[Tutor] Process Taking more than 10%

Asif Iqbal iqbala-python at qwestip.net
Sun Aug 22 00:26:03 CEST 2004


On Fri, Aug 20, 2004 at 04:55:22AM +0100, Alan Gauld wrote:
> > >There are easy ways to do this on both Unix and Windows and
> > >there are harder ways. But if its only one OS we might as
> > >well stick to the easy ways... :-)
> 
> > I think on linux you would use popen and ps, 
> 
> Nope, the easy way is to use ps and awk...
> 
> > but how is it done on windows?
> 
> Assuming NT/W2K/XP
> Open Task Manager, look at processes and sort by CPU... :-)

I saw in perl a pkg called Proc::ProcessList that has a variable called
pctcpu that has the CPU percentage of all a process

Anything similar for Python? I really don't want to use that Perl module
since it has a lot of requirements

Thanks

> 
> In both cases Python is the harder route. Right tool for 
> the job... ;-)
> 
> Alan G.
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor

-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
There's no place like 127.0.0.1


More information about the Tutor mailing list