mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-30 08:59:56 +02:00
commit bash-20130301 snapshot
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#! /bin/bash
|
||||
#
|
||||
# pmtop - poor man's `top' for SunOS 4.x
|
||||
#
|
||||
|
||||
CLEAR=clear # could also be 'tput clear'
|
||||
HEADER="USER PID %CPU %MEM SZ RSS TT STAT START TIME COMMAND"
|
||||
|
||||
if [ -n "$LINES" ]; then
|
||||
SS=$(( $LINES - 2 ))
|
||||
else
|
||||
SS=20
|
||||
fi
|
||||
|
||||
while :
|
||||
do
|
||||
$CLEAR
|
||||
echo "$HEADER"
|
||||
ps -aux | sort -nr -k 3 | sed ${SS}q
|
||||
sleep 5
|
||||
done
|
||||
|
||||
exit 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user