Solaris 10 cron problem

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

Moderators: Developers, Moderators

Post Reply
atomicbits
Posts: 5
Joined: Wed Jul 30, 2008 1:14 pm

Solaris 10 cron problem

Post by atomicbits »

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: Select all

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
lipos
Posts: 31
Joined: Thu Jul 24, 2008 3:47 am

Post by lipos »

no comment
Last edited by lipos on Thu Jul 31, 2008 10:37 am, edited 1 time in total.
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Well, first, get rid of the following:
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:

Code: Select all

php -v
If it says "CGI" version, then change your cron to include:

Code: Select all

php -q ...
Although, I suspect that won't have anything to do with it. Sounds more like a Cron issue to me. Environment maybe.

TheWitness
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
atomicbits
Posts: 5
Joined: Wed Jul 30, 2008 1:14 pm

Post by atomicbits »

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: Select all

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.
lipos
Posts: 31
Joined: Thu Jul 24, 2008 3:47 am

Post by lipos »

no comment
Last edited by lipos on Thu Jul 31, 2008 10:38 am, edited 1 time in total.
lipos
Posts: 31
Joined: Thu Jul 24, 2008 3:47 am

Post by lipos »

no comment
Last edited by lipos on Thu Jul 31, 2008 10:38 am, edited 1 time in total.
lipos
Posts: 31
Joined: Thu Jul 24, 2008 3:47 am

Post by lipos »

crontab -e

and put

Code: Select all


*/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.
atomicbits
Posts: 5
Joined: Wed Jul 30, 2008 1:14 pm

Post by atomicbits »

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.
lipos
Posts: 31
Joined: Thu Jul 24, 2008 3:47 am

Post by lipos »

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..
atomicbits
Posts: 5
Joined: Wed Jul 30, 2008 1:14 pm

Post by atomicbits »

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?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests