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


The following commands retrieve the wmi sources from 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
cd /tmp/wmi-1.3.14/Samba/source

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