Subject: | |
From: | |
Reply To: | VANCE,JEFF (HP-Cupertino,ex1) |
Date: | Tue, 11 Apr 2000 12:21:12 -0600 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
...
> 5. How can you tell which users have been logged on for over a week?
On 6.0 PP1 and later you could write a script like this:
(not tested!!)
PARM who="@S", days=7
# This script shows all jobs/session ("who") that have been
# logged on more than "days" days.
if setvar(_jobcnt,JOBCNT("!who",_jobs)) = 0 then
echo No job/sessions match "!who"
return
endif
echo The job/sessions below have been connected more than !days days:
setvar i 0
while setvar(i,i+1) <= _jobcnt do
if JINFO(setvar(_job,word(_jobs,,i)),"ConnectMin") > !days then
echo "#!_job" ![JINFO(_job,"JobUserAccountGroup"] &
![JINFO(_job,"IPAddr")]
endif
endwhile
Jeff Vance, CSY
|
|
|