Monitoring System Load: Difference between revisions

From OLPC
Jump to navigation Jump to search
(init edit)
 
m (Reverted edits by 174.140.167.111 (Talk) to last revision by Crazy-chris)
 
(5 intermediate revisions by 2 users not shown)
Line 10: Line 10:
** [http://htop.sourceforge.net/ htop] .. is a more detailed, flexible, colorful version of top
** [http://htop.sourceforge.net/ htop] .. is a more detailed, flexible, colorful version of top
* Monitor a single process
* Monitor a single process
** pw.py .. a tool originating from [http://www·olpcaustria.org olpc-austria]
** pw.py .. a tool originating from [http://www.linuxuser.at linuxuser.at]




Line 26: Line 26:


== pw.py ==
== pw.py ==
* [http://www.linuxuser.at/process-watch/src/pw.txt <font color="green">'''pw.py'''</font>] is a free and simple tool to monitor a single process with its cpu and memory load<br>
* is a free and simple tool to monitor a single process with its cpu and memory load. [http://www.olpcaustria.org/mediawiki/index.php/Xo-get Project page]
* Installation (via [[xo-get]]):
* Source (GPL) [3 files]: [http://www.linuxuser.at/process-watch/process-watch.tar.gz tar.gz] [http://www.linuxuser.at/process-watch/process-watch.zip zip] [http://www.linuxuser.at/process-watch/src/ tree]
xo-get install pw
* Existing plugins:

** [http://www.linuxuser.at/process-watch/src/pw-plugin-console.txt <font style="color:green;font-weight:bold;">pw-plugin-console.py</font>] ....... Console text output (cpu < 0.4%)
** [http://www.linuxuser.at/process-watch/src/pw-plugin-gtk_graph.txt <font style="color:green;font-weight:bold;">pw-plugin-gtk_graph.py</font>] ... a simple graph with gtk (cpu < 1.3%)
* Planned plugins:
** ''pw-plugin-rrd-collect.py'' ... collect data for [http://oss.oetiker.ch/rrdtool/ rrd] and send over network
** ''pw-plugin-rrd_tool.py'' ...... receive data and draw graph with rrd
* Feedback: chris (at) linuxuser (dot) at
* Usage:
* Usage:
pw.py process_id/name/part_of_name
pw process_id / name / part_of_name


Examples:
* Examples:
1. '<font color="green">'''pw.py fire'''</font>' ... possibly capture firefox
1. '<font color="green">'''pw fire'''</font>' ... possibly capture firefox
2. '<font color="green">'''pw.py 8285'''</font>' ... watch process with pid 8285
2. '<font color="green">'''pw 8285'''</font>' ... watch process with pid 8285
3. '<font color="green">'''pw.py pw.py'''</font>' .. watch last pw.py
3. '<font color="green">'''pw pw.py'''</font>' .. watch last pw.py


* Screenshots:
* Screenshots:
<table border="0">
<table border="0">
<tr><td valign="top">Monitoring Firefox:<br>[[Image:Pw_fire.png]]</td><td style="padding-left:20px" valign="top">GTK Graph (mem=grey, cpu=white):<br>[[Image:Pw_fire_gtk.png]]</td></tr>
<tr><td valign="top">Monitoring Firefox:<br>[[Image:Pw_fire.png]]</td><td style="padding-left:20px" valign="top colspan="2">GTK Graph (mem=grey, cpu=white):<br>[[Image:Pw_fire_gtk.png]]</td></tr>
<tr><td colspan="2"><br>Capturing the Journal:<br>[[Image:Xo-journal.png]]</td></tr>
<tr><td colspan="2"><br>Capturing the Journal:<br>[[Image:Xo-journal.png|500px]]</td><td valign="top" style="padding-left:20px"><br>Another Graph on the xo:<br>[[Image:Xo-graph.png]]</td></tr>
<tr><td colspan="2"><br>Another Graph on the xo:<br>[[Image:Xo-graph.png]]</td></tr>
</table>
</table>


[[Category:HowTo]]
[[Category:Developers]]

Latest revision as of 03:48, 6 January 2011

About

  • Resources are limited: the less load an activity needs, the better!
  • Best time to start monitoring the system load is during development; it's easy!
  • Pygame best-practices are shown Game development HOWTO here and discussed here


Tools

  • Monitoring System Load
    • top ... the good old top is also on the xo
    • htop .. is a more detailed, flexible, colorful version of top
  • Monitor a single process


htop

installation:

$ su
# yum install htop

htop reacts on mouse-clicks - especially useful since the f-keys for the options are not working on the xo.

Process view:
Htop list.png
XO-friendly setup:
Htop setup.png


pw.py

  • is a free and simple tool to monitor a single process with its cpu and memory load. Project page
  • Installation (via xo-get):
xo-get install pw
  • Usage:
pw process_id / name / part_of_name
  • Examples:
1. 'pw fire' ... possibly capture firefox
2. 'pw 8285' ... watch process with pid 8285
3. 'pw pw.py' .. watch last pw.py
  • Screenshots:
Monitoring Firefox:
Pw fire.png
GTK Graph (mem=grey, cpu=white):
Pw fire gtk.png

Capturing the Journal:
Xo-journal.png

Another Graph on the xo:
Xo-graph.png