Solved

This is in RHEL 5.0 and AIX 5.3

Posted on 2011-02-11
8
1,019 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
8 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 100 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 100 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

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 50 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Suggested Solutions

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

861 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