HowTo compile wmic on Centos

In this posting you will be learning how to compile the wmic addon for Cacti to monitor Windows systems from a CentOS based Cacti system.

Addition Information

Proecdures

The following commands retrieve the wmi sources from zenoss.org and compiles them. The wmic binary is only a small part, but the compile process takes some time to complete due to it processing all required sources.

cd /tmp
svn export http://dev.zenoss.org/svn/tags/wmi-1.3.14/
cd /tmp/wmi-1.3.14/Samba/source
./autogen.sh
./configure
make

You may see an error like this, which you can safely ignore.:

make: *** No rule to make target `wmi/wmiq.o', needed by `bin/wmiq'.  Stop.

If you get any other error then you can try using this make command:

make "CPP=gcc -E -ffreestanding"

You will now have the wmic binary in /tmp/wmi-1.3.14/Samba/source/bin The wmic binary is the only file needed. You can safel delete the wmi directory after you stored the wmic binary to a safe place.

This compilation was tested on CentOS 6.2 32bit