Solved

This is in RHEL 5.0 and AIX 5.3

Posted on 2011-02-11
8
1,016 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

Author Comment

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

Assisted Solution

by:jackiechen858
jackiechen858 earned 50 total points
Comment Utility
"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
Comment Utility
efas
0
 
LVL 48

Expert Comment

by:Tintin
Comment Utility
I think aixtutorial must have accidentally hit the wrong button.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

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…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

763 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now