getting system status?
Martin von Loewis
loewis at informatik.hu-berlin.de
Thu May 24 11:13:55 EDT 2001
=?EUC-KR?B?wMy8urz2?= <senux at linuxkorea.co.kr> writes:
> How can I get system status by Python? I want to get
> CPU average load, disk and memory usage, uptime and so on.
> Is there related Python module?
>
> Or just run the each Unix command and grep it like this?
> got = commands.getoutput("ls -l /bin")
Depends on your operating system. On Linux, you can do
status = open("/proc/stat").readlines()
Regards,
Martin
More information about the Python-list
mailing list