return to PRS Technologies website


4ge_watch.sh
#!/usr/bin/ksh ############################################################################### # # Module: 4ge_watch.sh # Author: Peter R. Schmidt # Description: Monitor progress of Informix 4ge programs # # Change Log # # Date Name Description................. # 05/13/02 Peter R. Schmidt Start Program # ############################################################################### EXCLUDE="pschmidt" while true do echo "Note: excluding elbs.4ge..." ps -ef | grep 4ge | egrep -v "grep|elbs.4ge|4ge_watch" | sort +4 echo "----------------------------------------------------------------------" # Who are these users anyway ??? for USER in `ps -ef | grep 4ge | egrep -v "grep|elbs.4ge|4ge_watch" | sort +4 | cut -c1-8 | egrep -v "root|$EXCLUDE" | sort -u` do NAME=`egrep "^$USER:" /etc/passwd | cut -d":" -f5` echo "$USER: $NAME" done echo "----------------------------------------------------------------------" sleep 10 done ################################################################################