Hi again Lucas,

so I did some digging and it seems that it actually works the same way
in Grid5000 and my machine.

If you add a user (eg., adduser test) and then start some processes as
by user, they will be shown in "tiptop -i -U", if you run it by root.

If you look into the code, when run by root, tiptop shows all
processes of *non-root* users. The relevant code is in process.c:340:

    if (((my_uid != 0) && (uid == my_uid)) || /* not root, monitor mine */
        ((my_uid == 0) && (uid != 0)))        /* I am root, monitor all others*/
      skip_by_user = 0;

What happens is that if the user running tiptop is root (my_uid == 0)
*and* the process to watch is owned by root (uid == 0) then the
process wil be skipped.  This is consistent on my personal machine, where
when run by root, tiptop shows only my regular user's processes.

This is still buggy, there seems to way to trace root processes AFAICT.
Moreover, the "-K" option (show kernel processes) seems to not work at all.
I'm letting the upstream know about it.

Cheers,
Tomasz

PS. I also found another, unrelated bug which I'm going to submit now.

Attachment: signature.asc
Description: PGP signature

Reply via email to