$! HOWMANY.COM - Give information about logins (see below) $! $! Author: Peter Johansson (peter@cs.umbc.edu) $! $! This file is intended for informational purposes only - Execute it at $! your own risk. All code Copyright (C) 1993 by Peter Johansson. $! $! Non-commercial use unrestricted so long as all attributions remain $! intact. That is, if you use any part or parts of this code, I want $! credit for my work. $! $! --- begin origonal file --- $! $! this COM file tells how many users are signed onto the current node $! and how many subprocesses there are under the current signon. $! $ set noon $ on control_y then goto finish $ privs = f$setprv("noworld,nogroup") $ bell[0,32] = 7 $ count = 1 $ sub_count = 0 $ noise = "" $ context = "" $ master = f$getjpi ("", "master_pid") $ loop: $ pid = f$pid(context) $ if pid .eqs. "" then goto done $ if f$getjpi (pid, "master_pid") .nes. master then goto other_login $ sub_count = sub_count + 1 $ goto loop $ other_login: $ if f$getjpi (pid, "master_pid") .eqs. pid then count = count + 1 $ if count .gt. 1 then noise = noise + bell $ goto loop $ done: $ logins == count $ msg = "!SL user!%S logged in under account !AS on !AS." $ write sys$output f$fao (msg, count, f$edit(f$getjpi("", "username"), "trim"), f$getsyi("nodename")) + noise $ msg = "!SL processes created by this signon" $ if sub_count .gt. 1 then write sys$output f$fao (msg, sub_count) $ finish: $ exit