cdef problem

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

Moderators: Developers, Moderators

Post Reply
UweK
Posts: 6
Joined: Sun Apr 17, 2005 1:24 pm
Contact:

cdef problem

Post by UweK »

Hi,

after I could draw my VMware ESX Memory Stats, I try to graph the cpu usage every virtual machine. the cpu usage is stored in a rrd as follow:

vm4:/esx-stat/vm/1 # rrdpoller ls vcpu0.rrd
ready
syssec
uptime
usedsec
waitsec

How could I (or cati) calculate the percentage of the diferent cpu usage values (wait%, sys%)?

I think, I should calculate as follow: wait%=uptime/waitsec*100

But, how do I create the right cdef?

Uwe
voskampm
Posts: 1
Joined: Tue Oct 11, 2005 3:41 am

Post by voskampm »

Uwe,

I am having some problems with these calculations. I have for example:

Average values sampled Tue Oct 11 09:19:19 2005 - Tue Oct 11 09:24:19 2005
.
.
linux06 vcpu0 uptime=99.7268
linux06 vcpu0 usedsec=3.87523
linux06 vcpu0 syssec=0
linux06 vcpu0 waitsec=90.3097
linux06 vcpu0 ready=4.43534

I have tried the following calculations:

Wait% = (waitsec/uptime)*100 = 90.557102002671297986098019790066
Busy = (usedsec/uptime)*100 = 3.885846131631617579226446652254
Ready% = (ready/uptime)*100 = 4.4474905441666633242017190965718 I assume ready is ready seconds.

But this does not add up to 100%. Do you know if this is the correct method?

regards

Michiel

ps these values are retrieved with vmktree version 2.18
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: cdef problem

Post by gandalf »

UweK wrote:I think, I should calculate as follow: wait%=uptime/waitsec*100
The CDEF would look like

Code: Select all

<uptime>,<waitsec>,/,100,*
You'll have to replace <uptime> by the DEF variable name for the uptime DS and <waitsec> respectively. As a starting point for that, please look at the Templates provided at http://forums.cacti.net/viewtopic.php?t=8520 or at the Advanced Ping Template.
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests