Xymon Mailing List Archive search

No cpu utilization graph under openSUSE 13.1

7 messages in this thread

list Hermann J Beckers · Wed, 22 Jan 2014 14:46:54 +0100 ·
Running xymon 4.3.13 under openSUSE 13.1, sending data to the local server under 4.3.13 and a second xymon 4.3.12 server under openSUSE 12.3. Since the latest openSUSE 13.1 updates on monday the cpu utilization graph on both servers is no longer generated.

Only difference I can see is that top 3.3.5 on openSUSE 13.1 sets a percent (%) sign in front of the "cpu(s)...." line, whereas top 3.2.8 on opensuse 12.3 doesn't. Could this confuse the rrd generation?

Yours
Hermann-Josef Beckers
list Henrik Størner · Wed, 22 Jan 2014 15:11:25 +0100 ·
quoted from Hermann J Beckers
Den 22.01.2014 14:46, Hermann J Beckers skrev:
Running xymon 4.3.13 under openSUSE 13.1, sending data to the local
server under 4.3.13 and a second xymon 4.3.12 server under openSUSE
12.3. Since the latest openSUSE 13.1 updates on monday the cpu
utilization graph on both servers is no longer generated.
The "CPU utilization" graph uses data from vmstat (unlike "CPU load" which uses data from uptime). So check the "client data" link from one of the servers that work, and one that doesn't, and look for differences in the format of the vmstat data: Change of column names / count / order.

It is not uncommon for the vmstat output to change ever so slightly between releases.


Regards,
Henrik
list Henrik Størner · Wed, 22 Jan 2014 15:32:39 +0100 ·
quoted from Henrik Størner
Den 22.01.2014 15:11, user-ce4a2c883f75@xymon.invalid skrev:
Den 22.01.2014 14:46, Hermann J Beckers skrev:
Running xymon 4.3.13 under openSUSE 13.1, sending data to the local
server under 4.3.13 and a second xymon 4.3.12 server under openSUSE
12.3. Since the latest openSUSE 13.1 updates on monday the cpu
utilization graph on both servers is no longer generated.
The "CPU utilization" graph uses data from vmstat (unlike "CPU load"
which uses data from uptime). So check the "client data" link from one
of the servers that work, and one that doesn't, and look for
differences in the format of the vmstat data: Change of column names /
count / order.
Firing up an install cd, it seems they have added an extra column "st", after the "us sy id wa" bit.

linux at linux:~> vmstat 2 10
procs -----------memory---------- ---swap-- -----io---- -system-- -----cpu------
  r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st


Regards,
Henrik
list Hermann J Beckers · Thu, 23 Jan 2014 08:34:44 +0100 ·
Am 22.01.2014 15:32, schrieb user-ce4a2c883f75@xymon.invalid:
quoted from Henrik Størner
Den 22.01.2014 15:11, user-ce4a2c883f75@xymon.invalid skrev:
...
Firing up an install cd, it seems they have added an extra column "st",
after the "us sy id wa" bit.

linux at linux:~> vmstat 2 10
procs -----------memory---------- ---swap-- -----io---- -system--
-----cpu------
  r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy
id wa st

Sorry, but the vmstat programs on both servers give the same result:

working server (correct graph display):

procps version 3.2.8
quoted from Henrik Størner
procs -----------memory---------- ---swap-- -----io---- -system-- -----cpu------
  r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st

  0  0 365064  95496  52940 385244    1    1    81   137   77   75 10  5 82  2  0


non-working server (missing utilization graph):

vmstat from procps-ng 3.3.8
quoted from Henrik Størner
procs -----------memory---------- ---swap-- -----io---- -system-- -----cpu------
  r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st

  3  2 402896 129772 213744 1695380    1    3   190   264  216  227 17 6 73  4  0


As you can see, the "st" column is available in both versions.

Yours
Hermann-Josef Beckers
list Henrik Størner · Thu, 23 Jan 2014 15:07:00 +0100 ·
OK, got it now. The problem isn't with vmstat, it is with "top".

Xymon doesn't use the "top" output except to display on a status page. But the output from "top" in the client data message comes just before the "vmstat" output. And the output from "top" in OpenSuSE 13.1 has no final new-line ... so the client data ends up being garbled:

[top]
... lots of top output ...
51302 root      20   0       0      0      0 S 0.000 0.000   0:00.00 jfsSync
51321 root       0 -20       0      0      0 S 0.000 0.000   0:00.00 bioset[vmstat]
quoted from Hermann J Beckers
procs -----------memory---------- ---swap-- -----io---- -system-- -----cpu------
  r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st

  0  0 186588  68608   5576 153836    3   11   201    52   92  230  1  1 97  0  0
  0  0 193504  69168   9848 225832   40   45  1415   109  240  714  4  3 93  1  0

Xymon expects that '[vmstat]' marker to be at the beginning of the line. When top doesn't terminate the final line, then it ends up as above and Xymon doesn't see it.

So the solution is simple: Change the xymonclient-linux.sh script that generates the client data. Near the end of the script is where 'top' runs, so add a blank line to the output right after top:

    if test -x "$TOP"
     then
         echo "[top]"
         $TOP -b -n 1
         # Some top's (OpenSUSE 13.1) do not output a final newline ...
         echo ""    <---- add this line
     fi


Regards,
Henrik
list Japheth Cleaver · Thu, 23 Jan 2014 07:56:07 -0800 ·
quoted from Henrik Størner

On Thu, January 23, 2014 6:07 am, user-ce4a2c883f75@xymon.invalid wrote:
OK, got it now. The problem isn't with vmstat, it is with "top".

Xymon doesn't use the "top" output except to display on a status page.
But the output from "top" in the client data message comes just before
the "vmstat" output. And the output from "top" in OpenSuSE 13.1 has no
final new-line ... so the client data ends up being garbled:
I noticed when debugging F19 RPMs that Fedora 19's "top" had the same
problem, causing the same issue... It's fixed in Fedora now, turned out to
date back to some display work in procps-ng. The following might help for
reference if you wanted to send something up to OpenSuSE to bump their
package (assuming they haven't already).

https://gitorious.org/procps/procps/commit/4141efaf13254564f0377289bcf5a1a1389f60af

https://bugzilla.redhat.com/show_bug.cgi?id=1008674


HTH,

-jc
list Hermann J Beckers · Fri, 24 Jan 2014 08:22:28 +0100 ·
Am 23.01.2014 15:07, schrieb user-ce4a2c883f75@xymon.invalid:
quoted from Henrik Størner

...
So the solution is simple: Change the xymonclient-linux.sh script that
generates the client data. Near the end of the script is where 'top'
runs, so add a blank line to the output right after top:

    if test -x "$TOP"
     then
         echo "[top]"
         $TOP -b -n 1
         # Some top's (OpenSUSE 13.1) do not output a final newline ...
         echo ""    <---- add this line
     fi
Works.

Thank you.
Hermann-Josef Beckers