Multi CPU Utilization Graph

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
bballard
Posts: 35
Joined: Thu Jan 19, 2006 11:58 am

Post by bballard »

Can we hide the CPU graphs? And still be able to provide for the Multi CPU graph?
bballard
Posts: 35
Joined: Thu Jan 19, 2006 11:58 am

Post by bballard »

Nevermind. I wasn't thinking. I was just displaying the host in the tree, which was giving me too much. I just needed to create the tree and name one of the leaves as the server name. This way I can just add the graph I need.
bballard
Posts: 35
Joined: Thu Jan 19, 2006 11:58 am

Post by bballard »

I am trying to make a template for a 16 CPU multi graph. Somewhere it is going wrong. Has anyone made one? And could you post it?
bballard
Posts: 35
Joined: Thu Jan 19, 2006 11:58 am

Post by bballard »

Got it and I here are the graphs:
Attachments
16cpu.jpg
16cpu.jpg (83.87 KiB) Viewed 18553 times
cacti_graph_template_multi_cpu_utilization_on_16_processor_box.xml
(56.79 KiB) Downloaded 2065 times
Turtle77
Posts: 1
Joined: Sun Mar 11, 2007 7:45 am

Post by Turtle77 »

I am having the same problem that burrben posted. Here is the output of the 4 CPU usage graph in debug mode:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-108000 \
--end=-300 \
--title="Multi CPU Utilization on %server name%" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
CDEF:cdefa=a,b,+,c,+,d,+,4,/ \
AREA:cdefa#FFFFC0:"Mean CPU\:" \
GPRINT:cdefa:LAST:"Current\:%8.2lf %%" \
GPRINT:cdefa:MIN:"Min\:%8.2lf %%" \
GPRINT:cdefa:MAX:"Max\:%8.2lf %%\n" \
LINE1:#FFFFD8:"CPU0\:" \
GPRINT::LAST:" Current\:%8.2lf %%" \
GPRINT::MIN:"Min\:%8.2lf %%" \
GPRINT::MAX:"Max\:%8.2lf %%\n" \
LINE1:#980000:"CPU1\:" \
GPRINT::LAST:" Current\:%8.2lf %%" \
GPRINT::MIN:"Min\:%8.2lf %%" \
GPRINT::MAX:"Max\:%8.2lf %%\n" \
LINE1:#FFFFF0:"CPU2\:" \
GPRINT::AVERAGE:" Current\:%8.2lf %%" \
GPRINT::MIN:"Min\:%8.2lf %%" \
GPRINT::MAX:"Max\:%8.2lf %%\n" \
LINE1:#808080:"CPU3\:" \
GPRINT::AVERAGE:" Current\:%8.2lf %%" \
GPRINT::MIN:"Min\:%8.2lf %%" \
GPRINT::MAX:"Max\:%8.2lf %%\n"

RRDTool Says:

ERROR: invalid rpn expression in: a,b,+,c,+,d,+,4,/
Note that the line
--title="Multi CPU Utilization on %server name%" \
Displays the correct information. I have removed the server name for security reasons.

Why am I getting the error and not seeing any data graphed?

If I select the data sources and click save Cacti tells me that the graph was saved successfully, but when I go back into the graph settings the 4 data sources are blank.

What am I doing wrong?
ccoager
Posts: 11
Joined: Tue May 01, 2007 9:56 am

Post by ccoager »

I have the same problem:

Code: Select all

ERROR: invalid rpn expression in: a,b,+,2,/
Gentoo Linux AMD64 2.6.18-hardened
cacti-0.8.6j-r4
net-smp-5.4
apache-2.0.58-r2
php-5.2.1-r3


Any ideas?
dragonb
Posts: 1
Joined: Thu May 17, 2007 5:17 pm

Post by dragonb »

first of all, thanks a bunch for all the work in this forum.
Using the templates I got 2,4,8 working on my servers within an hour. I had the exact same problems others had, but they had been addressed, and I was able to fix it all.

Great work!

and, ccoager who posted last.
I had that same error when the cpu's aren't selected. I usually selected them just above where that logging is.
super-hornet
Cacti User
Posts: 175
Joined: Sun May 27, 2007 5:42 pm

Post by super-hornet »

Hi all

I tried the 2CPU, 4CPU and 8CPU on my workplace.

I can't get information for CPU (SNMP Processor Information?) for all the Redhat Enterprise Linux v4.

On system running openSUSE 10.2, it can get those CPU information and thus the script/graph works.

I do comparison of both OS and notice that openSUSE 10.2 uses net-snmp-5.4.rc3 whereas RHEL uses net-snmp-5.0.

I manage to find net-snmp-5.2 RPM for RHEL but it still cannot read the CPU information.

Is it that in order to use the MultiCPU script, the target system needed to have net-snmp-5.4? If yes, then I really have no choice but to compile net-snmp-5.4 in RHEL. If anyone has the RPM version for RHELv3 or v4, plz let me know. Oh... I need x86_64 type of binaries.

SH
karthick1978
Posts: 3
Joined: Wed Jun 13, 2007 6:49 am

CPU Average

Post by karthick1978 »

Hi,

Any one can plz help me out .... I'm facing problem in Multiple CPU (4) processor averaging. I'm getting graph,but the values are not proper .
This is debug
c:/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start=1181648993 \
--end=1181735393 \
--title="Multi CPU Utilization on Intranet_CPU_test" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
COMMENT:"From 2007/06/12 11\:49\:53 To 2007/06/13 11\:49\:53\c" \
COMMENT:" \n" \
--vertical-label="" \
--slope-mode \
DEF:a="C\:/cacti/rra/intranet_cpu_test_cpu_1174.rrd":cpu:AVERAGE \
DEF:b="C\:/cacti/rra/intranet_cpu_test_cpu_1175.rrd":cpu:AVERAGE \
DEF:c="C\:/cacti/rra/intranet_cpu_test_cpu_1176.rrd":cpu:AVERAGE \
DEF:d="C\:/cacti/rra/intranet_cpu_test_cpu_1177.rrd":cpu:AVERAGE \
CDEF:cdefa=a,b,+,c,+,d,+,4,/ \
AREA:cdefa#F9FD5F:"Mean CPU\:" \
GPRINT:cdefa:LAST:"Current\:%8.2lf %%" \
GPRINT:cdefa:MIN:"Min\:%8.2lf %%" \
GPRINT:cdefa:MAX:"Max\:%8.2lf %%\n" \
LINE1:a#0000FF:"CPU0\:" \
GPRINT:a:LAST:" Current\:%8.2lf %%" \
GPRINT:a:MIN:"Min\:%8.2lf %%" \
GPRINT:a:MAX:"Max\:%8.2lf %%\n" \
LINE1:b#00A348:"CPU1\:" \
GPRINT:b:LAST:" Current\:%8.2lf %%" \
GPRINT:b:MIN:"Min\:%8.2lf %%" \
GPRINT:b:MAX:"Max\:%8.2lf %%\n" \
LINE1:c#C4FD3D:"CPU2\:" \
GPRINT:c:AVERAGE:" Current\:%8.2lf %%" \
GPRINT:c:MIN:"Min\:%8.2lf %%" \
GPRINT:c:MAX:"Max\:%8.2lf %%\n" \
LINE1:d#FF0000:"CPU3\:" \
GPRINT:d:AVERAGE:" Current\:%8.2lf %%" \
GPRINT:d:MIN:"Min\:%8.2lf %%" \
GPRINT:d:MAX:"Max\:%8.2lf %%\n"
I don't know where it went wrong?..
Attachments
Attachment of graph
Attachment of graph
graph_image.png (28.7 KiB) Viewed 17418 times
tonzy0907
Posts: 19
Joined: Wed May 30, 2007 6:16 am

Error : xml parse error

Post by tonzy0907 »

Error : xml parse error

I got this error, upon importing xml files.. what will i do?? please help me..
tonzy0907
Posts: 19
Joined: Wed May 30, 2007 6:16 am

Post by tonzy0907 »

Please HELP WITH THIS ERROR.



RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Multi CPU Utilization on CHECK21 APPS. SVR. - 10.40.54.231 / 202.124.158.114" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
DEF:a="/usr/local/cacti/rra/check21_apps_svr_10_40_54_231_202_124_158_114_cpu0_1233.rrd":cpu0:AVERAGE \
DEF:b="/usr/local/cacti/rra/check21_apps_svr_10_40_54_231_202_124_158_114_cpu1_1234.rrd":cpu1:AVERAGE \
DEF:c="/usr/local/cacti/rra/check21_apps_svr_10_40_54_231_202_124_158_114_cpu2_1235.rrd":cpu2:AVERAGE \
DEF:d="/usr/local/cacti/rra/check21_apps_svr_10_40_54_231_202_124_158_114_cpu3_1236.rrd":cpu3:AVERAGE \
CDEF:cdefa=a,b,+,c,+,d,+,4,/ \
AREA:cdefa#F9FD5F:"Mean CPU\:" \
GPRINT:cdefa:LAST:"Current\:%8.2lf %%" \
GPRINT:cdefa:MIN:"Min\:%8.2lf %%" \
GPRINT:cdefa:MAX:"Max\:%8.2lf %%\n" \
LINE1:a#0000FF:"CPU0\:" \
GPRINT:a:LAST:" Current\:%8.2lf %%" \
GPRINT:a:MIN:"Min\:%8.2lf %%" \
GPRINT:a:MAX:"Max\:%8.2lf %%\n" \
LINE1:b#00A348:"CPU1\:" \
GPRINT:b:LAST:" Current\:%8.2lf %%" \
GPRINT:b:MIN:"Min\:%8.2lf %%" \
GPRINT:b:MAX:"Max\:%8.2lf %%\n" \
LINE1:b#C4FD3D:"CPU2\:" \
GPRINT:c:AVERAGE:" Current\:%8.2lf %%" \
GPRINT:b:MIN:" Min\:%8.2lf %%" \
GPRINT:b:MAX:"Max\:%8.2lf %%\n" \
LINE1:b#FF0000:"CPU3\:" \
GPRINT:d:AVERAGE:" Current\:%8.2lf %%" \
GPRINT:b:MIN:" Min\:%8.2lf %%" \
GPRINT:b:MAX:"Max\:%8.2lf %%\n"
RRDTool Says:

ERROR: opening '/usr/local/cacti/rra/check21_apps_svr_10_40_54_231_202_124_158_114_cpu0_1233.rrd': No such file or directory
tonzy0907
Posts: 19
Joined: Wed May 30, 2007 6:16 am

HELLO PEOPLE

Post by tonzy0907 »

Disregard my posts below, already fix the errors.. i have another problem , how can i set a threshold for the total cpu utilization using this multi cpu template? is it possible ?
MoreDakka
Posts: 44
Joined: Wed Jul 04, 2007 12:57 pm

Post by MoreDakka »

I hate to bring this back from the dead but I'm having math problems with this script. It's not calculating Mean CPU MIN and MAX properly (Current "seems" good). I'm running v2 of the script, here is the output:

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-108000 \
--end=-300 \
--title="Multi CPU Utilization on NALFILE1" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
DEF:a="/var/www/html/cacti/rra/nalfile1_cpu_314.rrd":cpu:AVERAGE \
DEF:b="/var/www/html/cacti/rra/nalfile1_cpu_315.rrd":cpu:AVERAGE \
DEF:c="/var/www/html/cacti/rra/nalfile1_cpu_316.rrd":cpu:AVERAGE \
DEF:d="/var/www/html/cacti/rra/nalfile1_cpu_317.rrd":cpu:AVERAGE \
CDEF:cdefa=a,b,c,d,+,+,+,4,/ \
AREA:cdefa#F9FD5F:"Mean CPU\:" \
GPRINT:cdefa:LAST:" Current\:%8.2lf %%" \
GPRINT:cdefa:MIN:"Min\:%8.2lf %%" \
GPRINT:cdefa:MAX:"Max\:%8.2lf %%\n" \
LINE1:a#0000FF:"CPU0\:" \
GPRINT:a:LAST:" Current\:%8.2lf %%" \
GPRINT:a:MIN:"Min\:%8.2lf %%" \
GPRINT:a:MAX:"Max\:%8.2lf %%\n" \
LINE1:b#00A348:"CPU1\:" \
GPRINT:b:LAST:" Current\:%8.2lf %%" \
GPRINT:b:MIN:"Min\:%8.2lf %%" \
GPRINT:b:MAX:"Max\:%8.2lf %%\n" \
LINE1:c#C4FD3D:"CPU2\:" \
GPRINT:c:LAST:" Current\:%8.2lf %%" \
GPRINT:c:MIN:"Min\:%8.2lf %%" \
GPRINT:c:MAX:"Max\:%8.2lf %%\n" \
LINE1:d#FF0000:"CPU3\:" \
GPRINT:d:LAST:" Current\:%8.2lf %%" \
GPRINT:d:MIN:"Min\:%8.2lf %%" \
GPRINT:d:MAX:"Max\:%8.2lf %%\n"

RRDTool Says:

OK

As you can see by the image (if you pull out good old calc) that the math for MAX and MIN does not match the Mean calculations.

Thanks for your time.
Attachments
badrrdmath.JPG
badrrdmath.JPG (29.83 KiB) Viewed 16907 times
MoreDakka
Posts: 44
Joined: Wed Jul 04, 2007 12:57 pm

Post by MoreDakka »

I'm hoping that the dev of this script can take a look at my post to help me out with this problem of the math not being correct.

Thanks.
User avatar
Cylindric
Cacti User
Posts: 54
Joined: Mon Jul 16, 2007 9:32 am

Post by Cylindric »

I seem to be getting the same problem as a previous poster. I have installed a clean Ubuntu 7.04 server, and used the apt package of Cacti for installation.

Everything looks great, I've added various servers and graphs (including processor) and all is ticking over nicely.

I've installed the cacti_graph_template_multi_cpu_utilization_on_4_processor_box_v2a.xml template, but whenever I'm managing the graph for a server, I cannot save the selections for Data Source [cpu0] to [cpu3].

I can select the datasources 1 to 3, but they are not saved, despite the message at the top of the page being "Save Successful."
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests