LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-28-2008, 09:17 AM   #1
Tom@Duna
LQ Newbie
 
Registered: May 2008
Posts: 1

Rep: Reputation: 0
Is the user doing anything


Hi all,

We a software which is licensed according to active users, so if we have 30 licenses then 30 people can use the software at the same time. I am trying to determine if a user is doing anything, or if he has just logged in and left the machine that way, so I can kill these kind of processes.
How can you determine if the user is doing anything or not?

thanks
tom
 
Old 05-28-2008, 09:25 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,635

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by Tom@Duna View Post
We a software which is licensed according to active users, so if we have 30 licenses then 30 people can use the software at the same time. I am trying to determine if a user is doing anything, or if he has just logged in and left the machine that way, so I can kill these kind of processes.
How can you determine if the user is doing anything or not?
You can't, unless that particular piece of software spawns off other processes that you can check for. If someone logs in and fires up that package, it'll just show up as a process, whether they're doing something with it or not.

One way you could determine something, is to look at how much CPU time that process is eating from one interval to the next. If it hasn't changed, you can kill it, but that's not a sure-fire way to go. What if someone is sitting there, thinking about something for a bit? Goes to the restroom and gets sidetracked? Would kinda suck to come back and have lost your work.
 
Old 05-28-2008, 09:40 AM   #3
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
It's generally not a good idea to just watch for some magical signs and when they appear (i.e. "ha! now the cpu usage reveals that guy isn't doing anything!") kill a process somebody else started. Yes, as an administrator you could do that, but it doesn't mean you should do that. The correct way is to inform the users that there's a user limit for that piece of software and that they should close the program when they don't need to use it; this is how it works in most of the civilized companies that I am aware of. So consider process killing as "the last resort" rather than an option.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Gnome: Auto mounting external devices as first user logged in, not current user yitzle Linux - Software 4 04-01-2008 09:43 AM
samba(global security=user) useful tools for client.ex: user change password. hocheetiong Linux - Newbie 1 03-18-2008 09:20 AM
C program to see user log on in system and print user with real user name also naveen245 Programming 2 12-21-2005 12:53 AM
Load kde profile from /mnt/removable/user instead of /home/user preacher.ca Linux - General 3 12-02-2005 03:00 PM
grant user access to /fat-c & copying users' preferences to another user n0x Linux - Newbie 1 07-04-2004 12:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:46 AM.

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