LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 11-19-2009, 06:21 AM   #1
blahblah
LQ Newbie
 
Registered: Nov 2009
Posts: 6

Rep: Reputation: 0
How to find idle time


Hi

I am working on power management project in linux. which is same as gnome power manager. i.e, I want to lock the monitor if system is idle for 5 min, hibernate after 30 min like this.

My problem is how to find the idle time.
I know by using 'w' or 'finger' command we can get the idle time of terminal. but it gives the idle time of terminals, not other applications.
ex:suppose if i am using firefox or gedit application, the "w" command will not give the idle time of that firefox rite?
How can i get the idle time of these application.
Is there an API or command or if u have source code please post it.

Thanking you in advance
 
Old 11-19-2009, 11:29 AM   #2
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: FreeBSD, Puppy
Posts: 3,016

Rep: Reputation: 91
I've got loads of idle time.

no job since the end of february.
 
Old 11-23-2009, 12:15 AM   #3
blahblah
LQ Newbie
 
Registered: Nov 2009
Posts: 6

Original Poster
Rep: Reputation: 0
No answer yet.
Please tell me how can i get the idle time..
 
Old 11-23-2009, 05:53 AM   #4
wje_lq
Member
 
Registered: Sep 2007
Location: Mariposa
Distribution: Debian lenny, Slackware 12
Posts: 805

Rep: Reputation: 161Reputation: 161
For an authoritative answer, go straight to the source.

If that's too involved, hire bigearsbilly to do the work for you. I hear he has plenty of idle time. As well as, you know, big ears.

Hope this helps.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Idle Process Time On Linux And Unix: How To Find It Again LXer Syndicated Linux News 0 03-30-2009 05:30 AM
Idle time vs program time kinkle Linux - General 4 03-11-2009 10:57 PM
finding login time and idle time,..etc from a list of users knavramesh Linux - Newbie 2 10-02-2008 11:55 PM
Find X idle time jlinkels Linux - Software 2 01-25-2007 07:02 PM
How to find out idle time at console? redss Linux - General 1 04-26-2004 11:23 PM


All times are GMT -5. The time now is 12:23 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration