- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Monitoring loggin
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
Discussions
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
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-04-2001 03:48 AM
09-04-2001 03:48 AM
i need a script for monitoring loggin accounts like this:
if used 'ps -ef | grep $LOGNAME | grep ba6.1 | wc -l' -ge 2
then
echo "Youre still logged in, please use this session"
sleep 5
exec logout 2> /dev/null
else
echo "I am starting application"
sleep 2
exec ba6.1
fi
But the obove script does not work, it allways uses the else.
But, if the user is logged in (the "ps...." is greater/equal 2), the exec logout must be executed.
Is there any idea ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2001 04:02 AM
09-04-2001 04:02 AM
Re: Monitoring loggin
What about this URL ?
http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0xacc2d06ed8c8d4118fef0090279cd0f9,00.html
Rgds
Alexander M. Ermes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2001 04:33 AM
09-04-2001 04:33 AM
Re: Monitoring loggin
if test "`ps -ef | grep $LOGNAME | grep xterma |wc -l`" -ge 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2001 04:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-04-2001 04:58 AM
09-04-2001 04:58 AM
Re: Monitoring loggin
hey, another BAAN user !
To prevent for multiple BAAN-Login-session you could use this:
if ps -fu$LOGNAME | grep ba6.1 | grep -vq grep
then
echo "Youre still logged in, please use this session"
sleep 5
exec logout 2> /dev/null
else
echo "I am starting application"
sleep 2
exec ba6.1
fi
Regards