Show pageOld revisionsBacklinksBack to top This page is read only. You can view the source, but not change it. Ask your administrator if you think this is wrong. ======Linux Process Management====== =====ps===== * process listing command An example of a good general purpose process listing including a long formatted date-time of the start time of the command and the elapsed time since the process was started. <code bash> ps -eo pid,lstart,etime,cmd:128 </code> * List processes looking for specific process names. * Use a regex with a character class so that the grep command itself doesn't appear in the output of the //ps// command. <code bash> ps -ef | grep -i "[f]oobar" </code> * List process hierarchy (tree) <code bash> ps -ejH </code> =====disown===== * process termination When a process is started from a bash shell the process is a child of the shell and when the terminal session ends the child will be sent a signal that will result in the process being terminated. To prevent this the //bash// //disown -ha// command can be used to cause the child process to not receive the signal. As a result the process will remaining running after the terminal session ends. =====nohup===== ''nohup'' runs the specified program so that it will not receive a hang-up signal when the terminal exists. Therefore the program will continue running like a daemon. <code> nohup python /path/to/script.py & </code> linux/process_management.txt Last modified: 2018/06/01 13:27by mgupton