- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Process type !
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
Discussions
Forums
Discussions
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
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
08-08-2002 09:28 PM
08-08-2002 09:28 PM
============================
For example "(sleep 20)&" is a background process, but "sleep 20" is foreground process. But I use "ps -ef |grep sleep" just get the same result.
============================
Thanks a lot.
-Gerald-
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2002 10:09 PM
08-08-2002 10:09 PM
Re: Process type !
The PPID of your sleep command should be the PID of the shell that forked the sleep.
But this doesn't really help much.
It is easy though to identify background processes from the shell (or script) that is the parent.
A
ps -fp $(echo $!)
should show the process.
But you'd better use the jobs command (provided your shell has "set -o monitor").
"jobs -l"
gives information including the backgrounded jobs' PIDs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2002 12:36 AM
08-09-2002 12:36 AM
Re: Process type !
It will give priority to foreground jobs and it will return your command-prompt, nothing more.
Use "jobs -l":
$> (sleep 2000)&
[1] + 17391 Running (sleep 2000)&
$> jobs
[1] + Running (sleep 2000)&
$> jobs -l
[1] + 17391 Running (sleep 2000)&
$> kill 17391
[1] + Terminated (sleep 2000)&
$> ps -ef | grep 17391
$> .. not found
Regards,
Ceesjan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2002 12:51 AM
08-09-2002 12:51 AM
SolutionI'm looking for the nice value each job is running with. The standard nice value is 20 normally used for interactive jobs run by users. If a user puts a job into the background the nice value is higher. Using ksh the nice value is 24 for background jobs, using csh I think it is 22 (instead of 20).
The nice values can be seen with 'ps -l' or 'top' in column NI.
But, higher nice values are just a hint that the associated job is really a background job. Users can set the nice value by their own, but, I think only very few are aware of the nice(1) command and use it, regularly. The nice command was more familiar 10 or 20 years ago, when users run huge jobs in the background but having had comparatively poor resources. So, their jobs had to be very "nice" to interactive jobs or small jobs of other users.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2002 03:19 AM
08-09-2002 03:19 AM
Re: Process type !
Nevertheless, you do not seem to be completely satisfied on our answers to your question.
Please explain what you want to know else then these answers?