View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 11 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Fri Dec 29, 2006 5:43 pm 
Offline
Joined: Sun Jan 23, 2005 8:12 pm
Posts: 15
I added to crontab:
root@mythtv:/etc/cron.hourly# crontab -l
*/5 * * * * /usr/local/bin/run_rrd

The only problem I'm seeing is that the networking stats don't get updated.
I can run /usr/local/bin/rrd_traffic and get:

root@mythtv:/etc/cron.hourly# /usr/local/bin/rrd_traffic.pl
eth0 traffic in, out: 163058, 540323

After I run it manually, it shows the one snap shot on the Monitor page with mythweb.
Even if I put that script in to crontab or cron.hourly, it never seems to update.

Any ideas?

Thanks!

TiM


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 02, 2007 2:14 am 
Offline
Joined: Mon Feb 13, 2006 7:10 pm
Posts: 36
Location: Australia
Same here. Working on it at the moment - will let you know what I find.

_________________
LinHES 7.1, Gigabyte GA-K8NXP-SLI m/b, Athlon 64 X2 4200+, 3Gb RAM, 80GB PATA (/ & /myth), 2TB SATA (/myth/tv), Gigabyte 8600GT component-out, 2x Dvico HDTV DVB-T Lite, 1x Hauppage HVR-2200 PCIe Dual, Harmony remote with Dvico IR receiver.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 8:19 am 
Offline
Joined: Mon May 02, 2005 2:45 am
Posts: 8
Edit /usr/local/bin/rrd_traffic.pl and add the path to the callson lines 38 &39 to ifconfig, grep and cut.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 7:10 pm 
Offline
Joined: Mon Feb 13, 2006 7:10 pm
Posts: 36
Location: Australia
gbutters you officially rock my world. I've been swearing at that script for 2 days and I never would have picked up that fix.

Nice work!

_________________
LinHES 7.1, Gigabyte GA-K8NXP-SLI m/b, Athlon 64 X2 4200+, 3Gb RAM, 80GB PATA (/ & /myth), 2TB SATA (/myth/tv), Gigabyte 8600GT component-out, 2x Dvico HDTV DVB-T Lite, 1x Hauppage HVR-2200 PCIe Dual, Harmony remote with Dvico IR receiver.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 7:11 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Good eye! BTW - I changed these to:
Code:
        my $in = `/sbin/ifconfig $_[0] | /bin/sed -n '/.*RX bytes:\\([0-9]*\\).*/s//\\1/p'`;
        my $out = `/sbin/ifconfig $_[0] | /bin/sed -n '/.*TX bytes:\\([0-9]*\\).*/s//\\1/p'`;

to reduce the number of commands in the pipeline.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 8:16 pm 
Offline
Site Admin
Joined: Fri Sep 19, 2003 6:37 pm
Posts: 2659
Location: Whittier, Ca
Updated.


Top
 Profile  
 
 Post subject: Trying to understand
PostPosted: Wed Jan 03, 2007 8:26 pm 
Offline
Joined: Tue Jun 21, 2005 6:09 pm
Posts: 57
Gbutters sorry I am not getting your post I don't have anything pointing to a path on line 38 and 39 :?:


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 8:36 pm 
Offline
Site Admin
Joined: Fri Sep 19, 2003 6:37 pm
Posts: 2659
Location: Whittier, Ca
Code:
vi /usr/local/bin/rrd_traffic.pl +34
Will put you where you want to be...


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 8:43 pm 
Offline
Joined: Tue Jun 21, 2005 6:09 pm
Posts: 57
Sorry I had no problem editing the file and found the lines just not sure what to do with them
my $in = `ifconfig $_[0] |grep bytes|cut -d":" -f2|cut -d" " -f1`;
my $out = `ifconfig $_[0] |grep bytes|cut -d":" -f3|cut -d" " -f1`;


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 03, 2007 10:48 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
See my example which uses full pathnames for all the executables used.

Since these are being run by cron any assumptions about what is in your environment (especially your PATH) will tend to get you in trouble. Folks have had similar problems in the past with program guide grabbers that make unwarranted assumptions about the HOME variable being set...


Top
 Profile  
 
 Post subject: Got it
PostPosted: Wed Jan 03, 2007 11:22 pm 
Offline
Joined: Tue Jun 21, 2005 6:09 pm
Posts: 57
Thanks tjc


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 19 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu