Commit graph

43 commits

Author SHA1 Message Date
Doug Torrance 219e04f6ad Update mailing list links to new Google Groups. 2018-05-14 23:34:53 +01:00
Doug Torrance 67f91e7794 wmmon: Bump to version 1.4. 2018-04-11 00:07:09 +01:00
Doug Torrance 2a199f8b19 wmmon: Add support for larger load averages.
Previously, a green hint line was drawn on the CPU window for each
multiple of 1.  This meant as the load average approached 40 (the
height of the window), the window would gradually fill up entirely
with green.

To get around this, we switch to a yellow hint line for each
multiple of 10 once the load passes 10.  And then a red hint line
for each multiple of 100 once the load passes 100.

This fixes Debian bug #894801, reported by Pedro Gimeno
<debian.bts@personal.formauri.es>.
2018-04-11 00:07:03 +01:00
Doug Torrance bdfca9d3d0 wmmon: Only compute vertical position of hint lines once.
The system load monitor displays green hint lines at every 100 units once
load average rises above 100.

Previously, the vertical position of these lines was computed before
each and every pixel was drawn.  But since the horizontal position
isn't needed for this computation, we move it up a level to the
outer for loop.
2018-04-11 00:06:58 +01:00
Doug Torrance 7354c4df53 wmmon: Properly compute height of system load window.
Previously, we looped through the history and added 100 whenever we found
a larger value.  This has a number of problems.  In particular,
* We get a maximum possible value of 5500 (100 * the number of values in
  the history).  It is certainly possible to have a system load north of
  this on modern systems.
* If the system load in history were to jump by more than 100 in a single
  step, then we wouldn't be adding enough.  For example, suppose the
  system load in history is 175, and our height was previously computed
  to be 200.  Suppose the next value in history is 320.  We would add
  100 to get a new height of 300, which isn't sufficient to display the
  320.

The fix is simple -- replace the if statement with a while loop, i.e.,
continue adding 100 until we get a height that fits our value.
2018-04-11 00:06:49 +01:00
Doug Torrance 0fcfc7aa4e wmmon: Bump to version 1.3. 2017-08-12 22:40:32 +01:00
Doug Torrance e1abd5ceee wmmon: Update documentation. 2017-08-12 22:40:32 +01:00
Doug Torrance ce3921d830 wmmon: Add desktop entry file. 2017-08-12 22:40:32 +01:00
Doug Torrance 3ec1a9cde3 wmmon: Fix jiffy counter overflowing long on 32-bit systems.
Based on patch by Pedro Gimeno Fortea for Debian bug #670151 [1].

[1] https://bugs.debian.org/670151
2017-08-12 22:40:32 +01:00
Doug Torrance cd2115dbe8 wmmon: Use consistent data types. 2017-08-12 22:40:32 +01:00
Doug Torrance 4a1a75e65a wmmon: Remove redundant #define. 2017-08-12 22:40:32 +01:00
Doug Torrance a7a65a17ce wmmon: Update includes based on results of include-what-you-use. 2017-08-12 22:40:32 +01:00
Doug Torrance 61ff28e190 wmmon: Use autotools for build. 2017-08-12 22:40:32 +01:00
Doug Torrance 0306231dcb wmmon: Move all source files to top directory for simplicity. 2017-08-12 22:40:32 +01:00
Rodolfo García Peñas (kix) f35a87796f wmmon uses libdockapp
The dockapp wmmon uses the new version of libdockapp and do not use
libwmgeneral.

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2015-08-15 09:52:19 +01:00
Rodolfo García Peñas (kix) 9b5756d5bd New library wmgeneral
This patch includes the library wmgeneral. The wmgeneral library
is used in a lot of dockapps:

$ find . -name wmgeneral
./wmkeys/wmgeneral
./wmtime/wmgeneral
./wmtz/wmgeneral
./wmsm.app/wmgeneral
./wmcpufreq/wmgeneral
./wmtv/src/wmgeneral
./wmSMPmon/wmgeneral
./wmckgmail/wmgeneral
./wmifs/wmgeneral
./wmbiff/wmgeneral
./wmfsm/wmgeneral
./wmsun/wmgeneral
./wmmon/wmgeneral
./wmitime/wmgeneral
./wmppp.app/wmgeneral

So, any change in the wmgeneral needs change a lot of dockapps.

I used the wmmon dockapp to move the wmgeneral and then I adjust the
wmmon to use the library. The library must be installed in the system
to build wmmon (wmmon uses the .h files) and is needed to run wmmon
(wmmon uses the libwmgeneral.so shared library).

I did not include any Changelog/README/... file to announce the change
in the libwmgeneral folder.

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2015-08-13 19:33:19 +01:00
Doug Torrance e46ebfcb20 wmgeneral, wmsun: Use threadsafe functions. 2015-06-14 23:23:24 +01:00
Doug Torrance a332db862a wmgeneral: Add support for X geometry strings to -geometry option.
In particular, we can specify the offsets from the right and bottom of the
screen using '-', e.g., '-geometry -64-64' places the dockapp in the lower
right corner of the screen.
2015-05-28 00:36:23 +01:00
Doug Torrance 2e2937620d wmgeneral: Add _POSIX_C_SOURCE #defines for strdup, pid_t, and getline. 2015-05-26 08:22:14 +01:00
Doug Torrance 7e04b6a890 wmgeneral: Fix "unused variable" warning. 2015-05-26 08:22:14 +01:00
Doug Torrance 624b2898fe wmgeneral: Don't call free on pointers we haven't malloced.
Could cause occasional segfaults.
2015-05-20 10:44:41 +01:00
Doug Torrance a9b73f2fd6 wmgeneral: Fix segfault if newline encountered in parse_rcfile.
From a patch for wmppp.app by Chris Gray <cgray@tribsoft.com> submitted to
Debian to fix several bugs [1].

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=27997
2015-05-20 10:44:41 +01:00
Doug Torrance cd30d4127d wmgeneral: Add proper copyright headers; fix changelog formatting. 2015-05-20 10:44:41 +01:00
Doug Torrance afd3d56aea wmgeneral: Use #includes from include-what-you-use. 2015-05-20 10:44:41 +01:00
Doug Torrance 6b1ed40882 wmgeneral: Use field width limits for scanf.
This fixes "(portability) scanf without field width limits can crash with
huge input data on some versions of libc" warning from cppcheck.

We choose 10 as the field width limit as it is the number of characters in
2^31-1, the largest int.
2015-05-20 10:44:41 +01:00
Doug Torrance a0f16b945a wmgeneral: Reduce scope of several variables.
Also took the opportunity to fix some whitespace formatting.
2015-05-20 10:44:41 +01:00
Doug Torrance 6dc4716c29 wmgeneral: Merge 2003-10-10 version from wmmon and wmtime.
Note that this was a fork of the earlier 1998-05-02 version and didn't
contain the later changes.  Therefore we merge the best of both versions.

wmtime had some additional unnecessary dummy variables, so we use the wmmon
version.
2015-05-20 10:44:41 +01:00
Doug Torrance 7d77c17cc1 wmgeneral: Remove inline keywords.
Previously, if we attempted to build using C99 or later, we got "inline
function declared but never defined" warnings and eventual "undefined
reference" errors.  As a result, it fails to build from source using gcc5.

However, if we move the definitions to list.h and add "extern inline"
declarations to list.c, which does compile using C99 and later, then it no
longer compiles using gnu90, the default for gcc4.

To avoid this mess, we remove the inline keywords altogether.

Note that this fixes Debian bugs for wmifs [1], wmppp.app [2], and
wmtime [3].

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=778170
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=778172
[3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=778174
2015-05-20 10:44:40 +01:00
Doug Torrance dae24a2f5d wmgeneral: Free pointer.
Fixes "(error) Memory leak: argv" found by cppcheck.
2015-05-20 10:44:40 +01:00
Doug Torrance 746c4b6b7c wmgeneral: Check if malloc fails.
Fixes "(error) Uninitialized variable: ret" found by cppcheck.
2015-05-20 10:44:40 +01:00
Doug Torrance 612921ae43 Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
Len Trigg 145662ff35 Fix two bugs related to command execution:
- When executing a command, control flow would fall through to the
  display cycle code, changing the display.

- When display cycling was prevented by the user (via -l), command
  execution was also disabled.
2013-12-05 10:00:25 +00:00
Rodolfo García Peñas (kix) 91a59cb9a4 wmmon: Code style clean.
This patch only includes code clean (curly brackets, tabs, ...).
2012-06-17 17:30:46 +01:00
Alexey I. Froloff 792a5d290a Mass update FSF address
Signed-off-by: Alexey I. Froloff <raorn@raorn.name>
2012-06-05 20:50:13 +01:00
Alexey I. Froloff 31c2845466 Mass update GPLv2 from http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
Signed-off-by: Alexey I. Froloff <raorn@raorn.name>
2012-06-05 20:45:40 +01:00
B. Kelly (wbk) 53d8bad0f4 wmmon: Add -b flag, etc
Added -b flag to include buffers and cache in total memory usage.
Added global show_buffers, -b parsing code, associated logic in
update_stat_mem(), and usage information.

wmmon.1
  Added -b documentation.
2012-04-02 10:35:56 +01:00
B. Kelly (wbk) a5f88e5e59 wmmon: Merged patch suggested by Bernard Cafarelli at Gentoo to prevent clobbering environment.
TODO: Still need to fix dependencies.

wmmon.c:
  Updated version string to 1.2b2 (forgot this for 1.2b1).

  Fixed compiler warnings: added error checking for filesystem calls
  and commented out some preprocessor/C code that was apparently used
  to hardcode test cases.

  TODO: remove completely  soon if no ill effect.
2012-04-02 10:32:59 +01:00
B. Kelly (wbk) b2ce70a147 Makefile: changed erroneous -O3 flag to -O2. 2012-03-26 23:17:44 +01:00
Barry Kelly e2363d30fc wmmon I/O monitor bug fixes:
wmmon/CHANGES:
  Updated for 1.2b1.

wmmon/Makefile:
  Added debug build with -g3; default build with -O3. Note:
  This makefile isn't perfect. You must "make clean" when switching
  between "make" and "make debug" otherwise objects won't compile.
  I'm sure it's a simple dependency issue, but I am not an expert with
  Makefiles. I intend to fix this, but it's a low priority.

wmmon/wmmon/wmmon.c:
  Updated changelog. Added #define HISTORY_ENTRIES to replace hardcoded
  values.

  DrawStats_io():
    Removed static variable global_io_scale. Replaced with a local
    variable.  This should improve graphing - scale was growing, but
    never shrinking, meaning as time passed, graphed values were
    downscaled and not displayed.

    Fixed rounding errors caused by use of integer types which were
    causing very small values not to appear on graph. Added code to
    round very low values up, so they will appear on meter and graph.
    We are making a reasonable compromise between readability and
    accuracy. Side effect is that small peaks (greater than 0 but less
    than our rounded-up tiny values) will actually appear as dips
    instead of peaks. I feel this is acceptable, since it still conveys
    an impression of "jitter" to the user. Fixing this would have
    involved further modifying the data before we graph it, which would
    defeat the purpose of improving accuracy.

    Tweaked load bar scaling algorithm for reabality and sensitivity.

  update_stat_io():
    Added a "stale" timeout for static long maxdiskio (determines
    scaling of load bar). New behaviour is that every couple of minutes
    we discard our saved peak value and resample. This prevents an
    anomalously huge I/O spike from making more typical values fail to
    trigger the load bar for the rest of the app's lifetime. Side
    effect will be that every couple of minutes, we will get an
    anomalous spike in the load bar as it recalibrates. This anomaly
    only affects the bar, not the graph.

  getWidth():
    Fixed integer rounding issue similar to that in DrawStats_io().
    Added similar rounding code to round up very small values so we
    don't have the illusion of an idle system following a huge spike.
2012-03-26 08:48:39 +01:00
Rodolfo García Peñas (kix) 0740b8c902 wmmon: wmmon manpage 2011-12-18 20:37:44 +00:00
Rodolfo García Peñas (kix) 996f7c41ad wmmon: remove wmgeneral.c typecasting warning
wmmon: Added -f to rm

The -f argument don't stop the make process if the file don't
exists.
2011-12-18 14:31:52 +00:00
Rodolfo García Peñas (kix) 7e6c32e926 wmmon: debian patches applied to upstream 2011-12-18 14:30:31 +00:00
Rodolfo García Peñas (kix) b603570f4a wmmon: Official release of wmmon 1.0b2 2011-12-18 14:30:15 +00:00