aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDuncaen <mail@duncano.de>2017-03-22 17:04:09 +0100
committerDuncaen <mail@duncano.de>2017-03-22 17:04:09 +0100
commitee757cb7e0c52176b457ea2c626adde3d7600504 (patch)
tree9cab4eaf0da888744558b8a4c8df8ce5dc2cf19e
parent959fbe2a711026178e726df093a8512f7b5f959c (diff)
downloaddotfiles-ee757cb7e0c52176b457ea2c626adde3d7600504.tar.gz
bin/oomtop: make the output more similiar to swaptop
-rwxr-xr-xbin/oomtop3
1 files changed, 1 insertions, 2 deletions
diff --git a/bin/oomtop b/bin/oomtop
index 63c88cc..4fbc5ce 100755
--- a/bin/oomtop
+++ b/bin/oomtop
@@ -1,9 +1,8 @@
#!/bin/sh
# oomtop - lists processes by oom score
-printf "SCORE\tPID\tCOMMAND\n" >&2
for f in /proc/[0-9]*; do
s=$(cat "$f/oom_score")
[ "$s" -eq 0 ] && continue
- printf "%d\t%d\t%s\n" "$s" "${f#*/proc/}" "$(cat "$f/comm")"
+ printf "%8d %s %d\n" "$s" "$(cat "$f/comm")" "${f#*/proc/}"
done | sort -nr