HP3000-L Archives

April 2001, Week 1

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:
Michael Anderson <[log in to unmask]>
Reply To:
Michael Anderson <[log in to unmask]>
Date:
Thu, 5 Apr 2001 16:47:02 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (77 lines)
I have a M.P.E. cmd file that does what Lars is referring to, 

I had to go ahead and add his 'catch a cold' message to it.

USER DEFINED COMMAND FILE:  WINDOWCK.UTIL.SYS

Setvar allowed_count 3
#
# Check number of sessions from the logon IP.
# DON'T COUNT MGR SESSIONS
#
Purge session,temp > $null
Purge countme,temp > $null
Purge mgr,temp > $null
Build session;rec=-128,1,f,ascii;disc=10000;temp
Build countme;rec=-128,1,f,ascii;disc=100;temp
Build mgr;rec=-128,1,f,ascii;disc=10;temp
File session=session,oldtemp
File countme=countme,oldtemp
File mgr=mgr,oldtemp
Listfile ci.pub.sys,8 > *session
/bin/fgrep "-i '!HPREMIPADDR'"    < *session > *countme
/bin/fgrep "-i mgr"              < *countme > *mgr
Setvar logon_count ![finfo("*countme", "eof")]
Setvar mgr_count ![finfo("*mgr", "eof")]
Setvar other_count !logon_count - !mgr_count
Purge session,temp > $null
Purge countme,temp > $null
Purge mgr,temp > $null
Reset session
Reset countme
Reset mgr
If !other_count > !allowed_count Then
  Echo *********************************************
  Echo TOO MANY SESSION WINDOWS OPEN.
  Echo You have !other_count session Windows open.
  Echo Plus an additional !mgr_count MGR session Windows Open.
  Echo A total of !logon_count Windows.
  echo You will catch a cold with so many open windows ;-)
  Echo *********************************************
  bye
endif
:


>>> Lars Appel <[log in to unmask]> 04/05/01 03:30PM >>>
>Some of our users open many session on our HP3000 (up to 11 !!!).
>I want to limit the sessionnumber up to 2 or 3 from one PC with a
>reflectio-login-script.

While I don't know how to due this with Reflection emulator tricks,
I'd probably try something in their logon UDC that uses LISTF,8 on
a common program like CI.PUB.SYS and greps for the client's IP addr
to count how many times it is already shown...

:listfile ci.pub.sys,8 > $newpass
: /bin/grep "' !hp_rem_ip_addr$'" < $oldpass > $newpass
:if finfo($oldpass, "eof") >= 3 then
:  echo You will catch a cold with so many open windows ;-)
:  bye
:endif

This assumes that you're not using NEWCI to launch applications
as NEWCI would make the clients' IP address no longer show up on
the CI.PUB.SYS program usage.

Lars.


PS... I haven't tried above commands, they might need tweaking.

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

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

ATOM RSS1 RSS2