-1

In Linux the process is showing but the jar which is up by the process showing as deleted ? My doubt is if a jar itself is not there then how can a process shows running ?

Jithin Kumar S
  • 701
  • 2
  • 9
  • 20
  • i have an ui app using this back end jar where the app shows http://xxxx:8090 then i logged to this xxx machine and then used netstat command to find which jar is running for this service, command was netstat -pat | grep java and got the pid (hope the above command provided the correct pid) then i checked ls -l /proc/pid/cwd got the jar name and it is showing deleted. How come with jar deleted pid is live ? – Jithin Kumar S Nov 13 '19 at 12:34

1 Answers1

1

How come with jar deleted pid is live ?

Either java has read the whole file into memory and doesn't need it now to execute, or the file is still held open (in that case, only its directory entry is removed yet, and the file itself is deleted after it has been closed). If it is open, you can see that with ls -l /proc/pid/fd.

Armali
  • 18,255
  • 14
  • 57
  • 171