Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Programatically knowing inactive system

  1. #1
    Join Date
    Jul 2008
    Location
    New Delhi,India
    Beans
    273
    Distro
    Ubuntu

    Programatically knowing inactive system

    What are the methods which can be employed to figure out when a system is inactive(idle) for some threshold time duration?How to know this via some script etc.
    NB:Although i would like to work on Linux,but ideally would like to know some general features/algorithms which help detect the same for any computing environment.

  2. #2
    Join Date
    Feb 2007
    Location
    West Hills CA
    Beans
    10,044
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Programatically knowing inactive system

    ruptime
    rwho
    rwhod
    -------------------------------------
    Oooh Shiny: PopularPages

    Unumquodque potest reparantur. Patientia sit virtus.

  3. #3
    Join Date
    Jul 2008
    Location
    New Delhi,India
    Beans
    273
    Distro
    Ubuntu

    Re: Programatically knowing inactive system

    Quote Originally Posted by tgalati4 View Post
    ruptime
    rwho
    rwhod
    PLease may you elucidate.
    Does this take into consideration a situation like
    I am the only user logged to my system and suppose there's no activity on my part,not even mouse movement etc.Ubuntu by default uses some algo in the power management whereby the display turn after some time of no activity.Something of this type is what i desire

  4. #4
    Join Date
    Jul 2008
    Location
    New Delhi,India
    Beans
    273
    Distro
    Ubuntu

    Re: Programatically knowing inactive system

    Any answers?

  5. #5
    Join Date
    Jul 2008
    Location
    New Delhi,India
    Beans
    273
    Distro
    Ubuntu

    Re: Programatically knowing inactive system

    Let me reframe the question.How can i program to know when to turn my display etc off?

  6. #6
    Join Date
    Jan 2006
    Beans
    Hidden!
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Programatically knowing inactive system

    Quote Originally Posted by nipunreddevil View Post
    Let me reframe the question.How can i program to know when to turn my display etc off?
    monitor input events, no input events for 5 min -> screen saver
    I am infallible, you should know that by now.
    "My favorite language is call STAR. It's extremely concise. It has exactly one verb '*', which does exactly what I want at the moment." --Larry Wall
    (02:15:31 PM) ***TimToady and snake oil go way back...
    42 lines of Perl - SHI - Home Site

  7. #7
    Join Date
    Dec 2009
    Location
    germany
    Beans
    1,020
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Programatically knowing inactive system

    Quote Originally Posted by nipunreddevil View Post
    What are the methods which can be employed to figure out when a system is inactive(idle) for some threshold time duration?How to know this via some script etc.
    NB:Although i would like to work on Linux,but ideally would like to know some general features/algorithms which help detect the same for any computing environment.
    hello
    if you want to figure this out you need different interfaces in uninx/linux.
    on uninx ( solaris ) you can use /dev/kmem on linux you can use /proc to retrive the data.
    but i think your problem is how to design "idle" because the system is always a little busy ( sync, network ...)
    and what time slice you want to declare ( is there a screensaver running ? - get the cpu usage from it )
    hope it helps a little.
    ciao
    "What is the robbing of a bank compared to the FOUNDING of a bank?" Berthold Brecht

  8. #8
    Join Date
    Jul 2008
    Location
    New Delhi,India
    Beans
    273
    Distro
    Ubuntu

    Re: Programatically knowing inactive system

    How can i know how the screen save knows that it's 5 mins no activity and it may turn on.

  9. #9
    Join Date
    Dec 2009
    Location
    germany
    Beans
    1,020
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Programatically knowing inactive system

    Quote Originally Posted by nipunreddevil View Post
    How can i know how the screen save knows that it's 5 mins no activity and it may turn on.
    high
    watch your keyboard, mouse and every thing you got as an input.
    ciao
    "What is the robbing of a bank compared to the FOUNDING of a bank?" Berthold Brecht

  10. #10
    Join Date
    Sep 2009
    Location
    Canada, Montreal QC
    Beans
    1,809
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Programatically knowing inactive system

    Quote Originally Posted by rnerwein View Post
    high
    watch your keyboard, mouse and every thing you got as an input.
    ciao
    +1, The user may be away, but a program could do heavy processing.
    I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones.
    Freedom is measured in Stallmans.
    Projects: gEcrit

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •