How to determine the VMWare ESX Version from commandline Linux.

Simple!

1. Ensure you have dmidecode installed. if not install it, for CentOS (yum install dmidecode).
2. Type in commandline dmidecode and it will throw a list information about your hardware recorded in the BIOS for you. Since you want only the ESX Version, you can filter info by issuing “dmidecode -t bios” (without the quote)
bios
3. just look at “Address”
address
4. You can see from the pic above, I have Address: 0xEA050, compare it on the version mapping below

“0xE8480” = “ESX 2.5”
“0xE7C70” = “ESX 3.0”
“0xE7910” = “ESX 3.5”
“0xE7910” = “ESX 4”
“0xEA550” = “ESX 4U1”
“0xEA2E0” = “ESX 4.1”
“0xE72C0” = “ESXi 5”
“0xEA0C0” = “ESXi 5.1”
“0xEA050” = “ESXi 5.5”

5. so in my case I’m using ESXi 5.5!

That’s it!

Finding Apache httpd.conf file location

It’s been quite sometime since i’ve used apache, I’ve been enjoying nginx so far but had to switch back to apache for a project. just a quick tip for those who are working with Apache. Sometimes we are forced to work with a server that we are unfamiliar of interms of configuration/settings/installation and asked where to find the Apache configuration file is on a given server. so I usually do:

$ ps -ef | grep apache

which will give me the list of process like this

coolguy@mbpro:/$ ps -ef | grep apache

apache 14305 22691 11 21:22 ? 00:00:00 /usr/local/httpd-2.2.4/bin/httpd -k start
apache 14341 22691 0 21:22 ? 00:00:00 /usr/local/httpd-2.2.4/bin/httpd -k start
apache 14374 22691 1 21:22 ? 00:00:00 /usr/local/httpd-2.2.4/bin/httpd -k start

or in other linux flavor / installation path

root 4053 1 0 02:34 ? 00:00:04 /usr/sbin/apache2 -k start
www 6789 14053 0 12:00 ? 00:00:00 /usr/sbin/apache2 -k start
www 6790 14053 0 12:00 ? 00:00:00 /usr/sbin/apache2 -k start

...

after seeing the list you can have a clue now 🙂 Then simply run


$ /usr/local/httpd-2.2.4/bin/httpd -V
or
$ /usr/sbin/apache2 -V

and then you will get the details you need…

Server compiled with....
-D SERVER_CONFIG_FILE="/etc/apache2/apache2.conf"

There you go. Do you have another faster method? Please do let me know.