943,657 Members | Top Members by Rank

Ad:
  • Python Discussion Thread
  • Unsolved
  • Views: 407
  • Python RSS
Jul 5th, 2009
0

Accessing system resources

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
asim.mittal is offline Offline
2 posts
since Jul 2009
Jul 7th, 2009
0

Re: Accessing system resources

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

Quote ...
acpi -V
Hope this helps...
Reputation Points: 10
Solved Threads: 6
Junior Poster in Training
xav.vijay is offline Offline
52 posts
since Aug 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Python Forum Timeline: sudoku solver problem
Next Thread in Python Forum Timeline: Moola Gold Rush Solver





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC