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, 5 ... 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: Tue Feb 07, 2006 10:42 am    Post subject: Reply with quote

Its definitely worth looking at, if only for the backup routine..

(it has a nice backup routine included where you download the config to another machine, then if you need to recreate the machine you just boot from the distro disk (takes about 7 minutes) get your system up again and restore the config, nice)...
Back to top
joshm
Cacti User


Joined: 03 Oct 2005
Posts: 62
Location: STL

PostPosted: Tue Feb 07, 2006 11:27 am    Post subject: Reply with quote

argon0 wrote:
Its definitely worth looking at, if only for the backup routine..

(it has a nice backup routine included where you download the config to another machine, then if you need to recreate the machine you just boot from the distro disk (takes about 7 minutes) get your system up again and restore the config, nice)...


Ok I got everything fingered out with these CPU graphs and fixed a few issues that I had importing them onto a Windows system..... But The last issue I see is the 4cpu graph the Max string is still dividing by 5 instead of 4, is this an easy setting that I can just change myself somewhere?
Back to top
argon0
Cacti User


Joined: 12 Mar 2004
Posts: 238

PostPosted: Tue Feb 07, 2006 11:36 am    Post subject: Reply with quote

Yup, goto graph management, you will then see an item on the left of the screen:

CDEFs.

(just under Graph Management)

Click on that.

You'll get a list of (surprise, surprise) CDEFS - which are calculations done in a simple way (i.e. terma, termb, operation, termc, operation.... (e.g. a,b,+,c,+,3,/ - give a + b + c all divided by 3.)

So you just need to go into the cdef for "Average All data sources - 4 sources" click on the item and change the 5 for a 4.. Dunno how come its a 5 in your case though...

Argon0
Back to top
AndyStewart
Cacti User


Joined: 29 Sep 2005
Posts: 102
Location: Edinburgh, Scotland

PostPosted: Mon Feb 20, 2006 5:14 am    Post subject: Reply with quote

Is there a definitive link to a 4 processor template, and instructions for installing?

soz, but im still a real noob at getting cacti working
Back to top
argon0
Cacti User


Joined: 12 Mar 2004
Posts: 238

PostPosted: Mon Feb 20, 2006 6:08 am    Post subject: Reply with quote

,ang on... here you go:

download file below, goto Cacti console, goto Import a templates. Browse to it. Click Save... et viola. Template and Cdefs installed.

Now how to get it to work...
Assuming it s a windows machine (although it should also work with non-windows servers, as it just uses snmp) and is set up for SNMP already...


First you need to graph the cpus separately: goto Management Devices, choose your device, click on "create graphs for this host", now scroll down... you should see a section marked "Data Query [SNMP - Get Processor Information]" click on the top box to select all processors. Click create at the bottom. You'll be asked for a legend colour, click Create again. Independent graphs will now be available....

leave it for 10 minutes or so, so that Cacti can create the data sources you will need for your multi processor graph....


NOW... Go To Graph Management, choose your device from the drop down list, click add. This will open up "Graph Template Selection [new]" screen here you need to choose the "Multi CPU Utilization on 4 Processor Box v2" template. Click Create.

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).

For each of the Graph Item Fields you choose the relevant data source:

(e.g. with a server called Server1 you for the first field (Data Source [cpu0] you goto the drop down list and choose the first instance of: Server1 CPU Utilization (cpu), for each subsequent field you choose the next in the list (unfortunately the sources all have the same name! The only way to tell which is which is by there order in the drop down).

Now click Save,, et viola, you should now have a new graph added to the graph management screen - Multi CPU Utilization on Server1, click on this to see it....

<groan> that was more difficult to explain than I thought, let me know if you have any difficulties!

Argon0



cacti_graph_template_multi_cpu_utilization_on_4_processor_box_v2.xml
 Description:
download this, goto Cacti console, goto Import a templates. Browse to it. Click Save... et viola. Template and Cdefs installed.

Download
 Filename:  cacti_graph_template_multi_cpu_utilization_on_4_processor_box_v2.xml
 Filesize:  23.4 KB
 Downloaded:  1586 Time(s)

Back to top
argon0
Cacti User


Joined: 12 Mar 2004
Posts: 238

PostPosted: Mon Feb 20, 2006 6:13 am    Post subject: Reply with quote

Ah,there is a caveat to this....

Sometimes when you create the separate graphs it creates sensibly named data sources!!!

So when you go to choose your data sources, instead of just seeing 4 repetitions of : Server1 CPU Utilization (cpu) you MAY see separately named sources thus:

Server1 - CPU Utilization - CPU0 (cpu)
Server1 - CPU Utilization - CPU1 (cpu)
Server1 - CPU Utilization - CPU2 (cpu)
Server1 - CPU Utilization - CPU3 (cpu)


From this you should be able to work out which to assign to which graph item!!!

Argon0
Back to top
AndyStewart
Cacti User


Joined: 29 Sep 2005
Posts: 102
Location: Edinburgh, Scotland

PostPosted: Mon Feb 20, 2006 9:04 am    Post subject: Reply with quote

one other quick question - im running on 0.8.6g - i guess this is only supported on 0.8.6h?
Back to top
argon0
Cacti User


Joined: 12 Mar 2004
Posts: 238

PostPosted: Mon Feb 20, 2006 9:14 am    Post subject: Reply with quote

I'm using 0.8.6.h yes... via CactiEZ distro - which is VERY easy to install (just stick a cd in!)...

If you're starting from scratch this is the best way to go...

Otherwise, I don't THINK I'm using anything specific to h, so it SHOULD work...

Argon0
Back to top
AndyStewart
Cacti User


Joined: 29 Sep 2005
Posts: 102
Location: Edinburgh, Scotland

PostPosted: Mon Feb 20, 2006 9:19 am    Post subject: Reply with quote

yeh, im getting the "hash version" error....currently backing up the g install to do an upgrade (gulp)
Back to top
AndyStewart
Cacti User


Joined: 29 Sep 2005
Posts: 102
Location: Edinburgh, Scotland

PostPosted: Mon Feb 20, 2006 9:43 am    Post subject: Reply with quote

Bingo - 0.8.6h allows import with no errors...
Back to top
argon0
Cacti User


Joined: 12 Mar 2004
Posts: 238

PostPosted: Mon Feb 20, 2006 9:48 am    Post subject: Reply with quote

Hope you find it helpful...

I'm just about to publish my first script/graph templates which I've put together for a Virtualisation project - to identify Virtualisation Candidates from out Windows Farm.... If you are interested!

Argon0
Back to top
AndyStewart
Cacti User


Joined: 29 Sep 2005
Posts: 102
Location: Edinburgh, Scotland

PostPosted: Mon Feb 20, 2006 9:56 am    Post subject: Reply with quote

Almost there....

on the graph management part and i'm picking the 4 cpu entries to be graphed, but i'm getting the following message?

Quote:

RRDTool Command:

c:/rrdtool/rrdtool.exe graph - \
--imgformat=PNG \
--start=-108000 \
--end=-300 \
--title="Multi CPU Utilization on Terminal Server for India NETEHTERM01a" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
--font TITLE:12:c:\winnt\fonts\tahoma.ttf \
--font AXIS:8:c:\winnt\fonts\tahoma.ttf \
--font LEGEND:10:c:\winnt\fonts\tahoma.ttf \
--font UNIT:8:c:\winnt\fonts\tahoma.ttf \
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:#0000FF:"CPU0\:" \
GPRINT::LAST:" Current\:%8.2lf %%" \
GPRINT::MIN:"Min\:%8.2lf %%" \
GPRINT::MAX:"Max\:%8.2lf %%\n" \
LINE1:#00A348:"CPU1\:" \
GPRINT::LAST:" Current\:%8.2lf %%" \
GPRINT::MIN:"Min\:%8.2lf %%" \
GPRINT::MAX:"Max\:%8.2lf %%\n" \
LINE1:#C4FD3D:"CPU2\:" \
GPRINT::AVERAGE:" Current\:%8.2lf %%" \
GPRINT::MIN:"Min\:%8.2lf %%" \
GPRINT::MAX:"Max\:%8.2lf %%\n" \
LINE1:#FF0000:"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,/




and if i go back into the "edit" screen, its lost the 4 cpu parts i've selected and reset it to "none" on each of them...
Back to top
argon0
Cacti User


Joined: 12 Mar 2004
Posts: 238

PostPosted: Mon Feb 20, 2006 10:29 am    Post subject: Reply with quote

Yes that'd be why!!!

I you look at the code you'll see that the rrd's to use are not defined anywhere!

A slight issue may be that I'm running on Linux, you're running on win2k...

But it should work, I'm only using standard Cacti functionality not Linux Specific....

Do you have the graphs of the individual CPUs?

Do you click save after choosing the CPUs?

Argon0
Back to top
AndyStewart
Cacti User


Joined: 29 Sep 2005
Posts: 102
Location: Edinburgh, Scotland

PostPosted: Mon Feb 20, 2006 10:42 am    Post subject: Reply with quote

yeh, the 4 seperate graphs for the cpu's are fine - got about 3-4 weeks worth of data on them:

Pic 1 - screenshot of Graph Management for the server...

Pic 2 - info on one of the CPU graphs...

Cheers in advance for your help on this btw



2.jpg
 Description:
 Filesize:  147.08 KB
 Viewed:  8506 Time(s)

2.jpg



1.jpg
 Description:
 Filesize:  101.91 KB
 Viewed:  8506 Time(s)

1.jpg


Back to top
argon0
Cacti User


Joined: 12 Mar 2004
Posts: 238

PostPosted: Mon Feb 20, 2006 10:58 am    Post subject: Reply with quote

Could you give us a screen print of the Multi CPU screen with the sources selected & graph debug on?

TVM
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, 5 ... 10, 11, 12  Next
Page 4 of 12

 



Powered by phpBB © 2001, 2005 phpBB Group