Questions tagged [lsof]

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

236 questions
0
votes
3 answers

Process continues to hold file after file deletion

I created a log file by running the iostat command to a text file, and ran the command in the background using nohup. #nohup iostat -xm 5 > /z/logfile.txt & Later on, I created a cronjob that runs every ten minutes doing the same as above, after I…
sawe
  • 11
  • 6
0
votes
1 answer

Looking into bash script to log SSH activity

I'm having some suspicious SSH activity, apparently originating from my computer (OSX Sierra)... for this reason I am trying to determine why, and more specifically from where this is happening. I'm basically looking for something to track ssh…
arthJS
  • 13
  • 1
0
votes
0 answers

Process will not be killed

I have the Jenkins server running on my machine. I did lsof -i :8080, I took the PID and then I ran sudo kill -9 PID. However, when I go to localhost:8080 Jenkins is still up and lsof -i :8080 shows a different PID. I think some other process might…
bsky
  • 19,326
  • 49
  • 155
  • 270
0
votes
1 answer

why file is not exist but lsof show this file not deleted

stat a linux regular file, target file is not exist. but lsof can found this file, and found a program opened this file. lsof show this file is normal. I think this file must be deleted, but I cannot understand why lsof show this file is normal.
pexeer
  • 685
  • 5
  • 8
0
votes
1 answer

Why does netstat report lesser number of open ports than lsof

I have storm running on 2 machines. Each machine runs nimbus process (fancy for master process) and worker processes. And I wanted to see the communication between them - what ports are open and how they connect to each other. $ netstat -tulpn |…
user2250246
  • 3,807
  • 5
  • 43
  • 71
0
votes
0 answers

TCP response not getting sent

We seeing this behavior where all of a sudden our TCP response are not getting sent. Even when the connection is up (i.e We are able to receive request ) The TCP client is connected to server over a VPN. It work most of time but some time we don't…
Noobie
  • 461
  • 1
  • 12
  • 34
0
votes
1 answer

lsof -i output *:*?

What is the meaning of the output under the NAME tag of the lsof -i command when it appears as such *:* Example output:
Jupiter
  • 615
  • 1
  • 6
  • 15
0
votes
1 answer

Why does lsof interpret my variables incorrectly?

I'm trying to set up a loop to monitor a file being written by Apple Compressor. Once the file is no longer being written, I'd like to change the name of the directory it's in. However, when I feed a variable containing the filepath to lsof it…
Adam
  • 23
  • 3
0
votes
1 answer

Wildfly: Many open libraries

I have an Java EE application which runs fine with wildfly 8.2.0 but after some days uptime there are many open files (170000+). After checking the system with "lsof" I found for many lines with open libraries (jar files). For example: lsof | grep…
gregor
  • 2,397
  • 2
  • 12
  • 18
0
votes
1 answer

lsof, grepping output of

To count open epubs I used this: # - determine how many epubs are open - NUMBER_OF_OPEN_EPUBS=0 while read -r LINE ; do if [ "$(echo $LINE | rev | cut -c1-5 | rev)" = ".epub" ]; then NUMBER_OF_OPEN_EPUBS="$(($NUMBER_OF_OPEN_EPUBS+1))" …
0
votes
1 answer

lsof outputs greater than ulimit -Hn

The following commands run in a single session shows lsof size greater than ulimit supported size. How is this possible? $ lsof | wc -l 226863 $ ulimit -n 200000 $ ulimit -Hn 200000
Talespin_Kit
  • 20,830
  • 29
  • 89
  • 135
0
votes
1 answer

Shell Script CentOS - Killing process by reading it's config file and getting the port

I am looping through folders with Java applications and getting the config file for each. app1/config.yml app2/config.yml etc. I then pull the port from this config file by using: port= cat app1/config.yml | grep 90 | cut -d: -f2 I want to use…
0
votes
2 answers

Can not get the value of command execution "lsof"

Here is what my program looks like Reference import java.io.BufferedReader; import java.io.InputStreamReader; public class ExecuteShellCommand { public static void main(final String[] args) { final ExecuteShellCommand obj = new…
daydreamer
  • 87,243
  • 191
  • 450
  • 722
0
votes
1 answer

Is it possible to deterministically trace how port 80 is forwarded and where the configuration is on a given system?

Is there a way to determine or trace how a port forwarding configuration is set up on a system running Ubuntu 14.04 LTS, on which there is a NodeJS service running and somehow accepting connections via port 80, although the service itself is running…
zealoushacker
  • 6,766
  • 5
  • 35
  • 44
0
votes
1 answer

Check if file written by process A is ready to be read by process B

I have a Java script that executes a k-shell which calls a program that writes file A. Thereafter, the same Java script parses output file A. No other process read or writes file A. The problem is that file A is not always ready to be parsed in…