The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
1answer
25 views

Closing open file without killing the process

I have java(yeah java...) application running on CentOS 7. After a while, there are many "deleted" files that bother me. for deleted files used(not the issue): lsof | grep "(deleted)" I found them ...
0
votes
0answers
12 views

A port is supposedly being listened upon but lsof does not see it

I am unable to start the datanode on my mac because some process is bound to port 50020: $netstat -an | grep 50020 tcp4 0 0 10.246.244.94.50020 17.172.232.9.5223 ESTABLISHED ...
0
votes
0answers
6 views

Weblogic server port not listing in netstat

I am able to access weblogic server from a remote system in hostname:7001/console at 7001 port (as configured in weblogic). But I couldn't find a 7001 port entry in either netstat or lsof output. ...
0
votes
0answers
25 views

lsof without the TID on Ubuntu

While attempting to debug a I/O issue, I received asked my colleague to execute lsof on the machine and send it back to me. When I examined the output, I saw that for each file and network ...
1
vote
0answers
22 views

Per-process network usage on OSX?

I want to periodically poll for per-process network usage. Is there a way to do this efficiently in OSX like netstat -p on Linux? I know there's lsof -i -Tqsf but it doesn't seem to show bytes ...
0
votes
2answers
44 views

Counting the number of open files for each user?

I am looking for a command that would list me number of open files for each user, sorted descending. For example lsof -u postgres | wc - would list them only for the postgres user, but I do want to ...
0
votes
1answer
26 views

How can I find all files open within a given directory?

I know I can use lsof to list open files, and I know I can use find to find files by inode within a given directory. But how can I effectively combine these two programs to list all open files which ...
1
vote
1answer
72 views

How can I check which computers I am logged onto on my school network?

At some point in the last week, I forgot to log out of a computer somewhere in my school and now I cannot open firefox because it is already open on that computer. Is there a shell command for me to ...
0
votes
1answer
83 views

linux reverse engineer to find process source

A compromised wordpress site has started several processes that run as the apache user. I can find these processes by running ps and greping for the apache user. Then I take one of the process IDs and ...
3
votes
2answers
630 views

How can I print file names on linux command if know its file descriptor of a file opened by a process?

I know the file descriptor of a file opened by a process, but I don't know the process ID. How can I print file names from the Linux command prompt if I know the file descriptor of a file opened by a ...
1
vote
1answer
71 views

How can I get file names of opened by a process?

I want to list down all file names opened by init process. I know about /proc/PID/fd directory. But that gives file descriptors only. How can I get file names from list of file descriptors?
1
vote
1answer
3k views

Can't unmount dmg. Keep getting “Resource Busy”

"Workspace" is an encrypted dmg where I keep my code. I don't usually unmout it but I need to take a backup and it's refusing to let me unmount: mark@mark-macbook-air /Volumes$ lsof | grep Workspace ...
0
votes
2answers
152 views

What does *:* in lsof output stand for?

While executing the command /usr/sbin/lsof -l -i -P -n as the root user, I am getting this output. COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME ... httpd 9164 70 3u ...
1
vote
3answers
535 views

mv: cannot move «file.mp4» to «/path/file.mp4»: Device or resource busy*

I simply try to move file to another path and I'm getting mv: cannot move «file.mp4» to «/path/file.mp4»: Device or resource busy* I've tried using lsof, but it's not showing any openfiles. lsof +D ...
4
votes
1answer
823 views

lsof reports no files open on external volume but it still cannot be safely unmounted

I've searched around here on SX and other places but have not found an approach that gives me any traction on my issue. I've a volume (used by Time Machine as it happens) on an external Firewire ...
0
votes
1answer
140 views

Better use of lsof in Linux?

I'm looking for a way to list open files by the Flash plugin (whether Firefox or Chrome). I could use lsof | grep Flash, and it works. But I'm looking for a more efficient way to do that, using lsof ...
0
votes
3answers
451 views

Listing active *and past* network connections

On Linux, I know that I can list active network connections with lsof -i or netstat. However, as far as I know, this only list connections that are currently open. If a process makes a short ...
1
vote
1answer
77 views

How to determine full command with args given a pid (or port in use)

I've got this nice bash function for telling me the pid using a port: using_port() { lsof -i:${1} } Output looks like this: COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME ...
4
votes
2answers
306 views

How can I programmatically “eject” a keychain on OS X?

I'm using a script to eject a small USB key I use as a “identity” drive, which contains some secure information. Of note, it has an OS X “keychain” file on it, which contains some of my more secure ...
0
votes
1answer
294 views

How to quickly determine which process (if any) listens to a serial port

I am looking for a command to see the process listening to a port, e.g. /dev/ttyS0 (with root rights on a Linux system). I can do that with lsof /dev/ttyS0 but this is really too slow. Also, I ...
2
votes
1answer
364 views

Mac lsof command find all processes for all users

A while ago my teacher asked me to create a script that would kill Minecraft anytime it came up. It worked when the user themselves ran it, but it didn't if it was at root level. Is there a command ...
5
votes
1answer
272 views

Find processes listening on the wildcard address in `lsof`

Using lsof, I can find all of the processes with a TCP socket listening for connections: lsof -Pni -sTCP:LISTEN e.g.: COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME cupsd 662 ...
0
votes
1answer
504 views

How can I unbind a UDP port that has no entry in lsof?

On my Mac, I have a UDP port that is "already in use", but doesn't have an associated process: sudo netstat -na | grep "udp.*\.500\>" shows udp4 0 0 192.168.50.181.500 *.* ...
3
votes
1answer
2k views

How to install lsof on Debian/kFreeBSD?

How do you install lsof on Debian/kFreeBSD Testing (Wheezy/Sid)? $ apt-get install lsof Package lsof is not available, but is referred to by another package. This may mean that the package is ...
0
votes
1answer
650 views

How to convert lsof hexadecimal IP:port output to decimal notation?

I feel dumb for asking but how do I convert this to the IP port combination? IPV4 0xffffff8015f9aa40
1
vote
1answer
134 views

Why Does Issuing One lsof Launches Two Processes?

I'm on current OS X 10.7. Sometimes I want to check which application locks a certain file. I do that by lsof | grep $FILENAME I noticed that running this command invokes two instances of lsof. Why ...
1
vote
2answers
7k views

Debugging connection timeouts using strace?

I'm trying to figure out why is Eclipse spinning, so I decided to fire up strace. I found the eclipse process using: $ ps ax | grep java 5546 ? Sl 19:04 /usr/bin/java ... [arguments ...
11
votes
3answers
13k views

Continuously monitor files opened/accessed by a process

lsof -p 12345 will list all the files opened by process whose pid is 12345 but only for a particular instant of time. How can we continuously monitor a process from the start to end(until process is ...
2
votes
1answer
379 views

Periodically printing the number of open files for a process

I can use a program like top to periodically update system statistics and I can use lsof -p <pid> | wc -l to give me a snapshot of the number open files for a process. Is there a command I can ...
1
vote
2answers
561 views

How many files should be listed as open under lsof?

I am not an advanced Linux user. I have a VPS with 768MB of RAM running CentOS. I executed the lsof command as root and I see that there is a list of 3000 files. Usually, how many files should be ...
3
votes
1answer
56 views

Is there a way to know WHEN a connection has been established?

I'm working with mobile IPv6 and was dealing with lots of zombie connections. I set keepAlive to true and want to test whether old connections are being discarded. I'm using lsof to list the process ...
1
vote
4answers
1k views

How to move files that are not in use?

I want to move files in a directory that are not currently in use. I have a sense that some combination of lsof, find, and xargs could work but I can't quite get there. So far, I created the ...