Technical blog

June 1, 2008

Magic of ps

Filed under: linux — Tags: — paawak @ 11:34

The command

$ps -eF

lists all process along-with the full command which started the process. When I ran this, I could not see the entire command due the width restriction of my terminal. This is the solution to set unlimited width:

$ps -eF -w -w

Now, suppose I want to know a specific process by its name:

$ps -F -C java -w -w

The -C option accepts a list of process name like:

$ps -F -C “java xmms” -w -w

For a list of files opened by a process, use

$/usr/sbin/lsof -p 3456 | grep XXXX

[Courtesy Prakash]

« Newer Posts

Powered by WordPress