Process Id generated by some other process

For each process there is a unique id will be genrated by the process.
I want to know about the process that is generating that id in unix or linux..
I dont know the process name that is creating the process ids and the algorithm used for that purpose..

Replies

  • durga ch
    durga ch
    I guess the UID should be root for the PID generated by OS
    a ps -ef should return all the current running processes and a ps -ef|grep for a specific UID.
  • ms_cs
    ms_cs
    Yes but,Which process assigns this process id to processes? I am confused in that
  • durga ch
    durga ch
    hmm
    it should be the init process ie the process ID 1
    a 'pstree' should give you the cascading structure of parent child processes triggered and then when you do a 'ps -ef|grep init' bingo!
    thats the root process which runs
    for eg:

    1.'pstree'
    init─┬─NetworkManager─┬─dhclient
    │ └─{NetworkManager}
    ├─acpid
    ├─atd
    ├─avahi-daemon───avahi-daemon
    ├─bluetoothd
    ├─bonobo-activati───{bonobo-activati}
    ├─console-kit-dae───63*[{console-kit-dae}]
    ├─cron
    ├─cupsd
    ├─2*[dbus-daemon]
    ├─dbus-launch
    ├─dd
    ├─evince───{evince}
    ├─fast-user-switc
    ├─firefox───9*[{firefox}]
    ├─gconfd-2
    ├─gdm───gdm─┬─Xorg
    │ └─x-session-manag─┬─bluetooth-apple
    │ ├─evolution-alarm───{evolution-alarm}
    │ ├─gnome-keyring-d
    │ ├─gnome-panel
    │ ├─metacity
    │ ├─nautilus
    │ ├─nm-applet
    │ ├─python
    │ ├─seahorse-agent
    │ ├─tracker-applet
    │ ├─trackerd───2*[{trackerd}]
    │ ├─update-notifier
    │ └─{x-session-manag}
    ├─6*[getty]
    ├─gnome-keyring-d
    ├─gnome-power-man
    ├─gnome-screensav
    ├─gnome-settings-───{gnome-settings-}
    ├─gnome-terminal─┬─bash───pstree
    │ ├─gnome-pty-helpe
    │ └─{gnome-terminal}
    ├─gvfs-fuse-daemo───3*[{gvfs-fuse-daemo}]
    ├─gvfs-gphoto2-vo
    ├─gvfs-hal-volume
    ├─gvfsd
    ├─gvfsd-burn
    ├─gvfsd-trash
    ├─hald───hald-runner─┬─hald-addon-acpi
    │ ├─hald-addon-cpuf
    │ ├─hald-addon-dell
    │ ├─hald-addon-inpu
    │ └─hald-addon-stor
    ├─klogd
    ├─mixer_applet2───{mixer_applet2}
    ├─mount.ntfs
    ├─nm-system-setti
    ├─notification-da
    ├─pulseaudio─┬─gconf-helper
    │ └─2*[{pulseaudio}]
    ├─syslogd
    ├─system-tools-ba
    ├─trashapplet
    ├─udevd
    └─wpa_supplicant


    2. ~/Desktop$ ps -ef |grep init
    root 1 0 0 09:29 ? 00:00:01 /sbin/init
    1000 6806 8978 0 22:26 pts/0 00:00:00 grep init

You are reading an archived discussion.

Related Posts

Hi all... After a long gap i am back to this forum 😀 . I was busy with my exams and other works. I think some of CE'ans read my...
HELO FRIENDS I AM THIRD YEAR ENG. STUDENT AND I AM WORKING ON IMAGE COMPRESSION AND FOR THE SAME I WANT TO CAPTURE A IMAGE FROM A CAMERA AND STORE...
hii i am doing B.E and i wanted to do a project in inian airlines . can any one tell me if indian airlines have got any projects for students????
BASIC SOCKET PROGRAMMING IN JAVA Client/Server A server is anything that has some resources that can be shared. A client is simply any other entity that wants to gain access...
hi all... i want to ask about how connect flash mamory USB in mobile and use as momory in mobile😕