Processor stats MIA in RRD
-
1.2.3-PRERELEASE-TESTING-VERSION
built on Sun Jan 25 02:46:17 EST 2009Auto update from 1.2.2
Processor stats not displayed under RRD. Others (eg quality, traffic) seem fine.
ryts
-
Works fine for me, just updated from 1.22
-
1.2.3-PRERELEASE-TESTING-VERSION
built on Sun Jan 25 02:46:17 EST 2009Auto update from 1.2.2
Processor stats not displayed under RRD. Others (eg quality, traffic) seem fine.
Same here…
Processor usage stats are there, but always 0.0 all other graphs are fine... man. update from 1.2.2 to 1.2.3-PRERELEASE-TESTING-VERSION
built on Sun Jan 25 14:48:18 EST 2009 -
Same here, must be something different in FreeBSD 7.1.
-
Yep, I was too fast to say that those works, it seems that I dont have those either.
-
Edit /etc/inc/pfsense-utils.inc and add a colon after CPU on this line:
$rrdupdatesh .= "else if ( $1 == "CPU" ) { ";
so it reads:
$rrdupdatesh .= "else if ( $1 == "CPU:" ) { ";save the file, and that should work. Haven't committed that yet.
-
Should I reboot too? I tried this and after 30minutes I still got nothing
-
@ CMB,
The edit did nothing on my setup, even with a reboot.
NOT TRUE >>>>The problem lies with the values top presents to the the script.<<<< because processes get picked up from top just fine…
ryts
PS The edit made the processes graph line disappear, tho' the values remain displayed below. Remove the ":" and the processes line graph comes back.
-
look in pfsense-utils.inc and find the cpu stats gathering function.
It needs to look like this code, which is actually from 2.0 but should work fine.
/* the CPU stats gathering function. */ $rrdupdatesh .= "`$top -d 2 -s 1 0 | $awk '{gsub(/%/, \"\")} BEGIN { \\\n"; $rrdupdatesh .= "printf \"$rrdtool update $rrddbpath$ifname$proc \" } \\\n"; $rrdupdatesh .= "{ if ( \$2 == \"processes:\" ) { processes = \$1; } \\\n"; $rrdupdatesh .= "else if ( \$1 == \"CPU:\" ) { user = \$2; nice = \$4; sys = \$6; interrupt = \$8; } \\\n"; $rrdupdatesh .= "} END { printf \"N:\"user\":\"nice\":\"sys\":\"interrupt\":\"processes }'`\n\n";
-
look in pfsense-utils.inc and find the cpu stats gathering function.
It needs to look like this code, which is actually from 2.0 but should work fine.
/* the CPU stats gathering function. */ $rrdupdatesh .= "`$top -d 2 -s 1 0 | $awk '{gsub(/%/, \"\")} BEGIN { \\\n"; $rrdupdatesh .= "printf \"$rrdtool update $rrddbpath$ifname$proc \" } \\\n"; $rrdupdatesh .= "{ if ( \$2 == \"processes:\" ) { processes = \$1; } \\\n"; $rrdupdatesh .= "else if ( \$1 == \"CPU:\" ) { user = \$2; nice = \$4; sys = \$6; interrupt = \$8; } \\\n"; $rrdupdatesh .= "} END { printf \"N:\"user\":\"nice\":\"sys\":\"interrupt\":\"processes }'`\n\n";
It does!
tnx - pretty graphs are a must, aren't they :D
ryts