开发者

Linux process memory consumption in bytes (not Kbytes)

In Linux is there any way to check processes memory measured on bytes (using top开发者_如何学C or ps for example). Not in kbytes, but bytes.

Thanks in advance!


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.


multiply kbytes by 1024

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜