Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #10840

Re: python module to determine if a machine is idle/free

References <062306c6-3ee6-43ce-936f-ca9cc0f013c9@eb9g2000vbb.googlegroups.com> <CAGGBd_qfMZ8DmdxCg_498Grjz4iVXGu5C8gkcephwshd-ByoMw@mail.gmail.com> <CAMr-JwZ4POt+ZOu_xbor7GxNwHd9KuqVsS-ckDgXPK372scq0g@mail.gmail.com> <CAGGBd_pkpFqK8=pJUjoK3Kk1HUCefQ-AAegwtc0ztPtzrvLT3g@mail.gmail.com> <D59C59453D0EDC43832490B6DADFAECF043293E0@XMB-RCD-214.cisco.com>
Date 2011-08-03 21:38 -0700
Subject Re: python module to determine if a machine is idle/free
From Chris Rebert <clp2@rebertia.com>
Newsgroups comp.lang.python
Message-ID <mailman.1876.1312432716.1164.python-list@python.org> (permalink)

Show all headers | View raw


On Wed, Aug 3, 2011 at 9:06 PM, Danny Wong (dannwong)
<dannwong@cisco.com> wrote:
> Hi all,
>
>                 I have 5 server machines that are using to process
> information. I would like to write a quick server python script that
> determines which of the machines are not in use. Any recommendations on
> which python module I should use to detect if a machine is not performing
> idle (ex. Some specific task is not running)?

Yes, psutil:
http://code.google.com/p/psutil/

os.getloadavg() may or may not also be useful to you:
http://docs.python.org/library/os.html#os.getloadavg

Cheers,
Chris

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Complex sort on big files aliman <alimanfoo@googlemail.com> - 2011-08-01 08:33 -0700
  Re: Complex sort on big files Peter Otten <__peter__@web.de> - 2011-08-01 19:00 +0200
  Re: Complex sort on big files Alistair Miles <alimanfoo@googlemail.com> - 2011-08-02 11:25 +0100
  Re: python module to determine if a machine is idle/free Chris Rebert <clp2@rebertia.com> - 2011-08-03 21:38 -0700
  Re: Complex sort on big files sturlamolden <sturlamolden@yahoo.no> - 2011-08-05 18:31 -0700
    Re: Complex sort on big files Roy Smith <roy@panix.com> - 2011-08-05 22:54 -0400
      Re: Complex sort on big files Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-08-06 13:30 +1000
  Re: Complex sort on big files sturlamolden <sturlamolden@yahoo.no> - 2011-08-06 10:53 -0700
    Re: Complex sort on big files John Nagle <nagle@animats.com> - 2011-08-09 15:20 -0700

csiph-web