HP3000-L Archives

April 2000, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"VANCE,JEFF (HP-Cupertino,ex1)" <[log in to unmask]>
Reply To:
VANCE,JEFF (HP-Cupertino,ex1)
Date:
Tue, 11 Apr 2000 12:21:12 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (25 lines)
...
>  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

ATOM RSS1 RSS2