Hi Abel,

You should have to do what you did with your crontab.

I run Gentoo as my main development platform, so I'm positive vixie-cron works.

Try this:

JFFNMS=/opt/jffnms/engine
*/1 * * * * apache cd $JFFNMS && php -q consolidate.php >/dev/null 2>&1
*/30 * * * * apache cd $JFFNMS && php -q rrd_analizer.php >/dev/null 2>&1
*/30 * * * * apache cd $JFFNMS && php -q autodiscovery_interfaces.php > /dev/null 2>&1
02 4 * * * apache cd $JFFNMS && php -q tftp_get_host_config.php >/dev/null 2>&1
02 5 * * * apache cd $JFFNMS && php -q cleanup_raw_tables.php >/dev/null 2>&1
20 5 * * * apache cd $JFFNMS && sh tmpwatch.sh $JFFNMS >/dev/null 2>&1



And check the /var/log/cron.log

Javier

Abel Aberra wrote:
This my first post to the group. Being that I started reading up and working on JFFNMS about a week ago so a good old hello folks might be needed here. I read all the previous posts in regards to my problem and it seems my problem is a combination of a few issues.
Here is background information:
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> apache # uname -a
Linux BullDozer 2.6.7-gentoo #2 SMP Tue Jun 22 20:52:50 EST 2004 i686 Intel(R) Pentium(R) 4 CPU 1300MHz GenuineIntel GNU/Linux
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> apache # /usr/sbin/apache2 -v
Server version: Apache/2.0.49
Server built: Dec 27 2004 19:31:04


[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> apache # /usr/bin/php -v
PHP 4.3.6 (cli) (built: Dec 27 2004 22:23:28)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> apache # /usr/bin/rrdtool info
RRDtool 1.0.45 Copyright 1997-2001 by Tobias Oetiker <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
Usage: rrdtool [options] command command_options
* info - returns the configuration and status of the
rrdtool info filename.rrd
RRDtool is distributed under the Terms of the GNU General
Public License Version 2. (www.gnu.org/copyleft/gpl.html <http://www.gnu.org/copyleft/gpl.html>)
For more information read the RRD manpages
### Partial exceprt of cron entries */1 * * * * apache cd /opt/jffnms/engine && php -q poller_helper.php >.out 2>&1
*/1 * * * * apache cd /opt/jffnms/engine && php -q consolidate.php >.out 2>&1
*/5 * * * * apache cd /opt/jffnms/engine && php -q poller.php >.out 2>&1
I'm runing vixie-cron (For those of you who use Gentoo)
I had the statements below in crontab and noticed that my jobs were not running at all. Being that I don't have a mail mta running I was unable to receive the email from cron telling me exactly what was screwed up. But I noticed that no files would be created in $JFFNMS/rrd folder when I run the poller.php manually after su to apache. I see that the rrd files get created. This verified that the command itself was working properly and thus cron should have no problems with it. So after much troubleshooting I decided to write a bash script to run in cron that would basically run the commands above within bash (instead of 'sh' the default shell for cron). Here is the script and cron entry:


[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> apache # cat /opt/jffnms/engine/bash.poller
#!/bin/bash
su - apache
oPoller=/home/apache/bash.cron.poller
oPollerHelper=/home/apache/bash.cron.poller.helper
oConsolidate=/home/apache/bash.cron.consolidate
echo "Running again" `date`
cd /opt/jffnms/engine
/usr/bin/php -q consolidate.php >$oConsolidate 2>&1 &
/usr/bin/php -q poller.php >$oPoller 2>&1 &
/usr/bin/php -q poller_helper.php >$oPollerHelper 2>&1 &
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> apache # crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.25383 installed on Tue Dec 28 14:21:16 2004)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
#Min Hour Day Month WkDay User COMMAND TO RUN
* * * * * /opt/jffnms/engine/bash.poller >/dev/null 2>&1
At this point I have files that are being update every minute my graphs are being updated and all seems to be ok. Now what I'm trying to figure out is why I had to do this when it doesn't seem anyone else on the posts had to do this to get things to run correctly. Will this mean that I will need to script the actual commands like my example above for all the cron entries or is there something simple that I have overlooked?
PS: I had the JFFNMS=/opt/jffnms/engine entry and changed it to /opt/jffnms/engine/ notice the extra slash at the end and this didn't make a difference. Anyone out there that may have had to deal with this.....?
Thank you in advance to the team..
Abel

-- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Javier Szyszlican, Project Leader, JFFNMS [EMAIL PROTECTED]

I hope JFFNMS or I were helpful to you, if you
can, please donate at http://jffnms.org/donate



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/
_______________________________________________
jffnms-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jffnms-users

Reply via email to