OpenVZ Forum - RDF feed
type: channel
items: /proc/user_beancounters and vzlist giving different outputs
items: Re: /proc/user_beancounters and vzlist giving different outputs

/proc/user_beancounters and vzlist giving different outputs
type: item
description: well I created a script for checking my ram usage. Using the output of /proc/user_beacncounters, the total bytes of ram being used are: 20931303 with vzlist -o with the same fields that I use with the beancounters, the sum is 20847588. I've checked for differences, and at least kmemsize show different values in user_beancounters and in vzlist -o kmemsize...is this normal? Which one is the correct one? Thank you
creator: blunt
date: 2007-12-07T21:40:46-00:00

Re: /proc/user_beancounters and vzlist giving different outputs
type: item
description: Are you doing the checks at exactly the same time? Memory usage varies. You should try using vzmemcheck instead. [root@server ~]# vzmemcheck -Av Output values in Mbytes veid LowMem LowMem RAM MemSwap MemSwap Alloc Alloc Alloc util commit util util commit util commit limit 109 1.55 88.35 18.78 18.78 387.97 48.08 387.97 1424.51 103 0.91 88.35 8.30 8.30 387.97 13.17 387.97 1424.51 102 0.98 88.35 10.01 10.01 387.97 17.28 387.97 1424.51
creator: ugob
date: 2007-12-07T21:48:21-00:00

Re: /proc/user_beancounters and vzlist giving different outputs
type: item
description: yes I have both calculations made in the same script. They show a little difference in bytes, but the one based on user_beancounters is always +-100kb bigger than the vzlist -o mode... can't figure out why.. vzmemcheck shows a value that is closer to the vzlist mode, but lower...
creator: blunt
date: 2007-12-07T21:52:24-00:00

Re: /proc/user_beancounters and vzlist giving different outputs
type: item
description: Does anyone have a clue on why this happens? vzmemcheck shows 16,95Mb of usage, vzlist and /proc/user_beancouters show 17,1Mb (but not the same in bytes: 17969188 for beancounters, 17955105 for vzlist). Which is the output I should trust of being more accurate? thank you
creator: blunt
date: 2007-12-09T13:11:18-00:00

Re: /proc/user_beancounters and vzlist giving different outputs
type: item
description: I can't speak for the others, but I think that you're making a big deal out of a minimal difference between two outputs.
creator: ugob
date: 2007-12-09T22:48:53-00:00

Re: /proc/user_beancounters and vzlist giving different outputs
type: item
description: I just wanted to know because this time the difference is small, but I don't know if it may be a bigger one... that is why I wanted to know which one i should trust...
creator: blunt
date: 2007-12-10T08:34:11-00:00

Re: /proc/user_beancounters and vzlist giving different outputs
type: item
description: You can check vzlist sources to find out how it calculates those numbers, and compare it with your own way.
creator: kir
date: 2007-12-10T09:35:00-00:00