Code: Select all
#!/usr/bin/perl -w
# ----------------------------------------------------------
print "11";
exit;
__END__
But, in cacti.log, the result is bad:
Code: Select all
10/09/2008 02:05:03 PM - CMDPHP: Poller[0] Host[25] DS[46] WARNING: Result from CMD not valid. Partial Result:
10/09/2008 02:05:03 PM - CMDPHP: Poller[0] Host[25] DS[46] CMD: perl /usr/local/bin/temp.pl , output: U
# /usr/bin/perl /usr/local/bin/temp.pl
11#
ok, that's good, but, with www-data user: su -l www-data /usr/bin/perl /usr/local/bin/temp.pl
/usr/bin/perl: /usr/bin/perl: cannot execute binary file
Is this script used by www-data or not?
I am puzzled!
Have you any idea?
Remi.