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


Groups > comp.lang.python > #29554

How to limit CPU usage in Python

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rolando.caner@cnic.edu.cu>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.025
X-Spam-Evidence '*H*': 0.95; '*S*': 0.00; 'subject:Python': 0.05; 'subject:How': 0.09; 'python': 0.09; '(ubuntu': 0.16; 'received:edu.cu': 0.16; 'subject:limit': 0.16; 'subject:usage': 0.16; 'processor': 0.17; 'solution.': 0.18; 'module': 0.19; 'all,': 0.21; 'tools,': 0.23; 'external': 0.24; 'linux': 0.24; 'script': 0.24; 'header:User-Agent:1': 0.26; 'to:addr:python- list': 0.33; 'there': 0.35; 'but': 0.36; 'useful': 0.36; 'possible': 0.37; 'some': 0.38; 'received:10': 0.38; 'to:addr:python.org': 0.39; 'think': 0.40; 'limit': 0.65; 'regards.': 0.66; 'received:200': 0.71; 'saw': 0.75; 'received:10.36': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=cnic.edu.cu; s=mail; t=1348153887; bh=x8b1B9eRq5wa2ZqmuLigAyTsiPrdn1Ksh67sh51PoKM=; h=Message-ID:Date:From:MIME-Version:To:Subject:Content-Type: Content-Transfer-Encoding; b=Xw5YtuXOgkLqNo+WIOEPt9Yz344Ydy1f8/lY+o8H+VV6QRP7SQHUMCKU9a5+7pa9B AeOXF9ucsjrsyOZ6p8jiT6Vf2jfD+F9FtiXAw86jQbTTWpYWFIudZxo7gWXKNCpZql r2dg1rotfULY16wjUDN8S9mG43GGr2VpHBoPgE4I=
X-Virus-Scanned Debian amavisd-new at mx2.cnic.edu.cu
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=cnic.edu.cu; s=mail; t=1348153886; bh=x8b1B9eRq5wa2ZqmuLigAyTsiPrdn1Ksh67sh51PoKM=; h=Message-ID:Date:From:MIME-Version:To:Subject:Content-Type: Content-Transfer-Encoding; b=g8PY7z2Nlfx6BRADvsCA8oM/AF2kAPjcBXt6IQUsXT0z9UCurEPFV7gURrHpLZaXI TVv5xTstYV6/SCT2knCeEd7hc++mjyTSHWuIZiXc98aI7TQRUZQ/X89pgmdPdi9jfW dnvlSx176Q0q2qv1lVRa0xYR+UgElNRLAd4YCf4w=
Date Thu, 20 Sep 2012 11:12:44 -0400
From Rolando Cañer Roblejo <rolando.caner@cnic.edu.cu>
User-Agent Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120714 Thunderbird/14.0
MIME-Version 1.0
To python-list@python.org
Subject How to limit CPU usage in Python
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
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.960.1348154419.27098.python-list@python.org> (permalink)
Lines 10
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1348154419 news.xs4all.nl 6923 [2001:888:2000:d::a6]:47731
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:29554

Show key headers only | View raw


Hi all,

Is it possible for me to put a limit in the amount of processor usage (% 
CPU) that my current python script is using? Is there any module useful 
for this task? I saw Resource module but I think it is not the module I 
am looking for. Some people recommend to use nice and cpulimit unix 
tools, but those are external to python and I prefer a python solution. 
I am working with Linux (Ubuntu 10.04).

Best regards.

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


Thread

How to limit CPU usage in Python Rolando Cañer Roblejo <rolando.caner@cnic.edu.cu> - 2012-09-20 11:12 -0400
  Re: How to limit CPU usage in Python Tim Roberts <timr@probo.com> - 2012-09-22 13:55 -0700
    Re: How to limit CPU usage in Python Dwight Hutto <dwightdhutto@gmail.com> - 2012-09-22 23:24 -0400
  Re: How to limit CPU usage in Python Paul Rubin <no.email@nospam.invalid> - 2012-09-22 16:05 -0700
    Re: How to limit CPU usage in Python Dwight Hutto <dwightdhutto@gmail.com> - 2012-09-22 23:04 -0400
    Re: How to limit CPU usage in Python Tim Roberts <timr@probo.com> - 2012-09-24 21:09 -0700
    RE: How to limit CPU usage in Python "Prasad, Ramit" <ramit.prasad@jpmorgan.com> - 2012-09-27 16:58 +0000
    Re: How to limit CPU usage in Python Jerry Hill <malaclypse2@gmail.com> - 2012-09-27 13:07 -0400

csiph-web