![]() |
Universitätsrechenzentrum |
![]() |
|
#!/bin/sh
#
# Prozessangaben anzeigen
#
# Aufruf: proz <prozess_id>
#
ps -elf >/tmp/pro$$
a=$1
if test $a -lt 0
then
a=`expr $a '*' -1`
else
echo "PID PPID UID TTY CMD"
fi
trap "rm /tmp/pro$$; exit" 2
(
while read n
do
x=`echo $n | cut -f4 -d' '`
if test "$x" -eq "$a"
then
# die Feldnummern (fuer cut -f) sind vom Listenformat der
# ps-Implementierung abhaengig
p=`echo $n | cut -f4 -d' '`
pp=`echo $n | cut -f5 -d' '`
u=`echo $n | cut -f3 -d' '`
t=`echo $n | cut -f12 -d' '`
c=`echo $n | cut -f14- -d' '`
echo "$p $pp $u $t $c"
if test $pp -ne 0
then
./proz -$pp
fi
break
fi
done
) </tmp/pro$$
rm /tmp/pro$$
| Ursula Riedel 05. April 2003 |
Technische Universität Chemnitz, Straße der Nationen 62, 09107 Chemnitz Impressum - Copyright © 2005 by TU Chemnitz, URZ, alle Rechte vorbehalten. |
Druckansicht |