- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Users logging off incorrectly - can I catch them ?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-29-2004 12:07 AM
тАО09-29-2004 12:07 AM
Users logging off incorrectly - can I catch them ?
Many of my users are logging off the application by closing the window running the session, instead of logging out of the application first and then closing the window.
I believe this is causing issues with the application licensing and the number of concurrent users (ie. a user logs off incorrectly but the system still believes they have a session open and therefore using a license).
I'm looking for a way of tracking any such users, if possible. First thoughts were to look at the output of 'ps -ef' type commands for processes not assigned to terminals (/dev) but I'm not sure.
All help will be rewarded!
Many Thanks
Simon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-29-2004 12:18 AM
тАО09-29-2004 12:18 AM
Re: Users logging off incorrectly - can I catch them ?
regards
SK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-29-2004 12:25 AM
тАО09-29-2004 12:25 AM
Re: Users logging off incorrectly - can I catch them ?
In /etc/profile, set up a routine to create a login history record for them when they log in
eg:
echo 'LOGIN|`date`|`logname`|`tty`' >> $HOME/user.log
Then create use trap to create a record of when they log out;
trap "echo 'LOGOUT|`date`|`logname`|`tty`' >> $HOME/user.log" 0
You'll then have a pair of valid login/logout records for each user that performs a "correct" exit from the system (the trap of signal 0 should be ignored if they don't log out cleanly)
Obviously, you can customise the log file and location to suit your needs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-29-2004 12:26 AM
тАО09-29-2004 12:26 AM
Re: Users logging off incorrectly - can I catch them ?
Sunil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-29-2004 12:28 AM
тАО09-29-2004 12:28 AM
Re: Users logging off incorrectly - can I catch them ?
The very good idea is to put a small script in /etc/profile, which is doing the following:
1. Check if there are current session of this user:
#who -T
2. Writing in special system log the message about the user,which is trying 2nd attempt to log into application
3. Displaying a menu to choise for this user:
(1) kill old session and open new one
(2) keep old session
This way you will restrict the number of sessions for 1 user and will notify who are these users! It is not difficult to create such script using sh.
Regards,Stan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-30-2004 01:21 AM
тАО09-30-2004 01:21 AM
Re: Users logging off incorrectly - can I catch them ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-30-2004 01:56 AM
тАО09-30-2004 01:56 AM
Re: Users logging off incorrectly - can I catch them ?
Can you check there as,
start in new session and get the status with who / w command for tty there.
In the new session start an application in backgroudn and close the window there.
Check the started process in another terminal as,
ps -ef | grep "processid"
Please twice as some time later too. Are you seeing those?? I am sure you are not.
But you can collect idle users with
# who -HT
# w -l
commands there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-30-2004 01:59 AM
тАО09-30-2004 01:59 AM
Re: Users logging off incorrectly - can I catch them ?
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=707841
to get the idled sessions on system