shntnu
1/28/2017 - 2:30 PM

Inspect open files

Inspect open files

# define PID 

# lsof is a command meaning "list open files"
lsof -p $PID

# run the once per second
watch -n 1 lsof -p $PID

# iotop  watches  I/O  usage information output by the Linux kernel 
# (requires 2.6.20 or later) and displays a table of current I/O usage 
# by processes or threads on the system.
sudo iotop