Simpler way, if you have access to the server:
Linux: /opt/TeamCity/bin/version.sh (change the path to installation directory, if needed)
Windows: \TeamCity\bin\version.bat (again - change the path if needed)
It will display something like:
Using CATALINA_BASE: /opt/TeamCity
Using CATALINA_HOME: /opt/TeamCity
Using CATALINA_TMPDIR: /opt/TeamCity/temp
Using JRE_HOME: /usr
Using CLASSPATH: /opt/TeamCity/bin/bootstrap.jar:/opt/TeamCity/bin/tomcat-juli.jar
Server version: Apache Tomcat/7.0.59
Server built: Jan 28 2015 15:51:10 UTC
Server number: 7.0.59.0
OS Name: Linux
OS Version: 2.6.32-573.22.1.el6.x86_64
Architecture: amd64
JVM Version: 1.8.0_191-b12
JVM Vendor: Oracle Corporation