OpenVZ Forum


Home » General » Support » kvzstat - command line tool for measuring CPU and memory statistics
kvzstat - command line tool for measuring CPU and memory statistics [message #23447] Fri, 16 November 2007 19:48 Go to next message
KoolK is currently offline  KoolK
Messages: 8
Registered: September 2007
Junior Member
Hi all,

I have created a command line tool, which gives CPU and memory statistics for each VE in hardware node.It is available at

http://sourceforge.net/projects/kvzstat/

The output looks like:

CPU Usage:
VE ID USer % Nice % System % Idle %
2000 0.00 0.00 0.00 100.00
1001 99.49 0.00 0.51 0.00

Memory Usage:
VE ID nonguar guar kernel RAM SWAP used(%) free(%) failcount
2000 192.00MB 192.00MB 0.87MB 7.25MB 0.00MB 7.25MB(3.78%) 184.75MB(96.22%) 0
1001 192.00MB 192.00MB 0.95MB 7.34MB 0.00MB 7.34MB(3.82%) 184.66MB(96.18%) 0

Usage:
kvzstat -d delay -n iteration -f filename -v veid -m( for only memory) -c( for only cpu) -s ( for summary)

Have a try and let me know what improvement can be done to make it more useful.

I wanted to add average cpu latency but I get all latency values in my /proc/vz/vestat file as 0. I am not able to find the way to get non zero values of latency and numscheud fields.

next thing which I have thought of is to integrate it with GNUPlot to give output in graph format.

All suggestions are welcome....

Thanks,
Khyati
Re: kvzstat - command line tool for measuring CPU and memory statistics [message #23456 is a reply to message #23447] Sat, 17 November 2007 10:29 Go to previous messageGo to next message
curx
Messages: 739
Registered: February 2006
Location: N├╝rnberg, Germany
Senior Member

Hi,

on build some error occured, so fixed:

- removed the *.o and precombiled kvzstat on src code.
- fixed Makefile so make clean works

[Updated on: Sat, 17 November 2007 10:34]

Report message to a moderator

Re: kvzstat - command line tool for measuring CPU and memory statistics [message #24974 is a reply to message #23447] Wed, 12 December 2007 16:17 Go to previous messageGo to next message
powervps is currently offline  powervps
Messages: 54
Registered: December 2007
Member
Thx you how can run ?
Re: kvzstat - command line tool for measuring CPU and memory statistics [message #24997 is a reply to message #23447] Wed, 12 December 2007 20:17 Go to previous messageGo to next message
ugob is currently offline  ugob
Messages: 271
Registered: March 2007
Senior Member
Hi,

This sounds like a nice project Smile.

A little bit of documentation would be appreciated...

When running the binary, I get this error:

./kvzstat: /lib/tls/libc.so.6: version `GLIBC_2.4' not found (required by ./kvzstat)


Assuming I must use "make" to compile, I removed the binary and ran 'make' and got this error message:

g++ -o  kvzstat main.o VPS_cpuinfo.o VPS_meminfo.o
make: g++: Command not found
make: *** [kvzstat] Error 127


I tried to find where I could find g++, in vain.

Running CentOS4

Regards,
Ugo


Please read the manual before asking questions:
http://download.openvz.org/doc/OpenVZ-Users-Guide.pdf

Please have a look at the wiki before asking questions:
http://wiki.openvz.org/Main_Page
Re: kvzstat - command line tool for measuring CPU and memory statistics [message #25005 is a reply to message #23447] Wed, 12 December 2007 21:19 Go to previous message
tomp is currently offline  tomp
Messages: 64
Registered: August 2007
Member
Nice program Smile

However in the fail count column it shows "202" for every VE, however only 1 VE has a total fail count of 202.
Previous Topic: *SOLVED* How ican hidden real ram for a server
Next Topic: problem at ve cant ping or login with ssh
Goto Forum:
  


Current Time: Sun Apr 14 02:30:44 GMT 2024

Total time taken to generate the page: 0.01917 seconds