Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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:

screenshot

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

share|improve this question
add comment

4 Answers

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
add comment

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
add comment

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 
init(1)---screen(13578)---bash(13642)---mutt(9879)

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

share|improve this answer
add comment

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
add comment

Your Answer

 
discard

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.