-3

I need to know why this child proc is using 208% of my CPU. I think it would be a good idea to find the pathname of it. Do you have any idea how to find it?

4910 root 20 0 9691M 2006M 7924 R 208. 12.2 15:17.23 
java -server -d64 -Xmx4G -jar spigot.jar nogui -o false 

(original screenshot)

Gene
  • 3,633
  • 19
  • 39
  • 3
    @SturdyErde: Yes really, or at least that's what the system will report. That system has multiple cores (vCPUs) and is using more than one of them, so it's reporting utilisation based off of one core. It is possible to have a process reported as 200%, 300%, or even 1000% CPU depending on the number of cores available and how much they are being used. – Gene Aug 31 '15 at 15:03

2 Answers2

1

Since this is a java process half of the answer is in the screenshot you provided. This bit right here:

-jar spigot.jar

So when that java process was kicked off that spigot.jar file was in its current working directory (CWD). Now you just need to determine what the CWD is. There's many ways to do this, I'll cover two:

Use /proc:

ls -ld /proc/4910/cwd

Note: Replace '4910' as appropriate. The PID can and will change across reboots and restarting services.

/proc/PROCESS-ID/cwd will be a symlink to what the CWD is for that process.

Another way is to use lsof:

lsof -P -n -p 4910 | grep cwd
Gene
  • 3,633
  • 19
  • 39
0

I doesn't returned process you needed. Execute this:

ps auxfww

and find this process it will return full path with parameters used by program.