check_cpu
Chris Stankaitis
chris.stankaitis at datawire.net
Tue Aug 9 21:41:45 CEST 2005
Hello I am trying to get Nemir's check_cpu python script running... I
had to tweak it a bit to get it to report the right CPU idle reading
under RHEL3, and Solaris, and it's working great with one exception...
when I try and run the program from cmd line it's saying it can't find
the python interperter.
[root at netops.dw plugins]# which python
/usr/bin/python
[root at netops.dw plugins]# head check_cpu.py
#!/usr/bin/python
import string, os, sys, re
##from optik import OptionParser
from optparse import OptionParser
#######################################
### Define a set of strings to handle
### any info output requirements.
[root at netops.dw plugins]# ll check_cpu.py
-rwxr-xr-x 1 root root 5566 Aug 9 19:35 check_cpu.py
[root at netops.dw plugins]# ./check_cpu.py -w 10 -c 5
: bad interpreter: No such file or directory
[root at netops.dw plugins]#
if I run it wrapped around python it works fine..
# python check_cpu.py -w 10 -c 5
OK: CPU is 57% idle
any thoughts on where I am going wrong?
--Chris
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list