note to myself

(all one one line)
ps ax -o "vsize" -U www | tail -n +2 | awk '{sum=sum+$1;printf("sum: %d\n", sum)}' | tail -1

displays the total memory used (virtual mem, in 1024-byte blocks) by all processes owned by the user 'www', as reported by ps. i think that's right anyway.

do the same with "rss" instead of "vsize" to get real memory use (also in 1K-blocks).

i'm sure there's an easier way to do this. please share if anyone knows :)

One Response to “note to myself”

  1. Mechaman Says:

    There isn't an esier way to do that, but there is an esier way to call it… just put it in a script and into one of your global directories (/bin;/usr/bin;/sbin;/usr/sbin) and you'll be able to call it by the name of your script file anytime you need to see it. Hope that idea helps.

    Mechaman