Linux Admin Blog

System Administration, Linux, Solaris, Backup, Networking, Security, Mysql, Script, Tips & Tricks

Commands related to Process Control

Posted by sanjaydalal4u on July 1, 2009

Here “PID” is refer to the process ID, that you can get from command “ps -aux”

#fg PID
It Brings a background or stopped process to the foreground.

#bg PID
It sends the process to the background.

#any command &
Run any command in the background (the symbol “&” means “run the proceeding command in the background”).

#batch any command
Run any command when the system load is low. I can logout and the process will keep running.

#at 18:00
Execute a command at a specified time. You will be prompted for the command(s) to run, until you press d.

#kill PID
To shutdown process by force. First determine the PID of the process to kill using ps.

#killall program name
Kill program(s) by name.

#nice program_name
Run program name adjusting its priority. The priority value may be in the range -20 to 19. Only root may specify negative values. Use “top” to display the priorities of the running processes.

#renice -1 PID
(as root) Change the priority of a running process to -1. Normal users can only adjust processes they own, and only up from the current value (make them run slower).

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>