StarlingX system monitoring and repoting tools
Go to file
Jim Gauld 0232b8b9dc Update collectd cpu plugin and monitor-tools to diagnose cpu spikes
The collectd cpu plugin and monitor-tools are updated to
support diagnosing high cpu usage on shorter time scale.
This includes tools that assist SystemEngineering determine
the source where CPU time is coming from.

This collectd cpu plugin is updated to support Kubernetes services
under system.slice or k8splatform.slice.

This changes the frequency of read function sampling to 1 second.
We now see logs with instantaneous cpu spikes at the cgroup level.
This dispatch of results still occurs at the original plugin
interval of 30 seconds.  The logging of the 1 second sampling is
configurable via /etc/collectd.d/starlingx/python_plugins.conf
field 'hires = <true|false>. The hiresolution samples are always
collected and used for a histogram, but it is not always desired
to log this due to the volume of output.

This adds new logs for occupancy wait. This is similar to cpu
occupancy, but instead of realtime used, it measures the aggregate
percent of time a given cgroup is waiting to schedule. This is a
measure of CPU contention.

This adds new logs for occupancy histograms for all cgroups and
aggregated groupings based on the 1 second occupancy samples.
The histograms are displayed in hirunner order. This displays
the histogram, the mean, 95th-percentile, and max value.
The histograms are logged at 5 minute intervals.

This reduces collectd cgroup to 256 CPUShare from (1024).
This smoothes out behaviour of poorly behaved audits.

The 'schedtop' tool is updated to display 'cgroup' field. This
is the systemd cgroup name, or abbrieviated pod-name. This also
handles Kernel sched output format changes for 6.6.

New tool 'portscanner' is added to monitor-tools to diagnose
local host processes that are using specific ports. This has been
instrumental in discovering gunicorn/keystone API users.

New tool 'k8smetrics' is added to monitor-tools to display
the delay histogram and percentiles for kube-apiserver and
etdcserver. This gives a way to quantify performance as
a result of system load.

Partial-Bug: 2084714

TEST PLAN:
AIO-SX, AIO-DX, Standard, Storage, DC:
PASS: Fresh install ISO
PASS: Verify /var/log/collectd.logs for 1 second cpu/wait logs,
      and contains: etcd, kubelet, and containerd services.
PASS: Verify we are dispatching at 30 second granularity.
PASS: Verify we are displaying histograms every 5 minutes.
PASS: Verify we can enable/disable the display of hiresolution
      logs with /etc/collectd.d/starlingx/python_plugins.conf
      field 'hires = <true|false>'.
PASS: Verify schedtop contains 'cgroup' output.
PASS: Verify output from 'k8smetrics'.
      Cross check against Prometheus GUI for apiserver percentile.
PASS: Verify output from portscanner with port 5000.
      Verify 1-to-1 mapping against /var/log/keystone/keystone-all.log.

Change-Id: I82d4f414afdf1cecbcc99680b360cbad702ba140
Signed-off-by: Jim Gauld <James.Gauld@windriver.com>
2024-11-15 02:11:55 -05:00
collectd-extensions Update collectd cpu plugin and monitor-tools to diagnose cpu spikes 2024-11-15 02:11:55 -05:00
kube-cpusets Remove CentOS/OpenSUSE build support 2024-04-26 14:14:49 -04:00
kube-memory Remove CentOS/OpenSUSE build support 2024-04-26 14:14:49 -04:00
monitor-tools Update collectd cpu plugin and monitor-tools to diagnose cpu spikes 2024-11-15 02:11:55 -05:00
vm-topology Remove CentOS/OpenSUSE build support 2024-04-26 14:14:49 -04:00
.gitignore Remove python2 jobs from zuul for this repo 2023-04-28 18:24:13 +00:00
.gitreview Add a .gitreview file to the new repo 2019-09-09 09:35:13 -05:00
.zuul.yaml Merge "Fix github mirroring for this repo" 2023-05-01 20:51:03 +00:00
CONTRIBUTING.rst Adding zuul jobs for new repo 2019-09-09 14:37:23 -05:00
debian_build_layer.cfg Add debian_build_layer.cfg file 2021-10-05 14:34:25 -04:00
debian_iso_image.inc Debian: monitoring: update debian_iso_image.inc 2022-11-22 10:26:59 +08:00
debian_pkg_dirs Add debian_pkg_dirs for stx/monitoring 2022-04-05 11:29:17 -03:00
github_sync.trigger Trigger upload job to upload repo to GitHub 2020-02-07 10:13:03 -05:00
HACKING.rst Adding zuul jobs for new repo 2019-09-09 14:37:23 -05:00
requirements.txt Adding zuul jobs for new repo 2019-09-09 14:37:23 -05:00
test-requirements.txt Fix zuul errors due to changes in dependencies 2021-04-26 11:45:02 -04:00
tox.ini Update collectd cpu plugin and monitor-tools to diagnose cpu spikes 2024-11-15 02:11:55 -05:00