- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- idle users - notify with email
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
Forums
Discussions
Discussions
Forums
Discussions
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
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
12-16-2002 11:23 AM
12-16-2002 11:23 AM
This should be an easy one, however, the HPUX TMOUT parameter is not an option. If the O/S times out while the user has a db connection, we run the risk of data corruption.
I am looking for a script that will be run every 1/2 hour that will check to see if any users are idle for more than 1 hour and then it will send them an email.
Can someone suggest something that might help me out please?
Thanks,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2002 11:26 AM
12-16-2002 11:26 AM
Re: idle users - notify with email
Use a script on the who -u and pick up from that their idle time and if over a certain limit then email that user.
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2002 11:57 AM
12-16-2002 11:57 AM
Re: idle users - notify with email
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2002 12:01 PM
12-16-2002 12:01 PM
Re: idle users - notify with email
check out the handy scripts thread I think there was somthing there.
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2002 12:06 PM
12-16-2002 12:06 PM
Re: idle users - notify with email
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x026250011d20d6118ff40090279cd0f9,00.html
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-16-2002 12:41 PM
12-16-2002 12:41 PM
SolutionSee if this works,
#!/usr/bin/ksh
HOST=$(hostname)
EVERY=1
MESSAGE="please consider logging out"
SUBJECT="You are IDLE on $HOST"
get_user()
{
USER=$(echo $LINE|awk '{print $1}')
IDLE=$(echo $LINE|awk '{print $6}')
if [ "$IDLE" = "old" ]
then
echo $MESSAGE |mailx -s $ SUBJECT $USER
else
IDLE_HOURS=$(echo $IDLE|awk '{FS=":";print $1}')
if [ "$IDLE_HOURS" -ge 1 ]
then
echo $MESSAGE |mailx -s $ SUBJECT $USER
fi
fi
}
who -u|while read LINE
do
get_user $LINE
done
-Sri