Process Id generated by some other process

ms_cs

ms_cs

@ms-cs-Ab8svl Oct 11, 2024
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

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • durga ch

    durga ch

    @durga-TpX3gO Feb 28, 2009

    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 <username> for a specific UID.
  • ms_cs

    ms_cs

    @ms-cs-Ab8svl Feb 28, 2009

    Yes but,Which process assigns this process id to processes? I am confused in that
  • durga ch

    durga ch

    @durga-TpX3gO Mar 1, 2009

    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