Reputation
Top tag
Next privilege 125 Rep.
Vote down
Badges
2
Impact
~81 people reached

  • 0 posts edited
  • 0 helpful flags
  • 11 votes cast
Dec
28
comment Memory usage per user in Linux?
Actually that should be $NF instead of $2 in my comment above to get the last column from awk (as $2 doesn't work with commands that have spaces in them). Seems I can't edit the comment any more.
Dec
28
comment Memory usage per user in Linux?
Thanks! I made a few modifications and am using this: ps --no-headers -eo user,rss | awk '{arr[$1]+=$2}; END {for (i in arr) {print i,arr[i]}}' | sort -nk2. The sort command needs the -n flag to make it parse the memory as a number. Also this way you can replace the word "user" with "command" to group by application name instead.
Oct
24
answered Where are iptables rules stored on Digital Ocean Ubuntu 14.04
Oct
24
asked Where are iptables rules stored on Digital Ocean Ubuntu 14.04
Feb
11
awarded  Autobiographer
Mar
6
awarded  Supporter