Multi CPU Utilization Graph

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

Moderators: Developers, Moderators

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

Post by Cylindric »

Aha! Have I found it? Perhaps.

I went into "Graph Templates" and edited the "Multi CPU Utilization on 4 Processor Box (v2)" graph. I clicked on each of the "Graph Item Inputs" and assigned them to one of the LINE1 items (items #5,9,13,17).

Then I was able to save the graph details
User avatar
Cylindric
Cacti User
Posts: 54
Joined: Mon Jul 16, 2007 9:32 am

Post by Cylindric »

Actually, not just for the LINE1 bits, but for all 4.

Data Source [cpu0]
Item #5: LINE1 (AVERAGE)
Item #6: GPRINT (LAST)
Item #7: GPRINT (MIN)
Item #8: GPRINT (MAX)

Data Source [cpu1]
Item #9: LINE1 (AVERAGE)
Item #10: GPRINT (LAST)
Item #11: GPRINT (MIN)
Item #12: GPRINT (MAX)

etc
MoreDakka
Posts: 44
Joined: Wed Jul 04, 2007 12:57 pm

Post by MoreDakka »

I'm still having the graph math problem.

(1+2+3)/3 !=2.5

I don't know where this graph is pulling some of the numbers that it has to generate some of the answers that it does. I like this graph and it would suck not to be able to use it because it's adding something to the numbers it polls.

Hopefully someone can help.

Thanks.
Eggibba
Posts: 1
Joined: Mon Aug 06, 2007 7:21 pm

Post by Eggibba »

MoreDakka,

I suspect your Mins and Maxs are happening at different times on each of the processors - thus the mean Max will be lower than the mean of the Maxs. That's probably clear as mud ....

In other words, the mean Max shown is the highest MEAN that has been attained - it's just that one or two of the processors took it high at a particular sample. At another sample, different processors might be higher, and the mean still be lower than the existing Max for the mean.

If that still doesn't make sense, try looking at the graphs for each individual processor, and notice that they don't all peak at the same sample. Then run the numbers for the avg at each sample that appears to be the largest.

MoreDakka wrote:I'm still having the graph math problem.

(1+2+3)/3 !=2.5

I don't know where this graph is pulling some of the numbers that it has to generate some of the answers that it does. I like this graph and it would suck not to be able to use it because it's adding something to the numbers it polls.

Hopefully someone can help.

Thanks.
mtsm
Posts: 12
Joined: Fri Oct 21, 2005 8:08 am

Post by mtsm »

hi people....i tried all those templates...dont work...i have the graphs but nothing is plotted...does it use an external script to collect the data? or snmp? i didnt get it
kernelphr34k
Posts: 46
Joined: Tue Jul 24, 2007 6:23 pm
Location: Oregon

Post by kernelphr34k »

Trying to graph 2 CPU's...

suse enterprise 10 linux(2.6.16 kernel)
cacti 0.8.6j + patches

net-snmp = 5.3.0.1-25.2
php5 = 5.1.2-29.5
rrdtool = 1.2.12-13.2

Getting error:

Code: Select all

RRDTool Command:

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Multi CPU Utilization on localhost (ddbc-netmon)" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
DEF:a="/srv/www/htdocs/cacti-0.8.6j/rra/localhost_ddbcnetmon_cpu_2096.rrd":cpu:AVERAGE \
CDEF:cdefa=a,b+,2,/ \
AREA:cdefa#FAFD9E:"Mean CPU"  \
GPRINT:cdefa:LAST:"Current\:%8.2lf %%"  \
GPRINT:cdefa:MIN:"Min\:%8.2lf %%"  \
GPRINT:cdefa:MAX:"Max\:%8.2lf %%\n"  \
GPRINT:a:LAST:"CPU0%8.2lf %%"  \
GPRINT:a:LAST:"Current\:%8.2lf %%"  \
GPRINT:a:MIN:"Min\:%8.2lf %%"  \
GPRINT:a:MAX:"Max\:%8.2lf %%\n"  \
GPRINT:a:LAST:"CPU1%8.2lf %%"  \
GPRINT:a:LAST:"Current\:%8.2lf %%"  \
GPRINT:a:MIN:"Min\:%8.2lf %%"  \
GPRINT:a:MAX:"Max\:%8.2lf %%\n" 

RRDTool Says:

ERROR: invalid rpn expression in: a,b+,2,/
Any pointers are appreciated! thanks!
cbrmig
Posts: 14
Joined: Mon Sep 24, 2007 5:02 am

Post by cbrmig »

argon0 wrote:..................

This opens up a new section: Supplemental Graph Template Data
Here you need to choose your data sources for the graph (these are the individual graphs you created earlier).

When i do this....in the field "Supplemental Graph Template Data", in front of "Data Source", there is nothing under that arrow...So i can't associate the fields...
cbrmig
Posts: 14
Joined: Mon Sep 24, 2007 5:02 am

Post by cbrmig »

AndyStewart wrote:screenshot of detail screen. Any time i select any of the cpu's from the popup list, then click save, it goes back to the summary screen, but then re-entering the detail screen, they've all reset back to "None" - no errors displayed anywhere...

Yep..with my cpu's it's the same..
I'm runing :
Cacti Version - 0.8.6i
Plugin Architecture - 1.0
Poller Type - Cactid v0.8.6i
Server Info - Linux 2.6.9-42.0.3.EL
Web Server - Apache/2.0.52 (CentOS)
PHP - 4.3.9
PHP Extensions - yp, xml, wddx, tokenizer, sysvshm, sysvsem, standard, sockets, shmop, session, pspell, posix, pcre, overload, mime_magic, iconv, gmp, gettext, ftp, exif, dio, dbx, dba, curl, ctype, calendar, bz2, bcmath, zlib, openssl, apache2handler, gd, mysql, snmp, eAccelerator
MySQL - 4.1.20
RRDTool - 1.2.15
SNMP - 5.1.2
Plugins
  • PHP Network Weathermap (weathermap - v0.93)
    Thresholds (thold - v0.3.0)
    Device Monitoring (monitor - v0.7)
    Network Discovery (discovery - v0.6)
    Network Tools (tools - v0.2)
    Syslog Monitoring (haloe - v0.4)
    mactrack
    RRD Cleaner (rrdclean - v1.1)
    Update Checker (update - v0.3)
    FlowView (flowview - v0.3)
    Host Info (hostinfo - v0.1)
    Error Images (errorimage - v0.1)
    Real-time statistics (zond - v0.3)

thkns.
User avatar
esplinter
Posts: 14
Joined: Wed Oct 31, 2007 7:12 pm

anyone using this template on cacti 0.8.7?

Post by esplinter »

Hi all

I can´t make this graph work on cacti 0.8.7.because I cant get individual graphs for each cpu.

I am using a host template that has a associated data query called "1) SNMP - Get Processor Information". when I add a device and asign that template to the host I get this:
Image

but when I go to "create graph for this host" i get:
Image

and when I run on debug mode I get:
Image

¿does anyone knows how to to solve this?? ¿any clue? ¿maybe I have to modify the config of the snmp server on the host?? I think that´s not the problem because looking the code at the script ss_host_cpu.php I think the OID is .1.3.6.1.2.1.25.3.3.1 and when I run this it seems ok

$ [root@gen30 scripts]# snmpwalk -v2c -cpublic localhost .1.3.6.1.2.1.25.3.3.1
HOST-RESOURCES-MIB::hrProcessorFrwID.768 = OID: SNMPv2-SMI::zeroDotZero
HOST-RESOURCES-MIB::hrProcessorFrwID.769 = OID: SNMPv2-SMI::zeroDotZero

can anyone confirm if this config is ok??
Image
Image

I also tried to change the graph tempate to ucd/net - cpu usage on the last capture and still fails. ¿any clue to solve this??

Im running cacti 0.8.7 on centos5 x86_64 and monitoring some centos5 and debian etch machines.
many thanks in advance for any help
Attachments
instantánea4.jpg
instantánea4.jpg (69.04 KiB) Viewed 21091 times
instantánea5.jpg
instantánea5.jpg (79.28 KiB) Viewed 21091 times
instantánea1.jpg
instantánea1.jpg (38.27 KiB) Viewed 21099 times
instantánea2.jpg
instantánea2.jpg (18.95 KiB) Viewed 21099 times
instantánea3.jpg
instantánea3.jpg (42.69 KiB) Viewed 21099 times
megatronx
Posts: 1
Joined: Sun Nov 25, 2007 10:55 am
Location: Manila
Contact:

Re: HELLO PEOPLE

Post by megatronx »

tonzy0907 wrote: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 ?

@tonzy0907
@all

How can you clear or solve rrdtool says: Error ???
I just installed cacti and I'm having a problem displaying any graph...
PLease help!!!

RRDTool Command:

/usr/local/bin/rrdtool graph - \
--imgformat=PNG \
--start=-3600 \
--end=-300 \
--title="Linux CACTI - Load Average" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bytes per second" \
--slope-mode \
DEF:a="/usr/local/cacti/rra/linux_cacti_ping_52.rrd":ping:AVERAGE \
AREA:a#00CF00:"Inbound" \
GPRINT:a:LAST:"Current\:%8.2lf %s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:a:MAX:"Maximum\:%8.2lf %s\n" \
LINE1:a#002A97:"Outbound" \
GPRINT:a:LAST:"Current\:%8.2lf %s" \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s" \
GPRINT:a:MAX:"Maximum\:%8.2lf %s"
RRDTool Says:

ERROR: opening '/usr/local/cacti/rra/linux_cacti_ping_52.rrd': No such file or directory
slech
Cacti User
Posts: 90
Joined: Tue Nov 06, 2007 7:51 am

Post by slech »

My cacti template on 2 4 8 cpu
Based on ferst tempalate in this teme.
Attachments
cacti_graph_template_host_mib_-_multi_cpu_utilization_on_2_processor_box.xml
(13.97 KiB) Downloaded 1862 times
cacti_graph_template_host_mib_-_multi_cpu_utilization_on_4_processor_box.xml
(19.02 KiB) Downloaded 2658 times
cacti_graph_template_host_mib_-_multi_cpu_utilization_on_8_processor_box.xml
(29.09 KiB) Downloaded 1966 times
[size=75]
[color=green]|Cacti 0.87|[/color][color=green]|PA 1.3|[/color][color=green]|Poller cmd.php|[/color][color=green]|IIS 6.0|[/color][color=green]|PHP Version 5.2.4|[/color][color=green]|MySQL 5.0.27|[/color][color=green]|RRDtool 1.2.15|[/color][/size]
[color=brown]|Thold 0.3.8 |[/color] [color=red]|Zond 0.34 |[/color]
[url=http://forums.cacti.net/viewtopic.php?t=15067][size=75]Complete List of Cacti Scripts and Templates[/size][/url]
[url=http://forums.cacti.net/viewtopic.php?t=14985][size=75]Currently Known Plugins[/size][/url]
Smux
Posts: 40
Joined: Mon Sep 10, 2007 2:47 pm

Post by Smux »

RDTool Command:

/usr/local/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Svr01 - 4 CPU Utilization" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
--font TITLE:10: \
--font AXIS:8: \
--font LEGEND:7.9: \
--font UNIT:8: \
DEF:a="/home/sigfbr/public_html/cacti/rra/svr01_cpu_122.rrd":cpu:AVERAGE \
CDEF:cdefa=a,b,+,c,+,d,+,4,/ \
AREA:cdefa#FAFD9EFF:"Mean CPU" \
GPRINT:cdefa:LAST:"Current\:%8.2lf %%" \
GPRINT:cdefa:MIN:"Min\:%8.2lf %%" \
GPRINT:cdefa:MAX:"Max\:%8.2lf %%\n" \
LINE1:a#0000FFFF:"CPU0" \
GPRINT:a:LAST:" Current\:%8.2lf %%" \
GPRINT:a:MIN:"Min\:%8.2lf %%" \
GPRINT:a:MAX:"Max\:%8.2lf %%\n" \
LINE1:a#00A348FF:"CPU1" \
GPRINT:a:LAST:" Current\:%8.2lf %%" \
GPRINT:a:MIN:"Min\:%8.2lf %%" \
GPRINT:a:MAX:"Max\:%8.2lf %%\n" \
LINE1:a#C4FD3DFF:"CPU2" \
GPRINT:a:LAST:" Current\:%8.2lf %%" \
GPRINT:a:MIN:"Min\:%8.2lf %%" \
GPRINT:a:MAX:"Max\:%8.2lf %%\n" \
LINE1:a#FF0000FF:"CPU3" \
GPRINT:a:LAST:" Current\:%8.2lf %%" \
GPRINT:a:MIN:"Min\:%8.2lf %%" \
GPRINT:a:MAX:"Max\:%8.2lf %%\n"

RRDTool Says:

ERROR: invalid rpn expression in: a,b,+,c,+,d,+,4,/
slech
Cacti User
Posts: 90
Joined: Tue Nov 06, 2007 7:51 am

Post by slech »

Yoy have this CDEF's ?

Image


At me it work perfectly

Image


I now export template witch dependency. Try its.
Attachments
multi.2.4.8.cpu.zip
(9.52 KiB) Downloaded 2881 times
[size=75]
[color=green]|Cacti 0.87|[/color][color=green]|PA 1.3|[/color][color=green]|Poller cmd.php|[/color][color=green]|IIS 6.0|[/color][color=green]|PHP Version 5.2.4|[/color][color=green]|MySQL 5.0.27|[/color][color=green]|RRDtool 1.2.15|[/color][/size]
[color=brown]|Thold 0.3.8 |[/color] [color=red]|Zond 0.34 |[/color]
[url=http://forums.cacti.net/viewtopic.php?t=15067][size=75]Complete List of Cacti Scripts and Templates[/size][/url]
[url=http://forums.cacti.net/viewtopic.php?t=14985][size=75]Currently Known Plugins[/size][/url]
User avatar
exploit-soget
Posts: 40
Joined: Tue Jan 23, 2007 5:31 am

Post by exploit-soget »

It works fine. Thanks a lot.
One question : have you the template for 16 box CPU ?

Bye
slech
Cacti User
Posts: 90
Joined: Tue Nov 06, 2007 7:51 am

Post by slech »

no :(
i don't have servir with 16 cpu box.
But bballard create 16 cpu template.
Try it
[size=75]
[color=green]|Cacti 0.87|[/color][color=green]|PA 1.3|[/color][color=green]|Poller cmd.php|[/color][color=green]|IIS 6.0|[/color][color=green]|PHP Version 5.2.4|[/color][color=green]|MySQL 5.0.27|[/color][color=green]|RRDtool 1.2.15|[/color][/size]
[color=brown]|Thold 0.3.8 |[/color] [color=red]|Zond 0.34 |[/color]
[url=http://forums.cacti.net/viewtopic.php?t=15067][size=75]Complete List of Cacti Scripts and Templates[/size][/url]
[url=http://forums.cacti.net/viewtopic.php?t=14985][size=75]Currently Known Plugins[/size][/url]
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest