Tip #183 Always running
This checks if a daemon is running, if not it starts the daemon. Great for daemons that need to always be running. Can be used with cronps -C someprogram || { someprogram & }
// sil at infiltrated dot net Read more »
- TAGS:
- ps
Tip #22 Grepping for processes
Grepping for a process will return the grep command, this can be avoided by adding '| grep -v grep' to a command or easier in some cases altering the regular expression by adding brackets around a character.Read more »
Tip #822 Hierarchic list of processes
You probably use the ps command a lot, but sometimes there is too much info, and somewhat disordered. It can be easily ordered with the forest option, as the following example shows: Read more »- TAGS:
- ps
Tip #528 Top ten running processes
Display the top ten running processes - sorted by memory usageps aux | sort -nk +4 | tail
ps returns all running processes which are then sorted by the 4th field in numerical order and the top 10 are sent to STDOUT. Read more »
Tip #262 Kill matching processes without unnecessary greps and extra sh p
ps -eo pid,args | awk '/sleep/ && !/awk/{ system("kill -9 "$1)}' Read more »alias aptitude at awk bash bc cal cat cd colrm comm cp csh curl cut date dd df dialog diff dirname dpkg du fc find fuser grep gs gzip history iconv kill ksh last less ln ls lsof lynx m4 md5sum mkdir mkfifo mkisofs mv mysql nc netstat openssl OSX perl ping popd ps pushd python read redirection rm scp screen sed sort ssh stat sudo svn tail tar tee test top tr uniq vim wc wget xargs