CPU usage not correct

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

Moderators: Developers, Moderators

Post Reply
fering
Posts: 14
Joined: Sun Nov 23, 2008 5:52 am

CPU usage not correct

Post by fering »

Hi,

The cpu usage graph of my linux machine shows 80% but when i look at the top command its not more then 10%. Cn it be that 80% does not take under account that my machine has 8 cpu ?


Thanks
dus001
Posts: 42
Joined: Sun Aug 07, 2005 6:07 am

Re: CPU usage not correct

Post by dus001 »

fering wrote:Cn it be that 80% does not take under account that my machine has 8 cpu ?
Exactly, 80 here means 80/800 -> 10%.

One quick solution is to change the graph template to divide values by 8 before rendering.
fering
Posts: 14
Joined: Sun Nov 23, 2008 5:52 am

Post by fering »

how can i add this devide option ? in function ? didnt see any option to devide ?
dus001
Posts: 42
Joined: Sun Aug 07, 2005 6:07 am

Post by dus001 »

fering wrote:how can i add this devide option ? in function ? didnt see any option to devide ?
If you choose this option, you have to:
- create a new CDEF (console -> Graph Management -> CDEFs -> Add) which does this ' / 8 ' operation
- maybe duplicate the graph template you are currently using (maybe you need to preserve it for other servers)
- in the target graph template, for each graph item set the created CDEF
- if you duplicated the graph template: update the graph to use the new template.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

There are several approaches to ease this ask:

1. CDEF
mentioned above
Requires a CDEF and a Graph Template per "server layout" e.g. one for a 4 CPU machine, another one for a 8 CPU machine ...

2. Data Query
Verify, that you are able to query the target for the "number of CPUs"
Create a (SNMP|Script) Data Query and make the number a "<direction>input</direction>" element named nmbrCPU. Then you may use e.g. |query_nmbrCPU| in a single CDEF/Graph Template
(see 1st link of my sig for more help)
Support for this was added with cacti 087b

Reinhard
fering
Posts: 14
Joined: Sun Nov 23, 2008 5:52 am

Post by fering »

thanks to all x10
plotting4fun
Posts: 24
Joined: Thu Dec 11, 2008 10:42 am

Post by plotting4fun »

gandalf wrote:
2. Data Query
Verify, that you are able to query the target for the "number of CPUs"
Create a (SNMP|Script) Data Query and make the number a "<direction>input</direction>" element named nmbrCPU. Then you may use e.g. |query_nmbrCPU| in a single CDEF/Graph Template
(see 1st link of my sig for more help)
Support for this was added with cacti 087b

Reinhard

That's very interesting ! Somebody has done a template like this ?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests