when I do a command such as ps -aux on CentOS 6 I get a bunch of processes whos command is listed in [] as shown below. What is the meaning of the [] in the name? I am assuming that these are special processes of some kind, what makes a process name show up with a [] around it? [root@centos6 src]# ps -efUID        PID  PPID  C STIME TTY          TIME CMDroot         1     0  0 18:48 ?        00:00:01 /sbin/initroot         2     0  0 18:48 ?        00:00:00 [kthreadd]root         3     2  0 18:48 ?        00:00:00 [migration/0]root         4     2  0 18:48 ?        00:00:00 [ksoftirqd/0]root         5     2  0 18:48 ?        00:00:00 [migration/0]root         6     2  0 18:48 ?        00:00:00 [watchdog/0]root         7     2  0 18:48 ?        00:00:02 [events/0]
What is the meaning of ps process names printed in [] such as [cgroup]?
linux;ps
If the command line is inaccessible to ps, i.e. /proc/<pid>/cmdline returns an empty string then ps wraps it in square brackets.You can use this to test the above, by running the following command and then checking it out in the process list:$ perl -e '$0 = ; sleep'Then do a ps:saml     26756  2098  0 21:21 pts/9    00:00:00 []Sure enough our perl process shows up with the square brackets ([]).cmdline's are empty, really?Yeah seems a bit odd but just to confirm I checked the first couple and they're definitely empty:$ for i in `seq 2125`;do [ -e /proc/$i/cmdline ] || continue; \    echo -n PID# $i: ; echo $(cat /proc/$i/cmdline);done | lessPID# 1: /sbin/initPID# 2: PID# 3: PID# 4: PID# 5: PID# 15: ...PID# 1187: /sbin/rsyslogd-c4PID# 1189: /sbin/rsyslogd-c4PID# 1190: /sbin/rsyslogd-c4PID# 1211: PID# 1229: irqbalancePID# 1255: rpcbindPID# 1269: mdadm--monitor--scan-f--pid-file=/var/run/mdadm/mdadm.pid...Getting rid of them?If you use the -f and -c switches you can see the expanded version of these processes without the square brackets:$ ps --versionprocps version 3.2.8$ ps -auxfc | lessUSER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMANDroot         2  0.0  0.0      0     0 ?        S    Aug21   0:00 kthreaddroot         3  0.0  0.0      0     0 ?        S    Aug21   0:04  \_ ksoftirqd/0root         4  0.0  0.0      0     0 ?        S    Aug21   0:03  \_ migration/0root         5  0.0  0.0      0     0 ?        S    Aug21   0:00  \_ watchdog/0root        15  0.0  0.0      0     0 ?        S    Aug21   0:04  \_ events/0root        19  0.0  0.0      0     0 ?        S    Aug21   0:00  \_ cpusetroot        20  0.0  0.0      0     0 ?        S    Aug21   0:00  \_ khelperroot        21  0.0  0.0      0     0 ?        S    Aug21   0:00  \_ netnsroot        22  0.0  0.0      0     0 ?        S    Aug21   0:00  \_ async/mgrroot        23  0.0  0.0      0     0 ?        S    Aug21   0:00  \_ pmroot        24  0.0  0.0      0     0 ?        S    Aug21   0:00  \_ sync_supersroot        25  0.0  0.0      0     0 ?        S    Aug21   0:00  \_ bdi-defaultroot        26  0.0  0.0      0     0 ?        S    Aug21   0:00  \_ kintegrityd/0root        30  0.0  0.0      0     0 ?        S    Aug21   0:07  \_ kblockd/0root        34  0.0  0.0      0     0 ?        S    Aug21   0:00  \_ kacpidroot        35  0.0  0.0      0     0 ?        S    Aug21   0:00  \_ kacpi_notifyroot        36  0.0  0.0      0     0 ?        S    Aug21   0:00  \_ kacpi_hotplugroot        37  0.0  0.0      0     0 ?        S    Aug21   0:00  \_ ata_auxroot        38  0.0  0.0      0     0 ?        S    Aug21   0:00  \_ ata_sff/0root        42  0.0  0.0      0     0 ?        S    Aug21   0:00  \_ khubdroot        43  0.0  0.0      0     0 ?        S    Aug21   0:00  \_ kseriodroot        44  0.0  0.0      0     0 ?        S    Aug21   0:35  \_ kswapd0root        45  0.0  0.0      0     0 ?        SN   Aug21   0:00  \_ ksmdroot        46  0.0  0.0      0     0 ?        S    Aug21   0:00  \_ aio/0root        50  0.0  0.0      0     0 ?        S    Aug21   0:00  \_ crypto/0root        59  0.0  0.0      0     0 ?        S    Aug21   0:00  \_ scsi_eh_0root        60  0.0  0.0      0     0 ?        S    Aug21   0:26  \_ scsi_eh_1root        61  0.0  0.0      0     0 ?        S    Aug21   0:00  \_ scsi_eh_2root        62  0.0  0.0      0     0 ?        S    Aug21   0:00  \_ scsi_eh_3root        63  0.0  0.0      0     0 ?        S    Aug21   0:00  \_ scsi_eh_4root        64  0.0  0.0      0     0 ?        S    Aug21   0:00  \_ scsi_eh_5root        71  0.0  0.0      0     0 ?        S    Aug21   0:00  \_ kpsmousedroot        72  0.0  0.0      0     0 ?        S    Aug21   0:00  \_ kstripedFrom the man page for ps:   -c    Show different scheduler information for the -l option.   -f    does full-format listing. This option can be combined with many          other UNIX-style options to add additional columns. It also          causes the command arguments to be printed. When used with -L,          the NLWP (number of threads) and LWP (thread ID) columns will be          added. See the c option, the format keyword args, and the format          keyword comm.