Unix How To: Peering at a Process with lsof

By  

You have probably used lsof from time to time, probably when tracking down some sort of problem. But maybe you haven't tried all of its permutations or looked at it just to get a deeper understanding of how some particular process works. Let's look at one particular lsof command that can provide a lot of insight into a single process.

In this first example, we're going to look at the ypbind process with the command "lsof -c ypbind". The "c" specifies that we want to look at processes whose names start with "ypbind".

We see right away that ypbind is running as PID 198, making it likely it hasn't been restarted since the system was booted.

Join us:
Facebook

Twitter

Pinterest

Tumblr

LinkedIn

Google+

Answers - Powered by ITworld

Join us:
Facebook

Twitter

Pinterest

Tumblr

LinkedIn

Google+

Ask a Question