Open GioMac opened 6 years ago
Note the --total option outputs a single number unformatted, and is meant for automated tools. Is it practical to do other automated processing on the output?
I'm interested in this option as well. I have a few hundred php-fpm processes for which I want to check memory usage vs. the number of requests served. ps_mem does a lovely job of getting the memory usage, and although I can readily extract the memory info per process with "ps_mem -d" and then a bit of grep/awk etc., the output will be mangled if any of the processes ever cross a human boundary (e.g. kiB instead of MiB). I can hack my own version to do it this way of course, but having it in the master version seems more attractive :-D I'm happy to propose a patch if that helps. (Btw: seriously useful bit of code, this! I haven't found a built-in utility which does the same thing, which is baffling after all these years.)
duplicate of #32
It's very hard to parse the output, because we need to differentiate KiB and GiB, convert them to use in automation, monitoring tools etc. Can we please have an option to use only MiB's or B's?