HP3000-L Archives

November 2004, Week 3

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 H (Cupertino)" <[log in to unmask]>
Reply To:
Vance, Jeff H (Cupertino)
Date:
Fri, 19 Nov 2004 10:12:06 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (47 lines)
Here's another script, based on the one by Cory, which should be faster
on systems with a large number of remote sessions.  I don't sort based
on ip address, so this script could be run in break  mode, etc.

FWIW,
 Jeff
------cut here---------

PARM entry=main
# script to list all remote session's ip address via listfile,8.
Assumes that
# all remote sessions run the CI vs. an alternate program via the NEWCI
command.
#
if '!entry' = 'main' then
   setvar ipcnt 0
   errclear
   continue
   listfile ci.pub.sys,8 >iplist
   if hpcierr <> 0 then
      print iplist
      escape !hpcierr
   endif
   xeq !hpfile entry=read_listf <iplist
   deletevar cntr,ipcnt
   return

elseif '!entry' = 'read_listf' then
   # read listfile,8 output
   setvar cntr finfo('iplist',"eof")
   while setvar(cntr,cntr-1) >= 0 do
      input rec <iplist
      if pos("REM : ",rec) > 0 then
         echo ![lft(rec,pos("P:",rec)-1)] ![word(rec,,-1)]
         setvar ipcnt ipcnt+1
      endif
   endwhile
   echo
   echo !ipcnt remote sessions displayed
   echo
   return
endif
---------------end cut-------------

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2