[Xymon] how to fetch the Xymon max CPU usage value during chosen time period

ROZEK Michal michal.rozek.externe at cnp.fr
Tue Sep 3 18:48:26 CEST 2013


Hi guys,

I would like to know how to fetch, via a command line, the information about the max CPU usage of a chosen server for a chosen time period from its *.rrd  files.

More precisely, I would like to fetch the information from the "vm_cpu" section of the "/soft/xymon/current/server/etc/graphs.cfg" file:

[vm_cpu]
        TITLE VMX: vCPU usage
        YAXIS MHz Used
        DEF:cpuuse=vm_cpu,cpuuse.rrd:lambda:AVERAGE
        DEF:vcpurunning=vm_cpu,vcpurunning.rrd:lambda:AVERAGE
        AREA:cpuuse#00CC00:VM CPU usage
        LINE1:vcpurunning#000000:# of vCPUs running
        COMMENT:\n
        GPRINT:cpuuse:LAST:VM CPU usage \: %5.0lf (cur)
        GPRINT:cpuuse:MAX: \: %5.0lf (max)   <======================== HERE
        GPRINT:cpuuse:MIN: \: %5.0lf (min)
        GPRINT:cpuuse:AVERAGE: \: %5.0lf (avg)\n
        GPRINT:vcpurunning:LAST:#vCPUs running\: %5.0lf (cur)
        GPRINT:vcpurunning:MAX: \: %5.0lf (max)    <======================== HERE
        GPRINT:vcpurunning:MIN: \: %5.0lf (min)
        GPRINT:vcpurunning:AVERAGE: \: %5.1lf (avg)\n

so :

=> GPRINT:cpuuse:MAX: \: %5.0lf (max)
=> GPRINT:vcpurunning:MAX: \: %5.0lf (max)


I was having fun with the "rrdtool fetch …", but the result is not so comprehensible for me… I have found a topic "Top ten list of servers wrt cpu load" on Your mailing list, but it doesnt solve my problem.
What I tried is:


rrdtool fetch vm_cpu.rrd AVERAGE --start 1378040857 --end 1378213657 | awk '{print $3}' |sort



Few questions here:



1.) Should I use the vm_cpu.rrd file? Or vm_cpu,cpuuse.rrd or vm_cpu,vcpurunning.rrd?



Here are the files present on the server:



[root at vt2043]# ls -l | grep -i cpu

-rw-r--r-- 1 xymon xymon  19640 Apr 18 13:43 vm_cpu,cpuuse.rrd

-rw-r--r-- 1 xymon xymon  38624 Sep  3 18:32 vm_cpu.rrd

-rw-r--r-- 1 xymon xymon  19640 Apr 18 13:43 vm_cpu,vcpurunning.rrd



2.) How to understand the result ? There is a lot of numbers like:



-8.1787151835e-04

-8.3830185734e-03

8.4392892148e-03

8.5398628456e-03

9.1766240439e-04

-9.6038714038e-03

9.9081238031e-04

-9.9143698154e-04



3.) Is it a good way of fetching the max cpu usage value from the server ?

Thanks for Your help in advance.

Je reste à votre disposition pour tout complément d'informations. Cordialement.
Regards / Z poważaniem / تحية خالصة / 敬礼

Michal Rozek


Ce message (et toutes ses pieces jointes eventuelles) est confidentiel et etabli a l'intention exclusive de ses destinataires.
Toute utilisation de ce message non conforme a sa destination, toute diffusion ou toute publication, totale ou partielle, est
interdite, sauf autorisation expresse.
L'internet ne permettant pas d'assurer l'integrite de ce message, CNP Assurances et ses filiales declinent toute responsabilite
au titre de ce message, s'il a ete altere, deforme ou falsifie.

*****

This message and any attachments (the "message") are confidential and intended solely for the addressees.
Any unauthorised use or dissemination is prohibited.
E-mails are susceptible to alteration.
Neither CNP Assurances nor any of its subsidiaries or affiliates shall be liable for the message if altered, changed or falsified.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20130903/44150da7/attachment.html>


More information about the Xymon mailing list