Nas páginas de manual do ps
comando, temos as seguintes opções
-U userlist Select by real user ID (RUID) or name. It selects the processes whose real user name or ID is in the userlist list. The real user ID identifies the user who created the process, see getuid(2). -u userlist Select by effective user ID (EUID) or name. This selects the processes whose effective user name or ID is in userlist. The effective user ID describes the user whose file access permissions are used by the process (see geteuid(2)). Identical to U and --user.
Porém, quando eu tento
ps --forest -eo pid,ppid,ruser,euser,cputime,%mem,stat,comm -u example_username -U example_username
Ainda recebo processos que têm ruser
e euser
são diferentes de example_username
.
Aqui estão alguns exemplos:
1255 1 root root 00:00:00 0.0 Ss cron
1256 1 message+ message+ 00:00:02 0.0 Ss dbus-daemon
1261 1 gnome-r+ gnome-r+ 00:00:00 0.1 Ssl gnome-remote-de
1270 1 root root 00:00:00 0.0 Sl ecbd
1278 1 polkitd polkitd 00:00:01 0.0 Ssl polkitd
1281 1 nvidia-+ nvidia-+ 00:00:00 0.0 Ss nvidia-persiste
Que tipo de filtros são -u
e -U
?
PS: Suspeito que esses filtros sejam subordinados à -e
opção, ou seja, eles são sobrescritos por ela. Isso deveria estar explícito nas páginas do manual, mas não consegui encontrar nenhuma informação sobre isso...