Click here for "Error Codes for Commercial Air Conditioners".(Japanese Version)

Include daemon processes in the display

Include daemon processes in the display

In the case of Linux, there are processes that run specifically for system maintenance without the need to give any instructions.
These processes are called daemons, and they wait until there is a request from the user, and when there is a request, they create a new process and execute the process.
The process created here is called a child process, and if it is set to run at a certain date and time in advance, it will execute the reserved process at the reserved date and time.
Basically, these daemons are executed according to the user's settings, but some of them are default (standard) settings. Since these daemons are not operated by the user in a control terminal such as a console or terminal emulator, they will not be displayed in the control terminal when the ps command is executed, but you can display these processes by adding the option "-x".

oot@Lion:~# ps -ax
  PID TTY      STAT   TIME COMMAND
    1 ?        Ss     0:17 /sbin/init
    2 ?        S      0:00 [kthreadd]
    3 ?        I<     0:00 [rcu_gp]
    4 ?        I<     0:00 [rcu_par_gp]
    6 ?        I<     0:00 [kworker/0:0H-kblockd]
    8 ?        I<     0:00 [mm_percpu_wq]
    9 ?        S      0:00 [ksoftirqd/0]
   10 ?        I      0:27 [rcu_sched]
   11 ?        I      0:00 [rcu_bh]
   12 ?        S      0:01 [migration/0] (abbreviation)
29767 ?        S      0:06 /usr/sbin/apache2 -k start

29917 ?        Ss     0:00 sshd: nuy [priv]
29920 ?        Ss     0:00 /lib/systemd/systemd --user
29921 ?        S      0:00 (sd-pam)
29930 ?        I      0:00 [kworker/2:2-mm_percpu_wq]
29935 ?        R      0:00 sshd: nuy@pts/0
29936 pts/0    Ss     0:00 -bash
29939 pts/0    S      0:00 su -
29940 pts/0    S      0:00 -bash
29953 ?        I      0:00 [kworker/u8:1-events_unbound]
30022 ?        I      0:00 [kworker/1:0-cgroup_destroy]
30036 pts/0    S      0:00 su -
30037 pts/0    S      0:00 -bash
30040 pts/0    S      0:00 su - nuy
30041 pts/0    S      0:00 -bash
30047 ?        I      0:00 [kworker/3:2-events_power_efficient]
30117 ?        I      0:00 [kworker/3:1-events_power_efficient]
30120 pts/0    S      0:00 su -
30121 pts/0    S      0:00 -bash
30126 ?        I      0:00 [kworker/3:0-events_power_efficient]
30130 pts/0    R+     0:00 ps ax
A process with a TTY of "? does not have a control terminal.

Information to be displayed
PID:A number that is automatically assigned to each process
TTY:Control terminal running the process
STAT:state
・Field 1
R:executable
T:Stopping or tracing
D:Dormant and uninterruptible.
S:dormant
Z:zombie(Not deleted, but suspended)
・Field 2
W:swapped out(No resident pages)
・Field 3
N:positive nice value
TIME:CPU consumption time
COMMAND:Execute command

Copied title and URL