aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2005-01-04 21:14:58 +0000
committerrsc <devnull@localhost>2005-01-04 21:14:58 +0000
commit33514167ed3bfd7d80c9a08c7c38e52a691d51b1 (patch)
treeeefd4d98aff33218a35b0bd47dbe1c3136e24718 /bin
parentf9bca6a2a402eca55bcd8ea3f17d0051d7b5382e (diff)
downloadplan9port-33514167ed3bfd7d80c9a08c7c38e52a691d51b1.tar.gz
plan9port-33514167ed3bfd7d80c9a08c7c38e52a691d51b1.tar.bz2
plan9port-33514167ed3bfd7d80c9a08c7c38e52a691d51b1.zip
show the amount of memory in use
instead of the amount of address space. work a little harder for wchans
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ps6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/ps b/bin/ps
index 25384ccb..7a8cd4e4 100755
--- a/bin/ps
+++ b/bin/ps
@@ -25,7 +25,7 @@ BEGIN{
function statestr(s, wchan)
{
- if(wchan != s && wchan != "?")
+ if(wchan != s && wchan != "?" && wchan != "-")
return wchan;
t = state[substr(s, 1, 1)];
if(t == "")
@@ -71,11 +71,11 @@ function statestr(s, wchan)
case "${SYSNAME:-`uname`}" in
SunOS)
- /bin/ps -aA -o 'user,pid,stime,time,vsz,s,s,args' | sed 1d |
+ /bin/ps -aA -o 'user,pid,stime,time,rss,s,s,args' | sed 1d |
nawk -f /tmp/awk.xxx$$ | sort -n +1
;;
*)
- /bin/ps -axww -o 'user,pid,start,time,vsz,stat,wchan,command' | sed 1d |
+ /bin/ps -axww -o 'user,pid,start,time,rss,stat,wchan,command' | sed 1d |
awk -f /tmp/awk.xxx$$ | sort -n +1
;;
esac