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    


CPU usage on 2, 4 and 8 way Linux devices
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
fmangeant
Cacti Guru User


Joined: 19 Sep 2003
Posts: 2325
Location: Sophia-Antipolis, France

PostPosted: Mon Aug 14, 2006 7:41 am    Post subject: CPU usage on 2, 4 and 8 way Linux devices Reply with quote

Hi all

here are some data & graph templates for multiple CPU Linux devices.
Indeed, Net-SNMP under Linux returns counters whose values range from 0 to (100 x number of logical CPU).

More and more systems use dual core, hyper threading, etc. so the default template which ship with Cacti doesn't work.

To know how many logical CPU are seen by Linux, run this command :
Code:
$ grep -c ^processor /proc/cpuinfo
2

The graph templates do not use the "Auto Scale" functionnality, they are fixed between 0 and 100 percent.

These templates require Cacti 0.8.6h



CPU_x_ways.png
 Description:
 Filesize:  22.59 KB
 Viewed:  25221 Time(s)

CPU_x_ways.png



cacti_graph_template_ucdnet_cpu_usage_2_way.xml
 Description:

Download
 Filename:  cacti_graph_template_ucdnet_cpu_usage_2_way.xml
 Filesize:  22.56 KB
 Downloaded:  2557 Time(s)


cacti_graph_template_ucdnet_cpu_usage_4_way.xml
 Description:

Download
 Filename:  cacti_graph_template_ucdnet_cpu_usage_4_way.xml
 Filesize:  22.56 KB
 Downloaded:  1688 Time(s)


cacti_graph_template_ucdnet_cpu_usage_8_way.xml
 Description:

Download
 Filename:  cacti_graph_template_ucdnet_cpu_usage_8_way.xml
 Filesize:  22.56 KB
 Downloaded:  1229 Time(s)

Back to top
alexb



Joined: 29 Nov 2005
Posts: 3

PostPosted: Fri Aug 25, 2006 5:37 pm    Post subject: Reply with quote

Good stuff...
I think you need to remove maximum value of 100 from data templates for ucd/net - CPU Usage, it can go beyond 100 on SMP systems.

AlexB
Back to top
fmangeant
Cacti Guru User


Joined: 19 Sep 2003
Posts: 2325
Location: Sophia-Antipolis, France

PostPosted: Wed Aug 30, 2006 4:52 am    Post subject: Reply with quote

Hi
alexb wrote:
I think you need to remove maximum value of 100 from data templates for ucd/net - CPU Usage, it can go beyond 100 on SMP systems.

that's why I made these templates

They use CDEF to divide each counter by the number of processors.
Back to top
janeller



Joined: 01 Sep 2006
Posts: 1

PostPosted: Fri Sep 01, 2006 2:32 pm    Post subject: Reply with quote

great job, thank you very much!
before installing your template the processor load from the dualcore cpu has been showed like the scales from top in ssh multiplicated with 2...
Back to top
kamina



Joined: 22 Aug 2006
Posts: 28

PostPosted: Fri Sep 08, 2006 8:32 am    Post subject: Reply with quote

I added io-wait to these graphs, but they seem disproportionate. Should I also be using the division for them? They seem to correlate with top better when I leave them without division.

edit:

I think I'm mistaken, it does need to be divided
Back to top
fmangeant
Cacti Guru User


Joined: 19 Sep 2003
Posts: 2325
Location: Sophia-Antipolis, France

PostPosted: Fri Sep 08, 2006 10:15 am    Post subject: Reply with quote

I think so.
Back to top
kamina



Joined: 22 Aug 2006
Posts: 28

PostPosted: Fri Sep 08, 2006 10:59 am    Post subject: Reply with quote

I finally managed to get io-wait which was consistant enough to judge from the averige, it definatly does need to be divided.
Back to top
mr_chip



Joined: 18 Sep 2006
Posts: 3

PostPosted: Mon Sep 18, 2006 3:38 pm    Post subject: Reply with quote

Crap. I applied these templates and now every single graph in my cacti installation is blank.

My RRD's are still updating, the cacti log has nothing since I've done the change, and I'm stumped. Any ideas?
Back to top
fmangeant
Cacti Guru User


Joined: 19 Sep 2003
Posts: 2325
Location: Sophia-Antipolis, France

PostPosted: Tue Sep 19, 2006 10:56 am    Post subject: Reply with quote

Hi

did you have any error (like "dependancy not met") when importing the templates ?
Back to top
Viper



Joined: 11 Oct 2006
Posts: 3

PostPosted: Wed Oct 11, 2006 8:54 am    Post subject: Error... Reply with quote

Hello !
I see "Error: XML: Hash version does not exist." when importing the templates .
What the problem ?
Back to top
fmangeant
Cacti Guru User


Joined: 19 Sep 2003
Posts: 2325
Location: Sophia-Antipolis, France

PostPosted: Wed Oct 11, 2006 9:13 am    Post subject: Reply with quote

Hi

these templates were exported from Cacti 0.8.6h, so you need at least this version to import them.

What version are you running ?
Back to top
Viper



Joined: 11 Oct 2006
Posts: 3

PostPosted: Wed Oct 11, 2006 9:22 am    Post subject: Reply with quote

fmangeant wrote:
Hi

these templates were exported from Cacti 0.8.6h, so you need at least this version to import them.

What version are you running ?


Thaks ! i use Cacti Version 0.8.6c.
Back to top
fmangeant
Cacti Guru User


Joined: 19 Sep 2003
Posts: 2325
Location: Sophia-Antipolis, France

PostPosted: Wed Oct 11, 2006 9:30 am    Post subject: Reply with quote

If you have a large Cacti installation, 0.8.6i (released yesterday) is for you
Back to top
Viper



Joined: 11 Oct 2006
Posts: 3

PostPosted: Thu Oct 12, 2006 12:25 am    Post subject: Reply with quote

fmangeant wrote:
If you have a large Cacti installation, 0.8.6i (released yesterday) is for you


A lot of thanks )
Back to top
xpbit



Joined: 29 Sep 2006
Posts: 20

PostPosted: Thu Oct 19, 2006 3:49 pm    Post subject: Reply with quote

im not getting any data for the 4 way graph. no errors in the poller either. any ideas? it doesnt say nan just 0.00
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 1, 2, 3  Next
Page 1 of 3

 



Powered by phpBB © 2001, 2005 phpBB Group