schedtop field widths not large enough

Bug #1902954 reported by Jim Gauld
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
Jim Gauld

Bug Description

Brief Description
-----------------
The field width for TID and PID require wider fields. In recent kernels, now have 7 digits. This makes visual interpretation of schedtop much harder since columns don't line up when browsing engineering data.

Severity
--------
minor.

Steps to Reproduce
------------------
Collect schedtop data. Look at data.

Expected Behavior
------------------
Columns should line up.

Actual Behavior
----------------
Various fields are wider than the allotted field width.

Reproducibility
---------------
100 percent.

System Configuration
--------------------
All configs.

Branch/Pull Time/Commit
-----------------------
N/A

Last Pass
---------
N/A

Timestamp/Logs
--------------
N/A

Test Activity
-------------
Engineering, Feature Testing, Developer Testing.

Workaround
----------
Manually update the schedtop source code.

-bash-4.2$ diff -u schedtop.ORIG schedtop
--- schedtop.ORIG 2020-09-18 15:50:47.300449000 -0400
+++ schedtop 2020-09-18 15:50:47.304448000 -0400
@@ -361,7 +361,7 @@
   # Build up output line by specific area
   my $L = ();
   $L = '';
- $L .= sprintf "%6s %6s %6s ", "TID", "PID", "PPID";
+ $L .= sprintf "%7s %7s %7s ", "TID", "PID", "PPID";
   if ($::opt_P{$::P_ps} != $::P_none) {
     $L .= sprintf "%1s %2s %*s %2s %3s %4s ",
             "S", "P", $w_aff, "AFF", "PO", "NI", "PR";
@@ -406,7 +406,7 @@

     # Build up output line by specific area
     $L = '';
- $L .= sprintf "%6d %6d %6d ",
+ $L .= sprintf "%7d %7d %7d ",
             $tid, $::D_task{$tid}{'pid'}, $::D_task{$tid}{'ppid'};
     if ($::opt_P{$::P_ps} != $::P_none) {
       $L .= sprintf "%1s %2d %*s %2s %3d %4d ",

Jim Gauld (jgauld)
Changed in starlingx:
assignee: nobody → Jim Gauld (jgauld)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to monitoring (master)

Fix proposed to branch: master
Review: https://review.opendev.org/761470

Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Low
tags: added: stx.tools
Jim Gauld (jgauld)
Changed in starlingx:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to monitoring (f/centos8)

Fix proposed to branch: f/centos8
Review: https://review.opendev.org/c/starlingx/monitoring/+/792244

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to monitoring (f/centos8)
Download full text (7.8 KiB)

Reviewed: https://review.opendev.org/c/starlingx/monitoring/+/792244
Committed: https://opendev.org/starlingx/monitoring/commit/fdc0d099fb0d65cbf8f037fe0cc9ac8125410284
Submitter: "Zuul (22348)"
Branch: f/centos8

commit 2ef5451f442482636db3c0c3641e8412821bd8c5
Author: Takamasa Takenaka <email address hidden>
Date: Thu Apr 22 12:28:37 2021 -0300

    Format 2 lines ntpq data into 1 lines

    The problem was logic expected one line data for
    ntpq result. But it was 2 lines for each ntp server
    entry. When peer server is selected, script checked
    refid if refid is reliable or not but it could not
    find because refid is in the following line.
    This fix formats 2 lines data into 1 line.

    The minor alarm "minor alarm "NTP cannot reach
    external time source; syncing with peer controller
    only" is removed because NTP does not prioritize
    external time source over peer.

    Closes-Bug: 1889101

    Signed-off-by: Takamasa Takenaka <email address hidden>
    Change-Id: Icc8316bb1a7041bf0351165c671ebf35b97fa3bc

commit d37490b81408ca53b1b8fd61992c6c9337dbcaed
Author: Eric MacDonald <email address hidden>
Date: Tue Apr 20 10:03:07 2021 -0400

    Add alarm audit to starlingx collectd fm notifier plugin

    This update adds common plugin support for alarm state auditing.
    The audit is able to detect and correct the following alarm
    state errors:

       Error Case Correction Action
       ----------------------- -----------------
     - stale alarm ; delete alarm
     - missing alarm ; assert alarm
     - alarm severity mismatch ; refresh alarm

    The common audit is enabled for the fm_notifier plugin that supports
    alarm managment for the following resources.

     - CPU with alarm id 100.101
     - Memory with alarm id 100.103
     - Filesystem with alarm id 100.104

    Other plugins may use this common audit in the future but only the
    above resources have the audit enabled for them by this update.

    Test Plan:

    PASS: Verify stale alarm detection/correction handling
    PASS: Verify missing alarm detection/correction handling
    PASS: Verify alarm severity mismatch detection/correction handling
    PASS: Verify hosts only audits its own specified alarms
    PASS: Verify success path of monitoring a single and mix
          of base and instance alarms of varying severity while
          such alarm conditions come and go
    PASS: Verify alarm audit of mix of base and instance alarms
          over a collectd process restart
    PASS: Verify audit handling of alarm that migrates from
          major to critical to major to clear
    PASS: Verify audit handling transition between alarm and
          no alarm conditions
    PASS: Verify soak of random cpu, memory and filesystem
          overage alarm assertions and clears that also involve
          manual alarm deletions, assertions and severity changes
          that exercise new audit features

    Regression:

    PASS: Verify alarm and audit handling over Swact with mounted
          filesystem that has active alarm
  ...

Read more...

tags: added: in-f-centos8
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.