aboutsummaryrefslogtreecommitdiff
path: root/bin/oomtop
blob: 4fbc5cea804b2c1a7c527076b8e7b64505a718f6 (plain)
1
2
3
4
5
6
7
8
#!/bin/sh
# oomtop - lists processes by oom score

for f in /proc/[0-9]*; do
	s=$(cat "$f/oom_score")
	[ "$s" -eq 0 ] && continue
	printf "%8d  %s %d\n" "$s" "$(cat "$f/comm")" "${f#*/proc/}"
done | sort -nr