Who's Connected to CMS using Supervisor? (R18)

This is exactly the same content as the R17 version of this post but for CMS R18.

The linux w command will tell you who's currently logged in.

w - display information about currently logged-in users

Run it and you'll see something like this:

$ w
 09:29:37 up 9 days, 18:14, 77 users,  load average: 0.35, 0.39, 0.62
USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT
cmsuser1 pts/1    localhost        04:49   18.00s  0.16s  0.10s chipr
cms      pts/2    1.2.3.4          03:59    5:29m  2.21s  2.17s /cms/toolsbin/c
cmsuser1 pts/3    5.6.7.8          04:49    8:30m  0.00s  0.00s /bin/sh /usr/bi
cmsuser2 pts/5    9.10.11.12       01:53    7:35m  0.00s  0.00s /bin/sh /usr/bi
cms      pts/6    13.14.15.16      Tue11   46:01m 17.76s 17.52s /cms/toolsbin/c
cmsuser2 pts/8    localhost        01:53   15.00s  0.44s  0.28s chipr

Yes, you'll see usernames listed twice with two different WHAT entries.

Those chipr entries are CMS Supervisor users. If you want to see just those entries, do the following:

$ w | grep chipr
cmsuser1 pts/1    localhost        04:49   18.00s  0.16s  0.10s chipr
cmsuser2 pts/8    localhost        01:53   15.00s  0.44s  0.28s chipr

Finally, if you just want to see how many people are logged in with Supervisor, use wc to get a line count:

$ w | grep chipr | wc -l
       2