views:

87

answers:

2

In Linux is there any way to check processes memory measured on bytes (using top or ps for example). Not in kbytes, but bytes.

Thanks in advance!

+1  A: 

multiply kbytes by 1024

Zydeco
That's stupid..
Rui
It's not, since pages are 4KB on most systems, any memory usage will be a multiple of the page size
Zydeco
+3  A: 

Beyond the obvious answer of multiplying by 1024 (or 1000 if you want to be SI-correct)?

AFAIK top, ps etc. get their info from reading /proc/[PID]/status or something equivalent. Which reports info in KB. So I'd guess the answer to your question is no. Not that a positive answer would be useful, since memory is allocated from the kernel at page-level granularity, and the minimum page size Linux supports is 4 KB, so you wouldn't get more "resolution" by getting the memory consumption in bytes.

janneb