On 07/01/2026 17:15, Marek Zarychta wrote:

I don’t know the exact use case or how /whowatch/ works, but the | tcsh(1)| shell still has a very nice feature for watching users who log in or out. It can be enabled with the command
|set watch = (1 any any)|.
Add this to |.cshrc| if |csh| or |tcsh| is your shell, and you will be notified whenever someone logs in/out.

Yes, I have this in my .tcshrc.set (included by .cshrc)

whowatch is good in interactive mode, listing all processes owned by user, or the tree of all processes similar to what pstree produces:

1 users: (0 local, 0 telnet, 1 ssh, 0 other)  load: 0.15, 0.20, 0.22
57 processes
    1   root     - init
  112   root      |- adjkerntz
  371   root      |- devd
  459   root      |- syslogd
  594   root      |- mountd
  600   root      |- nfsd
  601   root      | `- nfsd
  639   root      |- ntpd
  754   root      |- master
25014   postfix   | |- qmgr
25054   postfix   | |- tlsmgr
76457   postfix   | `- pickup
  760   root      |- php-fpm
14728   www       | |- php-fpm
17668   www       | |- php-fpm
  955   root      |- bsnmpd
  981   root      |- cron
78787   root      | `- cron
78794 ? -1        |   `- -
26727   root      `- sshd
72731   root        `- sshd
72733   usr1          `- sshd
72734   usr1            `- tcsh
79555 R usr1              `- whowatch
enter - users list, c - cmd, o - owner, ^I - send INT, ^K - send KILL

You can then navigate this tree using the arrow keys on your keyboard and send INT or KILL to the selected process. It's nothing magical, but it used to be very convenient (it doesn't work for me anymore).

Kind regards
Miroslav Lachman


Reply via email to