Cpu stats....

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
Suzumushi

Cpu stats....

Post by Suzumushi »

Hello
i have a question about cpu stats
i have windows machine witch 2 cpu's (showing 4 HT) and have 4 graphs
is this possible to make only one graph with four lines represented each cpu utilization ?
if yes, how to do it ?:)

and second, how to make graph showing only one line wich is average of this four (or less) utilization.

regards

Suzumushi
Deano
Cacti User
Posts: 101
Joined: Wed Oct 29, 2003 7:08 am
Contact:

Post by Deano »

1st Q.....

Create a new Blank Graph (within Graph Management)
Add "Graph Items". For each line you prob want
1st Item. Set Source to required RRA (will be in the drop down box)
Tyep to Line1, Color of your choice. Text Format = "CPU 1" etc.

2nd Item. Same Source. Type= Gprint. Text = "Current:" Consolidation Function = "Last"

3rd Item. Same Source. Type= Gprint. Text = "Average:" Consolidation Function = "Average"

4th Item. Same Source. Type= Gprint. Text = "Maximum:" Consolidation Function = "Max + Hard Return.

Will give you a total of 16 Items. Turn on "Graph Debugging" and you should be able to see the graph build as you add the items.
(have a look at the Interface Bits In/out template for an example)

2nd Q....
A bit more tricky but can be done with a custom CDEF...
first define the custome CDEF
name "Average a,b,c,d"
Add the following cdef Item.
a,b,+,c,+,d,+,4,/
(which adds the 1st 4 data sources and divides by 4)

Now either create a new graph
Add the 1st 4 Graph Items as the data sources - but DONT select a color. or add Text.
Add your 5th with data source as "none" , type Line1, Color as you wish, CDEF - selec your custom CDEF. Text "Total"
(You can add current/average/max Gprint as above using no data source and custom CDEF).

Deano
SeanLee
Posts: 44
Joined: Wed Oct 29, 2003 10:41 pm

Post by SeanLee »

I'm not sure I understand exactly what your steps are. I don't see the area in "Graph Management" that you speak of. Are you using the latest version (.0.8.4)? Would it be possible to get a more detailed step-by-step? I'd really appreciate it!
Deano
Cacti User
Posts: 101
Joined: Wed Oct 29, 2003 7:08 am
Contact:

Post by Deano »

Ok - I've thrown these screen grabs together v v quickly. I aim to do something "proper" at some point.

1) Add new Graph. Hit the "Add" in Graph Management

Screenshot 1

2) Dont select a template. Do select the host (with your CPU in ;) )

Screenshot 2

3) Set the Title and vertical label (at the bottom)

Screenshot 3

4) Add Graph items ("Add" in top right corner of graph items). The first item will be a line for one cpu. Select the Data Source, COlor, Type= Line1, Text Fomar="CPU 0" and create.

Screenshot 4

5) Then add the GPRINT items. Again Data Source, Color=None, Type=GPRINT,Function=MAX (for example), Text Format="Max:" and create

Screenshot 5

6) Add the line and Current/Average/Max GPRINTs for each CPU. If you have "Graph Debug Mode" on whilst you add the Graph Items you'll see you graph build. This is an example (With all the lines but the GPRINTs for only the first 1. Unfortunately its a teset server that does nowt so none of the CPUs are used !)

Screenshot 6

Deano
SeanLee
Posts: 44
Joined: Wed Oct 29, 2003 10:41 pm

Post by SeanLee »

Got it. Thanks for taking the time to do that. I let it run for a few hours, but I don't seem to be getting any data in my graph (see screenshot in attachment). However, the other CPU graphs work fine. I noticed they use the "AREA" tag instead of the "LINE 1" tag. When I switch to "AREA" I get data in my graphs. Not sure wth...?
Attachments
Screenshot JPG
Screenshot JPG
ss01.JPG (143.04 KiB) Viewed 2450 times
SeanLee
Posts: 44
Joined: Wed Oct 29, 2003 10:41 pm

Post by SeanLee »

And for your second example, which would be really cool - I get an error while trying to display the graph that says: ERROR: invalid rpn expression 'a,b,+,c,+,d,+,4/'

I'm close, but no cigars yet :)

Any ideas?
SeanLee
Posts: 44
Joined: Wed Oct 29, 2003 10:41 pm

Post by SeanLee »

I got it to work... check it out ;)

Much thanks for the howto. This should be a stciky in the windows section.

-Sean
Attachments
cpuworking.jpg
cpuworking.jpg (76.09 KiB) Viewed 2436 times
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests