Essentials of Linux

Hi. Please explain to me the following. I know these are online but not written in a way for a beginner student:

UID PID PPID C daemon 3884 3425 0 daemon 3879 3425 0 root 3425 3425 0 root 6535 3425 0 root 3443 3425 0 root 3906 3898 0 root 17953 3425 0 root 15106 6535 0 xyz 15152 15112 0 xyz 15112 15106 0 root 236 6535 0 xyz 15431 15152 0 root 15391 15932 0 root 3189 6535 0
STIME TTY TIME Feb07 ? 0:01 Feb07 ? 0:06 Feb 07 ? 0:00 Feb 07 ? 1:50 Feb 07 ? 0:07 Feb 07 ? 0:01
17:01:25  ?      0:43
23:07:48  ?      0:00
23:08:00  pts/19 0:00
23:07:54  ?      0:00
21:27:06  ?      0:01
23:09:30  pts/19 0:00
23:09:12  ?      0:00
21:47:00  ?      0:00
CMD
/usr/lib/nfs/nfsmapid
/usr/sbin/rpcbind
zsched
/local/openssh/4.5p1/sbin/sshd
/sbin/init
/usr/lib/saf/ttymon
/usr/sbin/nscd
/local/openssh/4.5p1/sbin/sshd -R
/usr/bin/bash
/local/openssh/4.5p1/sbin/sshd -R
/local/openssh/4.5p1/sbin/sshd -R
ps -ef
sleep 60
/local/openssh/4.5p1/sbin/sshd -R]


a) What is a process hierarchy
b) How to know which shell I run my ps -ef from?
c) What is PID of root's process?
d) How to find root user ID? What is the role of root user?
e) how to find root user in shell?
f) what is init? What happens if it quits suddenly?
g) what is background process? Does it consume resource? How to bring it foreground?

Please any help will be most appreciated....

Last edited on
This sounds like homework.

We can help, but we can't do it for you.
Yes that what I want...I can figure out most of them except a)...How to identify process hierarchy?
You are given the process id (PID) and it's parent (PPID).

So processes that have the same PPID, were started by the same parent.

Let's start with the first entry PPID=3425. And let's look for all the entries with PPID=3425.
That is entry: 1, 2, 3, 4, 5, 7
Also, entry 3 has PID=3425.

Let's look up their names:
entry 1: /usr/lib/nfs/nfsmapid
entry 2: /usr/sbin/rpcbind
entry 3: zsched
entry 4: /local/openssh/4.5p1/sbin/sshd
entry 5: /sbin/init
entry 7: /usr/sbin/nscd

So zsched started all these processes.

Do that for each process and you'll build up a picture. Got it?

thanks..much clear....I did for user xyz:

UID PID PPID C STIME TTY TIME CMD

....
root 15106 6535  0 23:07:48  ?      0:00  /local/openssh/4.5p1/sbin/sshd -R

xyz 15152 15112 0 23:08:00 pts/19 0:00 usr/bin/bash

xyz 15112 15106 0 23:07:54 ? 0:00 /local/openssh/4.5p1/sbin/sshd -R

root 236 6535 0 21:27:06 ? 0:01 /local/openssh/4.5p1/sbin/sshd -R

xyz 15431 15152 0 23:09:30 pts/19 0:00 ps -ef


from 15106

Entry 1: local/openssh/4.5p1/sbin/sshd -R
Entry 2: /usr/bin/bash
Entry 3: ps -ef

so SSHD started bash and -ef ..correct?


Last edited on
Topic archived. No new replies allowed.