Hey

I use both windows vista and Ubuntu (mostly) for developing small py scripts. I wanted to know if there were any libraries or modules available to get information about system resources like :
- Source of power (ac or battery)
- how much battery time is left
- Is there any network activity
- how much CPU / Memory is being used

Basically all the things that Task Manager(windows) or System Monitor(linux) would do for you. I wanna do this using a PY script. (or if there is a way to do it at the linux shell)

Any info would be greatly appreciated.

Thanks,
Asim

For windows look for WMI scripting queries that would fetch you the required info. You can use the same in the python. The Microsoft site has plenty of details on that.

For Ubuntu, you will have to look for the file which stores that info. It could be in /proc.

A google search for "Ubuntu + battery" gave me something called

acpi -V

Hope this helps...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.