getting cross platform system information
Gerhard Häring
gerhard.haering at gmx.de
Fri Jan 3 16:38:14 EST 2003
Simon Bunker wrote:
> Does anyone know how to get processor load, RAM usage and disk usage on
> linux/unix and Windows?
I'll answer for Unix:
processor load => uptime
disk usage => df
RAM usage: I don't believe you can do this portably on Unix. On Linux,
you can evaluate the output of 'free' or read /proc/meminfo directly
(with commands.getoutput or os.popen).
For Windows, you'll probably want to download the win32 extensions and
look what goodies there are in the win32api module.
Gerhard
--
Favourite database: http://www.postgresql.org/
Favourite programming language: http://www.python.org/
Combine the two: http://pypgsql.sf.net/
Embedded database for Python: http://pysqlite.sf.net/
More information about the Python-list
mailing list