Understanding lsof output

lsof seems to have duplicate entries for me.

1:fs:java 19644 4961 abc mem REG 252,1 126331 118159613 abc.jar 1:fs:java 19644 4962 abc mem REG 252,1 126331 118159613 abc.jar 

Lsof format:

 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME 

19644 is the PID. abc - USER. What are 4961 and 4962? And why do we have 100 of them. Only the difference between them is the 3rd column 4961, 4962 and so on?

+5
source share
1 answer

From the lsof 4.89 man page: "-K selects a list of tasks (threads) of processes, in dialects, where a task (thread) report is supported."

Version 4.89 lsof on Ubuntu 16.04 can display the TID header using the -K flag.

 $ lsof -K /usr/share/jenkins/jenkins.war COMMAND PID TID USER FD TYPE DEVICE SIZE/OFF NODE NAME java 6533 6534 jenkins cwd unknown /proc/6533/task/6534/cwd (readlink: Permission denied) java 6533 6534 jenkins rtd unknown /proc/6533/task/6534/root (readlink: Permission denied) java 6533 6534 jenkins txt unknown /proc/6533/task/6534/exe (readlink: Permission denied) java 6533 6534 jenkins 0u unknown 
0
source

Source: https://habr.com/ru/post/1233796/


All Articles