scripts are great and show the right way of using wmi  but sometimes you can 
get more columns returned from wmi, like when you have more NICs in the machine 
one of the NIC can say connection refused and wmi still returns the value you 
are looking for. for some people it might be better to cut the last column of 
the return value instead of cutting n-th column from beginning.

Here is an example how to do this change. I commented the original lines.
----------------------------------------------------------------------
if [ "$ERROR" != "ERROR" ]
then

#      RESULT=`echo $RAW | cut -d \  -f 4`
#      RESULT=`echo $RESULT | cut -d \|  -f 2`
#      echo -n $RESULT | awk '{print "OK|cpuPercentProcessorTime=" $1}'

        RESULT=`echo $RAW |  awk '{print $(NF)}'`
        RESULT=`echo $RESULT | cut -d \|  -f 2`
        echo -n $RESULT | awk '{print "OK|cpuPercentProcessorTime=" $1}'

else
        echo -n $RAW | awk '{print $RAW}'

fi
----------------------------------------------------------------------


WMI might return 100 percent of CPU load from some machines. This can be fixed 
by applying this patch
http://support.microsoft.com/default.aspx?scid=kb;en-us;888086
or installing the latest SP.

Michal




-------------------- m2f --------------------

Read this topic online here:
http://community.zenoss.com/forums/viewtopic.php?p=13205#13205

-------------------- m2f --------------------



_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to