|
|
| Author |
Message |
atomicbits
Joined: 30 Jul 2008 Posts: 4
|
Posted: Wed Jul 30, 2008 1:56 pm Post subject: Solaris 10 cron problem |
|
|
I have Version 0.8.7b installed on Solaris 10. I can run poller.php from the cacti user and see the graphs generate, but poller.php will not run from cron. When I look in /var/cron/log, I do not see the cron run. I tried sending output to a file but it does not populate. Below is the cron and when run from the cacti user.
Anyone know what I am missing?
Thank you.
| Code: |
bash-3.00$ crontab -l
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/local/bin/php /var/apache2/htdocs/cacti/poller.php > /dev/null 2>&1
bash-3.00$ /usr/local/bin/php /var/apache2/htdocs/cacti/poller.php
PHP Warning: Module 'zlib' already loaded in Unknown on line 0
07/30/2008 02:45:40 PM - POLLER: Poller[0] WARNING: Cron is out of sync with the Poller Interval! The Poller Interval is '300' seconds, with a maximum of a '300' second Cron, but 2386 seconds have passed since the last poll!
PHP Warning: Module 'zlib' already loaded in Unknown on line 0
cat: cannot open /proc/meminfo
cat: cannot open /proc/meminfo
usage: ps [ -aAdeflcjLPyZ ] [ -o format ] [ -t termlist ]
[ -u userlist ] [ -U userlist ] [ -G grouplist ]
[ -p proclist ] [ -g pgrplist ] [ -s sidlist ] [ -z zonelist ]
'format' is one or more of:
user ruser group rgroup uid ruid gid rgid pid ppid pgid sid taskid ctid
pri opri pcpu pmem vsz rss osz nice class time etime stime zone zoneid
f s c lwp nlwp psr tty addr wchan fname comm args projid project pset
OK u:0.00 s:0.01 r:1.01
OK u:0.01 s:0.01 r:1.01
OK u:0.01 s:0.01 r:1.01
OK u:0.01 s:0.01 r:1.01
OK u:0.01 s:0.01 r:1.01
OK u:0.01 s:0.01 r:1.01
OK u:0.01 s:0.01 r:1.01
07/30/2008 02:45:43 PM - SYSTEM STATS: Time:2.3183 Method:cmd.php Processes:1 Threads:N/A Hosts:4 HostsPerProcess:4 DataSources:11 RRDsProcessed:8
OK u:0.01 s:0.01 r:2.02
|
|
|
| Back to top |
|
 |
lipos
Joined: 24 Jul 2008 Posts: 24
|
Posted: Wed Jul 30, 2008 2:26 pm Post subject: |
|
|
no comment
Last edited by lipos on Thu Jul 31, 2008 10:37 am; edited 1 time in total |
|
| Back to top |
|
 |
TheWitness Developer
Joined: 14 May 2002 Posts: 9671 Location: MI, USA
|
Posted: Wed Jul 30, 2008 9:58 pm Post subject: |
|
|
Well, first, get rid of the following:
| Quote: | | PHP Warning: Module 'zlib' already loaded in Unknown on line 0 |
Then, goto System Utilities->Technical Support and see if there is anything interesting there.
Then, run the following:
If it says "CGI" version, then change your cron to include:
Although, I suspect that won't have anything to do with it. Sounds more like a Cron issue to me. Environment maybe.
TheWitness |
|
| Back to top |
|
 |
atomicbits
Joined: 30 Jul 2008 Posts: 4
|
Posted: Wed Jul 30, 2008 11:55 pm Post subject: |
|
|
TheWitness, thank you for the reply. I am not sure how to correct the "PHP Warning: Module 'zlib' already loaded in Unknown on line 0"
php -v displays:
| Code: |
bash-3.00$ /usr/local/bin/php -v
PHP Warning: Module 'zlib' already loaded in Unknown on line 0
PHP 5.2.6 (cli) (built: Jun 11 2008 12:55:33)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies |
I reviewed System Utilities -> Technical Support and everything seems normal.
Do you know how I can determine why the cacti cron does not appear to run? I don't see anything for it in /var/cron/log , but see jobs for other users working. If a job fails does it still show up in the log?
Thanks. |
|
| Back to top |
|
 |
lipos
Joined: 24 Jul 2008 Posts: 24
|
Posted: Thu Jul 31, 2008 3:27 am Post subject: |
|
|
no comment
Last edited by lipos on Thu Jul 31, 2008 10:38 am; edited 1 time in total |
|
| Back to top |
|
 |
lipos
Joined: 24 Jul 2008 Posts: 24
|
Posted: Thu Jul 31, 2008 3:54 am Post subject: |
|
|
no comment
Last edited by lipos on Thu Jul 31, 2008 10:38 am; edited 1 time in total |
|
| Back to top |
|
 |
lipos
Joined: 24 Jul 2008 Posts: 24
|
Posted: Thu Jul 31, 2008 4:07 am Post subject: |
|
|
crontab -e
and put
| Code: |
*/5 * * * * php -q /var/www/html/cacti/poller.php --force --debug >> /var/local/log/poller.log 2>&1
|
Check the cron command that I gave you above. It's should show some more logs that your command doesn't. Let me know.
Last edited by lipos on Thu Jul 31, 2008 10:39 am; edited 1 time in total |
|
| Back to top |
|
 |
atomicbits
Joined: 30 Jul 2008 Posts: 4
|
Posted: Thu Jul 31, 2008 8:49 am Post subject: |
|
|
lipos, thanks for hijacking the thread! What you posted has nothing to do with the issue I am having.
Can anyone help? I can run poller.php from the user account, get a zlib error but the graphs generate. When set the cron in my previous post, it does not appear to run since I do not see it in /var/cron/log. I verified the cron is set with correct permissions. When I send the output to a file nothing is added to the file.
Does anyone know common ways to troubleshoot if cron does not run? I set it the same way as other users are set and their jobs are running and showing in /var/cron/log. |
|
| Back to top |
|
 |
lipos
Joined: 24 Jul 2008 Posts: 24
|
Posted: Thu Jul 31, 2008 10:34 am Post subject: |
|
|
I was able to run poller.php for my user account, I was even forcing cron as well plus others cron job was working fine.. but if you don't need my help I'm out!
The only thing I will add is - chceck if cron is up and runing mr nice guy.. |
|
| Back to top |
|
 |
atomicbits
Joined: 30 Jul 2008 Posts: 4
|
Posted: Thu Jul 31, 2008 11:13 am Post subject: |
|
|
| lipos, I am sorry about being an idiot earlier, I did not understand how adding what you stated would allow cron to run. I changed as you advised to include -q and --force --debug and it now works. Can you explain why -q or --force --debug made this run? |
|
| Back to top |
|
 |
|