Jump to content


Click the link below to see the new game I'm developing!


Photo
- - - - -

logout all users like @timeout does for one user


3 replies to this topic

#1 vth

vth

    Newbie

  • Members
  • Pip
  • 2 posts
  • Location:Michigan, USA

Posted 24 January 2008 - 09:40 PM

Can proiv 5.5 + logout all users at a specified time internal to proiv like @timeout does for one user

I use RedHat so I can logout users via killing there processes but I would like to have proIV do it say at 11:45PM so that
I can do backups and etc and use _nix ps to verify the users are logged out... This way the database transactions handling is used ...clean exit

#2 Rob Donovan

Rob Donovan

    rob@proivrc.com

  • Admin
  • 1,652 posts
  • Gender:Male
  • Location:Spain

Posted 28 January 2008 - 09:12 AM

Hi,

You cant specify the time to log them out, you can only set @TIMEOUT for each user to timeout in a number of minutes.

We timeout everyone after 60 minutes, all the time, and this minimizes the number of processes around our backup time.

Rob.

#3 vth

vth

    Newbie

  • Members
  • Pip
  • 2 posts
  • Location:Michigan, USA

Posted 28 January 2008 - 01:08 PM

Thanks Rob,

I will stay with:

/bin/ps -ef | /bin/egrep bin | /bin/egrep pro | /bin/egrep -v "egrep" | /bin/awk '{print $2}' | /usr/bin/xargs -i{} -t kill {}

to logout the users.

I notice though that if a user is logged in using ssh instead of stunnel the process is a almost a zombie in that anything less than a kill -9 the process stays until the user tries to use their session an then it terminates. That user I have found does not hold any resources for proiv or postgresql

#4 andykay

andykay

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 204 posts
  • Gender:Male
  • Location:Cyberspace...looking for work

Posted 29 January 2008 - 06:19 PM

I can do backups and etc and use _nix ps to verify the users are logged out... This way the database transactions handling is used ...clean exit


Vth,

We use to kick people out the same way here, but as you've already noted the problem of data problems resulting from killing sessions in the middle of processes, I won't comment my cautions about doing so or the corrupt records that can result.

That being said, what we do here is the VERY first line of the LOGIC IN of EVERY screen function is to a GL that initializes common variables (Ie Most Recent WO's, PO's, Item, etc...)...this is a business/design rule that every screen follows. In this GL, in the first 10 lines, we check the time and if it falls between 22:01 and 23:30 we set @LFUNCT to a function that has a category NO user has rights to, FNEXIT, and ProIV kills the ProIV session for security violations and we can do our nightly backups knowing that nobody will be in any screens doing any transactions that might conflict with our backups because all screens do this check via the GL. We also issue a friendly message :eek: to the users 10 minutes prior to the code taking effect that the system will be inaccessible in "x" minutes, until 23:30, and ask that they log off themselves out before 22:00.


HTH,

AK
THE LIGHT AT THE END OF THE TUNNEL IS THE HEADLAMP OF THE TRAIN THAT'S ABOUT TO HIT YOU!!!



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Click the link below to see the new game I'm developing!