Questions tagged [lsof]

Lsof is a tool to list opened files by processes

Lsof is a tool to list on its standard output file information about files opened by processes.

102 questions
1
vote
1 answer

why in /proc file system have this infomation

run: lsof|grep delete can find some process open fd, but system said that it has been deleted: mingetty 2031 root txt REG 8,2 15256 49021039 /sbin/mingetty (deleted) I look in the /proc filesystem: ls -l /proc/[pid] lrwxrwxrwx…
liutaihua
  • 11
  • 1
1
vote
2 answers

"Too many open files in system" on VPS with LSOF far from MAXFILES

Good day. Lately my VPS server (CentOS on it) started crushing with "Too many open files in system" error. I read many on the error and know that the limit is set by my hosting provider. I received a list of limits from host provider and they say…
1
vote
2 answers

Unknown process on port, lsof no help, nfs-kernel-server?

During a standard security sweep we found out a something was listening on a port unknown to us, 2030, and we are having trouble determining the source. # netstat -anp | grep LIST tcp 0 0 0.0.0.0:2049 0.0.0.0:* …
Wrikken
  • 981
  • 9
  • 21
1
vote
2 answers

Command to monitor which processes have a given file open

I know I can use lsof path/to/file to see which processes currently have a given file open. Is there a top-like command I can use to continuously monitor which processes have a given file open?
rampion
  • 268
  • 1
  • 6
1
vote
1 answer

lsof gives warning for some daemon

lsof | grep /var is giving me following error lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /home/user/.gvfs Output information may be incomplete. what can be possible reason for it?
Registered User
  • 1,453
  • 5
  • 18
  • 37
1
vote
3 answers

How to know how many files a process opened efficiently?

I knows I can use the command lsof -p xxxx | wc -l to know the count of opened files op a process, it works, but however, it is just too inefficient. I have some server process which have too many socket files, the wc -l method never return the…
Fang-Pen Lin
  • 282
  • 1
  • 3
  • 12
1
vote
1 answer

lsof not showing what port a proc is listening on

I have many processes on a box listening on several ports. I am trying to map ports to pids. The problem is that lsof is not telling me what ports belong to which process. Given an apache listening on port 80, I can see it listening via…
ericslaw
  • 1,562
  • 2
  • 13
  • 15
1
vote
4 answers

apache listening on 80, but not on any other port

i wanted to change a working apache configuration of example.com (exampleIP = 1.2.3.4 ) to change from the default port 80 to port 8001, such that http://example.com:8001 should work. I wasn't able to do so, and will document what i have attempted.…
Bosky
  • 315
  • 1
  • 3
  • 7
1
vote
0 answers

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 0t0 561359758 protocol: TCPv6 java 30858 xxxx …
William Pursell
  • 204
  • 1
  • 3
1
vote
0 answers

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 doing it. dmesg is showing a block on nvme1n1.…
Gnosis
  • 39
  • 3
1
vote
3 answers

How can a server accept incoming traffic to port 443 if it isn't listed in netstat?

I have a server that is currently accepting HTTPS requests and the only thing that shows with netstat -plnt is this: elijahlynn@web:~$ sudo netstat -plnt Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign…
Elijah Lynn
  • 139
  • 3
  • 16
1
vote
1 answer

how to count the open files without lsof

we have in our cluster more then 800 rhel machines - version 7.2 since lsof | wc -l take too much time ( sometimes 3-4 min ) , in order to get the current open files we want to know if there are other approach that can give the total current open…
King David
  • 433
  • 4
  • 17
0
votes
1 answer

Kubernetes hostPort: invisible to lsof?

I am playing around with my own small Kubernetes cluster. Something that I don't understand so far is how to see all open ports (= everything my Pods are listening on). I use Traefik as ingress with hostPorts :80 and :443 and I can see it listening…
0
votes
1 answer

what is role of cfinger in below output of lsof -i

I would like to understand the output of lsof -i, come with below response below, it looks like mystance is making outbond connection with 192.168.200.21 however on port section it says cfinger .i.e. 192.168.201.22:cfinger what is cfinger here…
0
votes
2 answers

mysqld process deleted in lsof

running lsof on the server today I came across that mysqld was showing up as deleted. Does anyone came across something like this before, or there is an explanation about this. Is it a bug? lsof | grep /usr/sbin/mysqld mysqld 2589 mysql …
Olive.b
  • 52
  • 1
  • 2
  • 10