Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have this 'java' process running for 3 hours ( I guess ). I didn't see it before and I wonder how could I find out where it's coming from?

Here is a screenshot:


EDIT: ok I figured it out, it's a freenet stuff I installed few days ago.

share|improve this question
up vote 3 down vote accepted

What does a

ps  -p 1983  -f   # 1983 being the PID your screenshot shows

tell you about it?

share|improve this answer
thanks for response :) says:00:06:42 java -Dnetworkaddress.cache.ttl= – Zack Westwater Oct 10 '12 at 1:04
thanks mate, I learned useful command :) – Zack Westwater Oct 10 '12 at 1:15
What about its parent PID, the third column in the ps output? Looked that one up? – tink Oct 10 '12 at 1:36

Run htop. It's like top, only better. In particular, htop shows the full command line, and you can scroll horizontally to see more of it.

share|improve this answer

You can also run pstree from the psmisc package to view a given PID and all its parents, all the way back to init or PID 1. e.g.

pstree -s -p 1983

You can use pstree's -A option for ASCII line-drawing chars rather than terminal-specific (e.g. ANSI/vt100/xterm/linux) line-drawing chars.

e.g. an example from my system:

$ pstree -A -s -p 9879 

If it's somehow not in your distro, psmisc is at http://psmisc.sf.net/

share|improve this answer

My personal favorite is ps -wwwaux|grep java|grep -v grep.

You can also toggle the top-command-line (i.e. show parameters of the processes in top) by pressing c in top.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.