Look for unwanted processes.
Usually, you know about all the processes you’re running. However, occasionally, processes aren’t properly killed when you think they are. For example, sometimes you might log out abnormally and processes associated with that terminal aren’t completely killed.
When that happens, the processes just hang on, unassociated with a terminal, until the system is next booted or until you notice them and kill them yourself. Naturally, it’s better to kill them yourself before they help bring the whole system to its knees.
For example, suppose I use the ps command to see what processes I’m running:
% ps PID TT STAT TIME COMMAND 13745 q7 I 0:01 -csh (tcsh) 13781 q7 S 0:23 xlbiff 24912 q7 T 0:00 more ch01 23938 qe S 0:03 -csh (tcsh) 26079 qe S 0:00 xclock 26082 qe R 0:00 ps
The more ch01 process was something that I didn’t know I was running. At the time, I had accidentally run the more command in the background, which didn’t work since more is an interactive program. I had gotten a message like this:
[1] + Suspended (tty output) more ch01
Even though I got an error message, however, the process continued to run.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access