Looking at your WebObjects processes
ps and lsof are useful .......
These commands are harmless ... they just list
information and use grep to filter what is displayed on your
console.
See a list of your
running WebObjects apps. The second column is
the Process ID in case you want to kill it. The last column shows the bundle
(working directory) of the corresponding app. NOTE: You MUST use sudo, otherwise
you may not get any listing.
$ sudo
lsof | grep ^java.*woa$
...output like
this....
java 353 appserver cwd
VDIR 14,2 768 65973
/System/Library/WebObjects/JavaApplications/JavaMonitor.woa
java
354 appserver cwd VDIR 14,2 768 66109
/System/Library/WebObjects/JavaApplications/wotaskd.woa
java
17148 appserver cwd VDIR 14,2 768 1410537
/Library/WebObjects/JavaApplications/ERMailer.woa
java
17955 appserver cwd VDIR 14,2 768 1410537
/Library/WebObjects/JavaApplications/ERMailer.woa
java
17994 appserver cwd VDIR 14,2 768 1410537
/Library/WebObjects/JavaApplications/ERMailer.woa
java
18060 appserver cwd VDIR 14,2 768 1410537
/Library/WebObjects/JavaApplications/ERMailer.woa
java
19618 appserver cwd VDIR 14,2 768 1184476
/Library/WebObjects/Applications/EmailOptOut.woa
java
24193 appserver cwd VDIR 14,2 768 1425508
/Library/WebObjects/Applications/cheetah.woa
...
and a tip from Sacha Mallais...
Matching a
PID (process id) to a WebObjects app.
In
Monitor.woa, you can see the ports assigned by monitor to each app.
To get the PID for a specific WO
port, use something like this
example
which shows that the PID is 17148 for
the app running on port 2010.
$ sudo
lsof -i tcp:2010
.... gives output like
this....
COMMAND PID USER FD
TYPE DEVICE SIZE/OFF NODE
NAME
java 17148 appserver 6u
IPv6 0x04835530 0t0 TCP *:search
(LISTEN)
Once you have the PID,
you can get more info using the ps command. For example
......
$ ps -auxwww -p
331
USER PID %CPU %MEM
VSZ RSS TT STAT STARTED TIME
COMMAND
root 331 0.0 -1.7 291164
35184 ?? SN Fri09AM 4:00.68 java -XX:NewSize=2m -Xmx64m -Xms32m
-DWORootDirectory=/System -DWOLocalRootDirectory= -DWOUserDirectory=/
-DWOEnvClassPath= -DWOApplicationClass=Application -DWOPlatform=MacOS
-Dcom.webobjects.pid=331 -DWOAllowRapidTurnaround=false -classpath
WOBootstrap.jar com.webobjects._bootstrap.WOBootstrap
Posted: Monday - August 15, 2005 at 04:08 PM