Questions tagged [lsof]

lsof is a tool to list open files of processes

Filter by
Sorted by
Tagged with
57 votes
1 answer

How do I monitor opened files of a process in realtime?

I know I can view the open files of a process using lsof at that moment in time on my Linux machine. However, a process can open, alter and close a file so quickly that I won't be able to see it when ...
  • 13.1k
6 votes
3 answers

How can I know the process name which is opening a tcp port?

I have two linux servers. Let's say they are C and S. C is client of S On my S machine, I type. $ netstat -an | grep ESTABLISHED tcp 0 0 C:57010 ...
  • 1,515
1 vote
1 answer

lsof compares to pfiles, difference?

pfiles in Solaris suspends files for a short period while examining them, however, lsof does not. How does lsof work that allows it to retrieve information while not suspending files?
  • 149
2 votes
1 answer

Information about the 1630/master app

When I run $ sudo netstat -a --programs | grep LISTENING | grep 1630 I will get this output. Do you know what good are processes running under this app name? Why they are running on my system and if ...
  • 15.9k
1 vote
1 answer

How can I monitor if anybody (any process) access is certain file [duplicate]

Possible Duplicate: Access history of a file I know if a file is "being accessed" I can use lsof to see who (which process) is accessing it, but lsof is slow and heavy and I don't think I would ...
  • 6,483
9 votes
3 answers

lsof - age of file

The *nix command lsof gives you a list of open files. Is anyone aware of a way that would also list how long a particular file has been open? Either by using lsof or any other command. I'm using ...
user avatar
77 votes
3 answers

lsof and listening ports

I am trying to get all the processes listening for a network connection on Mac OS X. netstat does not have the -p option and I am trying with lsof lsof -i -sTCP:LISTEN gives me a fair list of ...
  • 9,576
9 votes
3 answers

Faster alternatives to lsof

I want to extract the process id of a certain process in order to shut it down. The process is a local web server using a certain port (localhost:3000), and I am currently doing it like this to ...
  • 862
14 votes
5 answers

Under AIX, how can I get the full path of a program bound to a port?

Under Linux I can use netstat -tulpnw and ps, like so: # netstat -tulpnw | grep :53 tcp 0 0* LISTEN 1482/named udp ...
  • 38.4k
27 votes
6 answers

Alternatives for "lsof" command?

In many cases lsof is not installed on the machines that I have to work with, but the "function" of lsof would be needed very much (for example on AIX). :\ Are there any lsof like ...
  • 38.4k
73 votes
8 answers

Who's got the other end of this unix socketpair?

I want to determine which process has the other end of a UNIX socket. Specifically, I'm asking about one that was created with socketpair(), though the problem is the same for any UNIX socket. I ...
116 votes
5 answers

Determining what process is bound to a port

I know that using the command: lsof -i TCP (or some variant of parameters with lsof) I can determine which process is bound to a particular port. This is useful say if I'm trying to start ...
user avatar
5 votes
3 answers

How do I get a mapping of Pid to Port?

I have a process which I need to run on a specific port. I have started some other process on that port and I need to kill it. Unfortunately, I don't remember the name/pid of the other process so I ...
  • 151

1 2 3 4