ucd CPU usage failed after upgrade

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

Moderators: Developers, Moderators

Post Reply
sgtrock
Posts: 9
Joined: Fri Feb 08, 2008 5:21 pm

ucd CPU usage failed after upgrade

Post by sgtrock »

Gentoo Linux box. Did a standard Gentoo upgrade and I've got a lot of missing graphs. At the moment, I'm trying to get one of the standard ones working again.

Output from the top of the Tech Support page:

Code: Select all

Date  	Mon, 10 Mar 2008 17:29:28 -0500
Cacti Version 	0.8.7b
Cacti OS 	unix
SNMP Version 	net-snmp
RRDTool Version 	RRDTool 1.2.x
Hosts 	1
Graphs 	5
Data Sources 	Script/Command: 5
SNMP: 3
Total: 8

Output from Graph debug:

Code: Select all

 RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Localhost - CPU Usage" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="percent" \
--slope-mode \
--font TITLE:12: \
--font AXIS:8: \
--font LEGEND:10: \
--font UNIT:8: \
DEF:a="/var/www/localhost/htdocs/cacti/rra/localhost_cpu_system_42.rrd":cpu_system:AVERAGE \
DEF:b="/var/www/localhost/htdocs/cacti/rra/localhost_cpu_user_43.rrd":cpu_user:AVERAGE \
DEF:c="/var/www/localhost/htdocs/cacti/rra/localhost_cpu_nice_41.rrd":cpu_nice:AVERAGE \
CDEF:cdefbc=TIME,1205187723,GT,a,a,UN,0,a,IF,IF,TIME,1205187723,GT,b,b,UN,0,b,IF,IF,TIME,1205187723,GT,c,c,UN,0,c,IF,IF,+,+ \
AREA:a#FF0000FF:"System"  \
GPRINT:a:LAST:"Current\:%8.2lf %s"  \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:a:MAX:"Maximum\:%8.2lf %s\n"  \
AREA:b#0000FFFF:"User":STACK \
GPRINT:b:LAST:"  Current\:%8.2lf %s"  \
GPRINT:b:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:b:MAX:"Maximum\:%8.2lf %s\n"  \
AREA:c#00FF00FF:"Nice":STACK \
GPRINT:c:LAST:"  Current\:%8.2lf %s"  \
GPRINT:c:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:c:MAX:"Maximum\:%8.2lf %s\n"  \
LINE1:cdefbc#000000FF:"Total"  \
GPRINT:cdefbc:LAST:" Current\:%8.2lf %s"  \
GPRINT:cdefbc:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefbc:MAX:"Maximum\:%8.2lf %s" 

RRDTool Says:

ERROR: opening '/var/www/localhost/htdocs/cacti/rra/localhost_cpu_system_42.rrd': No such file or directory
Output from Data Source Debug:

Code: Select all

Data Source Debug

/usr/bin/rrdtool create \
/var/www/localhost/htdocs/cacti/rra/localhost_cpu_system_42.rrd \
--step 300  \
DS:cpu_system:COUNTER:600:0:100 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
Anyone have any ideas? Any further info that may help troubleshoot this?

TIA
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Linux q, moving.

I suggest you follow http://docs.cacti.net/node/283 for debugging further.
sgtrock
Posts: 9
Joined: Fri Feb 08, 2008 5:21 pm

Post by sgtrock »

Please move this back to the General help request. I don't think this is a Linux specific issue. If I did, I would have posted there instead.

Check out the graphs here:

http://llama.iphouse.net/cacti/graph_vi ... first=true

Username, password both 'guest'

You'll note that I don't have a NaN problem, I have a missing graph. None of the proposed techniques in the link you suggest seem to have anything to do with my problem. (I did go through the few that seemed to be related with no improvment.)

The graph is missing a data source, yet the debug output for the Data Source (shown above) seems to be fine. Does anyone know a way to narrow down what my problem might be?

BTW, I've tried just creating the required file using 'touch', which has resolved some issues for me in the past. No go this time.

TIA
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

The data source debug won't help, because it only tells us how the file "would be created". It does not actually "read from the file".
So, why is the file not created? To get an idea, indeed the link from above will help, because it instructs you to enter debug mode and find error entries. You will notice some SNMP requests for the OID related to the missing file. Please try running this snmp request from command line. If it fails, cacti will not create the related file and hence the graph will break
Reinhard
sgtrock
Posts: 9
Joined: Fri Feb 08, 2008 5:21 pm

Post by sgtrock »

Will do. Thanks.
hammerwalk
Posts: 24
Joined: Wed Mar 05, 2008 10:46 pm
Location: Fort Worth, TX

Post by hammerwalk »

I dont have an answer for you question, but I do have a question about your load graph.

I checked out the URL that you supplied, and I would like to know if you did anything in particular to get the load average to display the way it does on your localhost. I have a statistic page www.hammerwalk.org/Current_Load.pdf that displays similar to yours, which is how I would like it to be, but when I select the ucd/net Load Average in Cacti, it displays the load stacked and nothing like that at all.

Got any suggestions to get the load avg in Cacti to look the way yours did, or like my first image??
Attachments
incorrect_load_avg_graph.jpg
incorrect_load_avg_graph.jpg (450.99 KiB) Viewed 2894 times
correct_avg_load_graph.jpg
correct_avg_load_graph.jpg (367.06 KiB) Viewed 2894 times
sgtrock
Posts: 9
Joined: Fri Feb 08, 2008 5:21 pm

Post by sgtrock »

Actually, this turned out to be fairly easy. The graph template improperly defines the display for load average. (The idiot who thinks it should be tracked as stacked averages obviously has never managed a *nix box! Otherwise s/he would know it's far more important to see how they change over time.)

To fix it:
  • Log in as admin.
    Open Graph Templates -> ucd/net Load Average
    Change the first, third, and fifth tracked items from 'Average' or 'Stacked' to 'Line1'. Save each tracked item.
That's it. You now have a properly displayed Load Average graph.
hammerwalk
Posts: 24
Joined: Wed Mar 05, 2008 10:46 pm
Location: Fort Worth, TX

Post by hammerwalk »

How did you get rid of "Total" with out killing the graph. When I tried to tell total to represent None, the graph crashes. Any thoughts?
hammerwalk
Posts: 24
Joined: Wed Mar 05, 2008 10:46 pm
Location: Fort Worth, TX

Post by hammerwalk »

Nevermind, got it.
As ar as your problem, I was having something similar to it earlier with the load average. The DST change killed it. I saw another article about this and went into the php.ini and manually set America/Chicago as the time zone. After that I removed all the graphs for the load average and recreated it, and it fired right up.

Perhaps this could be the same problem for you....

Thanks for the tip to properly graph load average btw.

8)
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests