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

2 thoughts on “HowTo compile wmic on Centos”

  1. Hello.
    I’m on Cent OS 6.4 x64, when I do make, I got an error and I can’t find any solutions on the net.

    Linking bin/static/libheimdal_roken_getprogname_h.a
    /usr/bin/ar: bin/static/libheimdal_roken_getprogname_h.a: No such file or directory
    make: *** [bin/static/libheimdal_roken_getprogname_h.a] Erreur 1

    If you have any ideas to solution that 😀

    1. Hi,
      Can you explain a bit more what you did ? That missing file comes together with the SVN export command.

      I just tested the above steps with CentOS 6.4 64bit and was not able to reproduce the error.

Leave a Reply