Questions tagged [lsof]
lsof is a tool to list open files of processes
231 questions
4 votes
2 answers
525 views
how to tell, from the outside, if the output stream of a process has been closed?
Suppose you have this script, on an Ubuntu machine: #!/bin/env python3 import sys import time try: i = 1 while True: print(i) i += 1 except Exception as e: sys.stderr.write(f"We ...
0 votes
1 answer
62 views
Detecting outbound mail
My VMs IPv6 address occasionally get on a blocklist. Their "evidence" is that they claim something is making outbound connections to port 25 and issuing an EHLO of an IP address, not a ...
0 votes
1 answer
37 views
freeciv in lsof output
I'm working an issue with ZeroMQ using XSub-XPub. I did lsof on bind in port and see: lsof -i :5556 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME python 475590 codespace 45u IPv4 ...
0 votes
2 answers
338 views
Process called lsof using too much CPU
I keep having lsof -w -l +d /var/lib/php5 eating up my CPU I want to know who is triggering it and what does it have with php5 ...
2 votes
2 answers
434 views
Finding the processes trying to open some FIFO
In my example, the wc program is trying to open the test FIFO or named pipe. These in-progress open syscalls seem not to be shown by fuser or lsof: mknod /tmp/testpipe p wc /tmp/testpipe & timeout ...
4 votes
1 answer
157 views
lsof output file descriptor with asterisk not documented
When I run lsof I see the output java 1752736 user 9995u sock 0,8 0t0 1432559505 protocol: TCPv6 java 1752736 ...
2 votes
1 answer
260 views
Have lsof take action if a process has a file open — and, ideally, do so repeatedly
Per the EXAMPLES section in the lsof(8) man page on manpages.ubuntu.com, I should be able to run a command/take action if a process has a file open: To take action only if a process has /u/abe/foo ...
0 votes
1 answer
546 views
how can I list, with lsof command, TCP Established connections ignoring localhost?
Using lsof command I would like to print out TCP connections with ESTABLISHED state but ignoring the ones with localhost. I tried: lsof -itcp@^127.0.0.1 -stcp:established lsof -itcp@(^127.0.0.1) -stcp:...