Possible Duplicate:
How to get current CPU and RAM usage in Python?
How to read pc ram size using python or wmi generator/Windows command line
Possible Duplicate:
How to get current CPU and RAM usage in Python?
How to read pc ram size using python or wmi generator/Windows command line
Check out psutil, Just a note to those using linux if you install this via a package manager just be aware of the version you are using as they are generally out of date.
https://github.com/giampaolo/psutil
psutil is a module providing an interface for retrieving information on all running processes and system utilization (CPU, memory, disks, network, users) in a portable way by using Python, implementing many functionalities offered by command line tools such as:
For memory specifics check out http://code.google.com/p/psutil/wiki/Documentation#Memory