I know how to get a PID
of a running process in Ubuntu
, but aside from killing a running process, what else can the PID
be used for?
The question is a bit broad. Maybe it helps to explain what a PID is:
PID = Process ID = Process Identifier
Every process on your system is assigned an unique number. This number is the PID. The PID is only there so that you can specify a process unambiguously. So the question should rather be:
What operations can be done on processes.
Sending signals (with kill
). Signals can be used for more than just killing programs, for instance dd
can output its current progress when sending the USR1
signal.
Changing priority (with renice
). Processes have a priority which determines how much CPU time they get compared to other processes. The priority can be changed by you.