- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Identifying new processes IDs
Operating System - HP-UX
1753565
Members
5647
Online
108796
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
тАО10-01-2001 10:37 AM
тАО10-01-2001 10:37 AM
I have a software package which startsa jre to run. However I have a number fo other packages that also start a jre when they are running. I need a solid method of identifying which jre is started by which process and the PID of that jre.
I had thought about simply doing a search for the pid pf the jre (using ps) as soon as I started the process, however (in theory if not practice) this could allow for the PID of another jre started at the exact same time to be reported.
I remember there being a command which reports back the process ID of a new process as soon as it is started from a script, however I cannot remember what that command is.
If anyone out there knows the command, or a better way to do this, I would be grateful!'
Thanks!
Mike
I had thought about simply doing a search for the pid pf the jre (using ps) as soon as I started the process, however (in theory if not practice) this could allow for the PID of another jre started at the exact same time to be reported.
I remember there being a command which reports back the process ID of a new process as soon as it is started from a script, however I cannot remember what that command is.
If anyone out there knows the command, or a better way to do this, I would be grateful!'
Thanks!
Mike
"If we treated each person we met as if they were carrying an unspeakable burden, we might almost treat each other as we should." Dale Carnegie
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-01-2001 10:45 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-01-2001 11:10 AM
тАО10-01-2001 11:10 AM
Re: Identifying new processes IDs
Hi Mike
$! is the pid of last process.
Try this two command on command line for more understandig of what you receiving.
#sleep 10000 &
#echo $!
Sachin
$! is the pid of last process.
Try this two command on command line for more understandig of what you receiving.
#sleep 10000 &
#echo $!
Sachin
Is photography a hobby or another way to spend $
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-01-2001 05:53 PM
тАО10-01-2001 05:53 PM
Re: Identifying new processes IDs
As noted $! will allow the starting program to
identify the PID of the java process just started.
I use a couple of techniques to make it easier to
identify which process is which. First, I define
the process or task as the first parameter to the
java process. Then I echo the PID to a pid file
java -D task.$mytask ....
echo $! > $PIDDIR/$mytask.pid
I can then look at the command string to find out which
task owns the VM, or check the pid files to find the
VM if it is still running. You can use the PID file to make
sure you don't run multiple copies of the same task.
identify the PID of the java process just started.
I use a couple of techniques to make it easier to
identify which process is which. First, I define
the process or task as the first parameter to the
java process. Then I echo the PID to a pid file
java -D task.$mytask ....
echo $! > $PIDDIR/$mytask.pid
I can then look at the command string to find out which
task owns the VM, or check the pid files to find the
VM if it is still running. You can use the PID file to make
sure you don't run multiple copies of the same task.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP