CPU usage on 2, 4 and 8 way Linux devices

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

Moderators: Developers, Moderators

User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Hi

what version of Net-SNMP is your host running ?

This will tell you :

Code: Select all

$ snmpwalk -v 1 -c public xx.xx.xx.xx versiontag
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
pbulteel
Cacti User
Posts: 150
Joined: Fri Sep 05, 2003 9:20 am
Location: London
Contact:

Post by pbulteel »

Have these been updated for 8.6.i? I can't import them and I'm on 8.6.h

-P
uname -a
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Hi

this is strange, these templates have been exported from 0.8.6h...

Do you want me to export them from a fresh 0.8.6i installation ?
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
pbulteel
Cacti User
Posts: 150
Joined: Fri Sep 05, 2003 9:20 am
Location: London
Contact:

Post by pbulteel »

We can try that as well - thank you! I don't know if it'll work but I'm willing to try it. Otherwise I'll just have to try to make the same changes myself by hand. :(

-P
uname -a
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Here you are :)
Attachments
cacti_graph_template_ucdnet_cpu_usage_linux_2way.xml
(27.09 KiB) Downloaded 1088 times
cacti_graph_template_ucdnet_cpu_usage_linux_4way.xml
(27.1 KiB) Downloaded 1117 times
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
pbulteel
Cacti User
Posts: 150
Joined: Fri Sep 05, 2003 9:20 am
Location: London
Contact:

Post by pbulteel »

Merci
uname -a
pbulteel
Cacti User
Posts: 150
Joined: Fri Sep 05, 2003 9:20 am
Location: London
Contact:

Post by pbulteel »

Nope! didn't work... :( I'm going to have to figure out what you did and then do it myself.

Thank you for posting these!
uname -a
pbulteel
Cacti User
Posts: 150
Joined: Fri Sep 05, 2003 9:20 am
Location: London
Contact:

Post by pbulteel »

By the way I diff-ed the two 2way templates and they have several differences - plus additions. :P
uname -a
pbulteel
Cacti User
Posts: 150
Joined: Fri Sep 05, 2003 9:20 am
Location: London
Contact:

Post by pbulteel »

Ummm - sorry for the dumb question, but how did you do these?!

I created a CDEF = current_data_souce,2,/

And then used that... However, although my graphs show half of everything, the values seem wrong still ...

Do I need to do something to the rrd?

-P
uname -a
nsanders
Posts: 21
Joined: Thu Oct 19, 2006 2:01 pm

Post by nsanders »

Any reason why you use a fixed graph size? Some of my servers barely peak 30% and the graphs are almost useless for a visual representation.

Can this be changed easily or did you have a specific reason for it?
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

Hi

I prefer having CPU graphs going from 0 to 100 %, I find it easier to read (expecially if you're using the "List" view in Cacti, to display several servers).

If you want to change this behavior, edit the graph templates and check the "auto scale" item.
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
kaverne
Posts: 2
Joined: Wed Jan 24, 2007 6:22 am

Post by kaverne »

Hi all,

Thx for those great Templates. As i got lot of 8 and 16 CPU servers i'll use them right now, and now i'm understanding the strange behavior on my CPU graphs :D

I was only searching on that since a few hours so no big deal. I'm happy to have a strong cacti community helping me.

I still have one question. I imported your data templates and itsays me :

Round Robin Archive
[success] Daily (5 Minute Average) [update]
[success] Weekly (30 Minute Average) [update]
[success] Monthly (2 Hour Average) [update]
[success] Yearly (1 Day Average) [update]
CDEF
[success] Divide by 4 [new]
[success] Total All Data Sources, Divide by 4 [new]
GPRINT Preset
[success] Normal [update]
Data Input Method
[success] Get SNMP Data [update]
Data Template
[success] ucd/net - CPU Usage - System [update]
[success] ucd/net - CPU Usage - User [update]
[success] ucd/net - CPU Usage - Nice [update]
Graph Template
[success] ucd/net - CPU Usage (4 way) [new]

So all seems fine.

But when i go check in the Data Template section i still got a max value at 100. And if i'm not wrong the CDEF happen after the data gathering right ? So i still got to delete this max value i think right ? And if yes, so why logs wrote me [update], are your template wrong ?
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

kaverne wrote:But when i go check in the Data Template section i still got a max value at 100. And if i'm not wrong the CDEF happen after the data gathering right ? So i still got to delete this max value i think right ? And if yes, so why logs wrote me [update], are your template wrong ?
Hi

I fear that the export went wrong...

Can you modify the data templates and choose 400 as the maximum for 4-way graph, and 1600 for 16-way graphs ?

If you've already created .rrd files with the wrong (100) maximum, you can use rrdtool tune
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
kaverne
Posts: 2
Joined: Wed Jan 24, 2007 6:22 am

Post by kaverne »

Aaaaahhhh

I'm happy of this answer :D That mean my understanding of cacti is not so bad. As i'm only a 2 week user it's not that bad hehe.

First of all thanks a lot for such a quick reply fmangeant. Are you French or something with that name ?

Your reply lead me to another question. What is the real use of setting a max value ?
User avatar
fmangeant
Cacti Guru User
Posts: 2345
Joined: Fri Sep 19, 2003 8:36 am
Location: Sophia-Antipolis, France
Contact:

Post by fmangeant »

kaverne wrote:First of all thanks a lot for such a quick reply fmangeant. Are you French or something with that name ?
You guessed it :lol:
kaverne wrote:Your reply lead me to another question. What is the real use of setting a max value ?
IMHO it's really useful for counters : if setting a proper maximum value, you won't get spikes in the graphs because of counters wraps.
[size=84]
[color=green]HOWTOs[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15353]Install and configure the Net-SNMP agent for Unix[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=26151]Install and configure the Net-SNMP agent for Windows[/url]
[*][url=http://forums.cacti.net/viewtopic.php?t=28175]Graph multiple servers using an SNMP proxy[/url][/list]
[color=green]Templates[/color] :
[list][*][url=http://forums.cacti.net/viewtopic.php?t=15412]Multiple CPU usage for Linux[/url]
[*][url=http://forums.cacti.net/viewtopic.php?p=125152]Memory & swap usage for Unix[/url][/list][/size]
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest