lsof Questions

3

I am trying to remove a directory /path/to/dir using the rm -rf command. Unfortunately I get the error rm: cannot remove '/path/to/dir/.nfsdda293a660f276ca0000000a': Device or resource busy After ...
Greensward asked 22/4, 2022 at 1:32

2

Solved

A file is locked with either a fcntl (non-blocking) or some custom way. So I'm using lsof and checking if pid of a process is in there. If lsof returns blank than nothing is using it. However lsof...
Gel asked 22/9, 2014 at 19:5

2

Solved

I'm looking for a way to determine which files are open in my whole system (Linux) using Python. I can't find any module that does this. Or maybe the only way is with the command lsof?
Analyzer asked 20/11, 2013 at 20:23

3

Solved

I'm using the following command to get a list of pipes: lsof | grep PIPE I want to know what the values of the FD column mean (the 5th one https://i.sstatic.net/zkjCn.png). I think that r and w...
Assumpsit asked 5/8, 2014 at 14:1

2

I try to start the Python SimpleHTTPServer on port 7054 : $ sudo python -m SimpleHTTPServer 7054 ... socket.error: [Errno 98] Address already in use So, I ran the following commands : $ sudo ne...
Nikko asked 28/5, 2014 at 8:59

1

We have a 3 node Kafka cluster deployment, with a total of 35 topics with 50 partitions each. In total, we have configured the replication factor=2. We are seeing a very strange problem that interm...
Mercer asked 12/3, 2019 at 17:20

5

Solved

Is there any way to get all opened sockets using c++? I know the lsof command and this is what I'm looking for, but how to use it in a c++ application? The idea is to get the FD of an opened socke...
Blackfish asked 17/12, 2010 at 11:44

3

Tomcat runs on my workstation for several days, now it has no response, lsof command outputs lots of close_wait state connections, tomcat pid is 25422, however the ulimit command shows that the "op...
Tonsure asked 4/11, 2013 at 9:23

4

Solved

In linux, I use lsof to check the file is opened by which process. I have an android device, but no lsof command. Is it possible to find which process open the specific file ? I will use it to ver...
Rainwater asked 29/5, 2012 at 9:19

0

I have a minimal starlette app running via uvicorn doing nothing but returning a ping. Strangely, even with a single thread, I have 45 file handles to my log file. The handles increase with hits to...
Howlend asked 23/4, 2020 at 22:10

3

I wrote a small pieces of java program as following: package com.ny.utils.pub; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputSt...
Rubella asked 11/11, 2011 at 9:30

2

Solved

I've created a named pipe for some other process to write to and want to check that the other process started correctly, but don't know its PID. The context is running a command in screen, making s...
Noumenon asked 6/2, 2017 at 19:7

2

Solved

How do you get lsof to produce numeric port information instead of attempting to resolve the port to service name? For example, I want TCP *:http (LISTEN) to give me TCP *:80 (LISTEN) in-fact if a...
Occupancy asked 1/12, 2015 at 23:34

4

Solved

I encounted a problem today: When I started HDP docker container, an error occured: listen tcp 0.0.0.0:8086: bind: address already in use According to error message, I know that port 8086 was...
Cookstove asked 20/3, 2018 at 9:57

1

Solved

I have a spring boot app running in alpine linux listening on port 8080. However, when I do: $ lsof $ lsof -i 8080 it doesn't show the open ports. Do you know what I am doing wrong? It almos...
Ajar asked 1/2, 2019 at 21:46

1

Solved

I have a custom pipeline that looks roughly like this in gstreamer shorthand: gst-launch-1.0 rtspsrc location=rtsp://<url-for-stream> ! rtph264depay ! h264parse ! imxvpudec ! *any-sink* a...
Jonellejones asked 8/10, 2018 at 23:40

4

The thing is, I want to track if a user tries to open a file on a shared account. I'm looking for any record/technique that helps me know if the concerned file is opened, at run time. I want to cr...
Azotic asked 19/6, 2015 at 10:14

2

Solved

I have a file that was deleted, but is still held open my a program. I found the inode number using lsof. How can I create a hard link back to that inode? Any code helps, but Perl would be handy. ...
Decker asked 24/7, 2009 at 15:59

4

Solved

On Linux, ulimit -n can be used to change or view the limit on the number of file descriptors for a process, and lsof -p nnn | wc -l seems to consistently report the actual file descriptor usage. ...
Gadhelic asked 27/4, 2009 at 20:48

2

I ran the command sudo lsof -i -n -P | grep TCP and I was wondering if I could get some more clarification on its output. Specifically, in this image: Why do I have an IP:PORT pointing to anoth...
Transfinite asked 19/6, 2015 at 21:11

1

Solved

I am using following lsof command: lsof -iTCP -a -sTCP:^LISTEN -a -p <pid> If there is some output this command returns an exit code of 0 but if there is no output the exit code is 1. ech...
Component asked 24/4, 2015 at 8:7

2

Running Apache and Jboss on Linux, sometimes my server halts unexpectedly saying that the problem was Too Many Open Files. I know that we might set a higher limit for nproc and nofile at /etc/secu...
Nostology asked 13/9, 2013 at 14:28

3

Solved

I got an application which is polling on a folder continuously. Once any file is ftp to the folder, the application has to move this file to some other folder for processing. Here, we don't have a...
Janeejaneen asked 31/7, 2009 at 8:52

0

Anyone know of a way to list currently open file descriptors in Java as well as the limits on the number of open file descriptors? The best I've found so far is https://gist.github.com/jtai/540868...
Fushih asked 24/6, 2014 at 20:19

1

Solved

My intent is to check for TCP and UDP being opened by a specific process. lsof -p $1 | grep -E "TCP|UDP" (this works well on Mac OS) I installed lsof binary on a jailbroken iPad, from cydia. Whe...
Uphill asked 25/7, 2013 at 8:39

© 2022 - 2025 — McMap. All rights reserved.