- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- process identification with long process names
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2002 03:42 AM
03-21-2002 03:42 AM
process identification with long process names
In order to be sure that Tomcat is stopped by a script, before issuing 'tomcat.sh stop' we attempt to identify the tomcat process with the ps command. Then after 'tomcat.sh stop' we check that the process has gone.
However, we are finding that the command string returned from 'ps -fu' gets truncated, so when the tomcat invocation occurs from a long path we are unable to identify the tomcat process and therefore unable to stop it.
Has anyone got a working solution to this problem ?
Thanks
Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2002 03:47 AM
03-21-2002 03:47 AM
Re: process identification with long process names
The way I normally work around this is to amend the startup script to place the pid of the process in a file and then check that, eg:
[startup script]
...
processd
print ${!!} >/var/run/processd.pid
...
[checking]
...
Pid=$(ps -fp ${Pid} && print "Process still running"
...
HTH
dave
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2002 03:50 AM
03-21-2002 03:50 AM
Re: process identification with long process names
you could always move tomcat to another directory ( shorter path ) and create a symbolic link to it , the hey presto it will appear in the ps listing.
ps truncates there is no way to manipiulate the command to increase the length ot output.
cheers
john.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2002 08:17 AM
03-21-2002 08:17 AM
Re: process identification with long process names
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2002 08:32 AM
03-21-2002 08:32 AM
Re: process identification with long process names
Maybe you can use:
UNIX95= ps -fC processname
See Bill Hassell's answer in:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xdf541012aa92d5118ff10090279cd0f9,00.html
Search the forums for more examples and comments.
Darrell