Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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!!
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).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.