?
Solved

This is in RHEL 5.0 and AIX 5.3

Posted on 2011-02-11
8
Medium Priority
?
1,024 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 

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

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Fine Tune your automatic Updates for Ubuntu / Debian
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 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.
Suggested Courses
Course of the Month12 days, 8 hours left to enroll

777 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