[Tutor] Any way of monitoring a python program's memory utilization?

Alan Gauld alan.gauld at btinternet.com
Thu Jul 17 02:19:05 CEST 2008


"Terry Carroll" <carroll at tjc.com> wrote

> Is there anything within Python (I'm on 2.5) that can check this? 
> Failing
> that, are there any Windows/XP line-oriented commands that I could 
> invoke
> and parse the output of?  (I also have Cygwin installed, in case 
> there are
> any gnu-based commands that woudl work, too.)

With cygwin you should have top, vmstat and of course ps.
All of these can monitor system status,. top being very similar to
XPs Task Manager process view but in a text window. vmstat will
not tell you process IDs, just report total usage. And ps is single
shot so you could run it (via subprocess, say) after processing each
100 files or somesuch

Take your pick...

Alan G 




More information about the Tutor mailing list