Memory usage by user
2009-12-03 09:12
211 查看
A short little script I stumbled across when cleaning my $HOME. I do not think I wrote it myself - at least I can't recall that I did. Quite handy and it's small and compact using the commands ps, awk, sort and head:
The result is a top ten list of the users that consume the most memory:
There I am - at number five...
ps aux --no-headers | awk ' { name[$1] += $1; pros[$1] += $4; mem[$1] += $5 } END { for (var in name) { print mem[var]" "var" "pros[var] } }' | sort -nr | head
The result is a top ten list of the users that consume the most memory:
741012 root 9.3 238152 bjorn 3.8 119380 thomasez 1.2 105332 krav 1.9 100804 lars 0.6 95916 ingvar 1.6 89720 kjetilho 1.5 78044 jo 1 74232 espen 0.8 73460 michael 0.4
There I am - at number five...
相关文章推荐
- Exception occurred during processing request: com.hry.shop.user.action.UserAction.findByName()
- 关于Suppressing notification from package com.xxx.xxx by user request.的异常
- ORACLE数据库表解锁record is locked by another user
- 产品issue 诊断:Java CPU/Memory- Caused by JAX-WS Client
- Vmware提示:the operation was canceled by the user
- oracle 表记录被locked的解决办法,record is locked by another user
- mybatis-中级篇-UserDaoTestByMapper
- Installation failed with message:INSTALL_CANCELED_BY_USER
- Memory Hacking Software v4.0.0.13 by L. Spiro
- Installation failed with message:INSTALL_CANCELED_BY_USER
- Caused by: java.lang.OutOfMemoryError: PermGen space异常处理
- Unifying User-Based and Item-Based Collaborative Filtering Approaches by Similarity Function 译文与j...
- UE(User experience design) is defined by Wikipedia
- oracle record is locked by another user
- Record is locked by another user --Oracle行锁解锁
- Oracle 数据库 Record is locked by another user 问题解决办法
- 连接redis时:Connection reset by peer: socket write error&&mysql:Access denied for user 'root'@'localhos
- php -- memory_get_usage
- OM Record is currently being worked on by another user, Please try to update it later.
- Eclipse连不上模拟器的问题[emulator-5554 disconnected] 与 ERROR: the user data image is used by another emulator. aborting