getting cross platform system information

Cameron Laird claird at lairds.com
Fri Jan 3 17:14:17 EST 2003


In article <slrnb1c0m6.3kp.gerhard.haering at lilith.my-fqdn.de>,
Gerhard Häring  <gerhard.haering at gmx.de> wrote:
>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.
			.
			.
			.
We've covered these before in c.l.p; valuable information
is in the archives.

Most troublesome is "memory usage", which is not a portable
concept at all, let alone one implemented with portable
access.  In fact, what *do* you mean by "memory usage"?  Is
that per process?  Or are you asking how much RAM the host
recognizes?  Or ...?
-- 

Cameron Laird <Cameron at Lairds.com>
Business:  http://www.Phaseit.net
Personal:  http://phaseit.net/claird/home.html




More information about the Python-list mailing list