Solved

This is in RHEL 5.0 and AIX 5.3

Posted on 2011-02-11
8
1,018 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

773 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