Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

This is in RHEL 5.0 and AIX 5.3

Posted on 2011-02-11
8
Medium Priority
?
1,030 Views
Last Modified: 2012-05-11
This is in AIX 5.3  I have WebSpehe running on that box..When I do pe -ef | grep java  i see the process running ..Myquestion is how does it work for one process the pid is three digit like 981 and for the process the pid number is 456831..This is just an example just wanted to know is there any difference of a pid with three digit and the other if yes what is the difference and also wants to know where does the pid gets genetared from when we start the application which file does it refer too
0
Comment
Question by:aixtutorial
7 Comments
 
LVL 48

Expert Comment

by:Tintin
ID: 34875329
There's no difference between a 3 digit PID and any other PID (apart from PID 1).

PID's are generally allocated on a sequential basis, so any PID's with lower numbers are created earlier on than PID's with larger numbers.

0
 
LVL 48

Accepted Solution

by:
Tintin earned 400 total points
ID: 34875362
I should also point out that the Parent PID (PPID) will always be a lower number than it's children.

For example, we look at:

root      7088     1  0 Feb07 ?        00:00:00 /usr/sbin/apache2 -k start
www-data 30643  7088  0 10:29 ?        00:00:00 /usr/sbin/apache2 -k start

Open in new window


The Apache process with PID 7088 is the main apache process that starts (can also tell because it's PPID is 1)

The process with PID 30643 was started today, hence the reason it has a much higher PID.  Apache is creating/killing processes all the time.

The 3rd column shows the PPID of 7088, which is the apache parent process.
0
 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 400 total points
ID: 34875439
Hi,

your examples are not taken from "real life", are they?

AIX PIDs are always even, with the exception of init (1).

The only difference between processes with high PIDs or low PIDs is the PID itself, which is somewhat related to the number of processes started since reboot - processes started "earlier" have lower PIDs, until the process slot is being reused - see below.

AIX PIDS are calculated using the "process slot" number, multiplied with a fixed even number plus a generation number (stepping 2). This is done to have unique PIDs over a long period of time even when a process slot is reused.
There is no "file" where consumed or future "potential" PIDs are stored.
The PIDs of running processes appear as subdirectories of "/proc".

Short - there is no reason at all to be concerned about process numbers, they don't make any difference in regard to how the process is treated by the kernel.

wmp

0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:aixtutorial
ID: 34875519
Thanks Tintin and WMP just wanted to get some knowledge on it.
0
 
LVL 7

Assisted Solution

by:jackiechen858
jackiechen858 earned 200 total points
ID: 35024542
"so any PID's with lower numbers are created earlier on than PID's with larger numbers."

I don't think this is true.  http://en.wikipedia.org/wiki/Process_identifier

There is a maxium PID number, so if you start the machine long enough and keep start/stop process, small number PID will be reused.

0
 

Author Comment

by:aixtutorial
ID: 35161181
efas
0
 
LVL 48

Expert Comment

by:Tintin
ID: 35161504
I think aixtutorial must have accidentally hit the wrong button.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month7 days, 19 hours left to enroll

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question