Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Multi CPU Utilization Graph
Goto page Previous  1, 2, 3, 4 ... 10, 11, 12  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
argon0
Cacti User


Joined: 12 Mar 2004
Posts: 238

PostPosted: Thu Feb 02, 2006 11:52 am    Post subject: Reply with quote

Hmm, the XML doesn't seem to be easily Human parsable (I thought it might be).

I've attached a new export of the template, try this one.



cacti_graph_template_multi_cpu_utilization_on_8_processor_box_1.xml
 Description:

Download
 Filename:  cacti_graph_template_multi_cpu_utilization_on_8_processor_box_1.xml
 Filesize:  34.89 KB
 Downloaded:  790 Time(s)

Back to top
joshm
Cacti User


Joined: 03 Oct 2005
Posts: 62
Location: STL

PostPosted: Thu Feb 02, 2006 12:03 pm    Post subject: Reply with quote

Ok this one still prompts for the data input like the other one. But now it defaults to not selecting any of that processors where before it had the first 4 selected.(although they were not the right data sources)

Then I tried to select all the right data sources and it would not save what I had selected. So all the data sources show none.

RRDTool Command:

n:/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Multi CPU Utilization on AlphaSQL (SQL3)" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
--font TITLE:10:c:/winnt/fonts/timesbd.ttf \
--font AXIS:9:c:/winnt/fonts/arial.ttf \
--font LEGEND:11:c:/winnt/fonts/arial.ttf \
--font UNIT:9:c:/winnt/fonts/arial.ttf \
DEF:a="N\:/cacti/rra/alphasql_sql3_cpu0_744.rrd":cpu0:AVERAGE \
DEF:b="N\:/cacti/rra/alphasql_sql3_cpu1_745.rrd":cpu1:AVERAGE \
DEF:c="N\:/cacti/rra/alphasql_sql3_cpu2_746.rrd":cpu2:AVERAGE \
DEF:d="N\:/cacti/rra/alphasql_sql3_cpu3_747.rrd":cpu3:AVERAGE \
DEF:e="N\:/cacti/rra/alphasql_sql3_cpu_748.rrd":cpu:AVERAGE \
DEF:f="N\:/cacti/rra/alphasql_sql3_cpu_748.rrd":cpu:AVERAGE \
DEF:g="N\:/cacti/rra/alphasql_sql3_cpu_748.rrd":cpu:AVERAGE \
DEF:h="N\:/cacti/rra/alphasql_sql3_cpu_748.rrd":cpu:AVERAGE \
CDEF:cdefa=a,b,+,c,+,d,+,e,+,f,+,g,+,h,+,5,/ \
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" \
LINE1:h#000000:"CPU4\:" \
GPRINT:h:LAST:" Current\:%8.2lf %%" \
GPRINT:h:MIN:"Min\:%8.2lf %%" \
GPRINT:h:MAX:"Max\:%8.2lf %%\n" \
LINE1:h#00BED9:"CPU5\:" \
GPRINT:h:LAST:" Current\:%8.2lf %%" \
GPRINT:h:MIN:"Min\:%8.2lf %%" \
GPRINT:h:MAX:"Max\:%8.2lf %%\n" \
LINE1:h#FF00FF:"CPU6\:" \
GPRINT:h:LAST:" Current\:%8.2lf %%" \
GPRINT:h:MIN:"Min\:%8.2lf %%" \
GPRINT:h:MAX:"Max\:%8.2lf %%\n" \
LINE1:h#AAABA1:"CPU7\:" \
GPRINT:h:LAST:" Current\:%8.2lf %%" \
GPRINT:h:AVERAGE:"Min\:%8.2lf %%" \
GPRINT:h:MAX:"Max\:%8.2lf %%"

RRDTool Says:

ERROR: opening 'N:/cacti/rra/alphasql_sql3_cpu0_744.rrd': No such file or directory
Back to top
argon0
Cacti User


Joined: 12 Mar 2004
Posts: 238

PostPosted: Thu Feb 02, 2006 12:34 pm    Post subject: Reply with quote

Arse just noticed an error in the cded, it divides by 5 not 8!

I'm off for a couple of days, so will try and fix it on my return, however if you wait a bit and try selecting the data sources again, it should still work, the other graphs need to create the data sources before this graph cab use them.
Back to top
joshm
Cacti User


Joined: 03 Oct 2005
Posts: 62
Location: STL

PostPosted: Fri Feb 03, 2006 4:30 pm    Post subject: Reply with quote

argon0 wrote:
Arse just noticed an error in the cded, it divides by 5 not 8!

I'm off for a couple of days, so will try and fix it on my return, however if you wait a bit and try selecting the data sources again, it should still work, the other graphs need to create the data sources before this graph cab use them.


Cool I lookforward to the fix.
Thanks

Also just a suggestion to go along with the graph. It would be nice to see an Average of all the CPUs over all the data instead of just the current ongoing average. The min. CPU spec seems less important as what the Average of the use would be.

-Josh
Back to top
argon0
Cacti User


Joined: 12 Mar 2004
Posts: 238

PostPosted: Mon Feb 06, 2006 4:46 am    Post subject: Reply with quote

OK, try this version out... Again you will have to have the CPUs graphed already for this graph to work...

Argon0



cacti_graph_template_multi_cpu_utilization_on_8_processor_box.xml
 Description:
New Version - now displays MEAN CPU utilisation for the period rather than minimum, AND divides by 8 rather than 5 (whoops)...

Download
 Filename:  cacti_graph_template_multi_cpu_utilization_on_8_processor_box.xml
 Filesize:  34.9 KB
 Downloaded:  863 Time(s)

Back to top
joshm
Cacti User


Joined: 03 Oct 2005
Posts: 62
Location: STL

PostPosted: Mon Feb 06, 2006 8:52 am    Post subject: Reply with quote

Still no luck. This is still the only graph out of the 2proc & 4proc that prompts me for that additional index information. I selected the sources just like I did for the 2 & 4 graph but no luck. No graph is even created and all I see is the text blurb.

RRDTool Command:

n:/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Multi CPU Utilization on AlphaSQL (SQL3)" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
--font TITLE:10:c:/winnt/fonts/timesbd.ttf \
--font AXIS:9:c:/winnt/fonts/arial.ttf \
--font LEGEND:11:c:/winnt/fonts/arial.ttf \
--font UNIT:9:c:/winnt/fonts/arial.ttf \
DEF:a="N\:/cacti/rra/alphasql_sql3_cpu_705.rrd":cpu:AVERAGE \
DEF:b="N\:/cacti/rra/alphasql_sql3_cpu_706.rrd":cpu:AVERAGE \
DEF:c="N\:/cacti/rra/alphasql_sql3_cpu_707.rrd":cpu:AVERAGE \
DEF:d="N\:/cacti/rra/alphasql_sql3_cpu_708.rrd":cpu:AVERAGE \
DEF:e="N\:/cacti/rra/alphasql_sql3_cpu_709.rrd":cpu:AVERAGE \
DEF:f="N\:/cacti/rra/alphasql_sql3_cpu_710.rrd":cpu:AVERAGE \
DEF:g="N\:/cacti/rra/alphasql_sql3_cpu_711.rrd":cpu:AVERAGE \
DEF:h="N\:/cacti/rra/alphasql_sql3_cpu_712.rrd":cpu:AVERAGE \
CDEF:cdefa=a,b,+,c,+,d,+,e,+,f,+,g,+,h,+,8,/ \
AREA:cdefa#F9FD5F:"Mean CPU\:" \
GPRINT:cdefa:LAST:"Current\:%8.2lf %%" \
GPRINT:cdefa:AVERAGE:"Mean\:%8.2lf %%" \
GPRINT:cdefa:MAX:"Max\:%8.2lf %%\n" \
LINE1:a#0000FF:"CPU0\:" \
GPRINT::LAST:" Current\:%8.2lf %%" \
GPRINT:a:AVERAGE:" Mean\:%8.2lf %%" \
GPRINT::MAX:" Max\:%8.2lf %%\n" \
LINE1:b#00A348:"CPU1\:" \
GPRINT::LAST:" Current\:%8.2lf %%" \
GPRINT:b:AVERAGE:" Mean\:%8.2lf %%" \
GPRINT::MAX:" Max\:%8.2lf %%\n" \
LINE1:c#C4FD3D:"CPU2\:" \
GPRINT:c:LAST:" Current\:%8.2lf %%" \
GPRINT:c:AVERAGE:"Mean\:%8.2lf %%" \
GPRINT::MAX:"Max\:%8.2lf %%\n" \
LINE1:d#FF0000:"CPU3\:" \
GPRINT:d:LAST:" Current\:%8.2lf %%" \
GPRINT:d:AVERAGE:"Mean\:%8.2lf %%" \
GPRINT:d:MAX:"Max\:%8.2lf %%\n" \
LINE1:e#000000:"CPU4\:" \
GPRINT:e:LAST:" Current\:%8.2lf %%" \
GPRINT:e:AVERAGE:"Mean\:%8.2lf %%" \
GPRINT:e:MAX:"Max\:%8.2lf %%\n" \
LINE1:f#00BED9:"CPU5\:" \
GPRINT:f:LAST:" Current\:%8.2lf %%" \
GPRINT:f:AVERAGE:"Mean\:%8.2lf %%" \
GPRINT:f:MAX:"Max\:%8.2lf %%\n" \
LINE1:g#FF00FF:"CPU6\:" \
GPRINT:g:LAST:" Current\:%8.2lf %%" \
GPRINT:g:AVERAGE:"Mean\:%8.2lf %%" \
GPRINT:g:MAX:"Max\:%8.2lf %%\n" \
LINE1:h#AAABA1:"CPU7\:" \
GPRINT:h:LAST:" Current\:%8.2lf %%" \
GPRINT:h:AVERAGE:"Mean\:%8.2lf %%" \
GPRINT:h:MAX:"Max\:%8.2lf %%"

RRDTool Says:

ERROR: Could not parse line 'GPRINT::LAST: Current\:%8.2lf %%'
Back to top
joshm
Cacti User


Joined: 03 Oct 2005
Posts: 62
Location: STL

PostPosted: Mon Feb 06, 2006 8:59 am    Post subject: Reply with quote

Something I just noticed.. It appears that the 4 proc graph is using 1 data source twice

RRDTool Command:

n:/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Multi CPU Utilization on AlphaSQL (SQL3)" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
--font TITLE:10:c:/winnt/fonts/timesbd.ttf \
--font AXIS:9:c:/winnt/fonts/arial.ttf \
--font LEGEND:11:c:/winnt/fonts/arial.ttf \
--font UNIT:9:c:/winnt/fonts/arial.ttf \
DEF:a="N\:/cacti/rra/alphasql_sql3_cpu_709.rrd":cpu:AVERAGE \
DEF:b="N\:/cacti/rra/alphasql_sql3_cpu_709.rrd":cpu:AVERAGE \
DEF:c="N\:/cacti/rra/alphasql_sql3_cpu_711.rrd":cpu:AVERAGE \
DEF:d="N\:/cacti/rra/alphasql_sql3_cpu_710.rrd":cpu:AVERAGE \
DEF:e="N\:/cacti/rra/alphasql_sql3_cpu_712.rrd":cpu:AVERAGE \
CDEF:cdefa=a,b,+,c,+,d,+,4,/ \
AREA:cdefa#FAFD9E:"Mean CPU" \
GPRINT:cdefa:LAST:" Current\:%8.2lf %%" \
GPRINT:cdefa:MIN:"Min\:%8.2lf %%" \
GPRINT:cdefa:MAX:"Max\:%8.2lf %%\n" \
LINE1:b#0000FF:"CPU0" \
GPRINT:b:LAST:" Current\:%8.2lf %%" \
GPRINT:b:MIN:"Min\:%8.2lf %%" \
GPRINT:b:MAX:"Max\:%8.2lf %%\n" \
LINE1:c#00A348:"CPU1" \
GPRINT:c:LAST:" Current\:%8.2lf %%" \
GPRINT:c:MIN:"Min\:%8.2lf %%" \
GPRINT:c:MAX:"Max\:%8.2lf %%\n" \
LINE1:d#C4FD3D:"CPU2" \
GPRINT:d:AVERAGE:" Current\:%8.2lf %%" \
GPRINT:d:MIN:"Min\:%8.2lf %%" \
GPRINT:d:MAX:"Max\:%8.2lf %%\n" \
LINE1:e#FF0000:"CPU3" \
GPRINT:e:AVERAGE:" Current\:%8.2lf %%" \
GPRINT:e:MIN:"Min\:%8.2lf %%" \
GPRINT:e:MAX:"Max\:%8.2lf %%"

RRDTool Says:

OK
Back to top
argon0
Cacti User


Joined: 12 Mar 2004
Posts: 238

PostPosted: Mon Feb 06, 2006 9:18 am    Post subject: Reply with quote

This is where you're graph is going wrong initially:

Yours
Code:

LINE1:a#0000FF:"CPU0\:" \
GPRINT[b]::[/b]LAST:" Current\:%8.2lf %%" \
GPRINT:a:AVERAGE:" Mean\:%8.2lf %%" \
GPRINT::MAX:" Max\:%8.2lf %%\n" \


Mine
Code:
LINE1:a#0000FF:"CPU0\:"  \
GPRINT[b]:a:[/b]LAST:"    Current\:%8.2lf %%"  \
GPRINT:a:AVERAGE:"Mean\:%8.2lf %%"  \
GPRINT:a:MAX:"Max\:%8.2lf %%\n"  \


Hmm to get around this the best way may be for you to edit the template on your machine.

Goto:Console, Graph Templates

Choose the "Multi CPU Utilization on 8 Processor Box" template.

the items which seem to be in error are: Items, 6,8,10,12 & 16.

If you just click on these items you will see something like this:


Make sure that each of these items say something like in this screen shot.. (The screen shot is for item 6), Item 8 should be similar with Consolidation function set to Max, Item 10 Consolidation set to Last, etc...

As to the extra data source in the 4 CPU template - that was before I realised you didn't need to do it twice I should change THAT template now...



sshot2.png
 Description:
 Filesize:  143.77 KB
 Viewed:  9597 Time(s)

sshot2.png


Back to top
argon0
Cacti User


Joined: 12 Mar 2004
Posts: 238

PostPosted: Mon Feb 06, 2006 9:24 am    Post subject: Reply with quote

THis should be better for 4 cpu, I've given it a different name, in case it breaks your graphs then you can revert to the former template.

THe earlier graph should have given you some dodgy average data...



cacti_graph_template_multi_cpu_on_4_processor_box_fixed.xml
 Description:

Download
 Filename:  cacti_graph_template_multi_cpu_on_4_processor_box_fixed.xml
 Filesize:  23.35 KB
 Downloaded:  909 Time(s)

Back to top
joshm
Cacti User


Joined: 03 Oct 2005
Posts: 62
Location: STL

PostPosted: Tue Feb 07, 2006 8:56 am    Post subject: Reply with quote

Well No luck with either graph.... .grrrrrrrrrrrr

The fixed 4 CPU graph doesn't seem to want to attatch to the individual CPU graphs. I click save, and go back into the graph and again nothing but 'none' is selected.

The 8cpu graph appeared OK setting wise but just won't work for me.

Are you exporting these from the latest Cacti Version? Although It doesn't make since that your 2 & 4cpu exports worked fine, but that your 8 & newest 4 are not......

Has anyone else out there tried these graphs?
-Josh
Back to top
argon0
Cacti User


Joined: 12 Mar 2004
Posts: 238

PostPosted: Tue Feb 07, 2006 9:16 am    Post subject: Reply with quote

One more thing to try... Delete the host and start again.. Or do it with another host...

I AM doing the export from .0.8.6h

Argon0
Back to top
joshm
Cacti User


Joined: 03 Oct 2005
Posts: 62
Location: STL

PostPosted: Tue Feb 07, 2006 9:52 am    Post subject: Reply with quote

No Luck

I then looked under graph templates and noticed that the data sources links showed nothing checked....

So I copied off the working 4cpu graph and it started working. But it appears to still attempt to divide with 5 instead of 4.

-josh

also the data sources had 2 cpu1 instead of a cpu2. But the other 4cpu graph was setup the same.
Back to top
argon0
Cacti User


Joined: 12 Mar 2004
Posts: 238

PostPosted: Tue Feb 07, 2006 9:58 am    Post subject: Reply with quote

Ah... AND I am running the whole thing on Linux...
Back to top
argon0
Cacti User


Joined: 12 Mar 2004
Posts: 238

PostPosted: Tue Feb 07, 2006 10:04 am    Post subject: Reply with quote

The Average utilisation does not need a data source associated with it, if you DO associate a source it will LOOK as if it is working but will add an extra data source to the graph - thus it will give the wrong result for the average...

That took a bit of fiddling around to work out...

BTW I've now started using the Nagios Plugin to graph windows stuff, I'm testing it out on my desktop PC at the moment. 1st Graph is System Uptime - so I can set a threshold and get a reminder to reboot a PC every x no. of days...

If you are interested I'll post the templates I come up with here, BUT you do need to be running the Linux version of Cacti (I use CactiEZ distro from cactiusers.org). I'm thinking of writing a bit of a walkthrough as it is *slightly* complicated to get it to work (especially if you DON't realise that the check_nt plugin for linux is included with the Nsclient software!).

Argon0
Back to top
joshm
Cacti User


Joined: 03 Oct 2005
Posts: 62
Location: STL

PostPosted: Tue Feb 07, 2006 10:12 am    Post subject: Reply with quote

Taking the steps I noticed with the 4cpu graph of not having data source boxes checked I did the same with the 8cpu.. I found some random boxes under a specific item# boxes not checked so I checked those.. At a glance it appears ok now, but the text is looking messing at the bottom of the graph.. Going to try poking at it a bit more.

As of now I run cacti on windows, and where I have the cacti box hosted currently I have no system I could load linux up on. Maybe eventually I may switch things around with a spare PC here to load up cacti on a NIX box but for now that is not possible.

-Josh
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Goto page Previous  1, 2, 3, 4 ... 10, 11, 12  Next
Page 3 of 12

 



Powered by phpBB © 2001, 2005 phpBB Group