Skip to main content

Questions tagged [lsof]

lsof is a tool to list open files of processes

4 votes
2 answers
495 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 ...
eftshift0's user avatar
  • 775
0 votes
2 answers
115 views

Killing a process PID starts a new process instead

I have a running process on localhost on port 5000. I have tried kill - 9 <PID> which it works for that PID but it starts a new process with a new PID instead. What's the issue here? I'll put ...
Ajit Sharma's user avatar
0 votes
1 answer
59 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 ...
John Oliver's user avatar
0 votes
0 answers
57 views

ps ax and -o fd

According to ps(1), ps doesn't support fd. even I didn't find fd in task_struct of kernel. How can I find fd of a program? َUPDATE: FD means File Descriptor. When I get query from services such as : ...
PersianGulf's user avatar
  • 11.3k
0 votes
1 answer
34 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 ...
davetapley's user avatar
0 votes
1 answer
236 views

Hundreds of strange connections in iftop

OS is Debian. I'm running nginx as a webserver. I am not running Wordpress. Logging is enabled in the http block with: access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; ...
cat pants's user avatar
  • 167
0 votes
2 answers
319 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 ...
Aleksandar Pavić's user avatar
0 votes
0 answers
73 views

Very large discrepancy between du and df

OS is Debian. I have a few systems that seem to not be freeing disk space correctly. On a normal system: du --max-depth 1 / --exclude=/proc -h -x Seems to almost exactly agree with: df -h / ie, ~800 ...
cat pants's user avatar
  • 167
2 votes
2 answers
411 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 ...
Juergen's user avatar
  • 754
1 vote
1 answer
337 views

Why ss show a port is in use but lsof doesn't?

When I use ss (socket statistics) to show the usages of port 5432 I get: $ sudo ss -ln | grep -E 'State|5432' Netid State Recv-Q Send-Q Local Address:Port Peer Address:...
Marco Lackovic's user avatar
4 votes
1 answer
156 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 ...
lfmunoz's user avatar
  • 398
0 votes
1 answer
671 views

fuser -v /dev/nvidia* and lsof not responding

On our A100 machine, we frequently have zombie processes that still allocate memory when already stopped. I usually used fuser -v /dev/nvidia* to determine the PIDs of all processes and kill them ...
Green 绿色's user avatar
2 votes
1 answer
256 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 ...
Bink's user avatar
  • 306
0 votes
1 answer
239 views

How can I find out what so_type an existing unix socket has in macOS?

In linux we can run ss -x or lsof -U +E and we can see what type unix socket has. But in macOS there is no ss or we can run lsof -U which only shows TYPE - unix, but I would like to know with some ...
amkgi's user avatar
  • 103
0 votes
1 answer
535 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:...
downtheroad's user avatar

15 30 50 per page
1
2 3 4 5
16