Questions tagged [lsof]

lsof is a tool to list open files of processes

Filter by
Sorted by
Tagged with
57 votes
1 answer
56k views

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
6k views

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 192.168.1.220:3306 C:57010 ...
  • 1,515
1 vote
1 answer
3k views

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
1k views

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
344 views

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
5k views

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
193k views

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
6k views

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
22k views

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 127.0.0.1:53 0.0.0.0:* LISTEN 1482/named udp ...
  • 38.4k
27 votes
6 answers
145k views

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
51k views

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
228k views

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
7k views

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
5