Permalink
Browse files

Preparing release 0.6.0

  • Loading branch information...
1 parent 2b023cb commit 7f8e484f5dad06528051677e4aef9253feb16976 @dagwieers committed Apr 28, 2005
Showing with 2,039 additions and 1,223 deletions.
  1. +46 −17 ChangeLog
  2. +29 −1 Makefile
  3. +14 −10 README
  4. +16 −0 README.examples
  5. +17 −0 README.performance
  6. +8 −5 README.screen
  7. +36 −0 README.stats
  8. +12 −13 TODO
  9. +800 −659 dstat
  10. +88 −14 dstat.1
  11. +25 −2 dstat.conf
  12. +6 −3 dstat.spec
  13. +696 −499 dstat15
  14. +23 −0 examples/curstest
  15. +39 −0 examples/mstat.py
  16. +39 −0 examples/read.py
  17. +1 −0 stats/dstat.py
  18. +25 −0 stats/dstat_battery.py
  19. +32 −0 stats/dstat_cpufreq.py
  20. +40 −0 stats/dstat_dbus.py
  21. 0 stats/dstat_qla2300.py
  22. +17 −0 stats/dstat_thermal.py
  23. +30 −0 stats/dstat_utmp.py
View
@@ -1,18 +1,44 @@
-* 0.5.10
-- Restore terminal for all exit situations (Modesto Alexandre)
-- Get ridding of duplicate 'too width' error message in dstat15
+* 0.6.0 - Bettiesbaai - released ../../2005
+- Removed keyboard input prevention patch. (Dbt 304673, Marc Lehmann)
+- Fixed bug with: dstat -tit -I 177
+- Added ipc stats (--ipc)
+- Added lock stats (--lock)
+- Added raw stats (--raw)
+- Added unix stats (--unix)
+- Improved udp stats
+- Reimplemented -I eth0,ide1 (Bert de Bruijn)
+- Smarter /proc handling, seek(0) instead of re-open()
+- Implemented dopen() as a wrapper hash for file descriptors
+- Small speedup improvements after profiling
+- Improvement in handling compatible stats (eg. disk, disk24, disk24old)
+- Added initial values (step=0) for disk, int, page, and sys stats
+- Allowed external tools to use the dstat classes
+- Added example scripts using the dstat classes (mstat.py and read.py)
+- Allowed external modules to be plugged in
+- Added external acpi modules (dstat_battery, dstat_cpufreq and dstat_thermal)
+- Added external modules (dstat_dbus and dstat_utmp)
+- Removed user stat (now in dstat_utmp module)
+- Smaller fixes and overall improvements
+- Improved help output and manpage
+- Added README.examples, README.performance and README.stats
+- Added profiling code (--debug)
+- Rewrote cprint/cprintlist logic
-* 0.5.9
+* 0.5.10 - released 08/04/2005
+- Small fix to restore terminal for all exit paths (Dbt 303526, Modesto Alexandre)
+- Get rid of duplicate 'screen width too small' error message in dstat15
+
+* 0.5.9 - released 28/03/2005
- Make default list total lists (cpu, disk, net)
- Fix clearline ANSI to work on older (Debian?) rxvt (Joshua Rodman)
-- Improved color/vt100 terminal capabilities logic (Charles Lepple)
+- Improved color/vt100 terminal capabilities logic (Dbt 300288, Charles Lepple)
- Finally use curses for some of the terminal capabilities logic
- Improvement to non-tty handling for intermediate updates
- Small fix to handle the edge of the counters better
- Prevent keyboard input/echo when running
-* 0.5.8
-- Added user stats using python-utmp
+* 0.5.8 - released 15/03/2005
+- Added user stats (-u), using python-utmp
- Bail out if all requested stats fail
- Replaced --noheader option by --noheaders option (like vmstat)
- Added -V as short for --version
@@ -23,13 +49,13 @@
- Replaced save and restore ANSI to save and restore VT100 (Olav Vitters)
- Backported dstat to python 1.5 again
-* 0.5.7
+* 0.5.7 - released 31/12/2004
- Change Makefile to not install when run without target (Kurt Roeckx)
- Fixed another crash caused by /proc instability
- Added --csv option to output Comma-Seperated-Value output
- If output is not a tty, don't care about line-width
-* 0.5.6
+* 0.5.6 - released 20/12/2004
- Made sys and int stats unit-aware (so 10000 int/sec -> 10.0k) (Anton Blanchard)
- Improve conv() function and stat show() functions
- Improved the calculation of the cpu usage
@@ -49,18 +75,18 @@
- Improvement in output, 10.0k or 5.0 will be displayed simply as 10k or 5
- proc stats now show floats
-* 0.5.5
+* 0.5.5 - released 02/12/2004
- In fact, round() was not the problem, use str() instead. (Anton Blanchard)
- Abandoned the use of round() as it is limited to integers (Juergen Kreileder)
-* 0.5.4
+* 0.5.4 - released 25/10/2004
- Added a python 1.5 version of dstat (Ville Herva)
- Fixed a problem with count
- Improved the logic for displaying repetitive headers
- Now --nocolor implies --noupdate (since it implies no ANSI escape sequences)
- Removed the 'Exiting on user request' message
-* 0.5.3
+* 0.5.3 - released 21/10/2004
- Added -M or --mods option to allow modules
- Added --full option to expand the -D, -I and -N discovery lists
- Re-added the number of new processes (the --vmstat will no longer resemble vmstat)
@@ -72,17 +98,17 @@
- Signal handling cleanup
- Partitions are excluded from discovery on 2.4 kernels
-* 0.5.2
+* 0.5.2 - released 13/10/2004
- Improved disk and net discovery functions (Ville Herva)
- Fixed a bug with values when using --noupdate (Pasi Pirhonen)
- Documented the internals a bit more, hoping people will contribute
- Implemented a fix for when the output exceeds terminal columns
-* 0.5.1
+* 0.5.1 - released 11/10/2004
- Fixed bug that caused counters to not be averages when delay > 1
- Added time stats (-t)
-* 0.5
+* 0.5 - released 11/10/2004
- Changed some more int()'s into long()'s (Pasi Pirhonen)
- Fixed the cpu out of index, /proc instability (Pasi Pirhonen)
- Improved the rounding function
@@ -94,7 +120,7 @@
- When counters roll over, show dash
- Fixed 2 crash bugs caused by /proc instability
-* 0.4
+* 0.4 - released 26/10/2004
- Added interrupt stats (-i)
- Order of the stats adhere the order of the options
- Interval more precise, using signals instead of sleep
@@ -122,6 +148,9 @@
- Converted all values to bytes
* 0.2
-- Added disk io (-d)
+- Added disk io stats (-d)
- Added proc stats (-p)
- Important layout changes
+
+* 0.1
+- Initial release
View
@@ -11,6 +11,34 @@ install:
# -[ ! -f $(DESTDIR)$(sysconfdir)/dstat.conf ] && install -D -m0644 dstat.conf $(DESTDIR)$(sysconfdir)/dstat.conf
install -Dp -m0755 dstat $(DESTDIR)$(bindir)/dstat
install -Dp -m0644 dstat.1 $(DESTDIR)$(mandir)/man1/dstat.1
+ install -d -m0755 $(DESTDIR)$(datadir)/dstat/
+ install -Dp -m0755 stats/*.py $(DESTDIR)$(datadir)/dstat/
+# install -d -m0755 $(DESTDIR)$(datadir)/dstat/examples/
+# install -Dp -m0755 examples/*.py $(DESTDIR)$(datadir)/dstat/examples/
clean:
- @echo "No clean phase."
+ rm -f dstat15.tr examples/*.pyc
+
+#### Imperfect translation to dstat15
+tr:
+ @cat dstat | perl -p -e ' \
+ next if (s|(\S+)\.center\((.+)\)\.replace\((.+), (.+)\)|string.replace(string.center($$1, $$2), $$3, $$4)|g); \
+ next if (s|(.[-?] .)\.rjust\((\S+)\)|string.rjust\($$1, $$2\)|g); \
+ next if (s|(. .)\.join\(l\[cpunr\+2:\]\)\.split\((.,.)\)|string.split(string.join(l[cpunr+2:], $$1), $$2)|g); \
+ next if (s|self\.intmap\[(\S+)\.strip\(\)\.lower\(\)\]|self.intmap[string.strip(string.lower($$1))]|g); \
+ next if (s|\((.0.) \+ (. .) \* len\((\S+)\)\)\.rjust\((\S+)\)|string.rjust($$1 + $$2 * len($$3), $$4)|g); \
+ next if (s|(\S+)\.replace\((.:.), (. .)\)\.split\(\)|string.split(string.replace($$1, $$2, $$3))|g); \
+ s|(\S+)\.replace\((.+), (.+)\)|string.replace($$1, $$2, $$3)|g; \
+ s|(\S+)\.rjust\((.+)\)|string.rjust($$1, $$2)|g; \
+ s|(\S+)\.center\((.+)\)|string.center($$1, $$2)|g; \
+ s|(\S+)\.strip\((.+)\)|string.strip($$1, $$2)|g; \
+ s|(\S+)\.split\((.+)\)|string.split($$1, $$2)|g; \
+ s|(\S+)\.rjust\(\)|string.rjust($$1)|g; \
+ s|(\S+)\.center\(\)|string.center($$1)|g; \
+ s|(\S+)\.strip\(\)|string.strip($$1)|g; \
+ s|(\S+)\.split\(\)|string.split($$1)|g; \
+ s|(\w+)\.lower\(\)|string.lower($$1)|g; \
+ s|long\(round\(var\)|int\(round\(var\)|g; \
+ s|, time$$|, time, string|g; \
+ ' >dstat15.tr
+ @chmod a+x dstat15.tr
View
24 README
@@ -8,16 +8,20 @@ directly with the disk throughput (in the same interval).
Dstat also cleverly gives you the most detailed information in
columns and clearly indicates in what magnitude and unit the output
-is displayed. Less confusion, less mistakes.
+is displayed. Less confusion, less mistakes, more efficient.
-Dstat is also unique in letting you aggregate block device throughput
-for a certain diskset or network bandwidth for a group of interfaces,
-ie. you can see the throughput for all the block devices that make up
-a single filesystem or storage system.
+Dstat is unique in letting you aggregate block device throughput for
+a certain diskset or network bandwidth for a group of interfaces, ie.
+you can see the throughput for all the block devices that make up a
+single filesystem or storage system.
-You can customize your dstat output from /etc/dstat.conf and you can
-write your own dstat modules to plug into the dstat output.
+Dstat allows its data to be directly written to a CSV file to be
+imported and used by OpenOffice, Gnumeric or Excelto create graphs.
-Dstat's output, in its current form, is not very useful to be post-
-processed by other tools. It's mostly meant for allowing humans to
-interprete real-time data as easy as possible.
+Since it's practically impossible to test dstat on every possible
+permutation of kernel , python or distribution version, I need your
+help and your feedback to fix the remaining problems.
+
+If you have improvements or bugreports, please send them to:
+
+ <dag@wieers.com>
View
@@ -0,0 +1,16 @@
+Dstat examples
+""""""""""""""
+I've written a few examples that make use of the dstat classes.
+
+The following examples currently exist:
+
+ read.py - shows how to access dstat data
+ mstat.py - small sub-second ministat tool
+
+Please send other examples or tools that make use of dstat classes
+or changes to extend the current infrastructure.
+
+I'm not particularly happy with how to interface with dstat from
+the outside, so any hints on how to improve it are welcome.
+
+Please send feedback to: <dag@wieers.com>
View
@@ -0,0 +1,17 @@
+Dstat performance
+"""""""""""""""""
+Since dstat is written in python, it's not optimized for performance.
+
+When doing performance analysis, it's important to verify that the
+monitoring tool is not messing with the performance numbers.
+
+Depending on the stats being used and the load on the server itself
+the impact Dstat has on the system you're monitoring might be
+considerable.
+
+Before performing any tests please verify for yourself what impact
+Dstat has on your test results and keep that in mind when analysing
+the results afterwards.
+
+In case the impact is higher than expected, reduce the number of stats
+and remove expensive stats.
View
@@ -1,8 +1,9 @@
Configuring screen to display multiple dstat for different systems
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
-It saved me a lot of work after I discovered the split screen functionality
-and how it worked exactly. Here is an example of how I would monitor 5 nodes
-in a cluster with a minimum of effort:
+Here is an example of how I monitor 5 nodes in a cluster with a minimum
+of effort using screen:
+
+Put the following content in a file called screenrc-5nodes:
startup_message off
defwrap off
@@ -20,8 +21,8 @@ in a cluster with a minimum of effort:
focus down
screen -t node05 5 ssh -t 172.17.0.215 'dstat -cdnyp --tcp --udp -l -D lores,hires -N bond0,eth0,eth2,eth3 10'
-Put this in a file named screenrc-5nodes and then set the environment
-variable to tell screen to use this config-file for the next screen.
+Then set the environment variable to tell screen to use this config-file
+for the next screen.
SCREENRC='screenrc-5nodes' screen
@@ -35,3 +36,5 @@ Do that 5 times, and then quit each dstat by pressing:
ctrl-c
5 times.
+
+If you have other tips or hints, please send them to: <dag@wieers.com>
View
@@ -0,0 +1,36 @@
+External dstat modules
+""""""""""""""""""""""
+The core functionality of dstat is self-contained inside the dstat script,
+but it is possible to add your own dstat modules. Currently only the
+following external modules exist:
+
+ dstat_battery
+ dstat_cpufreq
+ dstat_dbus
+ dstat_thermal
+ dstat_utmp
+
+You can enable one of these stats by using the -M options:
+
+ dstat -a -M dbus,utmp
+
+Currently I foresee that all stats that depend on something else than
+just the kernel or the stock python modules are implemented as external
+modules. Also experimental modules or modules that are expensive should
+be external.
+
+Future possible external modules:
+
+ dstat_amavisd
+ dstat_apache
+ dstat_bind
+ dstat_dhcpd
+ dstat_dnsmasq
+ dstat_gfs
+ dstat_gpfs (needs a fast /proc interface)
+ dstat_nfs
+ dstat_postfix
+ dstat_qla2300
+ dstat_samba (needs a python tdb implementation)
+ dstat_sendmail
+ dstat_squid
View
25 TODO
@@ -1,23 +1,21 @@
### Usability
-+ Add --config option and use /etc/dstat.conf to influence output
-+ Allow to force to given magnitude
++ Add --config option and use /etc/dstat.conf and ~/.dstat to influence output (see example dstat.conf)
++ Allow to force to given magnitude (--unit=kilo)
+ Look at possibilities to show deviation (on second line ?)
-+ Find a way to use curses without the flickering and tty clearing in screen
-+ Detect terminal capabilities (colors, ANSI) using curses (?)
-+ Re-implement -I eth0,eth1
### Export/Graph
-+ Interface with rrdtool
++ Interface with rrdtool (python-rrd ?)
+ Allow for different types of export modules (only CSV now)
### Extending statistics (help welcome!)
-+ Add all stats to seperate modules and allow people to plugin their own modules
++ Add slab stats (see /proc/slabinfo and slabtop)
++ Add xorg stats (xdpyinfo, xrestop)
+ Add icmp, nfs, ntp stats ?
-+ Add user stats (number of users logged on)
+ Add application stats (-a or -A pid,cmd)
++ Add user stats (number of users logged on, utmp is not that useful, /proc/key-users)
+ Look into interfacing with apps (bind, sendmail, postfix, squid, amavisd, laus, samba)
+ Look into interfacing with specific HW counters in /proc
-+ Look at /proc/slabinfo, /proc/meminfo, /proc/locks, /proc/mdstat, /proc/vmstat
++ Look at /proc/meminfo, /proc/mdstat, /proc/netstat, /proc/snmp, /proc/vmstat
+ Allow for SNMP counters to be added
### Documentation (help welcome!)
@@ -28,14 +26,15 @@
(explaining the different uses of tools like dstat, iostat, pmap, strace, tcpdump)
### General bugs
-+ Timer is not accurate on 2.6 kernel, every second there's a 1ms deviation (every 17mins -> 1sec)
++ Timer is not accurate on 2.6 kernel, every 1 seconds there's a 0.8ms deviation (every 21mins -> 1sec)
+ Python 1.5 prints 'L' for long, crashes when int()
+ If number of lines on terminal <= 1, division by zero
### Stat bugs
-+ tcp stat is very slow and generates lots of softirqs (on some systems)
+ Implement better (?) protection against counter rollovers
-+ Fix bug with: ./dstat -tit -I 177
++ tcp stat is very slow and generates lots of softirqs (on some systems), to be confirmed
++ proc stats (run, blk and new) does not work on 2.4.30 (possibly 2.4.x), to be confirmed
++ proc stats seem to be off-by-one (some of the time)
### Redesign (v2.0)
+ Create modules that can contain samples of different units
@@ -48,4 +47,4 @@
tps (int)
blk_read/sec, blk_wrtn/sec (kB/sec)
-+ Design proper object model
++ Design proper object model and namespace for _all_ possible stats
Oops, something went wrong.

0 comments on commit 7f8e484

Please sign in to comment.