LinHES Forums http://forum.linhes.org/ |
|
R5E50 upgrade and rrd_traffic doesn't update to mythweb http://forum.linhes.org/viewtopic.php?f=6&t=13164 |
Page 1 of 1 |
Author: | timtech [ Fri Dec 29, 2006 5:43 pm ] |
Post subject: | R5E50 upgrade and rrd_traffic doesn't update to mythweb |
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 |
Author: | shade4 [ Tue Jan 02, 2007 2:14 am ] |
Post subject: | |
Same here. Working on it at the moment - will let you know what I find. |
Author: | gbutters [ Wed Jan 03, 2007 8:19 am ] |
Post subject: | |
Edit /usr/local/bin/rrd_traffic.pl and add the path to the callson lines 38 &39 to ifconfig, grep and cut. |
Author: | shade4 [ Wed Jan 03, 2007 7:10 pm ] |
Post subject: | |
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! |
Author: | tjc [ Wed Jan 03, 2007 7:11 pm ] |
Post subject: | |
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. |
Author: | cecil [ Wed Jan 03, 2007 8:16 pm ] |
Post subject: | |
Updated. |
Author: | connollyr12 [ Wed Jan 03, 2007 8:26 pm ] |
Post subject: | Trying to understand |
Gbutters sorry I am not getting your post I don't have anything pointing to a path on line 38 and 39 ![]() |
Author: | cecil [ Wed Jan 03, 2007 8:36 pm ] |
Post subject: | |
Code: vi /usr/local/bin/rrd_traffic.pl +34 Will put you where you want to be...
|
Author: | connollyr12 [ Wed Jan 03, 2007 8:43 pm ] |
Post subject: | |
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`; |
Author: | tjc [ Wed Jan 03, 2007 10:48 pm ] |
Post subject: | |
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... |
Author: | connollyr12 [ Wed Jan 03, 2007 11:22 pm ] |
Post subject: | Got it |
Thanks tjc |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |