Questions tagged [lsof]

Unix command that lists the files, sockets, and other file-descriptors that processes have open.

236 questions
0
votes
2 answers

Who is writing to my file or why lsof did not display the writer but reader do

I did the following actions on two separate terminals: 1s term: Start process that is writing to file in background: └──> while true; do date >> log; sleep 1; done & [1] 20604 Get the PID of last process that is running in background: └──> echo…
Wakan Tanka
  • 7,542
  • 16
  • 69
  • 122
0
votes
0 answers

lsof shows difference in open file descriptors in riak process

When I am doing lsof -l it shows all open file descriptors (~180000), but when I am checking lsof -lp pid shows only ~1000. I know that process with pid pid has ~170000 file descriptors open. Here are logs: root@riak:/proc/3238# lsof -l | grep 3238…
Sławosz
  • 11,187
  • 15
  • 73
  • 106
0
votes
1 answer

redirection to file with '>' is not work

I want to redirect the result of 'lsof' to a file, but it does not work like this. $ sudo ./lsof > result.txt -bash: result.txt: Is there anyone why it does not work?
sungho
  • 3
  • 1
0
votes
1 answer

How to close open (deleted) file descriptor on linux shell

If i use lsof -n | grep deleted I have along list of php5-fpm list values. two sample output of a list value: (deleted)/dev/zero (stat: No such file or directory) (deleted)/tmp/.ZendSem.JQTejx 1) How can i close them within an openVZ…
wutangl
  • 33
  • 7
0
votes
2 answers

lsof showing unlinked file for more than one process

can anyone explain how unlinked file can be held by more than one process? currently I see four processes for the same inode 1543 # /usr/local/bin/lsof +aL1 /dev/vg00/lvol4 Xvnc 20622 p32adm 2u REG 64,0x40004 4587683840 0 1543 /home…
0
votes
1 answer

what does "ramp" mean in lsof name

I am using lsof to check connections to a remote Tibco server(7000). I am using this command.. line lsof -p 4567 | grep TCP | grep 7000 java 4446 app 319u IPv6 9150778 0t0 TCP localhost:49756->test-tibco-test.com:ramp…
Wade H
  • 3,029
  • 1
  • 13
  • 5
0
votes
1 answer

Script saving path of pdf files used by Preview

Hi I miss the modern feature of osx restoring session after reboot so I would like to write a bash script that save the pdf files open in Preview.app and ask if I want to reopen that files in preview.app if between the last 2 script execution the…
0
votes
2 answers

Can I to delete a file from directory but not its inode using code?

I am perplexed as to how a file can be deleted (trashed) but still be linked by a process and still be written to. My understanding is that a file name is an entry in the directory that points to an inode. An inode is a data structure that lists the…
aquagremlin
  • 3,515
  • 2
  • 29
  • 51
0
votes
1 answer

Mysql Server daemon have opened or accessing too many files is that an issue

I have a datawarehouse on mySQL size being almost 1.4 TB when i checked the number of files the mysql server daemon is accessing I was surprised. cmd user : lsof | grep mysql cnd2 used : lsof | grep mysql | wc -l 2598 Please suggest how can this be…
0
votes
1 answer

File is locked by Python debugger

I have a problem with understanding a strange file locking behavior in Python Debugger. I have a 2TB image file, which my script reads. Everything works perfect, until I want to read the same file with a different hex editor. If the file is opened…
0
votes
1 answer

glustershd.log Deleted open file: can i set file path to newlocation without restarting gluster service

I am a new user to gluster. And its log file taking too much size on disk. I used "#gluster volume log rotate VolumeName" to rotate logs, but it has no effect on file glustershd.log. I copied the file and remove the original log file from…
Adeel Ahmad
  • 1,671
  • 1
  • 17
  • 22
0
votes
3 answers

How to debug a connection failure between Jboss and eclipse debugger

I have setup eclipse to attach to a local JVM. But when I try to do the same for a machine over the network I get "connection timed out exception". How do I go about debugging this issue? I tried: lsof -i :8787 on the remote machine, and it appears…
jason
  • 3,471
  • 6
  • 30
  • 43
0
votes
1 answer

lsof if file descriptor is opened

I use the following command to find out if file descriptor is opened: /usr/sbin/lsof -a -c sqlplus -u ${USER} | grep -l "${FILE_NAME}” If it is not, I perform some actions. The file is a log spooled from sqlplus. Sometimes lsof tells that file…
idobr
  • 1,537
  • 4
  • 15
  • 31
0
votes
2 answers

How to exclude from `lsof` output the libraries?

I want to print in a log with the help of lsof the information about opened resources but I don't want the customer to see what libraries are used. I browsed through the lsof man page but I cannot get a hold of how I can exclude only the libraries…
George
  • 1,027
  • 3
  • 12
  • 20
0
votes
0 answers

How can I find out where a specific file descriptor is coming from when I see it using the lsof command?

Basically I type lsof and I have a bunch of file descriptors that have something like: COMMAND PID FD TYPE NODE NAME java 564 487u IPv4 TCP vm3:8003->website.com:5646 (CLOSE_WAIT) java 564 492u IPv4 TCP …
Grammin
  • 11,808
  • 22
  • 80
  • 138
1 2 3
15
16