Questions tagged [lsof]
Lsof is a tool to list opened files by processes
15
questions with no upvoted or accepted answers
2
votes
1
answer
612
views
Process has more open sockets than should be allowed by prlimit
Running debian jessie. The following is done as root to avoid any permissions issues.
First I find the pid of my program, then I check its open file limit to verify that it is set at 1024. But when I ...
2
votes
1
answer
1k
views
Incoming FTP transfer not showing in lsof when using specific FTP client
I've got a script that continuously monitors an FTP dropbox directory and processes new files when they come in. The script runs lsof on each file before it tries to process it to determine if the ...
2
votes
0
answers
1k
views
Apache web server maxing out due to processes stuck at D status
I have a Apache 2.2.3 web server running on a 8 core VM with 8G Ram.
During a load test, the web server stopped responding and load average went up to 1000.
When I run Top command, I see a large ...
1
vote
0
answers
287
views
Get information about socket of unknown domain
The output of lsof (revision: 4.87) on centos 7.8.2003 shows:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 30858 xxxx 841u sock 0,7 ...
1
vote
0
answers
2k
views
lsof hangs forever centos 7
Having an issue where lsof hangs forever. I thought it might have been caused by the NFS mount which was recently interrupted and remounted, however, I tried unmounting the NFS mount and it's still ...
1
vote
0
answers
1k
views
What are the steps to track down a 'too many open files' issue
I'm trying to track down and root cause a 'too many file open' issue on RHEL 7.
From googling around, if I run this command it give me the open file count in the first column and the PID in the ...
1
vote
0
answers
1k
views
Why is lsof showing these ESTABLISHED ipv6 connections?
I'm trying to track down why a web application is accumulating file descriptors, in the form of connections to clients, even when the clients (browsers) have disconnected.
The server is running ...
0
votes
1
answer
239
views
Debian 11, multiple Solr versions running on different ports, lsof says that Solr9 is accessible only from localhost.localdomain
I have a Debian 9 server that is running Solr 7.3.
I have upgraded to Debian 11, Solr is still fine.
Now I'm trying to install Solr 9 alongside Solr 7.3, to have both versions running in the same time....
0
votes
0
answers
882
views
netstat shows a listening port with no pid and can't find pid with rpcinfo and ss and lsof
I tried bind nc on port 41120, but it said port has already been used. So I want to find out which process binded this port and if I can kill it. I executed netstat -taupen| grep 41120 and it shows ...
0
votes
2
answers
1k
views
Why big difference between `lsof -p <pid> | wc -l` and `lsof | grep <pid> | wc -l`
I find an elasticsearch process in Ubntu 14.04 linux vm holding many file handlers, while when I use lsof to do further analysis, it just gives some confusing results as below:
$ lsof -p | wc -l
$ ...
0
votes
2
answers
177
views
View what file started a process in linux
One of my servers started sending spam in heavy amounts. The server is using ISPConfig 3 and one of the web users most likely has a security breach.
I have identified the user and one file somehow ...
0
votes
1
answer
111
views
Is there a way to know the duration for which the connection is open using lsof?
If not possible with lsof what other way to find the time for which the connection is open on a machine.
Please do let me know if you need any other information.
0
votes
1
answer
163
views
find files which are not currently in use
I'm trying to archive some older files, but don't want to touch all the files which are currently in use. What's the best way to ask find to exclude "in use" files?
Right now I'm working on this ...
0
votes
1
answer
772
views
Pipe lsof to grep to awk ps -ef to grep
I'm trying to get some info on a certain PID. I'm probably doing this in a manner that is way too difficult, but I'm trying to run this:
lsof | grep grepstuff | awk '{ps -ef | grep $2;}'
and I'm not ...
-1
votes
1
answer
70
views
How to get the command of a process by an established port while ss, netstat and lsof failed?
Recently I have noticed extremely high network usage on a ubuntu server. I identified the port with nethogs. It connects to a SMB server within my LAN. It should be connected at boot for the dozens of ...