You are not logged in.

#1 2010-03-16 12:07:05

clesch
Member
From: Salzburg, Austria
Registered: 2009-07-21
Posts: 18

Get process-ID of particular java process?

I have created a startup script for air-video-server which happens to be a java application.

The problem I'm facing now is that I can't identify the process ID of the particular java process using pidof.

ps aux | grep AirVideo shows:

user    4180  7.0  0.3 2309364 31288 pts/0   Sl   12:51   0:00 java -jar AirVideoServerLinux.jar

Here's the line I'm using right now:

PID=`pidof -o %PPID java`

but this obviously lists the process IDs of all running java processes, not just air-video-server.

PID=`pidof -o %PPID ava -jar AirVideoServerLinux.jar`

doesn't match anything at all.

Offline

#2 2010-03-16 13:42:16

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: Get process-ID of particular java process?

pgrep(1) might help you


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

Board footer

Powered by FluxBB