Re: java processes on linux - any way to get to the app name?
Sacha Michel Mallais <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.devel |
|---|---|
| Message-ID | <[email protected]> |
On Jul 27, 2006, at 1:33 PM, Matt Kime wrote: > I'm deploying on linux. Unforunately its difficult to get to the app > name on java processes. i've tried javaps which produces - > > 23628 java com.webobjects._bootstrap.WOBootstrap > 23629 java com.webobjects._bootstrap.WOBootstrap > 23630 java com.webobjects._bootstrap.WOBootstrap -WOPort 2001 > -WOCachingEnabled YES -WODebuggingEnabled YES -WOOutputPath > /home/mattkime/artbot-1 -WOAutoOpenInBrowser NO > -WOAutoOpenClientApplication NO -WOLifebeatInterva > > these processes include wotaskd, JavaMonitor, and artbot. > > has anyone figure out a direct way to get this information? I know of no way to get the application name from the process name; there are, however, several other ways to determine which application cooresponds to a given pid: The lsof way: as root, do lsof -p <pid>, where pid is the process id you are interested in. This will show you what ports that process is using, from which you can deduce the specific application instance. The big ps way: do ps auxwww | grep -i <appname>, where appname is the name of your application. This will list all your application instances. Assuming you have logging enabled (if not, why not?), you can look in the huge command line for each application to see the instance number appended to the log file name, /path/to/log/appname-1 for example. HTH, sacha -- Sacha Michel Mallais Senior Señor / President Global Village Consulting Inc. http://www.global-village.net/ PGP Key ID: 7D757B65 AIM: smallais Any sufficiently advanced satire is indistinguishable from reality.