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

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <chris@rebertia.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.012
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'subject:module': 0.04; 'python': 0.08; 'danny': 0.09; 'determines': 0.09; 'wed,': 0.12; 'subject:python': 0.12; 'wrote:': 0.15; 'skip:\xc2 30': 0.16; 'cc:addr:python-list': 0.16; 'pm,': 0.16; 'aug': 0.19; 'cheers,': 0.19; 'cc:2**0': 0.21; 'detect': 0.22; 'cc:no real name:2**0': 0.22; 'header:In-Reply-To:1': 0.22; 'received:209.85.213.46': 0.23; 'received:mail-yw0-f46.google.com': 0.23; 'url:code': 0.23; 'performing': 0.26; 'all,': 0.28; 'message-id:@mail.gmail.com': 0.28; 'server': 0.29; 'script': 0.29; 'idle': 0.29; 'cc:addr:python.org': 0.30; 'module': 0.30; 'url:library': 0.31; 'chris': 0.32; 'machine': 0.35; 'subject:/': 0.36; 'url:python': 0.37; 'useful': 0.37; 'some': 0.37; 'using': 0.37; 'received:google.com': 0.38; 'received:209.85': 0.38; 'url:org': 0.38; 'subject:: ': 0.38; 'should': 0.39; 'url:docs': 0.39; 'received:209': 0.40; 'url:p': 0.63; '8bit%:100': 0.70; 'you:': 0.80; 'sender:addr:chris': 0.84; 'url:os': 0.84; 'subject:free': 0.95
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=rebertia.com; s=google; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=CaqZHOof4JjGTdoTvXgpHoIauo3a9022uKsBCX1eDqk=; b=TF9x2IvE1ChVS6FYTbs2274aIlVbSk0rlUShB7dtc7CY4m1as4adPpaHSeX9RgTnI4 ZPvReHFaBaT64/GPvV591QqAyIYFM7EZI8T/pe9NKB/VjrwRdd7gggLFF7cdcUiomXDF cjTrzG2Rj21l79KBytypn0M2xhK/RYdND8wak=
MIME-Version 1.0
Sender chris@rebertia.com
In-Reply-To <D59C59453D0EDC43832490B6DADFAECF043293E0@XMB-RCD-214.cisco.com>
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 Wed, 3 Aug 2011 21:38:34 -0700
X-Google-Sender-Auth ewHjbpGZOxm9RtK-a-NTyIH6fPA
Subject Re: python module to determine if a machine is idle/free
From Chris Rebert <clp2@rebertia.com>
To "Danny Wong (dannwong)" <dannwong@cisco.com>
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1876.1312432716.1164.python-list@python.org> (permalink)
Lines 19
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1312432716 news.xs4all.nl 23967 [2001:888:2000:d::a6]:34324
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:10840

Show key headers only | 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