LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-09-2003, 09:38 PM   #1
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Rep: Reputation: 31
idle procress


(script wanted)

I am looking for a linux srcipt that to kill the user process that idle for over 2 hours, does anyone can post the sample script here ?thanks in advance .
 
Old 04-10-2003, 12:27 PM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
This will kill all a users processes:
Code:
#!/bin/bash
if [ ! $1 ]; then
	echo "please specify a username"
	exit 0
fi
pgrep -u $1 bash | xargs kill -9
# die user die!!!!
as for how to check if it's been idle I don't know...
 
Old 04-10-2003, 02:27 PM   #3
footfrisbee
Member
 
Registered: Apr 2003
Distribution: Debian Sarge
Posts: 259

Rep: Reputation: 30
Well, I don't have a script for you, but I did find a program that disconnects idle users called "autolog". I would post a link, but you haven't said what distribution you use.
 
Old 04-11-2003, 02:09 AM   #4
ust
Senior Member
 
Registered: Mar 2003
Location: fasdf
Distribution: Debian / Suse /RHEL
Posts: 1,130

Original Poster
Rep: Reputation: 31
I use RH8
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Python IDLE apocolpse Programming 2 11-09-2004 08:37 PM
Python Idle apocolpse Programming 2 10-18-2004 04:16 AM
X freezes when IDLE mehargags Slackware 5 06-05-2003 12:38 PM
idle procress ust Linux - General 0 04-15-2003 03:40 AM
idle procress ust Linux - Newbie 1 04-09-2003 11:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration