Multi CPU Utilization Graph

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

Moderators: Developers, Moderators

Post Reply
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Post by argon0 »

First thing we need to know is the version of Cacti you are using.

It looks like a cdef problem...

The way CDEFs work changed (temporarily) with version .87c (IIRC).
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
Roman777
Posts: 6
Joined: Thu Sep 10, 2009 3:10 am

Post by Roman777 »

argon0 wrote:First thing we need to know is the version of Cacti you are using.

It looks like a cdef problem...

The way CDEFs work changed (temporarily) with version .87c (IIRC).
i have cacti 0.8.7b (today i install from my debian 2.6.26-2-amd64 - aptitude install cacti)

i see on CDEF options values - Custom String: a,b,+,c,+,d,+,e,+,f,+,g,+,h,+,8,/ - i can change, but i dont know new value, im trying find on google, but i speak english bad and its hard for me. I hope, if here somebody can me help too.
Roman777
Posts: 6
Joined: Thu Sep 10, 2009 3:10 am

Post by Roman777 »

now i know what is CDEF - math function - but i dont know what i must use - can you help me pls?

thx
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Post by argon0 »

Hmmm, it may have been .87b it changed with...

I can't remember exactly what changed so can't tell you what to put in...
a,b,+,c,+,d,+,e,+,f,+,g,+,h,+,8,/
Is the correct cdef, and works with newer versions of Cacti (am using it still myself, despite having moved to using WMI for most things).

I wrote a brief tutorial a bit further up the thread - check that out first, if you have any specific questions I will try to answer them.
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
Roman777
Posts: 6
Joined: Thu Sep 10, 2009 3:10 am

Post by Roman777 »

ok, i find one function script - can you see on it and tell me better script who can show me all 8 cores? - this script show me all cores in one :-(

(i mean if you can look to code and tell me what script is better for me - i dont understand this code :-( )

Thx
Attachments
cacti_graph_template_ucdnet_-_cpu_usage_8_way.xml
(25.18 KiB) Downloaded 1490 times
graph_image.php.png
graph_image.php.png (25.69 KiB) Viewed 20207 times
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Post by argon0 »

See: http://forums.cacti.net/viewtopic.php?t ... c&start=15

That has my first shot at an 8cpu report. It has probably been superseded since then, but should still work.

If that doesn't work there should be several others in this thread..

BTW, please remember that to get any of "my" graphs to work you need to first graph each of the CPUs you want to include separately.

Good Luck
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
Roman777
Posts: 6
Joined: Thu Sep 10, 2009 3:10 am

Post by Roman777 »

im trying export from 1 pc to second pc - but import is different and i dont know why - first computer have function graph (funkcni.jpg) and import second computer have nonfunction

all have "ucd/net - CPU Usage"

im trying delete graph and import from this forum - i have wrong too :-(
Attachments
funkcni.jpg
funkcni.jpg (259.61 KiB) Viewed 20171 times
nonfunction.jpg
nonfunction.jpg (97.46 KiB) Viewed 20171 times
User avatar
bmote
Cacti User
Posts: 50
Joined: Thu Jul 15, 2010 1:12 pm
Location: Cincinnati, OH
Contact:

Post by bmote »

Does anyone have a good summary aka how-to regarding this topic? I don't want a link to documentation. Documentation requires comprehension ;) I just want to implement and administer.

I want to be able to add an AVERAGE CPU graph without a bunch of manual edits regardless of whether I have 2 or 20 CPUs.
Bill Mote
blog: http://ThingsThatMakeMeMadAndHowToFixThem.blogspot.com
mlam
Posts: 1
Joined: Fri Sep 24, 2010 8:21 am

Post by mlam »

I've imported the 4 cpu template. After selected all the cpu under the 'Data Query' section and click on 'Create' I get the follow error

ERROR: no Data Source associated. Check Template
wcpon
Posts: 16
Joined: Thu Dec 22, 2011 11:32 pm

Re: Multi CPU Utilization Graph

Post by wcpon »

Hi guys..
I have downloaded cacti_graph_template_multi_cpu_utilization_on_8_processor_box.xml
and follow the guide to apply the template.
But I'm getting the error below, can somebody help?
I still not able to display my 8 processor in this graph...
RRDTool Command:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Multi CPU Utilization on 10.10.10.13 WEB3" \
--base=1000 \
--height=120 \
--width=500 \
--upper-limit=100 \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
--font TITLE:10: \
--font AXIS:8: \
--font LEGEND:8: \
--font UNIT:8: \
DEF:a="/var/www/html/rra/10_10_10_13_web3_cpu_138.rrd":cpu:AVERAGE \
DEF:b="/var/www/html/rra/10_10_10_13_web3_cpu0_356.rrd":cpu0:AVERAGE \
DEF:c="/var/www/html/rra/10_10_10_13_web3_cpu_139.rrd":cpu:AVERAGE \
DEF:d="/var/www/html/rra/10_10_10_13_web3_cpu1_357.rrd":cpu1:AVERAGE \
DEF:e="/var/www/html/rra/10_10_10_13_web3_cpu_140.rrd":cpu:AVERAGE \
DEF:f="/var/www/html/rra/10_10_10_13_web3_cpu2_358.rrd":cpu2:AVERAGE \
DEF:g="/var/www/html/rra/10_10_10_13_web3_cpu_141.rrd":cpu:AVERAGE \
DEF:h="/var/www/html/rra/10_10_10_13_web3_cpu_142.rrd":cpu:AVERAGE \
DEF:i="/var/www/html/rra/10_10_10_13_web3_cpu_143.rrd":cpu:AVERAGE \
DEF:j="/var/www/html/rra/10_10_10_13_web3_cpu_144.rrd":cpu:AVERAGE \
DEF:ba="/var/www/html/rra/10_10_10_13_web3_cpu_145.rrd":cpu:AVERAGE \
CDEF:cdefa=a,4,/ \
AREA:cdefa#F9FD5FFF:"Mean CPU\:" \
GPRINT:cdefa:LAST:"Current\:%8.2lf %%" \
GPRINT:cdefa:AVERAGE:"Mean\:%8.2lf %%" \
GPRINT:cdefa:MAX:"Max\:%8.2lf %%\n" \
LINE1:a#0000FFFF:"CPU0\:" \
GPRINT:b:LAST:" Current\:%8.2lf %%" \
GPRINT:a:AVERAGE:"Mean\:%8.2lf %%" \
GPRINT:b:MAX:"Max\:%8.2lf %%\n" \
LINE1:c#00A348FF:"CPU1\:" \
GPRINT:d:LAST:" Current\:%8.2lf %%" \
GPRINT:c:AVERAGE:"Mean\:%8.2lf %%" \
GPRINT:d:MAX:"Max\:%8.2lf %%\n" \
LINE1:e#C4FD3DFF:"CPU2\:" \
GPRINT:e:LAST:" Current\:%8.2lf %%" \
GPRINT:e:AVERAGE:"Mean\:%8.2lf %%" \
GPRINT:f:MAX:"Max\:%8.2lf %%\n" \
LINE1:g#FF0000FF:"CPU3\:" \
GPRINT:g:LAST:" Current\:%8.2lf %%" \
GPRINT:g:AVERAGE:"Mean\:%8.2lf %%" \
GPRINT:g:MAX:"Max\:%8.2lf %%\n" \
LINE1:h#000000FF:"CPU4\:" \
GPRINT:h:LAST:" Current\:%8.2lf %%" \
GPRINT:h:AVERAGE:"Mean\:%8.2lf %%" \
GPRINT:h:MAX:"Max\:%8.2lf %%\n" \
LINE1:i#00BED9FF:"CPU5\:" \
GPRINT:i:LAST:" Current\:%8.2lf %%" \
GPRINT:i:AVERAGE:"Mean\:%8.2lf %%" \
GPRINT:i:MAX:"Max\:%8.2lf %%\n" \
LINE1:j#FF00FFFF:"CPU6\:" \
GPRINT:j:LAST:" Current\:%8.2lf %%" \
GPRINT:j:AVERAGE:"Mean\:%8.2lf %%" \
GPRINT:j:MAX:"Max\:%8.2lf %%\n" \
LINE1:ba#AAABA1FF:"CPU7\:" \
GPRINT:ba:LAST:" Current\:%8.2lf %%" \
GPRINT:ba:AVERAGE:"Mean\:%8.2lf %%" \
GPRINT:ba:MAX:"Max\:%8.2lf %%"
RRDTool Says:
ERROR: opening '/var/www/html/rra/10_10_10_13_web3_cpu0_356.rrd': No such file or directory
Kindly please advice.
JJX
Cacti User
Posts: 402
Joined: Thu Oct 06, 2005 5:03 am

Re: Multi CPU Utilization Graph

Post by JJX »

What if "SNMP - Get Processor Information" isn't in the list of Associated data Queries?
Changing Host Template doesnt help

The cacti version is 0.8.7g

-- edit --
I have found an older version, I have export the data template and then import .
Seems to work up to this point

So far so good :)
Last edited by JJX on Wed Sep 05, 2012 8:44 am, edited 1 time in total.
cacti rulez!
nandozzi
Posts: 34
Joined: Sun Nov 25, 2012 6:44 am

Re: Multi CPU Utilization Graph

Post by nandozzi »

Hi all,
i have a problem with the multi cpu template.
I want to set a threshold based on the mean cpu.
I need that cacti alert me when the mean between two cpu goes over 51%.
I have tried using the CDEF "Average All data sources - 2 sources" and with a custom cdef (a,b,+,2/) on a single data source (cause it doesn't exist a data source called Mean Cpu), but with no result.
For example on the first cpu i have passed the 70% and on the second cpu it arrived at 40%, the mean it's 55 but no email was sent.
There's a way to create a third data source based on the mean of the 2 cpu and set the threshold on it ?
Thanks in advance for your reply.
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Re: Multi CPU Utilization Graph

Post by argon0 »

I haven't ever come across this, but will look into somepoint soon.
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
argon0
Cacti User
Posts: 460
Joined: Fri Mar 12, 2004 1:22 pm

Re: Multi CPU Utilization Graph

Post by argon0 »

nandozzi wrote:Hi all,
i have a problem with the multi cpu template.
I want to set a threshold based on the mean cpu.
I need that cacti alert me when the mean between two cpu goes over 51%.
I have tried using the CDEF "Average All data sources - 2 sources" and with a custom cdef (a,b,+,2/) on a single data source (cause it doesn't exist a data source called Mean Cpu), but with no result.
For example on the first cpu i have passed the 70% and on the second cpu it arrived at 40%, the mean it's 55 but no email was sent.
There's a way to create a third data source based on the mean of the 2 cpu and set the threshold on it ?
Thanks in advance for your reply.
No, don't think you can do this. Would have to do the calculation prior to presenting the data to Cacti (i.e. in the data source/script) then so the threshold/alerting on that, I think.
No longer a n00by, probably, by now an 0ldby

Now Head of Technology at RSCH, back to the prickly subject of Monitorring....
ThompsonE
Posts: 4
Joined: Mon Mar 18, 2013 12:47 pm

Re: Multi CPU Utilization Graph

Post by ThompsonE »

Anyone ever do this for 24 cores?
2 processors 12 cores each I have snmp data for 24 processors.
Template to share?

:)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests