| | |
Accessing system resources
![]() |
•
•
Join Date: Jul 2009
Posts: 2
Reputation:
Solved Threads: 0
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
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
Hope this helps...
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
![]() |
Similar Threads
- Office 2007 Excel taking 1 GB of RAM from system resources (Windows Software)
- svchost using all system resources all the time (Windows NT / 2000 / XP)
- Accessing System resources (ASP.NET)
- not enough system resources to display completely (Windows Software)
- System Resources drainage with Win 98SE (Windows 95 / 98 / Me)
- LOW RESOURCES problem (Windows 95 / 98 / Me)
- System Resources Extremely Low (Windows 95 / 98 / Me)
Other Threads in the Python Forum
- Previous Thread: sudoku solver problem
- Next Thread: Moola Gold Rush Solver
| Thread Tools | Search this Thread |
advanced aliased bash beginner bits calling casino changecolor clear command convert corners count csv cturtle cursor def definedlines dictionary digital dynamic dynamically event events examples external file float format frange function google gui hints homework i/o iframe import input jaunty java keyboard line linux list lists loop matching mouse multiple number numbers obexftp output parsing path port prime programming projects py py2exe pygame pygtk python random rational raw_input recursion return scrolledtext signal singleton skinning stderr string strings subprocess table tails terminal text thread threading time tkinter tlapse tuple tutorial ubuntu unicode urllib urllib2 valueerror variable voip web-scrape whileloop word wxpython





