LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-30-2007, 09:04 AM   #1
roller24
Member
 
Registered: Nov 2005
Location: Baltimore MD
Distribution: suse
Posts: 30

Rep: Reputation: 15
process toble


Ive always noticed that in my process table I have multiple entries for the same process.

Is this normal?
 
Old 03-30-2007, 12:56 PM   #2
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 6, KDE Neon
Posts: 4,313

Rep: Reputation: 212Reputation: 212Reputation: 212
Depends, some processes will spawn multiple instances. Have a look at your process table in 'tree view' that will not only show you the processes but also other processes spawned by the original process. Phew, i'm all processed out!!
 
Old 03-30-2007, 01:05 PM   #3
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
You might want to give an example.

Sometimes what you're actually seeing are multiple "threads" of a single "process". These are called "clone processes". It has to do with the way Linux does NPTL (Native POSIX Thread Library). It is different than the way you see it on UNIX variants.

There were some kernel releases that didn't show the threads automatically even though they were there. By specifying an option with ps (-m) you could force them to display but the default now is that they do display. We had a slightly older 2.4 kernel on one server that I needed the -m to display but on the slightly newer 2.4 kernel on its mate I didn't need the -m.

You can confirm they are clone processes by verifying the memory for them is exactly the same.

Notes from something I did when investigating this on those two systems some time back. The processes I was interested in were named "omaws32". You would want to substitute the name you're interested in:

Quote:
First run a loop to dump the memory map of all the processes:

mkdir /tmp/omaws32
for PROC in `ps -ef |grep omaws32 |grep -v grep |awk '{print $2}'`
do cat /proc/${PROC}/maps >/tmp/omaws32/${PROC}.out
done

Then determine which one is the parent of all the others. Also then pick a single child to be your test case. In my situation 15862 was the parent and 15863 was the first child. I therefore did:

cd /tmp/omaws32
for FILE in `ls |egrep -v "15862|15863"`
do
echo $FILE
diff $FILE 15863.out
done |more

The above script gave a list of all the memory map files created by the first loop excluding the parent and the first child. It then did a diff of each of the remaining files (the other children) against the first child’s map file. Since the only output was the file name (echo $FILE) it proved that all the files were exactly the same meaning each of the children (including the first one) had exactly the same memory map and therefore were in fact using the same memory space.

An additional test would be to run cksum against each of the children map files to verify the sums seen are the same for each (they were here).

Don’t forget to rm –rf /tmp/omaws32 when done.
 
Old 04-03-2007, 09:20 AM   #4
roller24
Member
 
Registered: Nov 2005
Location: Baltimore MD
Distribution: suse
Posts: 30

Original Poster
Rep: Reputation: 15
Thanks guys, I appreciate the clarification
 
Old 04-03-2007, 11:14 AM   #5
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Quote:
<--- Very Insecure System Try Another --->
Funny.

How about:
V ague
I nternet
S ecurity
T oasts
A pplications
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how a father process know which child process send the signal SIGCHLD icoming Programming 10 07-20-2010 07:26 AM
Need to install process at end of boot process ch485de Linux - Newbie 5 12-07-2006 05:47 PM
child process usses same amount of ram as parent process socialjazz Programming 7 10-19-2006 05:48 PM
Process Table-Process Control Block sarahmencer Linux - General 1 01-09-2006 09:14 PM
Bash Scripting - child process affecting parent process mthaddon Linux - General 1 05-02-2004 01:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration