2
# ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0  13880  4016 ?        Ss   20:40   0:00 /bin/bash
root      9646  0.0  0.0   4312   360 ?        T    21:06   0:00 tee
root     10953  0.0  0.0  47420  1660 ?        R+   21:10   0:00 ps aux

I logged into my machine and I saw that some processes were still running like the tee above. What could have caused this?

1
  • 1
    It is actually stopped. Check the state, T. Whats the output of ps -p 9646 -o pid,ppid,pgid,cmd?
    – heemayl
    Jun 16, 2016 at 21:20

1 Answer 1

5

The T indicates that the process is "stopped". My guess is that you suspended a job (with Ctrl-Z, or with kill -STOP 9649), forgot about it, and then exited.

A suspended job can be resumed

  • by sending it the CONT signal (kill -CONT <process_id>), or,
  • by using either the fg (giving the control of the session back to the process) or bg (resuming the job in the background, as if it was started with a trailing &) commands. This is possible only if the process was started in the current shell session.

In this case, I would probably just kill the job (sudo kill 9649). It's up to you to decide if the process is doing something important that you'd like to investigate further.

3
  • So, what do we do when the process is stopped. Ignore it? or should we kill it? And how to properly exit? Jun 16, 2016 at 21:38
  • You have the user name (root) and the process ID (42430), so it ought to be easy to kill it: sudo kill 42430
    – Kusalananda
    Jun 17, 2016 at 5:48
  • @SenthilKumaran I've expanded on my answer.
    – Kusalananda
    Jun 17, 2016 at 6:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .