- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Kill Users process
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-28-2005 05:27 PM
тАО09-28-2005 05:27 PM
Kill Users process
PIDS=ps -af | awk '{print $2}'
i received the PIDS but how should i check whether active sessions. and also it should not be root process.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-28-2005 05:38 PM
тАО09-28-2005 05:38 PM
Re: Kill Users process
The process states changes every millisecond due to time sharing scheduling and so the process which is in running state now may be in wait, sleep, ready to run state after few miliiseconds.
If you want to log out inactive telnet sessions/ssh sessions, you can put TMOUT varibale. export TMOUT=100, will disconnect the session after 100 seconds.
If you want to kill user process, then you can do as follows.
ps -u"user_name|grep -iv [P]ID|awk '{print $1}'|xargs kill -15
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-28-2005 05:42 PM
тАО09-28-2005 05:42 PM
Re: Kill Users process
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-28-2005 05:46 PM
тАО09-28-2005 05:46 PM
Re: Kill Users process
And daily evening i want to kill inactive sessions i.e only one session should be active(if some users opened 3 session that
time i want to kill 2 sessions except current runing one).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-28-2005 05:49 PM
тАО09-28-2005 05:49 PM
Re: Kill Users process
I agree with RAC.
This is exactly what the TMOUT variable is designed for - to kill idle sessions.
MUCH safer than just killing processes.
My $0.02,
Jeff
- Tags:
- TMOUT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-28-2005 05:57 PM
тАО09-28-2005 05:57 PM
Re: Kill Users process
But i want to kill if users opened 2 or 3 sessions or process and and also logoff users process except current runing session.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-28-2005 06:10 PM
тАО09-28-2005 06:10 PM
Re: Kill Users process
You can control no. of logins. man 4 security. Prepare /etc/default/security file and put NUMBER_OF_LOGINS_ALLOWED=2
This will allow 2 simulataneous logins only.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-28-2005 06:10 PM
тАО09-28-2005 06:10 PM
Re: Kill Users process
It's just MUCH to dangerous to grep stuff out of ps command & kill them. You're likely to kill something that you shouldn't & crash the system.
But I guess if you're a gambling man.....
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-28-2005 06:16 PM
тАО09-28-2005 06:16 PM
Re: Kill Users process
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=305690
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-28-2005 06:18 PM
тАО09-28-2005 06:18 PM