Errors while running poller.php from cron job

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

Post Reply
botella40
Posts: 3
Joined: Fri Jan 07, 2005 2:04 am

Errors while running poller.php from cron job

Post by botella40 »

Everytime cron calls poller.php I get an email with the following output:

Subject: Output from "cron" command

Your "cron" job on xnytostg01
/opt/cacti/poller_cron > /var/log/cacti.log

produced the following output:

cat: /proc/meminfo: No such file or directory
cat: /proc/meminfo: No such file or directory
usage: ps [ -aAdeflcjLPy ] [ -o format ] [ -t termlist ]
[ -u userlist ] [ -U userlist ] [ -G grouplist ]
[ -p proclist ] [ -g pgrplist ] [ -s sidlist ]
'format' is one or more of:
user ruser group rgroup uid ruid gid rgid pid ppid pgid sid taskid
pri opri pcpu pmem vsz rss osz nice class time etime stime
f s c lwp nlwp psr tty addr wchan fname comm args projid project


It seems like the application is trying to read some processes by reading meminfo and then tries to use "ps" too, but does not call it properly.
I am running cacti on a Sun UltraSparc 5. I get the graphs and everything seems to be working OK, but I keep getting these emails. I delete them and they keep coming back.

By the way, I am running poller.php from a script. This is how the cron job is configured:

0,5,10,15,20,25,30,35,40,45,50,55 * * * * /opt/cacti/poller_cron > /var/log/cacti.log

and this is poller_cron:

PATH=/opt/perl/bin:/usr/local/bin:/usr/bin:/usr/sbin:/usr/ccs/bin
PATH=$PATH:/opt/php/bin:/opt/mysql/bin:/opt/rrdtool/bin
PATH=$PATH:/opt/net-snmp/bin

LD_LIBRARY_PATH=/opt/libxml2/lib:/usr/lib:/etc/lib:/opt/zlib/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/sparcv9

MANPATH=/usr/man:/usr/local/man:/opt/rrdtool/man:/opt/net-snmp/man

PS1="`/usr/ucb/whoami`@"`hostname`"$ "
PS2="`/usr/ucb/whoami`@"`hostname`"> "

export PATH LD_LIBRARY_PATH MANPATH
export PS1 PS2

/opt/php/bin/php /opt/cacti/cacti-0.8.6b/poller.php


Any ideas on how to stop the emails? I would appreciate any help.
zanaguara
Cacti User
Posts: 60
Joined: Tue Nov 16, 2004 10:33 am
Location: Spain

Post by zanaguara »

I guess you are using the "Local Linux Machine" host template. This template has several associated graphs that don't work on Solaris:

* Linux - Memory Usage
* Unix - Processes

Just delete these graphs (I suppose they should be blank) and cron messages must desappear.

Regards,

zanaguara
botella40
Posts: 3
Joined: Fri Jan 07, 2005 2:04 am

Post by botella40 »

That did the trick!

Thanks! :)
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests