From 7b4c9c7eccf599c7048beb1466d0cd07a9b2af0c Mon Sep 17 00:00:00 2001 From: AlmaLinux RelEng Bot Date: Wed, 19 Aug 2026 04:52:59 -0400 Subject: [PATCH] import Oracle_OSS pcp-5.3.7-22.0.12.el8_10.5 --- .gitignore | 2 +- .pcp.metadata | 2 +- ...tilty-to-view-ps-like-output-for-pcp.patch | 1543 +++++ ...python2-print-issue-and-o-option-fix.patch | 92 + ...abilities-to-show-n-sample-with-arch.patch | 82 + ...multiple-pcp-ps-and-pcp-mpstat-issue.patch | 687 ++ ...1005-Fixed-PCP-python-utility-issues.patch | 315 + ...nitial-PCP-implementation-of-meminfo.patch | 562 ++ ...itial-PCP-implementation-of-slabinfo.patch | 5770 +++++++++++++++++ ...initial-commit-of-pcp-implementation.patch | 623 ++ ...al-implemenation-of-pcp-netstat-tool.patch | 1659 +++++ ...0-pcp-zoneinfo-Initial-implemenation.patch | 1710 +++++ .../1011-pcp-zoneinfo-ol7-replay-fix.patch | 455 ++ ...Fixed-o-n-n-nested-hash-table-lookup.patch | 640 ++ ...s-option-to-view-full-process-argume.patch | 419 ++ ...Added-timestamp-and-no-interpolation.patch | 340 + ...eminfo-Added-timestamp-in-pcp-meinfo.patch | 152 + ...stat-avoid-corner-case-infinite-loop.patch | 46 + ...ohith-kumar-thummaluru-rocestat-pmda.patch | 1677 +++++ ...-rocestat-of-https-github.com-mohith.patch | 1106 ++++ ...tional-metrics-added-for-mem.util-to.patch | 56 + ...ional-mem.util-metrics-recent-kernel.patch | 302 + ...dded-kreclaimable-and-hugtlb-metrics.patch | 171 + ...x-mpstat-showing-inconsistent-values.patch | 267 + .../1023-fix-broken-pipe-error-iostat.patch | 29 + .../1024-add-missing-numastat-metrics.patch | 220 + ...-add-numastat-support-for-mn-options.patch | 495 ++ ...gesize-metric-value-from-bytes-to-KB.patch | 45 + ...fault-compression-changed-to-level-3.patch | 32 + ...8724884-fix-nfsclient-per-op-parsing.patch | 38 + ...duce-PCP-implementation-of-nfsiostat.patch | 575 ++ ...-sort-option-to-allow-sorting-by-cpu.patch | 1278 ++++ ...dd-disk-usage-limit-option-and-purge.patch | 366 ++ ...-restore-backward-compatibility-with.patch | 328 + ...36-adds-interval-option-in-nfsiostat.patch | 364 ++ ...ics-and-adds-numastat-process-option.patch | 1287 ++++ ...t-information-option-for-CSV-headers.patch | 776 +++ ...t-bugzilla-2219731-hacluster-metrics.patch | 749 +++ ...at-issues-RHEL-213662-CVE-2026-16524.patch | 270 + ...at-issues-RHEL-213686-CVE-2026-16526.patch | 221 + ...ssues-RHEL-213720-pmproxy-auth-flags.patch | 205 + ...ues-RHEL-213729-pdu-integer-overflow.patch | 223 + SPECS/pcp.spec | 165 +- 43 files changed, 26339 insertions(+), 5 deletions(-) create mode 100644 SOURCES/1001-pcp-ps-utilty-to-view-ps-like-output-for-pcp.patch create mode 100644 SOURCES/1002-pcp-ps-python2-print-issue-and-o-option-fix.patch create mode 100644 SOURCES/1003-pcp-ps-added-capabilities-to-show-n-sample-with-arch.patch create mode 100644 SOURCES/1004-Fixed-multiple-pcp-ps-and-pcp-mpstat-issue.patch create mode 100644 SOURCES/1005-Fixed-PCP-python-utility-issues.patch create mode 100644 SOURCES/1006-pcp-meminfo-initial-PCP-implementation-of-meminfo.patch create mode 100644 SOURCES/1007-pcp-slabinfo-initial-PCP-implementation-of-slabinfo.patch create mode 100644 SOURCES/1008-pcp-buddyinfo-initial-commit-of-pcp-implementation.patch create mode 100644 SOURCES/1009-pcp-netstat-Initial-implemenation-of-pcp-netstat-tool.patch create mode 100644 SOURCES/1010-pcp-zoneinfo-Initial-implemenation.patch create mode 100644 SOURCES/1011-pcp-zoneinfo-ol7-replay-fix.patch create mode 100644 SOURCES/1012-pmlogcheck-Fixed-o-n-n-nested-hash-table-lookup.patch create mode 100644 SOURCES/1013-pcp-ps-added-args-option-to-view-full-process-argume.patch create mode 100644 SOURCES/1014-pcp-buddyinfo-Added-timestamp-and-no-interpolation.patch create mode 100644 SOURCES/1015-pcp-meminfo-Added-timestamp-in-pcp-meinfo.patch create mode 100644 SOURCES/1016-pmstat-avoid-corner-case-infinite-loop.patch create mode 100644 SOURCES/1017-Merge-branch-mohith-kumar-thummaluru-rocestat-pmda.patch create mode 100644 SOURCES/1018-Merge-branch-pcp-rocestat-of-https-github.com-mohith.patch create mode 100644 SOURCES/1019-pcp-meminfo-additional-metrics-added-for-mem.util-to.patch create mode 100644 SOURCES/1020-additional-mem.util-metrics-recent-kernel.patch create mode 100644 SOURCES/1021-meminfo-added-kreclaimable-and-hugtlb-metrics.patch create mode 100644 SOURCES/1022-fix-mpstat-showing-inconsistent-values.patch create mode 100644 SOURCES/1023-fix-broken-pipe-error-iostat.patch create mode 100644 SOURCES/1024-add-missing-numastat-metrics.patch create mode 100644 SOURCES/1025-add-numastat-support-for-mn-options.patch create mode 100644 SOURCES/1026-Fixes-higepagesize-metric-value-from-bytes-to-KB.patch create mode 100644 SOURCES/1027-xz-default-compression-changed-to-level-3.patch create mode 100644 SOURCES/1028-orabug38724884-fix-nfsclient-per-op-parsing.patch create mode 100644 SOURCES/1029-orabug38817091-Introduce-PCP-implementation-of-nfsiostat.patch create mode 100644 SOURCES/1030-pcp-ps-implement-sort-option-to-allow-sorting-by-cpu.patch create mode 100644 SOURCES/1031-pmlogger_daily-add-disk-usage-limit-option-and-purge.patch create mode 100644 SOURCES/1032-pcp-system-tools-restore-backward-compatibility-with.patch create mode 100644 SOURCES/1033-orabug38902336-adds-interval-option-in-nfsiostat.patch create mode 100644 SOURCES/1034-orabug38509848-introduces-numa-maps-metrics-and-adds-numastat-process-option.patch create mode 100644 SOURCES/1035-pmrep-add-unit-information-option-for-CSV-headers.patch create mode 100644 SOURCES/redhat-bugzilla-2219731-hacluster-metrics.patch create mode 100644 SOURCES/redhat-issues-RHEL-213662-CVE-2026-16524.patch create mode 100644 SOURCES/redhat-issues-RHEL-213686-CVE-2026-16526.patch create mode 100644 SOURCES/redhat-issues-RHEL-213720-pmproxy-auth-flags.patch create mode 100644 SOURCES/redhat-issues-RHEL-213729-pdu-integer-overflow.patch diff --git a/.gitignore b/.gitignore index 4fb7ff5..a659f47 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ SOURCES/pcp-5.3.7.src.tar.gz -SOURCES/redhat-bugzilla-2219731-hacluster-metrics.patch +SOURCES/pdu-getpdu-overflow diff --git a/.pcp.metadata b/.pcp.metadata index 0b967ee..07daafa 100644 --- a/.pcp.metadata +++ b/.pcp.metadata @@ -1,2 +1,2 @@ a0a05bf501b016cb859fb211ae60ce18be2bbd99 SOURCES/pcp-5.3.7.src.tar.gz -bb84c58586e078343c975ed61a8b53d4fd4393e8 SOURCES/redhat-bugzilla-2219731-hacluster-metrics.patch +c3b4ccf034658b6a5c222a52ecf41175d06d0a0a SOURCES/pdu-getpdu-overflow diff --git a/SOURCES/1001-pcp-ps-utilty-to-view-ps-like-output-for-pcp.patch b/SOURCES/1001-pcp-ps-utilty-to-view-ps-like-output-for-pcp.patch new file mode 100644 index 0000000..fa66f7b --- /dev/null +++ b/SOURCES/1001-pcp-ps-utilty-to-view-ps-like-output-for-pcp.patch @@ -0,0 +1,1543 @@ +From 29f1e872f84e1201b52136b2ca522860298094ee Mon Sep 17 00:00:00 2001 +From: sagar sagar +Date: Wed, 9 Nov 2022 04:04:43 -0500 +Subject: [PATCH] pcp ps utilty to view ps like output for pcp + +This patch has pcp-ps utilty and unit test for the pcp-ps utilty. +The objective of pcp-ps utilty to show the archived data or live system data just like the output similar to ps command. +Signed-off-by: Sagar Sagar +[Orabug: 34321683] + +cherry pick commit :- ca5d4c0527c587ac3991f593a64094ac923d9fe8 + deb4391d2586196eadf3c64e9b0f5073b795461f + 1f2cf9fcc5f0941ddca8d0221b93e5079e9b88e2 + 32610fb436dde7f88b51bf1b0d0bf052da5eb4ff + ddc5c3439c40d7f6b6032dda99ade07be11706cb + eb71fe3d3d74ccb91ea4ac34cfc5cf0d73dce495 +--- + build/rpm/pcp.spec.in | 2 +- + build/rpm/redhat.spec | 2 +- + src/pcp/GNUmakefile | 3 +- + src/pcp/ps/.gitignore | 2 + + src/pcp/ps/GNUmakefile | 56 ++ + src/pcp/ps/pcp-ps.1 | 288 ++++++ + src/pcp/ps/pcp-ps.py | 822 ++++++++++++++++++ + src/pcp/ps/test/.gitignore | 2 + + src/pcp/ps/test/GNUmakefile | 33 + + .../test/process_state_util_reporter_test.py | 50 ++ + src/pcp/ps/test/process_statusutil_test.py | 161 ++++ + 11 files changed, 1418 insertions(+), 3 deletions(-) + create mode 100644 src/pcp/ps/.gitignore + create mode 100755 src/pcp/ps/GNUmakefile + create mode 100755 src/pcp/ps/pcp-ps.1 + create mode 100755 src/pcp/ps/pcp-ps.py + create mode 100755 src/pcp/ps/test/.gitignore + create mode 100755 src/pcp/ps/test/GNUmakefile + create mode 100755 src/pcp/ps/test/process_state_util_reporter_test.py + create mode 100755 src/pcp/ps/test/process_statusutil_test.py + +diff --git a/build/rpm/pcp.spec.in b/build/rpm/pcp.spec.in +index eee0475f2..d9cfd9f9b 100755 +--- a/build/rpm/pcp.spec.in ++++ b/build/rpm/pcp.spec.in +@@ -2276,7 +2276,7 @@ basic_manifest | grep -E -e 'pmiostat|pmrep|dstat|htop|pcp2csv' \ + -e 'pcp-atop|pcp-dmcache|pcp-dstat|pcp-free|pcp-htop' \ + -e 'pcp-ipcs|pcp-iostat|pcp-lvmcache|pcp-mpstat' \ + -e 'pcp-numastat|pcp-pidstat|pcp-shping|pcp-tapestat' \ +- -e 'pcp-uptime|pcp-verify|pcp-ss' | \ ++ -e 'pcp-uptime|pcp-verify|pcp-ss|pcp-ps' | \ + cull 'selinux|pmlogconf|pmieconf|pmrepconf' >pcp-system-tools-files + basic_manifest | keep 'sar2pcp' >pcp-import-sar2pcp-files + basic_manifest | keep 'iostat2pcp' >pcp-import-iostat2pcp-files +diff --git a/build/rpm/redhat.spec b/build/rpm/redhat.spec +index 96474c792..adc3a6f7f 100644 +--- a/build/rpm/redhat.spec ++++ b/build/rpm/redhat.spec +@@ -2434,7 +2434,7 @@ basic_manifest | grep -E -e 'pmiostat|pmrep|dstat|htop|pcp2csv' \ + -e 'pcp-atop|pcp-dmcache|pcp-dstat|pcp-free|pcp-htop' \ + -e 'pcp-ipcs|pcp-iostat|pcp-lvmcache|pcp-mpstat' \ + -e 'pcp-numastat|pcp-pidstat|pcp-shping|pcp-tapestat' \ +- -e 'pcp-uptime|pcp-verify|pcp-ss' | \ ++ -e 'pcp-uptime|pcp-verify|pcp-ss|pcp-ps' | \ + cull 'selinux|pmlogconf|pmieconf|pmrepconf' >pcp-system-tools-files + + basic_manifest | keep 'sar2pcp' >pcp-import-sar2pcp-files +diff --git a/src/pcp/GNUmakefile b/src/pcp/GNUmakefile +index 381b9c2df..bd70c1395 100644 +--- a/src/pcp/GNUmakefile ++++ b/src/pcp/GNUmakefile +@@ -34,7 +34,8 @@ SUBDIRS = \ + uptime \ + verify \ + vmstat \ +- ss ++ ss \ ++ ps + + default :: default_pcp + +diff --git a/src/pcp/ps/.gitignore b/src/pcp/ps/.gitignore +new file mode 100644 +index 000000000..c47a57b68 +--- /dev/null ++++ b/src/pcp/ps/.gitignore +@@ -0,0 +1,2 @@ ++*.pyc ++pcp-ps.1.gz +diff --git a/src/pcp/ps/GNUmakefile b/src/pcp/ps/GNUmakefile +new file mode 100755 +index 000000000..763f5a3f8 +--- /dev/null ++++ b/src/pcp/ps/GNUmakefile +@@ -0,0 +1,56 @@ ++# ++# Copyright (c) 2022 Oracle and/or its affiliates. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++# This program is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation; either version 2 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++# for more details. ++# ++ ++TOPDIR = ../../.. ++include $(TOPDIR)/src/include/builddefs ++ ++TARGET = pcp-ps ++SCRIPT = $(TARGET).py ++MAN_SECTION = 1 ++MAN_PAGES = $(TARGET).$(MAN_SECTION) ++MAN_DEST = $(PCP_MAN_DIR)/man$(MAN_SECTION) ++ ++SUBDIRS = test ++ ++default: build-me ++ ++ifeq "$(HAVE_PYTHON)" "true" ++build-me:: $(SCRIPT) $(MAN_PAGES) ++ ++build-me:: $(SUBDIRS) ++ $(SUBDIRS_MAKERULE) ++ ++install: default ++ $(INSTALL) -m 755 $(SCRIPT) $(PCP_BINADM_DIR)/$(TARGET) ++ @$(INSTALL_MAN) ++ ++check:: $(SUBDIRS) ++ $(SUBDIRS_MAKERULE) ++ ++check:: $(SCRIPT) ++ $(PYLINT) $^ ++ ++check :: $(MAN_PAGES) ++ $(MANLINT) $^ ++else ++build-me: ++install: ++endif ++ ++include $(BUILDRULES) ++ ++default_pcp : default ++ ++install_pcp : install +diff --git a/src/pcp/ps/pcp-ps.1 b/src/pcp/ps/pcp-ps.1 +new file mode 100755 +index 000000000..7ca98dbdd +--- /dev/null ++++ b/src/pcp/ps/pcp-ps.1 +@@ -0,0 +1,288 @@ ++'\"! tbl | mmdoc ++'\"macro stdmacro ++.\" ++.\" Copyright (c) 2022 Oracle and/or its affiliates. ++.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++.\" ++.\" This program is free software; you can redistribute it and/or modify it ++.\" under the terms of the GNU General Public License as published by the ++.\" Free Software Foundation; either version 2 of the License, or (at your ++.\" option) any later version. ++.\" ++.\" This program is distributed in the hope that it will be useful, but ++.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++.\" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++.\" for more details. ++.\" ++.TH PCP-PS 1 "PCP" "Performance Co-Pilot" ++.SH NAME ++\f3pcp-ps\f1 \- Report statistics for Linux Process. ++.SH SYNOPSIS ++\f3pcp\f1 ++[\f2pcp\ options\f1] ++\f3ps\f1 ++[\f3\-e\f1] ++[\f3\-U\f1 [\f2username\f1]] ++[\f3\-V\f1 \f2--version\f1] ++[\f3\-c\f1 \f2Command name\f1] ++[\f3\-P\f1 \f2pid1,pid2..\f1] ++[\f3\-p\f1 \f2pid1,pid2..\f1] ++[\f3\-o\f1 \f2col1,col2... or ALL\f1] ++[\f3\-Z\f1 \f2timezone\f1] ++[\f3\-z\f1] ++[\f3\-?\f1] ++.SH DESCRIPTION ++The ++.B pcp-ps ++command is used for monitoring individual process running on the system. ++Using various options it helps a user to see useful information related to ++the processes. ++This information includes CPU percentage, memory and stack usage, ++scheduling and priority. ++By default ++.B pcp-ps ++reports live data for the local host. ++.SH OPTIONS ++When invoked via the ++.BR pcp (1) ++command, the ++.BR \-h /\c ++.BR \-\-host , ++.BR \-O /\c ++.BR \-\-origin , ++.BR \-t /\c ++.BR \-\-interval , ++.BR \-Z /\c ++.BR \-\-timezone ++and several other ++.I pcp options ++become indirectly available; refer to ++.BR PCPIntro (1) ++for a complete description of these options. ++.PP ++The additional command line options available for ++.B pcp-ps ++are: ++.TP 5 ++.BR \-e \fR ++Display all the process. ++.br ++.TS ++l l. ++PID Process idenfier. ++TTY The termianl assoicated with the prcoess. ++TIME T{ ++.ad l ++.hy 0 ++The cumulated CPU time in [DD-]hh:mm:ss format (time=TIME). ++T} ++CMD The command name of the task. ++.TE ++.TP ++.B \-c [\fIcommand name\fR] ++Display the real Command name of the tasks being monitored instead of the UID. ++If \fIcommand name\fR is specified, then only tasks belonging to the specified ++command are displayed. ++.TP ++.BR \-U \ [\fIusername\fR] ", " \fB\-\-user\-name\fR[=\fIusername\fR] ++Display the real user name of the tasks being monitored instead of the UID. ++If \fIusername\fR is specified, then only tasks belonging to the specified ++user are displayed. ++.TP ++.BR \-V \fR ", " \fB\-\-version\fR ++Print version number then exit. ++.TP ++.BR \-p \ \fIpid1,pid2..\fR ", " \fB\-\-pid-list\fR=\fIpid1,pid2..\fR ++Display only processes with the listed PIDs. ++.TP ++.BR \-P \ \fIppid1,ppid2..\fR ", " \fB\-\-ppid-list\fR=\fIppid1,ppid2..\fR ++Display only processes with the listed PPIDs. ++.TP ++.B \-o ++User-defined format. ++ ++It is a single argument in the form of a blank-separated or comma-separated list, which offers a way to specify individual output columns. ++ ++The argument to -o are following: ++ ++.TS ++lfB lfB lfB ++lfB l lx. ++COL HEADER DESCRIPTION ++_ _ _ ++%cpu %CPU cpu utilization of the process ++%mem %MEM T{ ++.ad l ++.hy 0 ++physical memory on the machine expressed as a percentage ++T} ++start START time the command started ++time TIME accumulated cpu time, user + system ++cls CLS scheduling class of the process ++cmd CMD see \fBargs\fR. (alias args, command). ++pid PID The process ID ++ppid PPID Parent process ID ++pri PRI Priority of the process ++state S see \fBs\fR ++rss RSS T{ ++.ad l ++.hy 0 ++the non-swapped physical memory that a task has used ++T} ++rtprio RTPRIO realtime priority ++pname Pname Process name ++tty TT controlling tty (terminal) ++uid UID see \fBeuid\fR ++uname USER see \fBeuser\fR ++vsize VSZ see \fBvsz\fR ++wchan WCHAN T{ ++.ad l ++.hy 0 ++name of the kernel function in which the process is sleeping ++T} ++.TE ++.SH "STANDARD FORMAT SPECIFIERS" ++Here are the different keywords that may be used to control the output ++format (e.g. with option ++.BR \-o ) ++or to sort the selected processes ++ ++For example: ++.B pcp-ps \-o pid,\:user,\:args ++ ++.TS ++lfB lfB lfB ++lfB l lx. ++CODE HEADER DESCRIPTION ++_ _ _ ++pid PID a number representing the process ID ++%cpu %CPU T{ ++.ad l ++.hy 0 ++%cpu utilization of the process in "##.#" format. ++.br ++Currently, it is the CPU time used divided by the time the ++process has been running (cputime/realtime ratio), expressed as a percentage. ++T} ++%mem %MEM T{ ++.ad l ++.hy 0 ++%ratio of the process's resident set size to the physical memory on the ++machine, expressed as a percentage. ++T} ++args COMMAND T{ ++.ad l ++.hy 0 ++Command with all its arguments as a string. Modifications to the arguments ++may be shown. The output in this column may contain spaces. A process ++marked is partly dead, waiting to be fully destroyed by its parent. ++Sometimes the process args will be unavailable; when this happens,will instead print the executable name in brackets. ++T} ++class CLS T{ ++.ad l ++.hy 0 ++scheduling class of the process. ++.br ++Field's possible values are: ++\- not reported ++.br ++TS SCHED_OTHER ++.br ++FF SCHED_FIFO ++.br ++RR SCHED_RR ++.br ++B SCHED_BATCH ++.br ++ISO SCHED_ISO ++.br ++IDL SCHED_IDLE ++.br ++DLN SCHED_DEADLINE ++.br ++? unknown value ++T} ++s S T{ ++.ad l ++.hy 0 ++minimal state display. ++See also \fBstate\fR if you want additional information displayed. ++T} ++euid EUID effective user ID. ++vsz VSZ T{ ++.ad l ++.hy 0 ++virtual memory size of the process in KiB (1024\-byte units). ++Device mappings are currently excluded; this is subject to change. ++T} ++euser EUSER T{ ++.ad l ++.hy 0 ++effective user name. This will be the textual user ID, if it can be obtained and the field width permits, or a decimal representation otherwise. ++T} ++All N/A T{ ++.ad l ++.hy 0 ++This option shows USER, ++PID, ++PPID, ++PRI, ++%CPU, ++%MEM, ++VSZ, ++RSS, ++S, ++START, ++TIME, ++WCHAN and COMMAND. ++T} ++.TE ++.TP ++.BR \-Z \ \fItimezone\fR ", "\fB\-\-timezone=\fItimezone\fR ++By default, ++.B pcp-ps ++reports the time of day according to the local timezone on the system where ++.B pcp-ps ++is run. ++The ++.B \-Z ++option changes the timezone to ++.I timezone ++in the format of the environment variable ++.B TZ ++as described in ++.BR environ (7). ++.TP ++.BR \-z " , " \fB\-\-hostzone\fR ++Change the reporting timezone to the local timezone at the host that is ++the source of the performance metrics. ++When replaying a PCP archive that was captured in a foreign timezone, the ++.B \-z ++option would almost always be used (the default reporting timezone is the ++local timezone, which may not be the same as the timezone of the PCP archive). ++.TP ++.BR \-? " , " \fB\-\-help\fR ++Display usage message and exit. ++.SH NOTES ++.B pcp-ps ++is inspired by the ++.BR ps (1) ++command and aims to be command line and output compatible with it. ++.SH PCP ENVIRONMENT ++Environment variables with the prefix \fBPCP_\fP are used to parameterize ++the file and directory names used by PCP. ++On each installation, the ++file \fI/etc/pcp.conf\fP contains the local values for these variables. ++The \fB$PCP_CONF\fP variable may be used to specify an alternative ++configuration file, as described in \fBpcp.conf\fP(5). ++.PP ++For environment variables affecting PCP tools, see \fBpmGetOptions\fP(3). ++.SH SEE ALSO ++.BR PCPIntro (1), ++.BR pcp (1), ++.BR pcp-ps (1), ++.BR python (1), ++.BR pmParseInterval (3), ++.BR strftime (3) ++and ++.BR environ (7). +diff --git a/src/pcp/ps/pcp-ps.py b/src/pcp/ps/pcp-ps.py +new file mode 100755 +index 000000000..b087951c4 +--- /dev/null ++++ b/src/pcp/ps/pcp-ps.py +@@ -0,0 +1,822 @@ ++#!/usr/bin/env pmpython ++# ++# Copyright (c) 2022 Oracle and/or its affiliates. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++# This program is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation; either version 2 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++# for more details. ++# ++# pylint: disable=bad-whitespace,too-many-arguments,too-many-lines ++# pylint: disable=redefined-outer-name,unnecessary-lambda ++# ++ ++ ++import sys ++import time ++from pcp import pmcc ++from pcp import pmapi ++import datetime ++ ++process_state_info = {} ++ ++PSSTAT_METRICS = ['kernel.uname.nodename', 'kernel.uname.release', 'kernel.uname.sysname', ++ 'kernel.uname.machine', 'hinv.ncpu', 'proc.psinfo.pid', 'proc.psinfo.guest_time', ++ 'proc.psinfo.utime', 'proc.psinfo.ppid', 'proc.psinfo.rt_priority', 'proc.psinfo.rss', ++ 'proc.id.uid_nm', 'proc.psinfo.stime', 'kernel.all.uptime', 'proc.psinfo.sname', ++ 'proc.psinfo.start_time', 'proc.psinfo.vsize', 'proc.psinfo.priority', ++ 'proc.psinfo.nice', 'proc.psinfo.wchan_s', 'proc.psinfo.psargs', 'proc.psinfo.cmd', ++ 'proc.psinfo.ttyname', 'mem.physmem', 'proc.psinfo.policy'] ++ ++SCHED_POLICY = ['NORMAL', 'FIFO', 'RR', 'BATCH', '', 'IDLE', 'DEADLINE'] ++ ++ ++class StdoutPrinter: ++ def Print(self, args, continuation=None): ++ if continuation is not None: ++ print(args, end=continuation) ++ else: ++ print(args) ++ ++ ++class NoneHandlingPrinterDecorator: ++ def __init__(self, printer): ++ self.printer = printer ++ ++ def Print(self, args, continuation=None): ++ if continuation is None: ++ new_args = args.replace('None', '?') ++ elif type(args) not in [float, int] or args is not None: ++ new_args = str(args).replace('None', '?') ++ else: ++ new_args = args ++ self.printer.Print(new_args, continuation) ++ ++ ++# After fetching non singular metric values, create a mapping of instance id ++# to instance value rather than instance name to instance value. ++# The reason is, in PCP, instance names require a separate pmGetIndom() request ++# and some of the names may not be available. ++class ReportingMetricRepository: ++ def __init__(self, group): ++ self.group = group ++ self.current_cached_values = {} ++ self.previous_cached_values = {} ++ ++ def __fetch_current_values(self, metric, instance): ++ if instance: ++ return dict(map(lambda x: (x[0].inst, x[2]), self.group[metric].netValues)) ++ else: ++ return self.group[metric].netValues[0][2] ++ ++ def __fetch_previous_values(self, metric, instance): ++ if instance: ++ return dict(map(lambda x: (x[0].inst, x[2]), self.group[metric].netPrevValues)) ++ else: ++ return self.group[metric].netPrevValues[0][2] ++ ++ def current_value(self, metric, instance): ++ if not metric in self.group: ++ return None ++ if instance: ++ if self.current_cached_values.get(metric, None) is None: ++ lst = self.__fetch_current_values(metric, instance) ++ self.current_cached_values[metric] = lst ++ ++ return self.current_cached_values[metric].get(instance, None) ++ else: ++ if self.current_cached_values.get(metric, None) is None: ++ self.current_cached_values[metric] = self.__fetch_current_values(metric, instance) ++ return self.current_cached_values.get(metric, None) ++ ++ def previous_value(self, metric, instance): ++ if not metric in self.group: ++ return None ++ if instance: ++ if self.previous_cached_values.get(metric, None) is None: ++ lst = self.__fetch_previous_values(metric, instance) ++ self.previous_cached_values[metric] = lst ++ ++ return self.previous_cached_values[metric].get(instance, None) ++ else: ++ if self.previous_cached_values.get(metric, None) is None: ++ self.previous_cached_values[metric] = self.__fetch_previous_values(metric, instance) ++ return self.previous_cached_values.get(metric, None) ++ ++ def current_values(self, metric_name): ++ if self.group.get(metric_name, None) is None: ++ return None ++ if self.current_cached_values.get(metric_name, None) is None: ++ self.current_cached_values[metric_name] = self.__fetch_current_values(metric_name, True) ++ return self.current_cached_values.get(metric_name, None) ++ ++ def previous_values(self, metric_name): ++ if self.group.get(metric_name, None) is None: ++ return None ++ if self.previous_cached_values.get(metric_name, None) is None: ++ self.previous_cached_values[metric_name] = self.__fetch_previous_values(metric_name, True) ++ return self.previous_cached_values.get(metric_name, None) ++ ++ ++class ProcessFilter: ++ def __init__(self, options): ++ self.options = options ++ ++ def filter_processes(self, processes): ++ return filter(lambda p: self.__predicate(p), processes) ++ ++ def __predicate(self, process): ++ if self.options.filter_flag: ++ return bool(self.__matches_process_username(process) ++ and self.__matches_process_pid(process) ++ and self.__matches_process_name(process) ++ and self.__matches_process_ppid(process)) ++ else: ++ return True ++ ++ def __matches_process_username(self, process): ++ if self.options.username_filter_flag is True and self.options.filtered_process_user is not None: ++ return process.user_name().strip() == self.options.filtered_process_user.strip() ++ else: ++ return True ++ ++ def __matches_process_pid(self, process): ++ if self.options.pid_filter_flag: ++ if self.options.pid_list is not None: ++ pid = int(process.pid()) ++ return bool(pid in self.options.pid_list) ++ return True ++ ++ def __matches_process_ppid(self, process): ++ if self.options.ppid_filter_flag: ++ if self.options.ppid_list is not None: ++ ppid = int(process.ppid()) ++ return bool(ppid in self.options.ppid_list) ++ return True ++ ++ def __matches_process_name(self, process): ++ name = process.process_name() ++ if self.options.command_filter_flag is True and self.options.command_list is not None and name is not None: ++ return name.strip() in self.options.command_list ++ else: ++ return True ++ ++ ++class ProcessStatusUtil: ++ def __init__(self, instance, delta_time, metrics_repository): ++ self.instance = instance ++ self.__delta_time = delta_time ++ self.__metric_repository = metrics_repository ++ ++ def pid(self): ++ data = str(self.__metric_repository.current_value('proc.psinfo.pid', self.instance)) ++ if len(str(data)) < 8: ++ whitespace = 8 - len(str(data)) ++ res = data.ljust(whitespace + len(str(data)), ' ') ++ return res ++ else: ++ return data ++ ++ def ppid(self): ++ data = str(self.__metric_repository.current_value('proc.psinfo.ppid', self.instance)) ++ if len(str(data)) < 8: ++ whitespace = 8 - len(str(data)) ++ res = data.ljust(whitespace + len(str(data)), ' ') ++ return res ++ else: ++ return data ++ ++ def user_name(self): ++ data = self.__metric_repository.current_value('proc.id.uid_nm', self.instance)[:10] ++ if len(data) < 10: ++ whitespace = 10 - len(data) ++ res = data.ljust(whitespace + len(data), ' ') ++ return res ++ else: ++ return data ++ ++ def process_name(self): ++ data = self.__metric_repository.current_value('proc.psinfo.cmd', self.instance)[:20] ++ if len(data) < 20: ++ whitespace = 20 - len(data) ++ res = data.ljust(whitespace + len(data), ' ') ++ return res ++ else: ++ return data ++ ++ def process_name_with_args(self): ++ data = self.__metric_repository.current_value('proc.psinfo.psargs', self.instance)[:30] ++ if len(data) < 30: ++ whitespace = 30 - len(data) ++ res = data.ljust(whitespace + len(data), ' ') ++ return res ++ else: ++ return data ++ ++ def vsize(self): ++ return self.__metric_repository.current_value('proc.psinfo.vsize', self.instance) ++ ++ def rss(self): ++ return self.__metric_repository.current_value('proc.psinfo.rss', self.instance) ++ ++ def mem(self): ++ total_mem = self.__metric_repository.current_value('mem.physmem', None) ++ rss = self.__metric_repository.current_value('proc.psinfo.rss', self.instance) ++ if total_mem is not None and rss is not None: ++ return float("%.2f" % (100 * float(rss) / total_mem)) ++ else: ++ return None ++ ++ def s_name(self): ++ return self.__metric_repository.current_value('proc.psinfo.sname', self.instance) ++ ++ def cpu_number(self): ++ return self.__metric_repository.current_value('proc.psinfo.processor', self.instance) ++ ++ def system_percent(self): ++ c_systemtime = self.__metric_repository.current_value('proc.psinfo.stime', self.instance) ++ p_systemtime = self.__metric_repository.previous_value('proc.psinfo.stime', self.instance) ++ if c_systemtime is not None and p_systemtime is not None: ++ percent_of_time = 100 * float(c_systemtime - p_systemtime) / float(1000 * self.__delta_time) ++ return float("%.2f" % percent_of_time) ++ else: ++ return None ++ ++ def wchan_s(self): ++ process = self.__metric_repository.current_value('proc.psinfo.wchan_s', self.instance) ++ if process is None: ++ process = '-' ++ return process ++ elif len(process) < 30: ++ whitespace = 30 - len(process) ++ res = process.ljust(whitespace + len(process), ' ') ++ return res ++ return process[:30] ++ ++ def priority(self): ++ return self.__metric_repository.current_value('proc.psinfo.priority', self.instance) ++ ++ def user_percent(self): ++ c_usertime = self.__metric_repository.current_value('proc.psinfo.utime', self.instance) ++ p_usertime = self.__metric_repository.previous_value('proc.psinfo.utime', self.instance) ++ if c_usertime is not None and p_usertime is not None: ++ percent_of_time = 100 * float(c_usertime - p_usertime) / float(1000 * self.__delta_time) ++ return float("%.2f" % percent_of_time) ++ else: ++ return None ++ ++ def guest_percent(self): ++ c_guesttime = self.__metric_repository.current_value('proc.psinfo.guest_time', self.instance) ++ p_guesttime = self.__metric_repository.previous_value('proc.psinfo.guest_time', self.instance) ++ if c_guesttime is not None and p_guesttime is not None: ++ percent_of_time = 100 * float(c_guesttime - p_guesttime) / float(1000 * self.__delta_time) ++ return float("%.2f" % percent_of_time) ++ else: ++ return None ++ ++ def total_percent(self): ++ if self.user_percent() is not None and self.guest_percent() is not None and self.system_percent() is not None: ++ return float("%.2f" % (self.user_percent() + self.guest_percent() + self.system_percent())) ++ else: ++ return None ++ ++ def stime(self): ++ c_systime = self.__metric_repository.current_value('proc.psinfo.stime', self.instance) ++ p_systime = self.__metric_repository.previous_value('proc.psinfo.stime', self.instance) ++ # sometimes the previous_value seems to be Nonetype, not sure why ++ if p_systime is None: # print a '?' here ++ return '?' ++ else: ++ return c_systime - p_systime ++ ++ def age(self): ++ s_time = self.__metric_repository.current_value('proc.psinfo.start_time', self.instance) ++ group = manager['psstat'] ++ kernel_uptime = group['kernel.all.uptime'].netValues[0][2] ++ timefmt = "%H:%M:%S" ++ age = kernel_uptime - (s_time / 1000) ++ res = datetime.datetime.now() - datetime.timedelta(seconds=age) ++ if res.date() - datetime.datetime.now().date(): ++ return res.date() ++ else: ++ return res.strftime(timefmt) ++ ++ def total_time(self): ++ c_usertime = self.__metric_repository.current_value('proc.psinfo.stime', self.instance) ++ p_guesttime = self.__metric_repository.previous_value('proc.psinfo.utime', self.instance) ++ timefmt = "%H:%M:%S" ++ if c_usertime and p_guesttime is not None: ++ total_time = (c_usertime / 1000) + (p_guesttime / 1000) ++ else: ++ total_time = 0 ++ return time.strftime(timefmt, time.gmtime(total_time)) ++ ++ def tty_name(self): ++ return self.__metric_repository.current_value('proc.psinfo.ttyname', self.instance) ++ ++ def user_id(self): ++ return self.__metric_repository.current_value('proc.id.uid', self.instance) ++ ++ def start_time(self): ++ return self.__metric_repository.current_value('proc.psinfo.start_time', self.instance) ++ ++ def func_state(self): ++ s_name = self.__metric_repository.current_value('proc.psinfo.sname', self.instance) ++ if s_name == 'R': ++ return 'N/A' ++ elif s_name is None: ++ return '?' ++ else: ++ return self.wchan_s() ++ ++ def policy(self): ++ policy_int = self.__metric_repository.current_value('proc.psinfo.policy', self.instance) ++ if policy_int is not None and policy_int <= len(SCHED_POLICY): ++ # return policy_int ++ return SCHED_POLICY[policy_int] ++ return None ++ ++ ++PIDINFO_PAIR = {"%cpu": ('%CPU', ProcessStatusUtil.system_percent), ++ "%mem": ('%MEM', ProcessStatusUtil.mem), ++ "start": ("START\t", ProcessStatusUtil.age), ++ "time": ("TIME\t", ProcessStatusUtil.total_time), ++ "cls": ("CLS", ProcessStatusUtil.policy), ++ "cmd": ("Command\t\t\t", ProcessStatusUtil.process_name_with_args), ++ "pid": ("PID\t", ProcessStatusUtil.pid), ++ "ppid": ("PPID\t", ProcessStatusUtil.ppid), ++ "pri": ("PRI", ProcessStatusUtil.priority), ++ "state": ("S", ProcessStatusUtil.s_name), ++ "rss": ("RSS", ProcessStatusUtil.rss), ++ "rtprio": ("RTPRIO", ProcessStatusUtil.priority), ++ "tty": ("TT", ProcessStatusUtil.tty_name), ++ "pname": ("Pname\t\t", ProcessStatusUtil.process_name), ++ "vsize": ("VSZ", ProcessStatusUtil.vsize), ++ "uname": ("USER\t", ProcessStatusUtil.user_name), ++ "uid": ("USER_ID", ProcessStatusUtil.user_id), ++ "wchan": ("WCHAN\t\t\t", ProcessStatusUtil.wchan_s)} ++ ++ ++class ProcessStatus: ++ def __init__(self, metric_repository): ++ self.__metric_repository = metric_repository ++ ++ def get_processes(self, delta_time): ++ return map((lambda pid: (ProcessStatusUtil(pid, delta_time, self.__metric_repository))), self.__pids()) ++ ++ def __pids(self): ++ pid_dict = self.__metric_repository.current_values('proc.psinfo.pid') ++ return sorted(pid_dict.values()) ++ ++ ++class DynamicProcessReporter: ++ def __init__(self, process_report, process_filter, delta_time, printer, processStatOptions): ++ self.delta_time = delta_time ++ self.process_report = process_report ++ self.process_filter = process_filter ++ self.printer = printer ++ self.processStatOptions = processStatOptions ++ ++ def print_report(self, timestamp, header_indentation, value_indentation): ++ ++ # when the print count is exhausted exit the program gracefully ++ # we can't use break here because it's being called by the run manager ++ if self.processStatOptions.print_count == 0: ++ sys.exit(0) ++ else: ++ self.processStatOptions.print_count -= 1 ++ ++ if self.processStatOptions.filterstate is not None: ++ self.printer("Timestamp" + header_indentation + ++ "USER\t\tPID\t\tPPID\t\tPRI\t%CPU\t%MEM\tVSZ\tRSS\tS\tSTARTED\t\tTIME\t\tWCHAN\t\t\t\tCommand") ++ processes = self.process_filter.filter_processes(self.process_report.get_processes(self.delta_time)) ++ for process in processes: ++ total_percent = process.total_percent() ++ current_process_pid = process.pid() ++ current_process_sname = process.s_name() ++ if process.wchan_s() is not None: ++ wchan = process.wchan_s() ++ else: ++ wchan = '-' ++ key = (current_process_sname, current_process_pid) ++ if key in process_state_info: ++ process_state_info[key] = process_state_info[key] + self.delta_time ++ else: ++ process_state_info[key] = self.delta_time ++ process_name = process.process_name_with_args() ++ if 7 < len(wchan) < 15: ++ self.printer("%s%s%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t\t%s" % ++ (timestamp, value_indentation, process.user_name(), process.pid(), process.ppid(), ++ process.priority(), total_percent, process.system_percent(), process.vsize(), ++ process.rss(), current_process_sname, process.age(), process.total_time(), wchan, ++ process_name)) ++ elif len(wchan) >= 15: ++ self.printer("%s%s%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % ++ (timestamp, value_indentation, process.user_name(), process.pid(), process.ppid(), ++ process.priority(), total_percent, process.system_percent(), process.vsize(), ++ process.rss(), current_process_sname, process.age(), process.total_time(), wchan, ++ process_name)) ++ else: ++ self.printer("%s%s%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t\t\t%s" % ++ (timestamp, value_indentation, process.user_name(), process.pid(), process.ppid(), ++ process.priority(), total_percent, process.system_percent(), process.vsize(), ++ process.rss(), current_process_sname, process.age(), process.total_time(), wchan, ++ process_name)) ++ elif self.processStatOptions.colum_list is not None: ++ print('Timestamp', end="\t") ++ for key in self.processStatOptions.colum_list: ++ if key in PIDINFO_PAIR: ++ self.printer(PIDINFO_PAIR[key][0], '\t\t') ++ print('') ++ processes = self.process_filter.filter_processes(self.process_report.get_processes(self.delta_time)) ++ for process in processes: ++ print(timestamp, end="\t") ++ for key in self.processStatOptions.colum_list: ++ if key in PIDINFO_PAIR: ++ self.printer(PIDINFO_PAIR[key][1](process), '\t\t') ++ print('') ++ ++ ++class ProcessStatusReporter: ++ def __init__(self, process_report, process_filter, delta_time, printer, processStatOptions): ++ self.delta_time = delta_time ++ self.process_report = process_report ++ self.process_filter = process_filter ++ self.printer = printer ++ self.processStatOptions = processStatOptions ++ ++ def print_report(self, timestamp, header_indentation, value_indentation): ++ ++ # when the print count is exhausted exit the program gracefully ++ # we can't use break here because it's being called by the run manager ++ ++ if self.processStatOptions.print_count == 0: ++ sys.exit(0) ++ else: ++ self.processStatOptions.print_count -= 1 ++ ++ if self.processStatOptions.show_all_process: ++ self.printer("Timestamp" + header_indentation + "PID\t\t\tTTY\tTIME\t\tCMD") ++ processes = self.process_filter.filter_processes(self.process_report.get_processes(self.delta_time)) ++ for process in processes: ++ command = process.process_name() ++ ttyname = process.tty_name() ++ self.printer("%s%s%s\t\t%s\t%s\t%s" % (timestamp, value_indentation, process.pid(), ttyname, ++ process.total_time(), command)) ++ elif self.processStatOptions.empty_arg_flag: ++ self.printer("Timestamp" + header_indentation + "PID\t\tTIME\t\tCMD") ++ processes = self.process_filter.filter_processes(self.process_report.get_processes(self.delta_time)) ++ for process in processes: ++ pid = process.pid() ++ command = process.process_name() ++ self.printer("%s%s%s\t%s\t%s" % (timestamp, value_indentation, pid, ++ process.total_time(), command)) ++ elif self.processStatOptions.pid_filter_flag: ++ self.printer("Timestamp" + header_indentation + "PID\t\tPPID\t\tTTY\tTIME\t\tCMD") ++ processes = self.process_filter.filter_processes(self.process_report.get_processes(self.delta_time)) ++ for process in processes: ++ pid = process.pid() ++ command = process.process_name() ++ ttyname = process.tty_name() ++ self.printer("%s%s%s\t%s\t%s\t%s\t%s" % (timestamp, value_indentation, pid, process.ppid(), ++ ttyname, process.total_time(), command)) ++ elif self.processStatOptions.ppid_filter_flag: ++ self.printer("Timestamp" + header_indentation + "PID\t\tPPID\t\tTTY\tTIME\t\tCMD") ++ processes = self.process_filter.filter_processes(self.process_report.get_processes(self.delta_time)) ++ for process in processes: ++ ppid = process.ppid() ++ command = process.process_name() ++ ttyname = process.tty_name() ++ self.printer("%s%s%s\t%s\t%s\t%s\t%s" % (timestamp, value_indentation, process.pid(), ppid, ttyname, ++ process.total_time(), command)) ++ elif self.processStatOptions.username_filter_flag: ++ self.printer("Timestamp" + header_indentation + "USERNAME\t\tPID\t\t%CPU\t%MEM\tVSZ\tRSS\t" + ++ "TTY\tSTAT\t\tTIME\t\tSTART\t\tCOMMAND") ++ processes = self.process_filter.filter_processes(self.process_report.get_processes(self.delta_time)) ++ for process in processes: ++ self.printer("%s%s%s\t\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % ( ++ timestamp, value_indentation, process.user_name(), process.pid(), ++ process.system_percent(), process.total_percent(), process.vsize(), process.rss(), ++ process.tty_name(), process.ppid(), process.total_time(), process.age(), ++ process.process_name())) ++ ++ elif self.processStatOptions.user_oriented_format: ++ self.printer("Timestamp" + header_indentation + "USERNAME\tPID\t\t%CPU\t%MEM\tVSZ\tRSS\t" + ++ "TTY\tSTAT\tTIME\t\tSTART\t\tCOMMAND") ++ processes = self.process_filter.filter_processes(self.process_report.get_processes(self.delta_time)) ++ for process in processes: ++ self.printer("%s%s%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % ( ++ timestamp, value_indentation, process.user_name(), process.pid(), ++ process.system_percent(), process.total_percent(), process.vsize(), process.rss(), ++ process.tty_name(), process.s_name(), process.total_time(), process.age(), ++ process.process_name())) ++ ++ elif self.processStatOptions.command_filter_flag: ++ self.printer("Timestamp" + header_indentation + "PID\t\tPPID\t\tTTY\tTIME\t\tCMD") ++ processes = self.process_filter.filter_processes(self.process_report.get_processes(self.delta_time)) ++ for process in processes: ++ ppid = process.ppid() ++ command = process.process_name() ++ ttyname = process.tty_name() ++ self.printer("%s%s%s\t%s\t%s\t%s\t%s" % (timestamp, value_indentation, process.pid(), ppid, ttyname, ++ process.total_time(), command)) ++ ++ ++class ProcessstatReport(pmcc.MetricGroupPrinter): ++ Machine_info_count = 0 ++ ++ def timeStampDelta(self, group): ++ s = group.timestamp.tv_sec - group.prevTimestamp.tv_sec ++ u = group.timestamp.tv_usec - group.prevTimestamp.tv_usec ++ return s + u / 1000000.0 ++ ++ def print_machine_info(self, group, context): ++ timestamp = context.pmLocaltime(group.timestamp.tv_sec) ++ # Please check strftime(3) for different formatting options. ++ # Also check TZ and LC_TIME environment variables for more ++ # information on how to override the default formatting of ++ # the date display in the header ++ time_string = time.strftime("%x", timestamp.struct_time()) ++ header_string = '' ++ header_string += group['kernel.uname.sysname'].netValues[0][2] + ' ' ++ header_string += group['kernel.uname.release'].netValues[0][2] + ' ' ++ header_string += '(' + group['kernel.uname.nodename'].netValues[0][2] + ') ' ++ header_string += time_string + ' ' ++ header_string += group['kernel.uname.machine'].netValues[0][2] + ' ' ++ print("%s (%s CPU)" % (header_string, self.get_ncpu(group))) ++ ++ def get_ncpu(self, group): ++ return group['hinv.ncpu'].netValues[0][2] ++ ++ def report(self, manager): ++ group = manager['psstat'] ++ if group['proc.psinfo.utime'].netPrevValues is None: ++ # need two fetches to report rate converted counter metrics ++ return ++ ++ if not group['hinv.ncpu'].netValues or not group['kernel.uname.sysname'].netValues: ++ return ++ ++ try: ++ if not self.Machine_info_count: ++ self.print_machine_info(group, manager) ++ self.Machine_info_count = 1 ++ except IndexError: ++ # missing some metrics ++ return ++ ++ ts = group.contextCache.pmLocaltime(int(group.timestamp)) ++ timestamp = time.strftime(ProcessStatOptions.timefmt, ts.struct_time()) ++ interval_in_seconds = self.timeStampDelta(group) ++ header_indentation = " " if len(timestamp) < 9 else (len(timestamp) - 7) * " " ++ value_indentation = ((len(header_indentation) + 9) - len(timestamp)) * " " ++ ++ metric_repository = ReportingMetricRepository(group) ++ ++ # Doing this for one single print instance in case there is no count specified ++ if ProcessStatOptions.print_count is None: ++ ProcessStatOptions.print_count = 1 ++ ++ # ============================================================================================================= ++ if ProcessStatOptions.show_all_process: ++ process_report = ProcessStatus(metric_repository) ++ process_filter = ProcessFilter(ProcessStatOptions) ++ stdout = StdoutPrinter() ++ printdecorator = NoneHandlingPrinterDecorator(stdout) ++ report = ProcessStatusReporter(process_report, process_filter, interval_in_seconds, printdecorator.Print, ++ ProcessStatOptions) ++ report.print_report(timestamp, header_indentation, value_indentation) ++ ++ if ProcessStatOptions.empty_arg_flag: ++ process_report = ProcessStatus(metric_repository) ++ process_filter = ProcessFilter(ProcessStatOptions) ++ stdout = StdoutPrinter() ++ printdecorator = NoneHandlingPrinterDecorator(stdout) ++ report = ProcessStatusReporter(process_report, process_filter, interval_in_seconds, printdecorator.Print, ++ ProcessStatOptions) ++ report.print_report(timestamp, header_indentation, value_indentation) ++ ++ if ProcessStatOptions.pid_filter_flag: ++ process_report = ProcessStatus(metric_repository) ++ process_filter = ProcessFilter(ProcessStatOptions) ++ stdout = StdoutPrinter() ++ printdecorator = NoneHandlingPrinterDecorator(stdout) ++ report = ProcessStatusReporter(process_report, process_filter, interval_in_seconds, printdecorator.Print, ++ ProcessStatOptions) ++ report.print_report(timestamp, header_indentation, value_indentation) ++ if ProcessStatOptions.ppid_filter_flag: ++ process_report = ProcessStatus(metric_repository) ++ process_filter = ProcessFilter(ProcessStatOptions) ++ stdout = StdoutPrinter() ++ printdecorator = NoneHandlingPrinterDecorator(stdout) ++ report = ProcessStatusReporter(process_report, process_filter, interval_in_seconds, printdecorator.Print, ++ ProcessStatOptions) ++ report.print_report(timestamp, header_indentation, value_indentation) ++ ++ if ProcessStatOptions.command_filter_flag: ++ process_report = ProcessStatus(metric_repository) ++ process_filter = ProcessFilter(ProcessStatOptions) ++ stdout = StdoutPrinter() ++ printdecorator = NoneHandlingPrinterDecorator(stdout) ++ report = ProcessStatusReporter(process_report, process_filter, interval_in_seconds, printdecorator.Print, ++ ProcessStatOptions) ++ report.print_report(timestamp, header_indentation, value_indentation) ++ ++ if ProcessStatOptions.user_oriented_format: ++ process_report = ProcessStatus(metric_repository) ++ process_filter = ProcessFilter(ProcessStatOptions) ++ stdout = StdoutPrinter() ++ printdecorator = NoneHandlingPrinterDecorator(stdout) ++ report = ProcessStatusReporter(process_report, process_filter, interval_in_seconds, printdecorator.Print, ++ ProcessStatOptions) ++ report.print_report(timestamp, header_indentation, value_indentation) ++ ++ if ProcessStatOptions.username_filter_flag: ++ process_report = ProcessStatus(metric_repository) ++ process_filter = ProcessFilter(ProcessStatOptions) ++ stdout = StdoutPrinter() ++ printdecorator = NoneHandlingPrinterDecorator(stdout) ++ report = ProcessStatusReporter(process_report, process_filter, interval_in_seconds, printdecorator.Print, ++ ProcessStatOptions) ++ report.print_report(timestamp, header_indentation, value_indentation) ++ ++ # ================================================================ ++ if ProcessStatOptions.selective_colum_flag: ++ process_report = ProcessStatus(metric_repository) ++ process_filter = ProcessFilter(ProcessStatOptions) ++ stdout = StdoutPrinter() ++ printdecorator = NoneHandlingPrinterDecorator(stdout) ++ report = DynamicProcessReporter(process_report, process_filter, interval_in_seconds, printdecorator.Print, ++ ProcessStatOptions) ++ report.print_report(timestamp, header_indentation, value_indentation) ++ ++ ++class ProcessStatOptions(pmapi.pmOptions): ++ show_all_process = False ++ command_filter_flag = False ++ ppid_filter_flag = False ++ pid_filter_flag = False ++ username_filter_flag = False ++ selective_colum_flag = False ++ filter_flag = False ++ user_oriented_format = False ++ empty_arg_flag = False ++ filterstate = None ++ timefmt = "%H:%M:%S" ++ print_count = None ++ colum_list = [] ++ command_list = [] ++ pid_list = [] ++ ppid_list = [] ++ filtered_process_user = None ++ ++ def __init__(self): ++ pmapi.pmOptions.__init__(self, "t:c:e::p:ukVZ:z?:o:P:l:U:k") ++ self.pmSetOptionCallback(self.extraOptions) ++ self.pmSetOverrideCallback(self.override) ++ self.options() ++ ++ def options(self): ++ self.pmSetLongOptionHeader("General options") ++ self.pmSetLongOption("", 0, "e", "", ++ "Show all process") ++ self.pmSetLongOption("", 1, "c", "[Command name]", ++ "Show the stats for specified command name process") ++ self.pmSetLongOption("", 1, "p", "[pid1,pid2,...]", ++ "Select the process by process ID") ++ self.pmSetLongOption("", 1, "P", "[ppid1,ppid2,...]", "Select the process by process parent ID") ++ self.pmSetLongOption("", 1, "U", "[User Name]", "Select the process by user name") ++ self.pmSetLongOption("", 1, "o", "[col1,col2,... Or ALL]", "User -defined format " + ++ "USE -o [all] or -B [col1, col2 , ...]" + ++ "\n\t\t\tsupported user defined colums are command, wchan, started, Time, pid, ppid, " ++ "%mem, pri, user, %cpu and S " ++ "\n\t\t\tALL option shows USER,PID,PPID,PRI,%CPU,%MEM,VSZ,RSS,S,STARTED,TIME,WCHAN and " ++ "Command") ++ self.pmSetLongOptionText("\tCOL\tHEADER \tDESCRIPTION") ++ self.pmSetLongOptionText("\t%cpu\t%CPU \tcpu utilization of the process") ++ self.pmSetLongOptionText("\t%mem\t%MEM \tphysical memory on the machine expressed as a percentage") ++ self.pmSetLongOptionText("\tstart\tSTART \ttime the command started") ++ self.pmSetLongOptionText("\ttime\tTIME \taccumulated cpu time, user + system") ++ self.pmSetLongOptionText("\tcls\tCLS \tscheduling class of the process") ++ self.pmSetLongOptionText("\tcmd\tCMD\tsee args. (alias args, command).") ++ self.pmSetLongOptionText("\tpid\tPID \tthe process ID") ++ self.pmSetLongOptionText("\tppid\tPPID\tparent process ID") ++ self.pmSetLongOptionText("\tpri\tPRI \tpriority of the process") ++ self.pmSetLongOptionText("\tstate\tS \tsee s") ++ self.pmSetLongOptionText("\trss\tRSS \tthe non-swapped physical memory that a task has used") ++ self.pmSetLongOptionText("\trtprio\tRTPRIO \trealtime priority") ++ self.pmSetLongOptionText("\tpname\tPname\tProcess name") ++ # self.pmSetLongOptionText("\ttime\tTIME \tcumulative CPU time") ++ self.pmSetLongOptionText("\ttty\tTT \tcontrolling tty (terminal)") ++ self.pmSetLongOptionText("\tuid\tUID \tsee euid") ++ self.pmSetLongOptionText("\tvsize\tVSZ \tsee vsz") ++ self.pmSetLongOptionText("\tuname\tUSER \tsee euser") ++ self.pmSetLongOptionText("\twchan\tWCHAN \tname of the kernel function in which the process is sleeping") ++ self.pmSetLongOption("", 0, 'u', "", "Display user-oriented format") ++ self.pmSetLongOptionVersion() ++ self.pmSetLongOptionTimeZone() ++ self.pmSetLongOptionHostZone() ++ self.pmSetLongOptionHelp() ++ ++ def override(self, opts): ++ ProcessStatOptions.print_count = self.pmGetOptionSamples() ++ # """Override standard Pcp-ps option to show all process """ ++ return bool(opts in ['p', 'c', 'o', 'P', 'U']) ++ ++ def extraOptions(self, opts, optarg): ++ if opts == 'e': ++ ProcessStatOptions.show_all_process = True ++ elif opts == 'c': ++ ProcessStatOptions.command_filter_flag = True ++ ProcessStatOptions.filter_flag = True ++ try: ++ if optarg is not None: ++ ProcessStatOptions.command_list += optarg.replace(',', ' ').split(' ') ++ except ValueError: ++ print("Invalid command Id List: use comma separated pids without whitespaces") ++ sys.exit(1) ++ elif opts == 'p': ++ ProcessStatOptions.filter_flag = True ++ ProcessStatOptions.pid_filter_flag = True ++ try: ++ if optarg is not None: ++ dummy_list = optarg.replace(',', ' ').split(' ') ++ ProcessStatOptions.pid_list += [int(x) for x in dummy_list] ++ except ValueError: ++ print("Invalid pid Id List: use comma separated pids without whitespaces") ++ sys.exit(1) ++ elif opts == 'P': ++ ProcessStatOptions.filter_flag = True ++ ProcessStatOptions.ppid_filter_flag = True ++ try: ++ if optarg is not None: ++ dummy_list = optarg.replace(',', ' ').split(' ') ++ ProcessStatOptions.ppid_list += [int(x) for x in dummy_list] ++ except ValueError: ++ print("Invalid ppid Id List: use comma separated pids without whitespaces") ++ sys.exit(1) ++ elif opts == 'u': ++ ProcessStatOptions.user_oriented_format = True ++ elif opts == 'o': ++ ProcessStatOptions.selective_colum_flag = True ++ try: ++ if optarg.upper() == "ALL": ++ ProcessStatOptions.filterstate = optarg.upper() ++ else: ++ dummy_list = optarg.replace(',', ' ').split(' ') ++ for key in dummy_list: ++ if key.lower() in PIDINFO_PAIR: ++ ProcessStatOptions.colum_list.append(key.lower()) ++ else: ++ raise ValueError ++ except ValueError: ++ print("Invalid ppid Id List: Either colum name is not correct " ++ "or use comma separated colum names without whitespaces") ++ sys.exit(1) ++ elif opts == 'U': ++ ProcessStatOptions.username_filter_flag = True ++ ProcessStatOptions.filter_flag = True ++ ProcessStatOptions.filtered_process_user = optarg ++ elif opts is None: ++ ProcessStatOptions.show_all_process = True ++ ++ @staticmethod ++ def checkOptions(): ++ if ProcessStatOptions.selective_colum_flag or \ ++ ProcessStatOptions.filter_flag or \ ++ ProcessStatOptions.user_oriented_format: ++ return True ++ else: ++ ProcessStatOptions.empty_arg_flag = True ++ return True ++ ++ ++if __name__ == "__main__": ++ try: ++ opts = ProcessStatOptions() ++ manager = pmcc.MetricGroupManager.builder(opts, sys.argv) ++ ++ if not opts.checkOptions(): ++ raise pmapi.pmUsageErr ++ missing = manager.checkMissingMetrics(PSSTAT_METRICS) ++ if missing is not None: ++ sys.stderr.write('Error: not all required metrics are available\nMissing %s\n' % missing) ++ sys.exit(1) ++ manager['psstat'] = PSSTAT_METRICS ++ manager.printer = ProcessstatReport() ++ sts = manager.run() ++ sys.exit(sts) ++ except pmapi.pmErr as pmerror: ++ sys.stderr.write('%s\n' % (pmerror.message())) ++ except pmapi.pmUsageErr as usage: ++ usage.message() ++ sys.exit(1) ++ except KeyboardInterrupt: ++ print("Interrupted") ++ sys.exit(0) +diff --git a/src/pcp/ps/test/.gitignore b/src/pcp/ps/test/.gitignore +new file mode 100755 +index 000000000..1461dd1a2 +--- /dev/null ++++ b/src/pcp/ps/test/.gitignore +@@ -0,0 +1,2 @@ ++*.pyc ++pcp_ps.py +diff --git a/src/pcp/ps/test/GNUmakefile b/src/pcp/ps/test/GNUmakefile +new file mode 100755 +index 000000000..c09018023 +--- /dev/null ++++ b/src/pcp/ps/test/GNUmakefile +@@ -0,0 +1,33 @@ ++# ++# Copyright (c) 2022 Oracle and/or its affiliates. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++# This program is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation; either version 2 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++# for more details. ++# ++ ++TOPDIR = ../../../.. ++include $(TOPDIR)/src/include/builddefs ++ ++SCRIPT = pcp-ps.py ++MODULE = pcp_ps.py ++ ++LDIRT = $(MODULE) ++ ++default default_pcp build-me install install_pcp: ++ ++include $(BUILDRULES) ++ ++ifeq "$(HAVE_PYTHON)" "true" ++test: ++ @rm -f $(MODULE) ++ $(LN_S) ../$(SCRIPT) $(MODULE) ++ pmpython -m unittest discover -s . -p '*_test.py' ++endif +diff --git a/src/pcp/ps/test/process_state_util_reporter_test.py b/src/pcp/ps/test/process_state_util_reporter_test.py +new file mode 100755 +index 000000000..f473351b5 +--- /dev/null ++++ b/src/pcp/ps/test/process_state_util_reporter_test.py +@@ -0,0 +1,50 @@ ++#!/usr/bin/env pmpython ++# ++# Copyright (c) 2022 Oracle and/or its affiliates. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++# This program is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation; either version 2 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++# for more details. ++# ++from mock import Mock ++import unittest ++from pcp_ps import ProcessStateReporter ++ ++ ++class TestProcessStateReporter(unittest.TestCase): ++ def setUp(self): ++ self.options = Mock( ++ show_process_user=None) ++ ++ process_1 = Mock(pid=Mock(return_value=1), ++ process_name=Mock(return_value="process_1"), ++ user_name=Mock(return_value='pcp'), ++ user_id=Mock(return_value=1000), ++ stack_size=Mock(return_value=136), ++ tty_name=Mock(return_value="tty"), ++ total_time=Mock(return_value=100)) ++ ++ self.processes = [process_1] ++ ++ def test_print_report_with_user_name(self): ++ self.options.show_all_process = True ++ process_stack_util = Mock() ++ process_filter = Mock() ++ printer = Mock() ++ process_filter.filter_processes = Mock(return_value=self.processes) ++ reporter = ProcessStateReporter(process_stack_util, process_filter, 1.34, printer, self.options) ++ ++ reporter.print_report(123, " ", " ") ++ ++ printer.assert_called_with("123 1\t\ttty\t100\tprocess_1") ++ ++ ++if __name__ == "__main__": ++ unittest.main() +diff --git a/src/pcp/ps/test/process_statusutil_test.py b/src/pcp/ps/test/process_statusutil_test.py +new file mode 100755 +index 000000000..8ef45b451 +--- /dev/null ++++ b/src/pcp/ps/test/process_statusutil_test.py +@@ -0,0 +1,161 @@ ++#!/usr/bin/env pmpython ++# ++# Copyright (c) 2022 Oracle and/or its affiliates. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++# This program is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation; either version 2 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++# for more details. ++# ++ ++import mock ++import unittest ++from pcp_ps import ProcessStatus ++ ++ ++class TestProcessStackUtil(unittest.TestCase): ++ def setUp(self): ++ self.__metric_repository = mock.Mock() ++ self.__metric_repository.current_value = mock.Mock(side_effect=self.metric_repo_current_value_side_effect) ++ ++ def metric_repo_current_value_side_effect(self, metric_name, instance): ++ if metric_name == 'proc.psinfo.cmd' and instance == 1: ++ return "test" ++ if metric_name == 'proc.id.uid' and instance == 1: ++ return 1 ++ if metric_name == 'proc.psinfo.pid' and instance == 1: ++ return 1 ++ if metric_name == 'proc.id.uid_nm' and instance == 1: ++ return "test" ++ if metric_name == 'proc.psinfo.cmd' and instance == 1: ++ return "test" ++ if metric_name == 'proc.psinfo.psargs' and instance == 1: ++ return "test" ++ if metric_name == 'proc.psinfo.vsize' and instance == 1: ++ return 1 ++ if metric_name == 'proc.psinfo.rss' and instance == 1: ++ return 1 ++ if metric_name == 'mem.physmem' and instance is None: ++ return 1 ++ if metric_name == 'proc.psinfo.sname' and instance == 1: ++ return 'R' ++ if metric_name == 'proc.psinfo.processor' and instance == 1: ++ return 1 ++ if metric_name == 'proc.psinfo.stime' and instance == 1: ++ return 1 ++ if metric_name == 'proc.psinfo.wchan_s' and instance == 1: ++ return "test" ++ if metric_name == 'proc.psinfo.priority' and instance == 1: ++ return 1 ++ if metric_name == 'proc.psinfo.utime' and instance == 1: ++ return 1 ++ if metric_name == 'proc.psinfo.guest_time' and instance == 1: ++ return 1 ++ if metric_name == 'proc.psinfo.stime' and instance == 1: ++ return 1 ++ if metric_name == 'proc.psinfo.start_time' and instance == 1: ++ return 1 ++ if metric_name == 'kernel.all.uptime' and instance is None: ++ return 1 ++ if metric_name == 'proc.psinfo.ttyname' and instance == 1: ++ return 'tty' ++ if metric_name == 'proc.psinfo.policy' and instance == 1: ++ return 1 ++ ++ def test_stack_referenced_size(self): ++ self.skipTest(reason="Implement when suitable metric is found") ++ ++ def test_username(self): ++ process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ name = process_status_usage.user_name() ++ self.assertEqual(name, "test") ++ ++ def test_Processname(self): ++ process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ name = process_status_usage.process_name() ++ self.assertEqual(name, "test") ++ ++ def test_process_name_with_args(self): ++ process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ name = process_status_usage.process_name_with_args() ++ self.assertEqual(name, "test") ++ ++ def test_vszie(self): ++ process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ vsize = process_status_usage.vsize() ++ self.assertEqual(vsize, 1) ++ ++ def test_rss(self): ++ process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ vsize = process_status_usage.rss() ++ self.assertEqual(vsize, 1) ++ ++ def test_mem(self): ++ process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ vsize = process_status_usage.mem() ++ self.assertEqual(vsize, 100) ++ ++ def test_pid(self): ++ process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ pid = process_status_usage.pid() ++ self.assertEqual(pid, 1) ++ ++ def test_process_name(self): ++ process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ name = process_status_usage.process_name() ++ self.assertEqual(name, 'test') ++ ++ def test_user_id(self): ++ process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ user_id = process_status_usage.user_id() ++ self.assertEqual(user_id, 1) ++ ++ def test_s_name(self): ++ process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ name = process_status_usage.s_name() ++ self.assertEqual(name, 'R') ++ ++ def test_cpu_number(self): ++ process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ name = process_status_usage.cpu_number() ++ self.assertEqual(name, 1) ++ ++ def test_wchan_s(self): ++ process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ name = process_status_usage.wchan_s() ++ self.assertEqual(name, 'test') ++ ++ def test_priority(self): ++ process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ name = process_status_usage.priority() ++ self.assertEqual(name, 1) ++ ++ def test_tty_name(self): ++ process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ name = process_status_usage.tty_name() ++ self.assertEqual(name, 'tty') ++ ++ def test_start_time(self): ++ process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ name = process_status_usage.start_time() ++ self.assertEqual(name, 1) ++ ++ def test_func_state(self): ++ process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ name = process_status_usage.func_state() ++ self.assertEqual(name, 'N/A') ++ ++ def test_policy(self): ++ process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ name = process_status_usage.policy() ++ self.assertEqual(name, 'FIFO') ++ ++ ++if __name__ == '__main__': ++ unittest.main() +-- +2.31.1 + diff --git a/SOURCES/1002-pcp-ps-python2-print-issue-and-o-option-fix.patch b/SOURCES/1002-pcp-ps-python2-print-issue-and-o-option-fix.patch new file mode 100644 index 0000000..8fea67a --- /dev/null +++ b/SOURCES/1002-pcp-ps-python2-print-issue-and-o-option-fix.patch @@ -0,0 +1,92 @@ +From ff8b1172b43b850f2e858a621f7d79f34083d52e Mon Sep 17 00:00:00 2001 +From: sagar sagar +Date: Thu, 17 Nov 2022 00:57:13 -0500 +Subject: [PATCH] pcp-ps: python2 print issue and -o option fix + +For dynamic printing with -o option,end literal in print was being used to +print the output continously but it's not supported in python2 so we have +changed the method.Now we get all the data once in buffer then we print that buffer. + +pcp-ps -o option was not working because number of arguments in the extra option +function were incorrect so it was not able to override. + +cherry-picked upstream commit:- a5632f0e72fda4ab1e81a971c5b1eda31ab22f34 + 2641b1713252753a94c7e40cb59f4d3f45e828c1 +Signed-off-by: Sagar Sagar +Orabug: 34321683 +--- + src/pcp/ps/pcp-ps.py | 33 ++++++++++++--------------------- + 1 file changed, 12 insertions(+), 21 deletions(-) + +diff --git a/src/pcp/ps/pcp-ps.py b/src/pcp/ps/pcp-ps.py +index b087951c4..65e4403ff 100755 +--- a/src/pcp/ps/pcp-ps.py ++++ b/src/pcp/ps/pcp-ps.py +@@ -38,25 +38,16 @@ SCHED_POLICY = ['NORMAL', 'FIFO', 'RR', 'BATCH', '', 'IDLE', 'DEADLINE'] + + + class StdoutPrinter: +- def Print(self, args, continuation=None): +- if continuation is not None: +- print(args, end=continuation) +- else: +- print(args) +- ++ def Print(self, args): ++ print(args) + + class NoneHandlingPrinterDecorator: + def __init__(self, printer): + self.printer = printer + +- def Print(self, args, continuation=None): +- if continuation is None: +- new_args = args.replace('None', '?') +- elif type(args) not in [float, int] or args is not None: +- new_args = str(args).replace('None', '?') +- else: +- new_args = args +- self.printer.Print(new_args, continuation) ++ def Print(self, args): ++ new_args = args.replace('None', '?') ++ self.printer.Print(new_args) + + + # After fetching non singular metric values, create a mapping of instance id +@@ -429,18 +420,18 @@ class DynamicProcessReporter: + process.rss(), current_process_sname, process.age(), process.total_time(), wchan, + process_name)) + elif self.processStatOptions.colum_list is not None: +- print('Timestamp', end="\t") ++ header = "Timestamp" + '\t' + for key in self.processStatOptions.colum_list: + if key in PIDINFO_PAIR: +- self.printer(PIDINFO_PAIR[key][0], '\t\t') +- print('') ++ header += PIDINFO_PAIR[key][0] + '\t\t' ++ print(header) + processes = self.process_filter.filter_processes(self.process_report.get_processes(self.delta_time)) + for process in processes: +- print(timestamp, end="\t") ++ data_to_print = timestamp + '\t' + for key in self.processStatOptions.colum_list: + if key in PIDINFO_PAIR: +- self.printer(PIDINFO_PAIR[key][1](process), '\t\t') +- print('') ++ data_to_print += str(PIDINFO_PAIR[key][1](process)) + '\t\t' ++ print(data_to_print) + + + class ProcessStatusReporter: +@@ -729,7 +720,7 @@ class ProcessStatOptions(pmapi.pmOptions): + # """Override standard Pcp-ps option to show all process """ + return bool(opts in ['p', 'c', 'o', 'P', 'U']) + +- def extraOptions(self, opts, optarg): ++ def extraOptions(self, opts, optarg,index): + if opts == 'e': + ProcessStatOptions.show_all_process = True + elif opts == 'c': +-- +2.31.1 + diff --git a/SOURCES/1003-pcp-ps-added-capabilities-to-show-n-sample-with-arch.patch b/SOURCES/1003-pcp-ps-added-capabilities-to-show-n-sample-with-arch.patch new file mode 100644 index 0000000..c8772fc --- /dev/null +++ b/SOURCES/1003-pcp-ps-added-capabilities-to-show-n-sample-with-arch.patch @@ -0,0 +1,82 @@ +From 9e13cbc088bb88660a124e4a6b7f333ad9350670 Mon Sep 17 00:00:00 2001 +From: sagar sagar +Date: Tue, 17 Jan 2023 07:14:48 -0500 +Subject: [PATCH] pcp-ps:added capabilities to show n sample with archives + +we are checking if our current context is archive then don't +limit the output print to one instance of data. + +cherry-pick upstream commit:- 5236b96127adde8b4aaf01ad6dc9d4265b102979 + +Signed-off-by: Sagar Sagar +Orabug: 34849959 +--- + src/pcp/ps/pcp-ps.py | 24 ++++++++++++++---------- + 1 file changed, 14 insertions(+), 10 deletions(-) + +diff --git a/src/pcp/ps/pcp-ps.py b/src/pcp/ps/pcp-ps.py +index 65e4403ff..f05cbe755 100755 +--- a/src/pcp/ps/pcp-ps.py ++++ b/src/pcp/ps/pcp-ps.py +@@ -22,6 +22,8 @@ import sys + import time + from pcp import pmcc + from pcp import pmapi ++from cpmapi import PM_CONTEXT_ARCHIVE ++ + import datetime + + process_state_info = {} +@@ -378,10 +380,11 @@ class DynamicProcessReporter: + + # when the print count is exhausted exit the program gracefully + # we can't use break here because it's being called by the run manager +- if self.processStatOptions.print_count == 0: +- sys.exit(0) +- else: +- self.processStatOptions.print_count -= 1 ++ if self.processStatOptions.context is not PM_CONTEXT_ARCHIVE: ++ if self.processStatOptions.print_count == 0: ++ sys.exit(0) ++ else: ++ self.processStatOptions.print_count -= 1 + + if self.processStatOptions.filterstate is not None: + self.printer("Timestamp" + header_indentation + +@@ -446,11 +449,11 @@ class ProcessStatusReporter: + + # when the print count is exhausted exit the program gracefully + # we can't use break here because it's being called by the run manager +- +- if self.processStatOptions.print_count == 0: +- sys.exit(0) +- else: +- self.processStatOptions.print_count -= 1 ++ if self.processStatOptions.context is not PM_CONTEXT_ARCHIVE: ++ if self.processStatOptions.print_count == 0: ++ sys.exit(0) ++ else: ++ self.processStatOptions.print_count -= 1 + + if self.processStatOptions.show_all_process: + self.printer("Timestamp" + header_indentation + "PID\t\t\tTTY\tTIME\t\tCMD") +@@ -666,6 +669,7 @@ class ProcessStatOptions(pmapi.pmOptions): + pid_list = [] + ppid_list = [] + filtered_process_user = None ++ context = None + + def __init__(self): + pmapi.pmOptions.__init__(self, "t:c:e::p:ukVZ:z?:o:P:l:U:k") +@@ -792,7 +796,7 @@ if __name__ == "__main__": + try: + opts = ProcessStatOptions() + manager = pmcc.MetricGroupManager.builder(opts, sys.argv) +- ++ ProcessStatOptions.context = manager.type + if not opts.checkOptions(): + raise pmapi.pmUsageErr + missing = manager.checkMissingMetrics(PSSTAT_METRICS) +-- +2.31.1 + diff --git a/SOURCES/1004-Fixed-multiple-pcp-ps-and-pcp-mpstat-issue.patch b/SOURCES/1004-Fixed-multiple-pcp-ps-and-pcp-mpstat-issue.patch new file mode 100644 index 0000000..486cb7a --- /dev/null +++ b/SOURCES/1004-Fixed-multiple-pcp-ps-and-pcp-mpstat-issue.patch @@ -0,0 +1,687 @@ +From d2aeae7b1954f4c12a59928d807b0f796bf3ad7a Mon Sep 17 00:00:00 2001 +From: sagar sagar +Date: Wed, 18 Jan 2023 06:04:43 -0500 +Subject: [PATCH] Fixed multiple pcp-ps and pcp-mpstat issue + +fixed broken pipe issue in pcp ps and pcp-pidstat utility +fixed mpstat crash issue with archives by adding error handling in current values + +cherry-pick upstream commit:- + ac02934682e96a1bfd977c1b89b60d15878eef95 + fc82b0bc4a89722094a07ec1acdd37028ca710b6 + c8bdc0fa919b3534bd7184cc1aaaac1e3ca01188 + 94e2e6da2ccea5df70253037ce1106e44c5e2a68 + 1ce54e647bc8dfab4b313c39db005f16d10b87c4 + a0e2447506c1579d1a936d7b1b25c736b560bd07 + 60d436e929b8964b1eea035a4d69fa17a5108d6c +Signed-off-by: Sagar Sagar +Orabug: 34830203 +Orabug: 34891338 +Orabug: 34869451 +--- + src/pcp/mpstat/pcp-mpstat.py | 45 +++- + src/pcp/pidstat/pcp-pidstat.py | 3 + + src/pcp/ps/pcp-ps.py | 238 +++++++++--------- + .../test/process_state_util_reporter_test.py | 5 +- + src/pcp/ps/test/process_statusutil_test.py | 50 ++-- + 5 files changed, 188 insertions(+), 153 deletions(-) + +diff --git a/src/pcp/mpstat/pcp-mpstat.py b/src/pcp/mpstat/pcp-mpstat.py +index fefb6aae7..ad73fd6c8 100755 +--- a/src/pcp/mpstat/pcp-mpstat.py ++++ b/src/pcp/mpstat/pcp-mpstat.py +@@ -108,7 +108,10 @@ class MetricRepository: + if instance is not None: + return dict(map(lambda x: (x[0].inst, x[2]), self.group[metric].netValues)) + else: +- return self.group[metric].netValues[0][2] ++ if self.group[metric].netValues == []: ++ return None ++ else: ++ return self.group[metric].netValues[0][2] + + def __fetch_previous_values(self,metric,instance): + if instance is not None: +@@ -140,9 +143,11 @@ class CoreCpuUtil: + c_time = self.metric_repository.current_value(metric, self.instance) + if p_time is not None and c_time is not None: + value = (100*(c_time - p_time))/(1000*self.delta_time) +- if self.instance is None: ++ if self.instance is None and self.total_cpus() is not None: + return float("%.2f"%(value/self.total_cpus())) + else: ++ if self.total_cpus() is None: ++ return None + return float("%.2f"%(value)) + + else: +@@ -154,9 +159,11 @@ class CoreCpuUtil: + c_time = self.metric_repository.current_value(metric, self.instance) + if p_time is not None and c_time is not None: + value = (100*(c_time - p_time))/(1000*self.delta_time) +- if self.instance is None: ++ if self.instance is None and self.total_cpus() is not None: + return float("%.2f"%(value/self.total_cpus())) + else: ++ if self.total_cpus() is None: ++ return None + return float("%.2f"%(value)) + else: + return None +@@ -167,9 +174,11 @@ class CoreCpuUtil: + c_time = self.metric_repository.current_value(metric, self.instance) + if p_time is not None and c_time is not None: + value = (100*(c_time - p_time))/(1000*self.delta_time) +- if self.instance is None: ++ if self.instance is None and self.total_cpus() is not None: + return float("%.2f"%(value/self.total_cpus())) + else: ++ if self.total_cpus() is None: ++ return None + return float("%.2f"%(value)) + else: + return None +@@ -180,9 +189,11 @@ class CoreCpuUtil: + c_time = self.metric_repository.current_value(metric, self.instance) + if p_time is not None and c_time is not None: + value = (100*(c_time - p_time))/(1000*self.delta_time) +- if self.instance is None: ++ if self.instance is None and self.total_cpus() is not None: + return float("%.2f"%(value/self.total_cpus())) + else: ++ if self.total_cpus() is None: ++ return None + return float("%.2f"%(value)) + else: + return None +@@ -193,9 +204,11 @@ class CoreCpuUtil: + c_time = self.metric_repository.current_value(metric, self.instance) + if p_time is not None and c_time is not None: + value = (100*(c_time - p_time))/(1000*self.delta_time) +- if self.instance is None: ++ if self.instance is None and self.total_cpus() is not None: + return float("%.2f"%(value/self.total_cpus())) + else: ++ if self.total_cpus() is None: ++ return None + return float("%.2f"%(value)) + else: + return None +@@ -206,9 +219,11 @@ class CoreCpuUtil: + c_time = self.metric_repository.current_value(metric, self.instance) + if p_time is not None and c_time is not None: + value = (100*(c_time - p_time))/(1000*self.delta_time) +- if self.instance is None: ++ if self.instance is None and self.total_cpus() is not None: + return float("%.2f"%(value/self.total_cpus())) + else: ++ if self.total_cpus() is None: ++ return None + return float("%.2f"%(value)) + else: + return None +@@ -219,9 +234,11 @@ class CoreCpuUtil: + c_time = self.metric_repository.current_value(metric, self.instance) + if p_time is not None and c_time is not None: + value = (100*(c_time - p_time))/(1000*self.delta_time) +- if self.instance is None: ++ if self.instance is None and self.total_cpus() is not None: + return float("%.2f"%(value/self.total_cpus())) + else: ++ if self.total_cpus() is None: ++ return None + return float("%.2f"%(value)) + else: + return None +@@ -232,9 +249,11 @@ class CoreCpuUtil: + c_time = self.metric_repository.current_value(metric, self.instance) + if p_time is not None and c_time is not None: + value = (100*(c_time - p_time))/(1000*self.delta_time) +- if self.instance is None: ++ if self.instance is None and self.total_cpus() is not None: + return float("%.2f"%(value/self.total_cpus())) + else: ++ if self.total_cpus() is None: ++ return None + return float("%.2f"%(value)) + else: + return None +@@ -245,9 +264,11 @@ class CoreCpuUtil: + c_time = self.metric_repository.current_value(metric, self.instance) + if p_time is not None and c_time is not None: + value = (100*(c_time - p_time))/(1000*self.delta_time) +- if self.instance is None: ++ if self.instance is None and self.total_cpus() is not None: + return float("%.2f"%(value/self.total_cpus())) + else: ++ if self.total_cpus() is None: ++ return None + return float("%.2f"%(value)) + else: + return None +@@ -258,9 +279,11 @@ class CoreCpuUtil: + c_time = self.metric_repository.current_value(metric, self.instance) + if p_time is not None and c_time is not None: + value = (100*(c_time - p_time))/(1000*self.delta_time) +- if self.instance is None: ++ if self.instance is None and self.total_cpus() is not None: + return float("%.2f"%(value/self.total_cpus())) + else: ++ if self.total_cpus() is None: ++ return None + return float("%.2f"%(value)) + else: + return None +diff --git a/src/pcp/pidstat/pcp-pidstat.py b/src/pcp/pidstat/pcp-pidstat.py +index 888527ca8..a086e0f88 100755 +--- a/src/pcp/pidstat/pcp-pidstat.py ++++ b/src/pcp/pidstat/pcp-pidstat.py +@@ -21,6 +21,7 @@ + import sys + import re + import time ++import signal + from pcp import pmcc + from pcp import pmapi + +@@ -1033,5 +1034,7 @@ if __name__ == "__main__": + except pmapi.pmUsageErr as usage: + usage.message() + sys.exit(1) ++ except IOError: ++ signal.signal(signal.SIGPIPE, signal.SIG_DFL) + except KeyboardInterrupt: + pass +diff --git a/src/pcp/ps/pcp-ps.py b/src/pcp/ps/pcp-ps.py +index f05cbe755..6e2e9f4ac 100755 +--- a/src/pcp/ps/pcp-ps.py ++++ b/src/pcp/ps/pcp-ps.py +@@ -20,18 +20,17 @@ + + import sys + import time ++import signal + from pcp import pmcc + from pcp import pmapi + from cpmapi import PM_CONTEXT_ARCHIVE + +-import datetime +- + process_state_info = {} + + PSSTAT_METRICS = ['kernel.uname.nodename', 'kernel.uname.release', 'kernel.uname.sysname', + 'kernel.uname.machine', 'hinv.ncpu', 'proc.psinfo.pid', 'proc.psinfo.guest_time', + 'proc.psinfo.utime', 'proc.psinfo.ppid', 'proc.psinfo.rt_priority', 'proc.psinfo.rss', +- 'proc.id.uid_nm', 'proc.psinfo.stime', 'kernel.all.uptime', 'proc.psinfo.sname', ++ 'proc.id.uid_nm', 'proc.psinfo.stime', 'kernel.all.boottime', 'proc.psinfo.sname', + 'proc.psinfo.start_time', 'proc.psinfo.vsize', 'proc.psinfo.priority', + 'proc.psinfo.nice', 'proc.psinfo.wchan_s', 'proc.psinfo.psargs', 'proc.psinfo.cmd', + 'proc.psinfo.ttyname', 'mem.physmem', 'proc.psinfo.policy'] +@@ -43,6 +42,7 @@ class StdoutPrinter: + def Print(self, args): + print(args) + ++ + class NoneHandlingPrinterDecorator: + def __init__(self, printer): + self.printer = printer +@@ -288,17 +288,18 @@ class ProcessStatusUtil: + else: + return c_systime - p_systime + +- def age(self): ++ def start(self): + s_time = self.__metric_repository.current_value('proc.psinfo.start_time', self.instance) + group = manager['psstat'] +- kernel_uptime = group['kernel.all.uptime'].netValues[0][2] +- timefmt = "%H:%M:%S" +- age = kernel_uptime - (s_time / 1000) +- res = datetime.datetime.now() - datetime.timedelta(seconds=age) +- if res.date() - datetime.datetime.now().date(): +- return res.date() ++ kernel_boottime = group['kernel.all.boottime'].netValues[0][2] ++ ts = group.contextCache.pmLocaltime(int(0.5 + kernel_boottime + (s_time / 1000))) ++ if group.timestamp.tv_sec - int(0.5 + kernel_boottime + s_time / 1000) >= 24*60*60: ++ # started one day or more ago, use MmmDD HH:MM ++ return time.strftime("%b%d %H:%M", ts.struct_time()) + else: +- return res.strftime(timefmt) ++ # started less than one day ago, use HH:MM:SS ++ return time.strftime("%H:%M:%S", ts.struct_time()) ++ + + def total_time(self): + c_usertime = self.__metric_repository.current_value('proc.psinfo.stime', self.instance) +@@ -338,7 +339,7 @@ class ProcessStatusUtil: + + PIDINFO_PAIR = {"%cpu": ('%CPU', ProcessStatusUtil.system_percent), + "%mem": ('%MEM', ProcessStatusUtil.mem), +- "start": ("START\t", ProcessStatusUtil.age), ++ "start": ("START\t", ProcessStatusUtil.start), + "time": ("TIME\t", ProcessStatusUtil.total_time), + "cls": ("CLS", ProcessStatusUtil.policy), + "cmd": ("Command\t\t\t", ProcessStatusUtil.process_name_with_args), +@@ -408,19 +409,19 @@ class DynamicProcessReporter: + self.printer("%s%s%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t\t%s" % + (timestamp, value_indentation, process.user_name(), process.pid(), process.ppid(), + process.priority(), total_percent, process.system_percent(), process.vsize(), +- process.rss(), current_process_sname, process.age(), process.total_time(), wchan, ++ process.rss(), current_process_sname, process.start(), process.total_time(), wchan, + process_name)) + elif len(wchan) >= 15: + self.printer("%s%s%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % + (timestamp, value_indentation, process.user_name(), process.pid(), process.ppid(), + process.priority(), total_percent, process.system_percent(), process.vsize(), +- process.rss(), current_process_sname, process.age(), process.total_time(), wchan, ++ process.rss(), current_process_sname, process.start(), process.total_time(), wchan, + process_name)) + else: + self.printer("%s%s%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t\t\t%s" % + (timestamp, value_indentation, process.user_name(), process.pid(), process.ppid(), + process.priority(), total_percent, process.system_percent(), process.vsize(), +- process.rss(), current_process_sname, process.age(), process.total_time(), wchan, ++ process.rss(), current_process_sname, process.start(), process.total_time(), wchan, + process_name)) + elif self.processStatOptions.colum_list is not None: + header = "Timestamp" + '\t' +@@ -497,7 +498,7 @@ class ProcessStatusReporter: + self.printer("%s%s%s\t\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % ( + timestamp, value_indentation, process.user_name(), process.pid(), + process.system_percent(), process.total_percent(), process.vsize(), process.rss(), +- process.tty_name(), process.ppid(), process.total_time(), process.age(), ++ process.tty_name(), process.ppid(), process.total_time(), process.start(), + process.process_name())) + + elif self.processStatOptions.user_oriented_format: +@@ -508,7 +509,7 @@ class ProcessStatusReporter: + self.printer("%s%s%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % ( + timestamp, value_indentation, process.user_name(), process.pid(), + process.system_percent(), process.total_percent(), process.vsize(), process.rss(), +- process.tty_name(), process.s_name(), process.total_time(), process.age(), ++ process.tty_name(), process.s_name(), process.total_time(), process.start(), + process.process_name())) + + elif self.processStatOptions.command_filter_flag: +@@ -549,106 +550,109 @@ class ProcessstatReport(pmcc.MetricGroupPrinter): + return group['hinv.ncpu'].netValues[0][2] + + def report(self, manager): +- group = manager['psstat'] +- if group['proc.psinfo.utime'].netPrevValues is None: +- # need two fetches to report rate converted counter metrics +- return ++ try: ++ group = manager['psstat'] ++ if group['proc.psinfo.utime'].netPrevValues is None: ++ # need two fetches to report rate converted counter metrics ++ return + +- if not group['hinv.ncpu'].netValues or not group['kernel.uname.sysname'].netValues: +- return ++ if not group['hinv.ncpu'].netValues or not group['kernel.uname.sysname'].netValues: ++ return + +- try: +- if not self.Machine_info_count: +- self.print_machine_info(group, manager) +- self.Machine_info_count = 1 +- except IndexError: +- # missing some metrics +- return +- +- ts = group.contextCache.pmLocaltime(int(group.timestamp)) +- timestamp = time.strftime(ProcessStatOptions.timefmt, ts.struct_time()) +- interval_in_seconds = self.timeStampDelta(group) +- header_indentation = " " if len(timestamp) < 9 else (len(timestamp) - 7) * " " +- value_indentation = ((len(header_indentation) + 9) - len(timestamp)) * " " +- +- metric_repository = ReportingMetricRepository(group) +- +- # Doing this for one single print instance in case there is no count specified +- if ProcessStatOptions.print_count is None: +- ProcessStatOptions.print_count = 1 +- +- # ============================================================================================================= +- if ProcessStatOptions.show_all_process: +- process_report = ProcessStatus(metric_repository) +- process_filter = ProcessFilter(ProcessStatOptions) +- stdout = StdoutPrinter() +- printdecorator = NoneHandlingPrinterDecorator(stdout) +- report = ProcessStatusReporter(process_report, process_filter, interval_in_seconds, printdecorator.Print, +- ProcessStatOptions) +- report.print_report(timestamp, header_indentation, value_indentation) +- +- if ProcessStatOptions.empty_arg_flag: +- process_report = ProcessStatus(metric_repository) +- process_filter = ProcessFilter(ProcessStatOptions) +- stdout = StdoutPrinter() +- printdecorator = NoneHandlingPrinterDecorator(stdout) +- report = ProcessStatusReporter(process_report, process_filter, interval_in_seconds, printdecorator.Print, +- ProcessStatOptions) +- report.print_report(timestamp, header_indentation, value_indentation) +- +- if ProcessStatOptions.pid_filter_flag: +- process_report = ProcessStatus(metric_repository) +- process_filter = ProcessFilter(ProcessStatOptions) +- stdout = StdoutPrinter() +- printdecorator = NoneHandlingPrinterDecorator(stdout) +- report = ProcessStatusReporter(process_report, process_filter, interval_in_seconds, printdecorator.Print, +- ProcessStatOptions) +- report.print_report(timestamp, header_indentation, value_indentation) +- if ProcessStatOptions.ppid_filter_flag: +- process_report = ProcessStatus(metric_repository) +- process_filter = ProcessFilter(ProcessStatOptions) +- stdout = StdoutPrinter() +- printdecorator = NoneHandlingPrinterDecorator(stdout) +- report = ProcessStatusReporter(process_report, process_filter, interval_in_seconds, printdecorator.Print, +- ProcessStatOptions) +- report.print_report(timestamp, header_indentation, value_indentation) +- +- if ProcessStatOptions.command_filter_flag: +- process_report = ProcessStatus(metric_repository) +- process_filter = ProcessFilter(ProcessStatOptions) +- stdout = StdoutPrinter() +- printdecorator = NoneHandlingPrinterDecorator(stdout) +- report = ProcessStatusReporter(process_report, process_filter, interval_in_seconds, printdecorator.Print, +- ProcessStatOptions) +- report.print_report(timestamp, header_indentation, value_indentation) +- +- if ProcessStatOptions.user_oriented_format: +- process_report = ProcessStatus(metric_repository) +- process_filter = ProcessFilter(ProcessStatOptions) +- stdout = StdoutPrinter() +- printdecorator = NoneHandlingPrinterDecorator(stdout) +- report = ProcessStatusReporter(process_report, process_filter, interval_in_seconds, printdecorator.Print, +- ProcessStatOptions) +- report.print_report(timestamp, header_indentation, value_indentation) +- +- if ProcessStatOptions.username_filter_flag: +- process_report = ProcessStatus(metric_repository) +- process_filter = ProcessFilter(ProcessStatOptions) +- stdout = StdoutPrinter() +- printdecorator = NoneHandlingPrinterDecorator(stdout) +- report = ProcessStatusReporter(process_report, process_filter, interval_in_seconds, printdecorator.Print, +- ProcessStatOptions) +- report.print_report(timestamp, header_indentation, value_indentation) +- +- # ================================================================ +- if ProcessStatOptions.selective_colum_flag: +- process_report = ProcessStatus(metric_repository) +- process_filter = ProcessFilter(ProcessStatOptions) +- stdout = StdoutPrinter() +- printdecorator = NoneHandlingPrinterDecorator(stdout) +- report = DynamicProcessReporter(process_report, process_filter, interval_in_seconds, printdecorator.Print, +- ProcessStatOptions) +- report.print_report(timestamp, header_indentation, value_indentation) ++ try: ++ if not self.Machine_info_count: ++ self.print_machine_info(group, manager) ++ self.Machine_info_count = 1 ++ except IndexError: ++ # missing some metrics ++ return ++ ++ ts = group.contextCache.pmLocaltime(int(group.timestamp)) ++ timestamp = time.strftime(ProcessStatOptions.timefmt, ts.struct_time()) ++ interval_in_seconds = self.timeStampDelta(group) ++ header_indentation = " " if len(timestamp) < 9 else (len(timestamp) - 7) * " " ++ value_indentation = ((len(header_indentation) + 9) - len(timestamp)) * " " ++ ++ metric_repository = ReportingMetricRepository(group) ++ ++ # Doing this for one single print instance in case there is no count specified ++ if ProcessStatOptions.print_count is None: ++ ProcessStatOptions.print_count = 1 ++ ++ # ================================================================ ++ if ProcessStatOptions.show_all_process: ++ process_report = ProcessStatus(metric_repository) ++ process_filter = ProcessFilter(ProcessStatOptions) ++ stdout = StdoutPrinter() ++ printdecorator = NoneHandlingPrinterDecorator(stdout) ++ report = ProcessStatusReporter(process_report, process_filter, interval_in_seconds, ++ printdecorator.Print, ProcessStatOptions) ++ report.print_report(timestamp, header_indentation, value_indentation) ++ ++ if ProcessStatOptions.empty_arg_flag: ++ process_report = ProcessStatus(metric_repository) ++ process_filter = ProcessFilter(ProcessStatOptions) ++ stdout = StdoutPrinter() ++ printdecorator = NoneHandlingPrinterDecorator(stdout) ++ report = ProcessStatusReporter(process_report, process_filter, interval_in_seconds, ++ printdecorator.Print, ProcessStatOptions) ++ report.print_report(timestamp, header_indentation, value_indentation) ++ ++ if ProcessStatOptions.pid_filter_flag: ++ process_report = ProcessStatus(metric_repository) ++ process_filter = ProcessFilter(ProcessStatOptions) ++ stdout = StdoutPrinter() ++ printdecorator = NoneHandlingPrinterDecorator(stdout) ++ report = ProcessStatusReporter(process_report, process_filter, interval_in_seconds, ++ printdecorator.Print, ProcessStatOptions) ++ report.print_report(timestamp, header_indentation, value_indentation) ++ if ProcessStatOptions.ppid_filter_flag: ++ process_report = ProcessStatus(metric_repository) ++ process_filter = ProcessFilter(ProcessStatOptions) ++ stdout = StdoutPrinter() ++ printdecorator = NoneHandlingPrinterDecorator(stdout) ++ report = ProcessStatusReporter(process_report, process_filter, interval_in_seconds, ++ printdecorator.Print, ProcessStatOptions) ++ report.print_report(timestamp, header_indentation, value_indentation) ++ ++ if ProcessStatOptions.command_filter_flag: ++ process_report = ProcessStatus(metric_repository) ++ process_filter = ProcessFilter(ProcessStatOptions) ++ stdout = StdoutPrinter() ++ printdecorator = NoneHandlingPrinterDecorator(stdout) ++ report = ProcessStatusReporter(process_report, process_filter, interval_in_seconds, ++ printdecorator.Print, ProcessStatOptions) ++ report.print_report(timestamp, header_indentation, value_indentation) ++ ++ if ProcessStatOptions.user_oriented_format: ++ process_report = ProcessStatus(metric_repository) ++ process_filter = ProcessFilter(ProcessStatOptions) ++ stdout = StdoutPrinter() ++ printdecorator = NoneHandlingPrinterDecorator(stdout) ++ report = ProcessStatusReporter(process_report, process_filter, interval_in_seconds, ++ printdecorator.Print, ProcessStatOptions) ++ report.print_report(timestamp, header_indentation, value_indentation) ++ ++ if ProcessStatOptions.username_filter_flag: ++ process_report = ProcessStatus(metric_repository) ++ process_filter = ProcessFilter(ProcessStatOptions) ++ stdout = StdoutPrinter() ++ printdecorator = NoneHandlingPrinterDecorator(stdout) ++ report = ProcessStatusReporter(process_report, process_filter, interval_in_seconds, ++ printdecorator.Print, ProcessStatOptions) ++ report.print_report(timestamp, header_indentation, value_indentation) ++ ++ # ================================================================ ++ if ProcessStatOptions.selective_colum_flag: ++ process_report = ProcessStatus(metric_repository) ++ process_filter = ProcessFilter(ProcessStatOptions) ++ stdout = StdoutPrinter() ++ printdecorator = NoneHandlingPrinterDecorator(stdout) ++ report = DynamicProcessReporter(process_report, process_filter, interval_in_seconds, ++ printdecorator.Print, ProcessStatOptions) ++ report.print_report(timestamp, header_indentation, value_indentation) ++ finally: ++ sys.stdout.flush() + + + class ProcessStatOptions(pmapi.pmOptions): +@@ -724,7 +728,7 @@ class ProcessStatOptions(pmapi.pmOptions): + # """Override standard Pcp-ps option to show all process """ + return bool(opts in ['p', 'c', 'o', 'P', 'U']) + +- def extraOptions(self, opts, optarg,index): ++ def extraOptions(self, opts, optarg, index): + if opts == 'e': + ProcessStatOptions.show_all_process = True + elif opts == 'c': +@@ -812,6 +816,8 @@ if __name__ == "__main__": + except pmapi.pmUsageErr as usage: + usage.message() + sys.exit(1) ++ except IOError: ++ signal.signal(signal.SIGPIPE, signal.SIG_DFL) + except KeyboardInterrupt: + print("Interrupted") + sys.exit(0) +diff --git a/src/pcp/ps/test/process_state_util_reporter_test.py b/src/pcp/ps/test/process_state_util_reporter_test.py +index f473351b5..e7a30364d 100755 +--- a/src/pcp/ps/test/process_state_util_reporter_test.py ++++ b/src/pcp/ps/test/process_state_util_reporter_test.py +@@ -15,7 +15,7 @@ + # + from mock import Mock + import unittest +-from pcp_ps import ProcessStateReporter ++from pcp_ps import ProcessStatusReporter + + + class TestProcessStateReporter(unittest.TestCase): +@@ -35,11 +35,12 @@ class TestProcessStateReporter(unittest.TestCase): + + def test_print_report_with_user_name(self): + self.options.show_all_process = True ++ self.options.print_count=1 + process_stack_util = Mock() + process_filter = Mock() + printer = Mock() + process_filter.filter_processes = Mock(return_value=self.processes) +- reporter = ProcessStateReporter(process_stack_util, process_filter, 1.34, printer, self.options) ++ reporter = ProcessStatusReporter(process_stack_util, process_filter, 1.34, printer, self.options) + + reporter.print_report(123, " ", " ") + +diff --git a/src/pcp/ps/test/process_statusutil_test.py b/src/pcp/ps/test/process_statusutil_test.py +index 8ef45b451..7d2c9797e 100755 +--- a/src/pcp/ps/test/process_statusutil_test.py ++++ b/src/pcp/ps/test/process_statusutil_test.py +@@ -16,7 +16,7 @@ + + import mock + import unittest +-from pcp_ps import ProcessStatus ++from pcp_ps import ProcessStatusUtil + + + class TestProcessStackUtil(unittest.TestCase): +@@ -71,88 +71,90 @@ class TestProcessStackUtil(unittest.TestCase): + def test_stack_referenced_size(self): + self.skipTest(reason="Implement when suitable metric is found") + ++ #These are blank spaces in assert case been addded ++ #to match the format of function ouput.please don't remove + def test_username(self): +- process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ process_status_usage = ProcessStatusUtil(1, 1.34, self.__metric_repository) + name = process_status_usage.user_name() +- self.assertEqual(name, "test") ++ self.assertEqual(name, "test ") + + def test_Processname(self): +- process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ process_status_usage = ProcessStatusUtil(1, 1.34, self.__metric_repository) + name = process_status_usage.process_name() +- self.assertEqual(name, "test") ++ self.assertEqual(name, "test ") + + def test_process_name_with_args(self): +- process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ process_status_usage = ProcessStatusUtil(1, 1.34, self.__metric_repository) + name = process_status_usage.process_name_with_args() +- self.assertEqual(name, "test") ++ self.assertEqual(name, "test ") + + def test_vszie(self): +- process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ process_status_usage = ProcessStatusUtil(1, 1.34, self.__metric_repository) + vsize = process_status_usage.vsize() + self.assertEqual(vsize, 1) + + def test_rss(self): +- process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ process_status_usage = ProcessStatusUtil(1, 1.34, self.__metric_repository) + vsize = process_status_usage.rss() + self.assertEqual(vsize, 1) + + def test_mem(self): +- process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ process_status_usage = ProcessStatusUtil(1, 1.34, self.__metric_repository) + vsize = process_status_usage.mem() + self.assertEqual(vsize, 100) + + def test_pid(self): +- process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ process_status_usage = ProcessStatusUtil(1, 1.34, self.__metric_repository) + pid = process_status_usage.pid() +- self.assertEqual(pid, 1) ++ self.assertEqual(pid,'1 ') + + def test_process_name(self): +- process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ process_status_usage = ProcessStatusUtil(1, 1.34, self.__metric_repository) + name = process_status_usage.process_name() +- self.assertEqual(name, 'test') ++ self.assertEqual(name, 'test ') + + def test_user_id(self): +- process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ process_status_usage = ProcessStatusUtil(1, 1.34, self.__metric_repository) + user_id = process_status_usage.user_id() + self.assertEqual(user_id, 1) + + def test_s_name(self): +- process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ process_status_usage = ProcessStatusUtil(1, 1.34, self.__metric_repository) + name = process_status_usage.s_name() + self.assertEqual(name, 'R') + + def test_cpu_number(self): +- process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ process_status_usage = ProcessStatusUtil(1, 1.34, self.__metric_repository) + name = process_status_usage.cpu_number() + self.assertEqual(name, 1) + + def test_wchan_s(self): +- process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ process_status_usage = ProcessStatusUtil(1, 1.34, self.__metric_repository) + name = process_status_usage.wchan_s() +- self.assertEqual(name, 'test') ++ self.assertEqual(name, 'test ') + + def test_priority(self): +- process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ process_status_usage = ProcessStatusUtil(1, 1.34, self.__metric_repository) + name = process_status_usage.priority() + self.assertEqual(name, 1) + + def test_tty_name(self): +- process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ process_status_usage = ProcessStatusUtil(1, 1.34, self.__metric_repository) + name = process_status_usage.tty_name() + self.assertEqual(name, 'tty') + + def test_start_time(self): +- process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ process_status_usage = ProcessStatusUtil(1, 1.34, self.__metric_repository) + name = process_status_usage.start_time() + self.assertEqual(name, 1) + + def test_func_state(self): +- process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ process_status_usage = ProcessStatusUtil(1, 1.34, self.__metric_repository) + name = process_status_usage.func_state() + self.assertEqual(name, 'N/A') + + def test_policy(self): +- process_status_usage = ProcessStatus(1, 1.34, self.__metric_repository) ++ process_status_usage = ProcessStatusUtil(1, 1.34, self.__metric_repository) + name = process_status_usage.policy() + self.assertEqual(name, 'FIFO') + +-- +2.31.1 + diff --git a/SOURCES/1005-Fixed-PCP-python-utility-issues.patch b/SOURCES/1005-Fixed-PCP-python-utility-issues.patch new file mode 100644 index 0000000..b06bff1 --- /dev/null +++ b/SOURCES/1005-Fixed-PCP-python-utility-issues.patch @@ -0,0 +1,315 @@ +From 752bfc9fc16c1e432c3c7534416d2b2b0e3f0713 Mon Sep 17 00:00:00 2001 +From: sagar sagar +Date: Mon, 29 May 2023 12:48:41 +0530 +Subject: [PATCH] Fixed PCP python utility issues + +Fixed issue where initially created files by pmie failed to read +Fixed broken pipe issue in pcp-mpstat utility +Fixed exception in pcp-ps utility for process name + +Orabug: 35434363 +Signed-off-by: sagar sagar +--- + qa/883 | 4 ++ + qa/883.out | 7 ++ + qa/915 | 6 +- + qa/archives/GNUmakefile | 20 ++++++ + src/libpcp_web/src/query_parser.y | 21 ++++-- + src/pcp/mpstat/pcp-mpstat.py | 106 ++++++++++++++++++++---------- + src/pcp/ps/pcp-ps.py | 16 +++-- + 7 files changed, 133 insertions(+), 47 deletions(-) + +diff --git a/qa/883 b/qa/883 +index 4c798c352..fdc124fcb 100755 +--- a/qa/883 ++++ b/qa/883 +@@ -23,6 +23,7 @@ test -x $pcp_mpstat || _notrun "No pcp-mpstat(1) installed" + pcp_mpstat="$python $pcp_mpstat" + pcp_archive="-z -a archives/pcp-mpstat" + pcp_archive2="-z -a archives/pcp-mpstat2" ++pcp_archive3="-z -a archives/pcp-mpstat3" + + # real QA test starts here + export LC_TIME=POSIX +@@ -66,6 +67,9 @@ pcp $pcp_archive2 mpstat -I SCPU -s 2 + echo && echo === pcp-mpstat hard interrupt usage without metrics + pcp $pcp_archive2 mpstat -I CPU -s 2 + ++echo && echo === pcp-mpstat with log-once summary metric archive ++pcp $pcp_archive3 mpstat ++ + # success, all done + status=0 + exit +diff --git a/qa/883.out b/qa/883.out +index 2a975cd29..be7088cb8 100644 +--- a/qa/883.out ++++ b/qa/883.out +@@ -198,3 +198,10 @@ Timestamp CPU + 23:52:55 1 + 23:52:55 2 + 23:52:55 3 ++ ++=== pcp-mpstat with log-once summary metric archive ++Linux 4.4.0-31-generic (ram-Lenovo) 08/02/16 x86_64 (4 CPU) ++ ++Timestamp CPU %usr %nice %sys %iowait %irq %soft %steal %guest %nice %idle ++23:52:55 all 4.58 0.0 26.38 4.58 0.0 0.0 0.0 0.0 0.0 63.12 ++23:52:56 all 4.75 0.0 27.0 4.5 0.0 0.0 0.0 0.0 0.0 63.0 +diff --git a/qa/915 b/qa/915 +index 3217f9b62..e4bab5fcd 100755 +--- a/qa/915 ++++ b/qa/915 +@@ -131,11 +131,13 @@ echo quit | pmlc -h localhost -P 2>&1 | _filter + echo; echo "== checking bad pmlogger access, expect no control" + echo quit | pmlc -h $interface -P 2>&1 | _filter + +-echo; echo "== checking bad pmproxy access, expect no values" ++echo; echo "== checking bad pmproxy access, expect no values" | tee -a $here/$seq.full + pminfo -f -h localhost@$interface pmcd.feature.local 2>&1 | _filter ++cat $PCP_LOG_DIR/pmproxy/pmproxy.log >> $here/$seq.full + +-echo; echo "== checking loop pmproxy access, expecting success" ++echo; echo "== checking loop pmproxy access, expecting success" | tee -a $here/$seq.full + pminfo -f -h localhost@localhost pmcd.feature.local 2>&1 | _filter ++cat $PCP_LOG_DIR/pmproxy/pmproxy.log >> $here/$seq.full + + # success, all done + status=0 +diff --git a/qa/archives/GNUmakefile b/qa/archives/GNUmakefile +index 31d51dd45..005ca231f 100644 +--- a/qa/archives/GNUmakefile ++++ b/qa/archives/GNUmakefile +@@ -150,3 +150,23 @@ pcp-mpstat2.0: + pmlogextract -c tmp/config pcp-mpstat pcp-mpstat2 + rm -rf tmp + ++# variant of the mpstat2 archive with log-once summary metrics ++# ++pcp-mpstat3.0: pcp-mpstat2.0 ++ rm -rf tmp ++ mkdir tmp ++ pminfo -a pcp-mpstat2 \ ++ | sed \ ++ -e '/^kernel.uname./d' \ ++ -e '/^hinv.ncpu/d' \ ++ > tmp/config-body ++ pminfo -a pcp-mpstat2 \ ++ | grep -E '^kernel.uname.|^hinv.ncpu' \ ++ > tmp/config-head ++ pmlogextract -c tmp/config-head -s 1 pcp-mpstat2 pcp-mpstat3-head ++ pmlogextract -c tmp/config-body pcp-mpstat2 pcp-mpstat3-body ++ pmlogextract pcp-mpstat3-head pcp-mpstat3-body pcp-mpstat3 ++ mv pcp-mpstat3.0 tmp ++ ../src/stripmark tmp/pcp-mpstat3.0 pcp-mpstat3.0 ++ rm -rf tmp pcp-mpstat3-head.* pcp-mpstat3-body.* ++ +diff --git a/src/libpcp_web/src/query_parser.y b/src/libpcp_web/src/query_parser.y +index 20b92489c..7badd8711 100644 +--- a/src/libpcp_web/src/query_parser.y ++++ b/src/libpcp_web/src/query_parser.y +@@ -1118,10 +1118,23 @@ newmetric(char *name) + else + node = newnode(N_EQ); + +- node->left = newnode(N_NAME); +- node->left->value = sdsnew("metric.name"); +- node->right = newnode(N_STRING); +- node->right->value = sdsnew(name); ++ if (node) { ++ if ((node->left = newnode(N_NAME)) == NULL) { ++ sdsfree(name); ++ free(node); ++ return NULL; ++ } ++ if ((node->right = newnode(N_STRING)) == NULL) { ++ sdsfree(name); ++ free(node->left); ++ free(node); ++ return NULL; ++ } ++ node->left->value = sdsnew("metric.name"); ++ node->right->value = name; ++ } else { ++ sdsfree(name); ++ } + return node; + } + +diff --git a/src/pcp/mpstat/pcp-mpstat.py b/src/pcp/mpstat/pcp-mpstat.py +index ad73fd6c8..5b761a5a7 100755 +--- a/src/pcp/mpstat/pcp-mpstat.py ++++ b/src/pcp/mpstat/pcp-mpstat.py +@@ -15,6 +15,7 @@ + # pylint: disable=bad-whitespace,line-too-long + # pylint: disable=redefined-outer-name,unnecessary-lambda + # ++import signal + from pcp import pmapi + from pcp import pmcc + import sys +@@ -588,6 +589,11 @@ class DisplayOptions: + + class MpstatReport(pmcc.MetricGroupPrinter): + Machine_info_count = 0 ++ ncpu = 1 ++ machine = '' ++ release = '' ++ sysname = '' ++ nodename = '' + + def __init__(self, cpu_util_reporter, total_interrupt_usage_reporter, soft_interrupt_usage_reporter, hard_interrupt_usage_reporter): + self.cpu_util_reporter = cpu_util_reporter +@@ -601,6 +607,7 @@ class MpstatReport(pmcc.MetricGroupPrinter): + return s + u / 1000000.0 + + def print_machine_info(self,group, context): ++ self.get_summary_metrics(group) + timestamp = context.pmLocaltime(group.timestamp.tv_sec) + # Please check strftime(3) for different formatting options. + # Also check TZ and LC_TIME environment variables for more information +@@ -608,44 +615,71 @@ class MpstatReport(pmcc.MetricGroupPrinter): + time_string = time.strftime("%x", timestamp.struct_time()) + + header_string = '' +- header_string += group['kernel.uname.sysname'].netValues[0][2] + ' ' +- header_string += group['kernel.uname.release'].netValues[0][2] + ' ' +- header_string += '(' + group['kernel.uname.nodename'].netValues[0][2] + ') ' ++ header_string += self.sysname + ' ' ++ header_string += self.release + ' ' ++ header_string += '(' + self.nodename + ') ' + header_string += time_string + ' ' +- header_string += group['kernel.uname.machine'].netValues[0][2] + ' ' +- no_cpu = self.get_ncpu(group) +- print("%s (%s CPU)" % (header_string,no_cpu)) +- +- def get_ncpu(self,group): +- return group['hinv.ncpu'].netValues[0][2] ++ header_string += self.machine + ' ' ++ header_string += '(' + str(self.ncpu) + ' CPU)' ++ print(header_string) ++ ++ def get_summary_metrics(self,group): ++ # extract metrics safely which may have 'logged-once' semantics; ++ # we checked earlier so know the metrics exist once at least, so ++ # fallback to previous observed value if not in latest sample - ++ # always try though in case a later sample finds updated values. ++ try: ++ self.ncpu = group['hinv.ncpu'].netValues[0][2] ++ except IndexError: ++ pass ++ try: ++ self.sysname = group['kernel.uname.sysname'].netValues[0][2] ++ except IndexError: ++ pass ++ try: ++ self.machine = group['kernel.uname.machine'].netValues[0][2] ++ except IndexError: ++ pass ++ try: ++ self.release = group['kernel.uname.release'].netValues[0][2] ++ except IndexError: ++ pass ++ try: ++ self.nodename = group['kernel.uname.nodename'].netValues[0][2] ++ except IndexError: ++ pass + + def report(self,manager): +- group = manager['mpstat'] +- if group['kernel.all.cpu.user'].netPrevValues is None: +- # need two fetches to report rate converted counter metrics +- return +- +- if self.Machine_info_count == 0: +- self.print_machine_info(group, manager) +- self.Machine_info_count = 1 +- +- timestamp = group.contextCache.pmCtime(int(group.timestamp)).rstrip().split() +- interval_in_seconds = self.timeStampDelta(group) +- metric_repository = MetricRepository(group) +- display_options = DisplayOptions(MpstatOptions) +- +- if display_options.display_cpu_usage_summary(): +- cpu_util = CpuUtil(interval_in_seconds, metric_repository) +- self.cpu_util_reporter.print_report(cpu_util, timestamp[3]) +- if display_options.display_total_cpu_usage(): +- total_interrupt_usage = TotalInterruptUsage(interval_in_seconds, metric_repository) +- self.total_interrupt_usage_reporter.print_report(total_interrupt_usage, timestamp[3]) +- if display_options.display_hard_interrupt_usage(): +- hard_interrupt_usage = HardInterruptUsage(interval_in_seconds, metric_repository, interrupts_list) +- self.hard_interrupt_usage_reporter.print_report(hard_interrupt_usage,timestamp[3]) +- if display_options.display_soft_interrupt_usage(): +- soft_interrupt_usage = SoftInterruptUsage(interval_in_seconds, metric_repository, soft_interrupts_list) +- self.soft_interrupt_usage_reporter.print_report(soft_interrupt_usage, timestamp[3]) ++ try: ++ group = manager['mpstat'] ++ if group['kernel.all.cpu.user'].netPrevValues is None: ++ # need two fetches to report rate converted counter metrics ++ self.get_summary_metrics(group) ++ return ++ ++ if self.Machine_info_count == 0: ++ self.print_machine_info(group, manager) ++ self.Machine_info_count = 1 ++ ++ timestamp = group.contextCache.pmCtime(int(group.timestamp)).rstrip().split() ++ interval_in_seconds = self.timeStampDelta(group) ++ metric_repository = MetricRepository(group) ++ display_options = DisplayOptions(MpstatOptions) ++ ++ if display_options.display_cpu_usage_summary(): ++ cpu_util = CpuUtil(interval_in_seconds, metric_repository) ++ self.cpu_util_reporter.print_report(cpu_util, timestamp[3]) ++ if display_options.display_total_cpu_usage(): ++ total_interrupt_usage = TotalInterruptUsage(interval_in_seconds, metric_repository) ++ self.total_interrupt_usage_reporter.print_report(total_interrupt_usage, timestamp[3]) ++ if display_options.display_hard_interrupt_usage(): ++ hard_interrupt_usage = HardInterruptUsage(interval_in_seconds, metric_repository, interrupts_list) ++ self.hard_interrupt_usage_reporter.print_report(hard_interrupt_usage,timestamp[3]) ++ if display_options.display_soft_interrupt_usage(): ++ soft_interrupt_usage = SoftInterruptUsage(interval_in_seconds, metric_repository, soft_interrupts_list) ++ self.soft_interrupt_usage_reporter.print_report(soft_interrupt_usage, timestamp[3]) ++ finally: ++ sys.stdout.flush() + + + +@@ -680,5 +714,7 @@ if __name__ == '__main__': + except pmapi.pmUsageErr as usage: + usage.message() + sys.exit(1) ++ except IOError: ++ signal.signal(signal.SIGPIPE, signal.SIG_DFL) + except KeyboardInterrupt: + pass +diff --git a/src/pcp/ps/pcp-ps.py b/src/pcp/ps/pcp-ps.py +index 6e2e9f4ac..dbd556556 100755 +--- a/src/pcp/ps/pcp-ps.py ++++ b/src/pcp/ps/pcp-ps.py +@@ -195,12 +195,16 @@ class ProcessStatusUtil: + return data + + def process_name(self): +- data = self.__metric_repository.current_value('proc.psinfo.cmd', self.instance)[:20] +- if len(data) < 20: +- whitespace = 20 - len(data) +- res = data.ljust(whitespace + len(data), ' ') +- return res +- else: ++ try: ++ data = self.__metric_repository.current_value('proc.psinfo.cmd', self.instance)[:20] ++ if len(data) < 20: ++ whitespace = 20 - len(data) ++ res = data.ljust(whitespace + len(data), ' ') ++ return res ++ else: ++ return data ++ except TypeError: ++ data = '-' + return data + + def process_name_with_args(self): +-- +2.39.3 + diff --git a/SOURCES/1006-pcp-meminfo-initial-PCP-implementation-of-meminfo.patch b/SOURCES/1006-pcp-meminfo-initial-PCP-implementation-of-meminfo.patch new file mode 100644 index 0000000..b0403a5 --- /dev/null +++ b/SOURCES/1006-pcp-meminfo-initial-PCP-implementation-of-meminfo.patch @@ -0,0 +1,562 @@ +From e6522f0be49a214eb9aacfbc0e948b2c523457ab Mon Sep 17 00:00:00 2001 +From: Sagar Sagar +Date: Mon, 4 Sep 2023 11:19:19 +0000 +Subject: [PATCH] pcp-meminfo : initial PCP implementation of meminfo + +This patch introduces the pcp-meminfo utility to the pcp. +It gives the output like /proc/meminfo + +Signed-off-by: Mohith Kumar Thummaluru +upstream commit-links:- 4ec9bbbb264d2766e73512ffafdaf606f17b79a0 + 125bde660464b40a06a3b0db3fa7acf99bd2b4d4 + a5cc36434c767069d2a8e6466d68fd472e56586e + 38d06784b7c6d883ce74e9bbc61601304c728791 + 5d249b060d3f961b242dadd28302497313652ddd +Orabug: 35759707 +Signed-off-by: Sagar Sagar +--- + build/rpm/pcp.spec.in | 2 +- + build/rpm/redhat.spec | 2 +- + qa/1988 | 39 +++++++ + qa/archives/GNUmakefile | 2 +- + qa/archives/mk.meminfo | 68 ++++++++++++ + qa/group | 2 + + src/pcp/GNUmakefile | 1 + + src/pcp/meminfo/GNUmakefile | 44 ++++++++ + src/pcp/meminfo/pcp-meminfo.1 | 77 +++++++++++++ + src/pcp/meminfo/pcp-meminfo.py | 195 +++++++++++++++++++++++++++++++++ + 10 files changed, 429 insertions(+), 3 deletions(-) + create mode 100755 qa/1988 + create mode 100755 qa/archives/mk.meminfo + create mode 100755 src/pcp/meminfo/GNUmakefile + create mode 100755 src/pcp/meminfo/pcp-meminfo.1 + create mode 100755 src/pcp/meminfo/pcp-meminfo.py + +diff --git a/build/rpm/pcp.spec.in b/build/rpm/pcp.spec.in +index 9e27061d3..95459942c 100755 +--- a/build/rpm/pcp.spec.in ++++ b/build/rpm/pcp.spec.in +@@ -2262,7 +2262,7 @@ basic_manifest | grep -E -e 'pmiostat|pmrep|dstat|htop|pcp2csv' \ + -e 'pcp-atop|pcp-dmcache|pcp-dstat|pcp-free|pcp-htop' \ + -e 'pcp-ipcs|pcp-iostat|pcp-lvmcache|pcp-mpstat' \ + -e 'pcp-numastat|pcp-pidstat|pcp-shping|pcp-tapestat' \ +- -e 'pcp-uptime|pcp-verify|pcp-ss|pcp-ps' | \ ++ -e 'pcp-uptime|pcp-verify|pcp-ss|pcp-ps|pcp-meminfo' | \ + cull 'selinux|pmlogconf|pmieconf|pmrepconf' >pcp-system-tools-files + basic_manifest | keep 'sar2pcp' >pcp-import-sar2pcp-files + basic_manifest | keep 'iostat2pcp' >pcp-import-iostat2pcp-files +diff --git a/build/rpm/redhat.spec b/build/rpm/redhat.spec +index adc3a6f7f..5f54a5232 100644 +--- a/build/rpm/redhat.spec ++++ b/build/rpm/redhat.spec +@@ -2434,7 +2434,7 @@ basic_manifest | grep -E -e 'pmiostat|pmrep|dstat|htop|pcp2csv' \ + -e 'pcp-atop|pcp-dmcache|pcp-dstat|pcp-free|pcp-htop' \ + -e 'pcp-ipcs|pcp-iostat|pcp-lvmcache|pcp-mpstat' \ + -e 'pcp-numastat|pcp-pidstat|pcp-shping|pcp-tapestat' \ +- -e 'pcp-uptime|pcp-verify|pcp-ss|pcp-ps' | \ ++ -e 'pcp-uptime|pcp-verify|pcp-ss|pcp-ps|pcp-meminfo' | \ + cull 'selinux|pmlogconf|pmieconf|pmrepconf' >pcp-system-tools-files + + basic_manifest | keep 'sar2pcp' >pcp-import-sar2pcp-files +diff --git a/qa/1988 b/qa/1988 +new file mode 100755 +index 000000000..8dd249134 +--- /dev/null ++++ b/qa/1988 +@@ -0,0 +1,39 @@ ++#!/bin/sh ++# PCP QA Test No. 1987 ++# Exercise various pcp-meminfo(1) command options. ++# ++# Copyright (c) 2023 Oracle and/or its affiliates. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++ ++seq=`basename $0` ++echo "QA output created by $seq" ++ ++. ./common.python ++ ++__version=`$python --version 2>&1 | sed -e 's/Python //'` ++case "$__version" ++in ++ 2.7.5) _notrun "Python $__version reports start seconds off-by one for some processes" ++ ;; ++esac ++ ++status=1 # failure is the default! ++$sudo rm -rf $tmp.* $seq.full ++trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15 ++ ++pcp_meminfo="$PCP_BINADM_DIR/pcp-meminfo" ++test -x $pcp_meminfo || _notrun "No pcp-meminfo(1) installed" ++pcp_meminfo="$python $pcp_meminfo" ++ ++# real QA test starts here ++echo && echo pcp-meminfo output : Display default output ++PCP_ARCHIVE="archives/pcp-meminfo" PCP_HOSTZONE=1 PCP_ORIGIN=1 $pcp_meminfo ++ ++archive_first="-a archives/pcp-meminfo -z -O +1" ++ ++echo && echo pcp-meminfo output : Display output when given specified number of samples ++pcp $archive_first meminfo -s 3 ++ ++status=0 ++exit +diff --git a/qa/archives/GNUmakefile b/qa/archives/GNUmakefile +index 005ca231f..2abf6425f 100644 +--- a/qa/archives/GNUmakefile ++++ b/qa/archives/GNUmakefile +@@ -65,7 +65,7 @@ SCRIPTS = mk.diff mk.gap mk.mysql mk.schizo mk.foo+ \ + mk.sample_expr mk.tzchange mk.arch-all \ + mk.atop mk.hotatop mk.atop-boot mk.atop-nvidia mk.atop-threads \ + mk.log-derived mk.vmstat mk.rep mk.procsched \ +- mk.ipcs mk.value-test mk.rank-pred mk.cputime \ ++ mk.ipcs mk.value-test mk.rank-pred mk.cputime mk.meminfo \ + mk.sample-labels mk.pmproxy mk.mmv.help + + CONFIGS = config.verify config.shping YWhcCi.toium.config \ +diff --git a/qa/archives/mk.meminfo b/qa/archives/mk.meminfo +new file mode 100755 +index 000000000..9b50717e8 +--- /dev/null ++++ b/qa/archives/mk.meminfo +@@ -0,0 +1,68 @@ ++#!/bin/sh ++# ++# remake the free archive ... ++# this archive is intended to be checked in and not remade, this script is ++# simply a record of how it was created ++# ++ ++. /etc/pcp.env ++ ++tmp=/var/tmp/$$ ++rm -f $tmp.* ++trap "rm -f $tmp.*; exit 0" 0 1 2 3 15 ++ ++cat <>$tmp.config ++log mandatory on 1 sec { ++ mem.physmem ++ mem.util.free ++ mem.util.available ++ mem.util.bufmem ++ mem.util.cached ++ mem.util.swapCached ++ mem.util.active ++ mem.util.inactive ++ mem.util.active_anon ++ mem.util.inactive_anon ++ mem.util.active_file ++ mem.util.inactive_file ++ mem.util.unevictable ++ mem.util.mlocked ++ mem.util.swapTotal ++ mem.util.swapFree ++ mem.util.dirty ++ mem.util.writeback ++ mem.util.anonpages ++ mem.util.mapped ++ mem.util.shared ++ mem.util.slab ++ mem.util.slabReclaimable ++ mem.util.slabUnreclaimable ++ mem.util.kernelStack ++ mem.util.pageTables ++ mem.util.NFS_Unstable ++ mem.util.bounce ++ mem.vmstat.nr_writeback_temp ++ mem.util.commitLimit ++ mem.util.committed_AS ++ mem.util.vmallocTotal ++ mem.util.vmallocUsed ++ mem.util.vmallocChunk ++ mem.util.corrupthardware ++ mem.util.anonhugepages ++ mem.vmstat.nr_shmem_hugepages ++ mem.vmstat.nr_shmem_pmdmapped ++ mem.zoneinfo.nr_free_cma ++ mem.util.hugepagesTotal ++ mem.util.hugepagesFree ++ mem.util.hugepagesRsvd ++ mem.util.hugepagesSurp ++ hinv.hugepagesize ++ mem.util.directMap4k ++ mem.util.directMap2M ++ mem.util.directMap1G ++} ++End-of-File ++ ++rm -f pcp-meminfo.0 pcp-meminfo.meta pcp-meminfo.index ++ ++pmlogger -s 10 -c $tmp.config pcp-meminfo +diff --git a/qa/group b/qa/group +index 63c63b7f7..96b901278 100644 +--- a/qa/group ++++ b/qa/group +@@ -367,6 +367,7 @@ pidstat + iostat + tapestat + ipcs ++meminfo + mpstat + + # full test search +@@ -1976,8 +1977,9 @@ x11 + 1984 pmlogconf pmda.redis local + 1985 pmfind local valgrind + 1986 pmfind local ++1988 pcp meminfo python local + 2101 pmda.sockets local security + 2104 libpcp local security + 2100 pmproxy local security + 2105 libpcp pmcd local security pmcd.pdu + 4751 libpcp threads valgrind local pcp helgrind +diff --git a/src/pcp/GNUmakefile b/src/pcp/GNUmakefile +index bd70c1395..8eee01260 100644 +--- a/src/pcp/GNUmakefile ++++ b/src/pcp/GNUmakefile +@@ -24,6 +24,7 @@ SUBDIRS = \ + htop \ + iostat \ + ipcs \ ++ meminfo \ + mpstat \ + numastat \ + pidstat \ +diff --git a/src/pcp/meminfo/GNUmakefile b/src/pcp/meminfo/GNUmakefile +new file mode 100755 +index 000000000..98411a7dc +--- /dev/null ++++ b/src/pcp/meminfo/GNUmakefile +@@ -0,0 +1,44 @@ ++# ++# Copyright (c) 2023 Oracle and/or its affiliates. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++# This program is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation; either version 2 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++# for more details. ++# ++ ++TOPDIR = ../../.. ++include $(TOPDIR)/src/include/builddefs ++ ++TARGET = pcp-meminfo ++SCRIPT = $(TARGET).py ++MAN_SECTION = 1 ++MAN_PAGES = $(TARGET).$(MAN_SECTION) ++MAN_DEST = $(PCP_MAN_DIR)/man$(MAN_SECTION) ++ ++default: $(SCRIPT) $(MAN_PAGES) ++ ++include $(BUILDRULES) ++ ++install: default ++ifeq "$(HAVE_PYTHON)" "true" ++ $(INSTALL) -m 755 $(SCRIPT) $(PCP_BINADM_DIR)/$(TARGET) ++ @$(INSTALL_MAN) ++endif ++ ++default_pcp : default ++ ++install_pcp : install ++ ++check:: $(SCRIPT) ++ $(PYLINT) $^ ++ ++check :: $(MAN_PAGES) ++ $(MANLINT) $^ ++ +diff --git a/src/pcp/meminfo/pcp-meminfo.1 b/src/pcp/meminfo/pcp-meminfo.1 +new file mode 100755 +index 000000000..462dd8dbc +--- /dev/null ++++ b/src/pcp/meminfo/pcp-meminfo.1 +@@ -0,0 +1,77 @@ ++'\"! tbl | mmdoc ++'\"macro stdmacro ++.\" ++.\" Copyright (c) 2023 Oracle and/or its affiliates. ++.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++.\" ++.\" This program is free software; you can redistribute it and/or modify it ++.\" under the terms of the GNU General Public License as published by the ++.\" Free Software Foundation; either version 2 of the License, or (at your ++.\" option) any later version. ++.\" ++.\" This program is distributed in the hope that it will be useful, but ++.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++.\" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++.\" for more details. ++.\" ++.TH PCP-MEMINFO 1 "PCP" "Performance Co-Pilot" ++.SH NAME ++\f3pcp-meminfo\f1 \- Report statistics for System Memory. ++.SH SYNOPSIS ++\f3pcp\f1 ++[\f2pcp\ options\f1] ++\f3meminfo\f1 ++[\f3\-s\f1 \f2samples\f1] ++[\f3\-a\f1 \f2archive\f1] ++[\f3\-S\f1 \f2start_time\f1] ++[\f3\-T\f1 \f2end_time\f1] ++.SH DESCRIPTION ++The ++.B pcp-meminfo ++command is used for viewing the different kinds of stats related to memory. ++Using various options it helps a user to analyze useful information related to ++the memory availability. ++This information includes total memory, memory available, shared memory, etc. ++By default ++.B pcp-meminfo ++reports live data for the local host. ++.SH OPTIONS ++.TP ++\fB\-a\fP, \fB\-\-archive\fP ++Fetch /proc/meminfo for a specified archive file ++.TP ++\fB\-s\fP, \fB\-\-samples\fP ++Get the meminfo for specified number of samples count ++.TP ++\fB\-S\fP, \fB\-\-START TIME\fP ++Filter the samples from the archive from the given time ++.TP ++\fB\-T\fP, \fB\-\-END TIME\fP ++Filter the samples from the archive till the given time ++.TP ++\fB\-V\fR, \fB\-\-version\fR ++Display version number and exit. ++.TP ++\fB\-?\fR, \fB\-\-help\fR ++Display usage message and exit. ++.SH NOTES ++.B pcp-meminfo ++collects information from ++.BR /proc/meminfo ++and aims to be command line and output compatible with it. ++.SH PCP ENVIRONMENT ++Environment variables with the prefix \fBPCP_\fP are used to parameterize ++the file and directory names used by PCP. ++On each installation, the ++file \fI/etc/pcp.conf\fP contains the local values for these variables. ++The \fB$PCP_CONF\fP variable may be used to specify an alternative ++configuration file, as described in \fBpcp.conf\fP(5). ++.PP ++For environment variables affecting PCP tools, see \fBpmGetOptions\fP(3). ++.SH SEE ALSO ++.BR PCPIntro (1), ++.BR pcp (1), ++.BR pmParseInterval (3) ++and ++.BR environ (7). ++ +diff --git a/src/pcp/meminfo/pcp-meminfo.py b/src/pcp/meminfo/pcp-meminfo.py +new file mode 100755 +index 000000000..57ac05e34 +--- /dev/null ++++ b/src/pcp/meminfo/pcp-meminfo.py +@@ -0,0 +1,195 @@ ++#!/usr/bin/env pmpython ++# ++# Copyright (c) 2023 Oracle and/or its affiliates. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++# This program is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation; either version 2 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++# for more details. ++# ++# pylint: disable=bad-whitespace,too-many-arguments,too-many-lines, bad-continuation ++# pylint: disable=redefined-outer-name,unnecessary-lambda ++# ++ ++import sys ++import time ++from pcp import pmapi, pmcc ++ ++METRICS = ["mem.physmem", ++ "mem.util.free", ++ "mem.util.available", ++ "mem.util.bufmem", ++ "mem.util.cached", ++ "mem.util.swapCached", ++ "mem.util.active", ++ "mem.util.inactive", ++ "mem.util.active_anon", ++ "mem.util.inactive_anon", ++ "mem.util.active_file", ++ "mem.util.inactive_file", ++ "mem.util.unevictable", ++ "mem.util.mlocked", ++ "mem.util.swapTotal", ++ "mem.util.swapFree", ++ "mem.util.dirty", ++ "mem.util.writeback", ++ "mem.util.anonpages", ++ "mem.util.mapped", ++ "mem.util.shared", ++ "mem.util.slab", ++ "mem.util.slabReclaimable", ++ "mem.util.slabUnreclaimable", ++ "mem.util.kernelStack", ++ "mem.util.pageTables", ++ "mem.util.NFS_Unstable", ++ "mem.util.bounce", ++ "mem.vmstat.nr_writeback_temp", ++ "mem.util.commitLimit", ++ "mem.util.committed_AS", ++ "mem.util.vmallocTotal", ++ "mem.util.vmallocUsed", ++ "mem.util.vmallocChunk", ++ "mem.util.corrupthardware", ++ "mem.util.anonhugepages", ++ "mem.vmstat.nr_shmem_hugepages", ++ "mem.vmstat.nr_shmem_pmdmapped", ++ "mem.zoneinfo.nr_free_cma", ++ "mem.util.hugepagesTotal", ++ "mem.util.hugepagesFree", ++ "mem.util.hugepagesRsvd", ++ "mem.util.hugepagesSurp", ++ "hinv.hugepagesize", ++ "mem.util.directMap4k", ++ "mem.util.directMap2M", ++ "mem.util.directMap1G"] ++ ++METRICS_DESC = ["MemTotal", ++ "MemFree", ++ "MemAvailable", ++ "Buffers", ++ "Cached", ++ "SwapCached", ++ "Active", ++ "Inactive", ++ "Active(anon)", ++ "Inactive(anon)", ++ "Active(file)", ++ "Inactive(file)", ++ "Unevictable", ++ "Mlocked", ++ "SwapTotal", ++ "SwapFree", ++ "Dirty", ++ "Writeback", ++ "AnonPages", ++ "Mapped", ++ "Shmem", ++ "Slab", ++ "SReclaimable", ++ "SUnreclaim", ++ "KernelStack", ++ "PageTables", ++ "NFS_Unstable", ++ "Bounce", ++ "WritebackTmp", ++ "CommitLimit", ++ "Committed_AS", ++ "VmallocTotal", ++ "VmallocUsed", ++ "VmallocChunk", ++ "HardwareCorrupted", ++ "AnonHugePages", ++ "ShmemHugePages", ++ "ShmemPmdMapped", ++ "CmaFree", ++ "HugePages_Total_NO_kb", ++ "HugePages_Free_NO_kb", ++ "HugePages_Rsvd_NO_kb", ++ "HugePages_Surp_NO_kb", ++ "Hugepagesize", ++ "DirectMap4k", ++ "DirectMap2M", ++ "DirectMap1G"] ++ ++class MeminfoReport(pmcc.MetricGroupPrinter): ++ samples = 0 ++ ++ def __init__(self, samples): ++ self.samples = samples ++ ++ def getMetricName(self, idx): ++ metric_name = "" ++ units = "" ++ if METRICS_DESC[idx][-6:] == "_NO_kb": ++ metric_name = METRICS_DESC[idx][:-6] ++ else: ++ metric_name = METRICS_DESC[idx] ++ units = "kB" ++ return metric_name, units ++ ++ def report(self, manager): ++ group = manager["meminfo"] ++ ++ opts.pmGetOptionSamples() ++ ++ t_s = group.contextCache.pmLocaltime(int(group.timestamp)) ++ time_string = time.strftime(MeminfoOptions.timefmt, t_s.struct_time()) ++ print(time_string) ++ ++ idx = 0 ++ for metric in METRICS: ++ try: ++ val = group[metric].netValues[0][2] ++ except IndexError: ++ metric_name, units = self.getMetricName(idx) ++ print(F"{metric_name:17} : NA") ++ ++ idx += 1 ++ continue ++ ++ metric_name, units = self.getMetricName(idx) ++ print(F"{metric_name:17} : {val} {units}") ++ ++ idx += 1 ++ print() ++ ++class MeminfoOptions(pmapi.pmOptions): ++ context = None ++ timefmt = "%H:%M:%S" ++ samples = 0 ++ ++ def __init__(self): ++ pmapi.pmOptions.__init__(self, "a:s:S:T:z:A:t:") ++ self.pmSetLongOptionStart() ++ self.pmSetLongOptionFinish() ++ self.pmSetLongOptionHelp() ++ ++if __name__ == '__main__': ++ try: ++ opts = MeminfoOptions() ++ mngr = pmcc.MetricGroupManager.builder(opts,sys.argv) ++ MeminfoOptions.context = mngr.type ++ ++ missing = mngr.checkMissingMetrics(METRICS) ++ if missing is not None: ++ sys.stderr.write(F"Error:Metric is {missing} missing\n") ++ sys.exit(1) ++ ++ mngr["meminfo"] = METRICS ++ mngr.printer = MeminfoReport(opts.samples) ++ sts = mngr.run() ++ sys.exit(sts) ++ ++ except pmapi.pmErr as error: ++ sys.stderr.write(F"{error.progname()} {error.message()}") ++ except pmapi.pmUsageErr as usage: ++ usage.message() ++ sys.exit(1) ++ except KeyboardInterrupt: ++ pass +-- +2.39.3 diff --git a/SOURCES/1007-pcp-slabinfo-initial-PCP-implementation-of-slabinfo.patch b/SOURCES/1007-pcp-slabinfo-initial-PCP-implementation-of-slabinfo.patch new file mode 100644 index 0000000..0ed9a3f --- /dev/null +++ b/SOURCES/1007-pcp-slabinfo-initial-PCP-implementation-of-slabinfo.patch @@ -0,0 +1,5770 @@ +From 423d008bab6694875103422c4e4a73a920c9154a Mon Sep 17 00:00:00 2001 +From: sagar sagar +Date: Tue, 1 Aug 2023 18:05:58 +0530 +Subject: [PATCH] pcp-slabinfo: initial PCP implementation of slabinfo + +This patch introduces the pcp-slabinfo utility to the pcp. +It gives the output like /proc/slabinfo + +Upstream commit-links:- 8c54bbda9cf92ec93a87007c2c8f5c2a0bd49361 + a81fbefc3d95f8481eedab486316570c47ddaf72 + 344f9e3e69089194a1efa69e8f971f2b8182d8e6 + cc705b4ead292c846bc2f91353b49f10c43e41ea +Orabug: 35560940 +Signed-off-by: Sagar Sagar +--- + qa/1989 | 42 + + qa/1989.out | 5227 ++++++++++++++++++++++++++++++ + qa/archives/GNUmakefile | 2 +- + qa/archives/mk.slabinfo | 45 + + qa/group | 2 + + src/pcp/GNUmakefile | 3 + + src/pcp/slabinfo/GNUmakefile | 44 + + src/pcp/slabinfo/pcp-slabinfo.1 | 83 + + src/pcp/slabinfo/pcp-slabinfo.py | 208 ++ + 9 files changed, 5655 insertions(+), 1 deletion(-) + create mode 100755 qa/1989 + create mode 100644 qa/1989.out + create mode 100755 qa/archives/mk.slabinfo + create mode 100644 src/pcp/slabinfo/GNUmakefile + create mode 100644 src/pcp/slabinfo/pcp-slabinfo.1 + create mode 100644 src/pcp/slabinfo/pcp-slabinfo.py + +diff --git a/qa/1989 b/qa/1989 +new file mode 100755 +index 000000000..339078f7a +--- /dev/null ++++ b/qa/1989 +@@ -0,0 +1,42 @@ ++#!/bin/sh ++# PCP QA Test No. 1989 ++# Exercise various pcp-slabinfo(1) command options. ++# ++# Copyright (c) 2023 Oracle and/or its affiliates. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++ ++seq=`basename $0` ++echo "QA output created by $seq" ++ ++. ./common.python ++ ++__version=`$python --version 2>&1 | sed -e 's/Python //'` ++case "$__version" ++in ++ 2.7.5) _notrun "Python $__version reports start seconds off-by one for some processes" ++ ;; ++esac ++ ++status=1 # failure is the default! ++$sudo rm -rf $tmp.* $seq.full ++trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15 ++ ++pcp_slabinfo="$PCP_BINADM_DIR/pcp-slabinfo" ++test -x $pcp_slabinfo || _notrun "No pcp-slabinfo(1) installed" ++pcp_slabinfo="$python $pcp_slabinfo" ++ ++# real QA test starts here ++echo && echo pcp-slabinfo output : Display default output ++PCP_ARCHIVE="archives/pcp-slabinfo" PCP_HOSTZONE=1 $pcp_slabinfo ++ ++archive_first="-a archives/pcp-slabinfo -z -O +1" ++ ++echo && echo pcp-slabinfo output : Display output ++pcp $archive_first slabinfo ++ ++echo && echo pcp-slabinfo output : Display output when given specified number of samples ++pcp $archive_first slabinfo -s 3 ++ ++status=0 ++exit +diff --git a/qa/1989.out b/qa/1989.out +new file mode 100644 +index 000000000..7b3f257b3 +--- /dev/null ++++ b/qa/1989.out +@@ -0,0 +1,5227 @@ ++QA output created by 1989 ++ ++pcp-slabinfo output : Display default output ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:25:20 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:25:20 Acpi-Parse 314423 315652 56 73 1 4324 4324 ++10:25:20 Acpi-State 765 765 80 51 1 15 15 ++10:25:20 anon_vma 11481 11895 104 39 1 305 305 ++10:25:20 anon_vma_chain 18269 19264 64 64 1 301 301 ++10:25:20 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:25:20 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:25:20 avtab_node 401880 401880 24 170 1 2364 2364 ++10:25:20 bdev_cache 72 72 896 18 4 4 4 ++10:25:20 bfq_io_cq 0 0 160 25 1 0 0 ++10:25:20 biovec-128 64 64 2048 16 8 4 4 ++10:25:20 biovec-64 64 64 1024 16 4 4 4 ++10:25:20 biovec-max 148 192 4096 8 8 24 24 ++10:25:20 blkdev_ioc 210 210 136 30 1 7 7 ++10:25:20 buffer_head 117 117 104 39 1 3 3 ++10:25:20 cred_jar 1651 1848 192 21 1 88 88 ++10:25:20 dax_cache 57 57 832 19 4 3 3 ++10:25:20 dentry 346540 346655 208 19 1 18245 18245 ++10:25:20 dio 0 0 640 25 4 0 0 ++10:25:20 dm_uevent 0 0 2664 12 8 0 0 ++10:25:20 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:25:20 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:25:20 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:25:20 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:25:20 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:25:20 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:25:20 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:25:20 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:25:20 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:25:20 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:25:20 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:25:20 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:25:20 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:25:20 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:25:20 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:25:20 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:25:20 dnotify_struct 0 0 32 128 1 0 0 ++10:25:20 dquot 0 0 256 16 1 0 0 ++10:25:20 eventpoll_pwq 728 728 72 56 1 13 13 ++10:25:20 file_lock_cache 90 90 216 18 1 5 5 ++10:25:20 files_cache 230 230 704 23 4 10 10 ++10:25:20 filp 10324 11808 256 16 1 738 738 ++10:25:20 fscrypt_ctx 0 0 80 51 1 0 0 ++10:25:20 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:25:20 fuse_inode 19 19 832 19 4 1 1 ++10:25:20 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:25:20 iint_cache 0 0 120 34 1 0 0 ++10:25:20 inode_cache 26084 27100 640 25 4 1084 1084 ++10:25:20 ip4-frags 68 68 232 17 1 4 4 ++10:25:20 isofs_inode_cache 69 69 688 23 4 3 3 ++10:25:20 kcopyd_job 0 0 3312 9 8 0 0 ++10:25:20 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:25:20 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:25:20 kioctx 92 92 704 23 4 4 4 ++10:25:20 kmalloc-128 5693 5856 128 32 1 183 183 ++10:25:20 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:25:20 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:25:20 kmalloc-1k 4037 4352 1024 16 4 272 272 ++10:25:20 kmalloc-256 15322 15376 256 16 1 961 961 ++10:25:20 kmalloc-2k 697 768 2048 16 8 48 48 ++10:25:20 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:25:20 kmalloc-4k 1657 1728 4096 8 8 216 216 ++10:25:20 kmalloc-512 4174 8144 512 16 2 509 509 ++10:25:20 kmalloc-64 306657 307328 64 64 1 4802 4802 ++10:25:20 kmalloc-8 424448 424448 8 512 1 829 829 ++10:25:20 kmalloc-8k 69 84 8192 4 8 21 21 ++10:25:20 kmalloc-96 6342 6342 96 42 1 151 151 ++10:25:20 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:25:20 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:25:20 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:25:20 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:25:20 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:25:20 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:25:20 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:25:20 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:25:20 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:25:20 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:25:20 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:25:20 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:25:20 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:25:20 kmem_cache 176 176 512 16 2 11 11 ++10:25:20 kmem_cache_node 256 256 64 64 1 4 4 ++10:25:20 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:25:20 mm_struct 224 224 1152 28 8 8 8 ++10:25:20 mnt_cache 1500 1500 320 25 2 60 60 ++10:25:20 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:25:20 names_cache 56 56 4096 8 8 7 7 ++10:25:20 net_namespace 12 12 5312 6 8 2 2 ++10:25:20 nf_conntrack 225 225 320 25 2 9 9 ++10:25:20 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:25:20 numa_policy 31 31 264 31 2 1 1 ++10:25:20 pde_opener 408 408 40 102 1 4 4 ++10:25:20 pid 992 992 128 32 1 31 31 ++10:25:20 pid_namespace 0 0 240 17 1 0 0 ++10:25:20 PINGv6 0 0 1344 24 8 0 0 ++10:25:20 pool_workqueue 640 640 256 16 1 40 40 ++10:25:20 proc_dir_entry 819 819 192 21 1 39 39 ++10:25:20 proc_inode_cache 10403 10902 712 23 4 474 474 ++10:25:20 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:25:20 RAW 84 84 1152 28 8 3 3 ++10:25:20 RAWv6 72 72 1344 24 8 3 3 ++10:25:20 request_queue 39 39 2488 13 8 3 3 ++10:25:20 request_sock_TCP 0 0 336 24 2 0 0 ++10:25:20 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:25:20 rpc_inode_cache 23 23 704 23 4 1 1 ++10:25:20 scsi_sense_cache 160 160 128 32 1 5 5 ++10:25:20 search 0 0 680 24 4 0 0 ++10:25:20 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:25:20 sighand_cache 338 360 2112 15 8 24 24 ++10:25:20 signal_cache 1119 1232 1152 28 8 44 44 ++10:25:20 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:25:20 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:25:20 skbuff_head_cache 608 608 256 16 1 38 38 ++10:25:20 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:25:20 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:25:20 task_delay_info 8721 8721 80 51 1 171 171 ++10:25:20 task_group 0 0 832 19 4 0 0 ++10:25:20 task_struct 566 640 5824 5 8 128 128 ++10:25:20 taskstats 92 92 344 23 2 4 4 ++10:25:20 TCP 52 52 2432 13 8 4 4 ++10:25:20 TCPv6 48 48 2560 12 8 4 4 ++10:25:20 trace_event_file 2024 2024 88 46 1 44 44 ++10:25:20 tw_sock_TCP 87 87 280 29 2 3 3 ++10:25:20 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:25:20 UDP 100 100 1280 25 8 4 4 ++10:25:20 UDPv6 88 88 1472 22 8 4 4 ++10:25:20 user_namespace 0 0 600 27 4 0 0 ++10:25:20 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:25:20 uts_namespace 0 0 440 18 2 0 0 ++10:25:20 vm_area_struct 33984 34340 232 17 1 2020 2020 ++10:25:20 vmap_area 26304 26304 64 64 1 411 411 ++10:25:20 xfrm_dst_cache 756 756 384 21 2 36 36 ++10:25:20 xfs_btree_cur 72 72 224 18 1 4 4 ++10:25:20 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:25:20 xfs_buf_item 240 240 272 30 2 8 8 ++10:25:20 xfs_da_state 68 68 480 17 2 4 4 ++10:25:20 xfs_dqtrx 0 0 528 31 4 0 0 ++10:25:20 xfs_dquot 0 0 496 16 2 0 0 ++10:25:20 xfs_efd_item 414 414 440 18 2 23 23 ++10:25:20 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:25:20 xfs_log_ticket 88 88 184 22 1 4 4 ++10:25:20 xfs_rud_item 92 92 176 23 1 4 4 ++10:25:20 xfs_rui_item 0 0 696 23 4 0 0 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:25:23 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:25:23 Acpi-Parse 314423 315652 56 73 1 4324 4324 ++10:25:23 Acpi-State 765 765 80 51 1 15 15 ++10:25:23 anon_vma 11481 11895 104 39 1 305 305 ++10:25:23 anon_vma_chain 18269 19264 64 64 1 301 301 ++10:25:23 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:25:23 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:25:23 avtab_node 401880 401880 24 170 1 2364 2364 ++10:25:23 bdev_cache 72 72 896 18 4 4 4 ++10:25:23 bfq_io_cq 0 0 160 25 1 0 0 ++10:25:23 biovec-128 64 64 2048 16 8 4 4 ++10:25:23 biovec-64 64 64 1024 16 4 4 4 ++10:25:23 biovec-max 148 192 4096 8 8 24 24 ++10:25:23 blkdev_ioc 210 210 136 30 1 7 7 ++10:25:23 buffer_head 117 117 104 39 1 3 3 ++10:25:23 cred_jar 1651 1848 192 21 1 88 88 ++10:25:23 dax_cache 57 57 832 19 4 3 3 ++10:25:23 dentry 346540 346655 208 19 1 18245 18245 ++10:25:23 dio 0 0 640 25 4 0 0 ++10:25:23 dm_uevent 0 0 2664 12 8 0 0 ++10:25:23 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:25:23 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:25:23 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:25:23 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:25:23 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:25:23 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:25:23 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:25:23 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:25:23 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:25:23 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:25:23 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:25:23 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:25:23 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:25:23 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:25:23 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:25:23 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:25:23 dnotify_struct 0 0 32 128 1 0 0 ++10:25:23 dquot 0 0 256 16 1 0 0 ++10:25:23 eventpoll_pwq 728 728 72 56 1 13 13 ++10:25:23 file_lock_cache 90 90 216 18 1 5 5 ++10:25:23 files_cache 230 230 704 23 4 10 10 ++10:25:23 filp 10324 11808 256 16 1 738 738 ++10:25:23 fscrypt_ctx 0 0 80 51 1 0 0 ++10:25:23 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:25:23 fuse_inode 19 19 832 19 4 1 1 ++10:25:23 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:25:23 iint_cache 0 0 120 34 1 0 0 ++10:25:23 inode_cache 26084 27100 640 25 4 1084 1084 ++10:25:23 ip4-frags 68 68 232 17 1 4 4 ++10:25:23 isofs_inode_cache 69 69 688 23 4 3 3 ++10:25:23 kcopyd_job 0 0 3312 9 8 0 0 ++10:25:23 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:25:23 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:25:23 kioctx 92 92 704 23 4 4 4 ++10:25:23 kmalloc-128 5693 5856 128 32 1 183 183 ++10:25:23 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:25:23 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:25:23 kmalloc-1k 4037 4352 1024 16 4 272 272 ++10:25:23 kmalloc-256 15322 15376 256 16 1 961 961 ++10:25:23 kmalloc-2k 697 768 2048 16 8 48 48 ++10:25:23 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:25:23 kmalloc-4k 1657 1728 4096 8 8 216 216 ++10:25:23 kmalloc-512 4174 8144 512 16 2 509 509 ++10:25:23 kmalloc-64 306657 307328 64 64 1 4802 4802 ++10:25:23 kmalloc-8 424448 424448 8 512 1 829 829 ++10:25:23 kmalloc-8k 69 84 8192 4 8 21 21 ++10:25:23 kmalloc-96 6342 6342 96 42 1 151 151 ++10:25:23 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:25:23 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:25:23 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:25:23 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:25:23 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:25:23 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:25:23 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:25:23 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:25:23 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:25:23 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:25:23 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:25:23 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:25:23 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:25:23 kmem_cache 176 176 512 16 2 11 11 ++10:25:23 kmem_cache_node 256 256 64 64 1 4 4 ++10:25:23 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:25:23 mm_struct 224 224 1152 28 8 8 8 ++10:25:23 mnt_cache 1500 1500 320 25 2 60 60 ++10:25:23 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:25:23 names_cache 56 56 4096 8 8 7 7 ++10:25:23 net_namespace 12 12 5312 6 8 2 2 ++10:25:23 nf_conntrack 225 225 320 25 2 9 9 ++10:25:23 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:25:23 numa_policy 31 31 264 31 2 1 1 ++10:25:23 pde_opener 408 408 40 102 1 4 4 ++10:25:23 pid 992 992 128 32 1 31 31 ++10:25:23 pid_namespace 0 0 240 17 1 0 0 ++10:25:23 PINGv6 0 0 1344 24 8 0 0 ++10:25:23 pool_workqueue 640 640 256 16 1 40 40 ++10:25:23 proc_dir_entry 819 819 192 21 1 39 39 ++10:25:23 proc_inode_cache 10403 10902 712 23 4 474 474 ++10:25:23 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:25:23 RAW 84 84 1152 28 8 3 3 ++10:25:23 RAWv6 72 72 1344 24 8 3 3 ++10:25:23 request_queue 39 39 2488 13 8 3 3 ++10:25:23 request_sock_TCP 0 0 336 24 2 0 0 ++10:25:23 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:25:23 rpc_inode_cache 23 23 704 23 4 1 1 ++10:25:23 scsi_sense_cache 160 160 128 32 1 5 5 ++10:25:23 search 0 0 680 24 4 0 0 ++10:25:23 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:25:23 sighand_cache 338 360 2112 15 8 24 24 ++10:25:23 signal_cache 1119 1232 1152 28 8 44 44 ++10:25:23 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:25:23 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:25:23 skbuff_head_cache 608 608 256 16 1 38 38 ++10:25:23 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:25:23 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:25:23 task_delay_info 8721 8721 80 51 1 171 171 ++10:25:23 task_group 0 0 832 19 4 0 0 ++10:25:23 task_struct 566 640 5824 5 8 128 128 ++10:25:23 taskstats 92 92 344 23 2 4 4 ++10:25:23 TCP 52 52 2432 13 8 4 4 ++10:25:23 TCPv6 48 48 2560 12 8 4 4 ++10:25:23 trace_event_file 2024 2024 88 46 1 44 44 ++10:25:23 tw_sock_TCP 87 87 280 29 2 3 3 ++10:25:23 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:25:23 UDP 100 100 1280 25 8 4 4 ++10:25:23 UDPv6 88 88 1472 22 8 4 4 ++10:25:23 user_namespace 0 0 600 27 4 0 0 ++10:25:23 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:25:23 uts_namespace 0 0 440 18 2 0 0 ++10:25:23 vm_area_struct 33984 34340 232 17 1 2020 2020 ++10:25:23 vmap_area 26304 26304 64 64 1 411 411 ++10:25:23 xfrm_dst_cache 756 756 384 21 2 36 36 ++10:25:23 xfs_btree_cur 72 72 224 18 1 4 4 ++10:25:23 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:25:23 xfs_buf_item 240 240 272 30 2 8 8 ++10:25:23 xfs_da_state 68 68 480 17 2 4 4 ++10:25:23 xfs_dqtrx 0 0 528 31 4 0 0 ++10:25:23 xfs_dquot 0 0 496 16 2 0 0 ++10:25:23 xfs_efd_item 414 414 440 18 2 23 23 ++10:25:23 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:25:23 xfs_log_ticket 88 88 184 22 1 4 4 ++10:25:23 xfs_rud_item 92 92 176 23 1 4 4 ++10:25:23 xfs_rui_item 0 0 696 23 4 0 0 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:25:26 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:25:26 Acpi-Parse 314423 315652 56 73 1 4324 4324 ++10:25:26 Acpi-State 765 765 80 51 1 15 15 ++10:25:26 anon_vma 11481 11895 104 39 1 305 305 ++10:25:26 anon_vma_chain 18269 19264 64 64 1 301 301 ++10:25:26 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:25:26 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:25:26 avtab_node 401880 401880 24 170 1 2364 2364 ++10:25:26 bdev_cache 72 72 896 18 4 4 4 ++10:25:26 bfq_io_cq 0 0 160 25 1 0 0 ++10:25:26 biovec-128 64 64 2048 16 8 4 4 ++10:25:26 biovec-64 64 64 1024 16 4 4 4 ++10:25:26 biovec-max 148 192 4096 8 8 24 24 ++10:25:26 blkdev_ioc 210 210 136 30 1 7 7 ++10:25:26 buffer_head 117 117 104 39 1 3 3 ++10:25:26 cred_jar 1651 1848 192 21 1 88 88 ++10:25:26 dax_cache 57 57 832 19 4 3 3 ++10:25:26 dentry 346540 346655 208 19 1 18245 18245 ++10:25:26 dio 0 0 640 25 4 0 0 ++10:25:26 dm_uevent 0 0 2664 12 8 0 0 ++10:25:26 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:25:26 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:25:26 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:25:26 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:25:26 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:25:26 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:25:26 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:25:26 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:25:26 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:25:26 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:25:26 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:25:26 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:25:26 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:25:26 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:25:26 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:25:26 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:25:26 dnotify_struct 0 0 32 128 1 0 0 ++10:25:26 dquot 0 0 256 16 1 0 0 ++10:25:26 eventpoll_pwq 728 728 72 56 1 13 13 ++10:25:26 file_lock_cache 90 90 216 18 1 5 5 ++10:25:26 files_cache 230 230 704 23 4 10 10 ++10:25:26 filp 10324 11808 256 16 1 738 738 ++10:25:26 fscrypt_ctx 0 0 80 51 1 0 0 ++10:25:26 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:25:26 fuse_inode 19 19 832 19 4 1 1 ++10:25:26 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:25:26 iint_cache 0 0 120 34 1 0 0 ++10:25:26 inode_cache 26084 27100 640 25 4 1084 1084 ++10:25:26 ip4-frags 68 68 232 17 1 4 4 ++10:25:26 isofs_inode_cache 69 69 688 23 4 3 3 ++10:25:26 kcopyd_job 0 0 3312 9 8 0 0 ++10:25:26 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:25:26 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:25:26 kioctx 92 92 704 23 4 4 4 ++10:25:26 kmalloc-128 5693 5856 128 32 1 183 183 ++10:25:26 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:25:26 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:25:26 kmalloc-1k 4037 4352 1024 16 4 272 272 ++10:25:26 kmalloc-256 15322 15376 256 16 1 961 961 ++10:25:26 kmalloc-2k 697 768 2048 16 8 48 48 ++10:25:26 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:25:26 kmalloc-4k 1657 1728 4096 8 8 216 216 ++10:25:26 kmalloc-512 4174 8144 512 16 2 509 509 ++10:25:26 kmalloc-64 306657 307328 64 64 1 4802 4802 ++10:25:26 kmalloc-8 424448 424448 8 512 1 829 829 ++10:25:26 kmalloc-8k 69 84 8192 4 8 21 21 ++10:25:26 kmalloc-96 6342 6342 96 42 1 151 151 ++10:25:26 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:25:26 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:25:26 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:25:26 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:25:26 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:25:26 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:25:26 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:25:26 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:25:26 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:25:26 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:25:26 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:25:26 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:25:26 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:25:26 kmem_cache 176 176 512 16 2 11 11 ++10:25:26 kmem_cache_node 256 256 64 64 1 4 4 ++10:25:26 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:25:26 mm_struct 224 224 1152 28 8 8 8 ++10:25:26 mnt_cache 1500 1500 320 25 2 60 60 ++10:25:26 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:25:26 names_cache 56 56 4096 8 8 7 7 ++10:25:26 net_namespace 12 12 5312 6 8 2 2 ++10:25:26 nf_conntrack 225 225 320 25 2 9 9 ++10:25:26 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:25:26 numa_policy 31 31 264 31 2 1 1 ++10:25:26 pde_opener 408 408 40 102 1 4 4 ++10:25:26 pid 992 992 128 32 1 31 31 ++10:25:26 pid_namespace 0 0 240 17 1 0 0 ++10:25:26 PINGv6 0 0 1344 24 8 0 0 ++10:25:26 pool_workqueue 640 640 256 16 1 40 40 ++10:25:26 proc_dir_entry 819 819 192 21 1 39 39 ++10:25:26 proc_inode_cache 10403 10902 712 23 4 474 474 ++10:25:26 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:25:26 RAW 84 84 1152 28 8 3 3 ++10:25:26 RAWv6 72 72 1344 24 8 3 3 ++10:25:26 request_queue 39 39 2488 13 8 3 3 ++10:25:26 request_sock_TCP 0 0 336 24 2 0 0 ++10:25:26 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:25:26 rpc_inode_cache 23 23 704 23 4 1 1 ++10:25:26 scsi_sense_cache 160 160 128 32 1 5 5 ++10:25:26 search 0 0 680 24 4 0 0 ++10:25:26 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:25:26 sighand_cache 338 360 2112 15 8 24 24 ++10:25:26 signal_cache 1119 1232 1152 28 8 44 44 ++10:25:26 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:25:26 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:25:26 skbuff_head_cache 608 608 256 16 1 38 38 ++10:25:26 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:25:26 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:25:26 task_delay_info 8721 8721 80 51 1 171 171 ++10:25:26 task_group 0 0 832 19 4 0 0 ++10:25:26 task_struct 566 640 5824 5 8 128 128 ++10:25:26 taskstats 92 92 344 23 2 4 4 ++10:25:26 TCP 52 52 2432 13 8 4 4 ++10:25:26 TCPv6 48 48 2560 12 8 4 4 ++10:25:26 trace_event_file 2024 2024 88 46 1 44 44 ++10:25:26 tw_sock_TCP 87 87 280 29 2 3 3 ++10:25:26 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:25:26 UDP 100 100 1280 25 8 4 4 ++10:25:26 UDPv6 88 88 1472 22 8 4 4 ++10:25:26 user_namespace 0 0 600 27 4 0 0 ++10:25:26 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:25:26 uts_namespace 0 0 440 18 2 0 0 ++10:25:26 vm_area_struct 33984 34340 232 17 1 2020 2020 ++10:25:26 vmap_area 26304 26304 64 64 1 411 411 ++10:25:26 xfrm_dst_cache 756 756 384 21 2 36 36 ++10:25:26 xfs_btree_cur 72 72 224 18 1 4 4 ++10:25:26 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:25:26 xfs_buf_item 240 240 272 30 2 8 8 ++10:25:26 xfs_da_state 68 68 480 17 2 4 4 ++10:25:26 xfs_dqtrx 0 0 528 31 4 0 0 ++10:25:26 xfs_dquot 0 0 496 16 2 0 0 ++10:25:26 xfs_efd_item 414 414 440 18 2 23 23 ++10:25:26 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:25:26 xfs_log_ticket 88 88 184 22 1 4 4 ++10:25:26 xfs_rud_item 92 92 176 23 1 4 4 ++10:25:26 xfs_rui_item 0 0 696 23 4 0 0 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:25:29 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:25:29 Acpi-Parse 314423 315652 56 73 1 4324 4324 ++10:25:29 Acpi-State 765 765 80 51 1 15 15 ++10:25:29 anon_vma 11502 11895 104 39 1 305 305 ++10:25:29 anon_vma_chain 17920 19264 64 64 1 301 301 ++10:25:29 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:25:29 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:25:29 avtab_node 401880 401880 24 170 1 2364 2364 ++10:25:29 bdev_cache 72 72 896 18 4 4 4 ++10:25:29 bfq_io_cq 0 0 160 25 1 0 0 ++10:25:29 biovec-128 64 64 2048 16 8 4 4 ++10:25:29 biovec-64 64 64 1024 16 4 4 4 ++10:25:29 biovec-max 148 192 4096 8 8 24 24 ++10:25:29 blkdev_ioc 210 210 136 30 1 7 7 ++10:25:29 buffer_head 117 117 104 39 1 3 3 ++10:25:29 cred_jar 1651 1848 192 21 1 88 88 ++10:25:29 dax_cache 57 57 832 19 4 3 3 ++10:25:29 dentry 346562 346655 208 19 1 18245 18245 ++10:25:29 dio 0 0 640 25 4 0 0 ++10:25:29 dm_uevent 0 0 2664 12 8 0 0 ++10:25:29 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:25:29 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:25:29 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:25:29 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:25:29 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:25:29 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:25:29 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:25:29 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:25:29 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:25:29 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:25:29 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:25:29 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:25:29 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:25:29 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:25:29 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:25:29 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:25:29 dnotify_struct 0 0 32 128 1 0 0 ++10:25:29 dquot 0 0 256 16 1 0 0 ++10:25:29 eventpoll_pwq 728 728 72 56 1 13 13 ++10:25:29 file_lock_cache 90 90 216 18 1 5 5 ++10:25:29 files_cache 230 230 704 23 4 10 10 ++10:25:29 filp 10438 12000 256 16 1 750 750 ++10:25:29 fscrypt_ctx 0 0 80 51 1 0 0 ++10:25:29 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:25:29 fuse_inode 19 19 832 19 4 1 1 ++10:25:29 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:25:29 iint_cache 0 0 120 34 1 0 0 ++10:25:29 inode_cache 26084 27100 640 25 4 1084 1084 ++10:25:29 ip4-frags 68 68 232 17 1 4 4 ++10:25:29 isofs_inode_cache 69 69 688 23 4 3 3 ++10:25:29 kcopyd_job 0 0 3312 9 8 0 0 ++10:25:29 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:25:29 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:25:29 kioctx 92 92 704 23 4 4 4 ++10:25:29 kmalloc-128 5748 5856 128 32 1 183 183 ++10:25:29 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:25:29 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:25:29 kmalloc-1k 4055 4352 1024 16 4 272 272 ++10:25:29 kmalloc-256 15322 15376 256 16 1 961 961 ++10:25:29 kmalloc-2k 697 768 2048 16 8 48 48 ++10:25:29 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:25:29 kmalloc-4k 1664 1728 4096 8 8 216 216 ++10:25:29 kmalloc-512 4200 8144 512 16 2 509 509 ++10:25:29 kmalloc-64 306657 307328 64 64 1 4802 4802 ++10:25:29 kmalloc-8 424448 424448 8 512 1 829 829 ++10:25:29 kmalloc-8k 69 84 8192 4 8 21 21 ++10:25:29 kmalloc-96 6342 6342 96 42 1 151 151 ++10:25:29 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:25:29 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:25:29 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:25:29 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:25:29 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:25:29 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:25:29 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:25:29 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:25:29 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:25:29 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:25:29 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:25:29 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:25:29 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:25:29 kmem_cache 176 176 512 16 2 11 11 ++10:25:29 kmem_cache_node 256 256 64 64 1 4 4 ++10:25:29 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:25:29 mm_struct 224 224 1152 28 8 8 8 ++10:25:29 mnt_cache 1500 1500 320 25 2 60 60 ++10:25:29 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:25:29 names_cache 56 56 4096 8 8 7 7 ++10:25:29 net_namespace 12 12 5312 6 8 2 2 ++10:25:29 nf_conntrack 225 225 320 25 2 9 9 ++10:25:29 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:25:29 numa_policy 31 31 264 31 2 1 1 ++10:25:29 pde_opener 408 408 40 102 1 4 4 ++10:25:29 pid 992 992 128 32 1 31 31 ++10:25:29 pid_namespace 0 0 240 17 1 0 0 ++10:25:29 PINGv6 0 0 1344 24 8 0 0 ++10:25:29 pool_workqueue 640 640 256 16 1 40 40 ++10:25:29 proc_dir_entry 819 819 192 21 1 39 39 ++10:25:29 proc_inode_cache 10450 10902 712 23 4 474 474 ++10:25:29 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:25:29 RAW 84 84 1152 28 8 3 3 ++10:25:29 RAWv6 72 72 1344 24 8 3 3 ++10:25:29 request_queue 39 39 2488 13 8 3 3 ++10:25:29 request_sock_TCP 0 0 336 24 2 0 0 ++10:25:29 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:25:29 rpc_inode_cache 23 23 704 23 4 1 1 ++10:25:29 scsi_sense_cache 160 160 128 32 1 5 5 ++10:25:29 search 0 0 680 24 4 0 0 ++10:25:29 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:25:29 sighand_cache 338 360 2112 15 8 24 24 ++10:25:29 signal_cache 1119 1232 1152 28 8 44 44 ++10:25:29 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:25:29 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:25:29 skbuff_head_cache 608 608 256 16 1 38 38 ++10:25:29 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:25:29 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:25:29 task_delay_info 8721 8721 80 51 1 171 171 ++10:25:29 task_group 0 0 832 19 4 0 0 ++10:25:29 task_struct 566 640 5824 5 8 128 128 ++10:25:29 taskstats 92 92 344 23 2 4 4 ++10:25:29 TCP 52 52 2432 13 8 4 4 ++10:25:29 TCPv6 48 48 2560 12 8 4 4 ++10:25:29 trace_event_file 2024 2024 88 46 1 44 44 ++10:25:29 tw_sock_TCP 87 87 280 29 2 3 3 ++10:25:29 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:25:29 UDP 100 100 1280 25 8 4 4 ++10:25:29 UDPv6 88 88 1472 22 8 4 4 ++10:25:29 user_namespace 0 0 600 27 4 0 0 ++10:25:29 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:25:29 uts_namespace 0 0 440 18 2 0 0 ++10:25:29 vm_area_struct 33972 34340 232 17 1 2020 2020 ++10:25:29 vmap_area 26432 26432 64 64 1 413 413 ++10:25:29 xfrm_dst_cache 756 756 384 21 2 36 36 ++10:25:29 xfs_btree_cur 72 72 224 18 1 4 4 ++10:25:29 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:25:29 xfs_buf_item 240 240 272 30 2 8 8 ++10:25:29 xfs_da_state 68 68 480 17 2 4 4 ++10:25:29 xfs_dqtrx 0 0 528 31 4 0 0 ++10:25:29 xfs_dquot 0 0 496 16 2 0 0 ++10:25:29 xfs_efd_item 468 468 440 18 2 26 26 ++10:25:29 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:25:29 xfs_log_ticket 88 88 184 22 1 4 4 ++10:25:29 xfs_rud_item 92 92 176 23 1 4 4 ++10:25:29 xfs_rui_item 0 0 696 23 4 0 0 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:25:32 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:25:32 Acpi-Parse 314423 315652 56 73 1 4324 4324 ++10:25:32 Acpi-State 765 765 80 51 1 15 15 ++10:25:32 anon_vma 11502 11895 104 39 1 305 305 ++10:25:32 anon_vma_chain 17920 19264 64 64 1 301 301 ++10:25:32 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:25:32 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:25:32 avtab_node 401880 401880 24 170 1 2364 2364 ++10:25:32 bdev_cache 72 72 896 18 4 4 4 ++10:25:32 bfq_io_cq 0 0 160 25 1 0 0 ++10:25:32 biovec-128 64 64 2048 16 8 4 4 ++10:25:32 biovec-64 64 64 1024 16 4 4 4 ++10:25:32 biovec-max 148 192 4096 8 8 24 24 ++10:25:32 blkdev_ioc 210 210 136 30 1 7 7 ++10:25:32 buffer_head 117 117 104 39 1 3 3 ++10:25:32 cred_jar 1651 1848 192 21 1 88 88 ++10:25:32 dax_cache 57 57 832 19 4 3 3 ++10:25:32 dentry 346562 346655 208 19 1 18245 18245 ++10:25:32 dio 0 0 640 25 4 0 0 ++10:25:32 dm_uevent 0 0 2664 12 8 0 0 ++10:25:32 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:25:32 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:25:32 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:25:32 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:25:32 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:25:32 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:25:32 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:25:32 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:25:32 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:25:32 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:25:32 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:25:32 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:25:32 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:25:32 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:25:32 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:25:32 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:25:32 dnotify_struct 0 0 32 128 1 0 0 ++10:25:32 dquot 0 0 256 16 1 0 0 ++10:25:32 eventpoll_pwq 728 728 72 56 1 13 13 ++10:25:32 file_lock_cache 90 90 216 18 1 5 5 ++10:25:32 files_cache 230 230 704 23 4 10 10 ++10:25:32 filp 10438 12000 256 16 1 750 750 ++10:25:32 fscrypt_ctx 0 0 80 51 1 0 0 ++10:25:32 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:25:32 fuse_inode 19 19 832 19 4 1 1 ++10:25:32 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:25:32 iint_cache 0 0 120 34 1 0 0 ++10:25:32 inode_cache 26084 27100 640 25 4 1084 1084 ++10:25:32 ip4-frags 68 68 232 17 1 4 4 ++10:25:32 isofs_inode_cache 69 69 688 23 4 3 3 ++10:25:32 kcopyd_job 0 0 3312 9 8 0 0 ++10:25:32 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:25:32 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:25:32 kioctx 92 92 704 23 4 4 4 ++10:25:32 kmalloc-128 5748 5856 128 32 1 183 183 ++10:25:32 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:25:32 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:25:32 kmalloc-1k 4055 4352 1024 16 4 272 272 ++10:25:32 kmalloc-256 15322 15376 256 16 1 961 961 ++10:25:32 kmalloc-2k 697 768 2048 16 8 48 48 ++10:25:32 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:25:32 kmalloc-4k 1664 1728 4096 8 8 216 216 ++10:25:32 kmalloc-512 4200 8144 512 16 2 509 509 ++10:25:32 kmalloc-64 306657 307328 64 64 1 4802 4802 ++10:25:32 kmalloc-8 424448 424448 8 512 1 829 829 ++10:25:32 kmalloc-8k 69 84 8192 4 8 21 21 ++10:25:32 kmalloc-96 6342 6342 96 42 1 151 151 ++10:25:32 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:25:32 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:25:32 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:25:32 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:25:32 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:25:32 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:25:32 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:25:32 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:25:32 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:25:32 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:25:32 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:25:32 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:25:32 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:25:32 kmem_cache 176 176 512 16 2 11 11 ++10:25:32 kmem_cache_node 256 256 64 64 1 4 4 ++10:25:32 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:25:32 mm_struct 224 224 1152 28 8 8 8 ++10:25:32 mnt_cache 1500 1500 320 25 2 60 60 ++10:25:32 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:25:32 names_cache 56 56 4096 8 8 7 7 ++10:25:32 net_namespace 12 12 5312 6 8 2 2 ++10:25:32 nf_conntrack 225 225 320 25 2 9 9 ++10:25:32 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:25:32 numa_policy 31 31 264 31 2 1 1 ++10:25:32 pde_opener 408 408 40 102 1 4 4 ++10:25:32 pid 992 992 128 32 1 31 31 ++10:25:32 pid_namespace 0 0 240 17 1 0 0 ++10:25:32 PINGv6 0 0 1344 24 8 0 0 ++10:25:32 pool_workqueue 640 640 256 16 1 40 40 ++10:25:32 proc_dir_entry 819 819 192 21 1 39 39 ++10:25:32 proc_inode_cache 10450 10902 712 23 4 474 474 ++10:25:32 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:25:32 RAW 84 84 1152 28 8 3 3 ++10:25:32 RAWv6 72 72 1344 24 8 3 3 ++10:25:32 request_queue 39 39 2488 13 8 3 3 ++10:25:32 request_sock_TCP 0 0 336 24 2 0 0 ++10:25:32 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:25:32 rpc_inode_cache 23 23 704 23 4 1 1 ++10:25:32 scsi_sense_cache 160 160 128 32 1 5 5 ++10:25:32 search 0 0 680 24 4 0 0 ++10:25:32 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:25:32 sighand_cache 338 360 2112 15 8 24 24 ++10:25:32 signal_cache 1119 1232 1152 28 8 44 44 ++10:25:32 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:25:32 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:25:32 skbuff_head_cache 608 608 256 16 1 38 38 ++10:25:32 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:25:32 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:25:32 task_delay_info 8721 8721 80 51 1 171 171 ++10:25:32 task_group 0 0 832 19 4 0 0 ++10:25:32 task_struct 566 640 5824 5 8 128 128 ++10:25:32 taskstats 92 92 344 23 2 4 4 ++10:25:32 TCP 52 52 2432 13 8 4 4 ++10:25:32 TCPv6 48 48 2560 12 8 4 4 ++10:25:32 trace_event_file 2024 2024 88 46 1 44 44 ++10:25:32 tw_sock_TCP 87 87 280 29 2 3 3 ++10:25:32 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:25:32 UDP 100 100 1280 25 8 4 4 ++10:25:32 UDPv6 88 88 1472 22 8 4 4 ++10:25:32 user_namespace 0 0 600 27 4 0 0 ++10:25:32 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:25:32 uts_namespace 0 0 440 18 2 0 0 ++10:25:32 vm_area_struct 33972 34340 232 17 1 2020 2020 ++10:25:32 vmap_area 26432 26432 64 64 1 413 413 ++10:25:32 xfrm_dst_cache 756 756 384 21 2 36 36 ++10:25:32 xfs_btree_cur 72 72 224 18 1 4 4 ++10:25:32 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:25:32 xfs_buf_item 240 240 272 30 2 8 8 ++10:25:32 xfs_da_state 68 68 480 17 2 4 4 ++10:25:32 xfs_dqtrx 0 0 528 31 4 0 0 ++10:25:32 xfs_dquot 0 0 496 16 2 0 0 ++10:25:32 xfs_efd_item 468 468 440 18 2 26 26 ++10:25:32 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:25:32 xfs_log_ticket 88 88 184 22 1 4 4 ++10:25:32 xfs_rud_item 92 92 176 23 1 4 4 ++10:25:32 xfs_rui_item 0 0 696 23 4 0 0 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:25:35 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:25:35 Acpi-Parse 314423 315652 56 73 1 4324 4324 ++10:25:35 Acpi-State 765 765 80 51 1 15 15 ++10:25:35 anon_vma 11502 11895 104 39 1 305 305 ++10:25:35 anon_vma_chain 17920 19264 64 64 1 301 301 ++10:25:35 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:25:35 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:25:35 avtab_node 401880 401880 24 170 1 2364 2364 ++10:25:35 bdev_cache 72 72 896 18 4 4 4 ++10:25:35 bfq_io_cq 0 0 160 25 1 0 0 ++10:25:35 biovec-128 64 64 2048 16 8 4 4 ++10:25:35 biovec-64 64 64 1024 16 4 4 4 ++10:25:35 biovec-max 148 192 4096 8 8 24 24 ++10:25:35 blkdev_ioc 210 210 136 30 1 7 7 ++10:25:35 buffer_head 117 117 104 39 1 3 3 ++10:25:35 cred_jar 1651 1848 192 21 1 88 88 ++10:25:35 dax_cache 57 57 832 19 4 3 3 ++10:25:35 dentry 346562 346655 208 19 1 18245 18245 ++10:25:35 dio 0 0 640 25 4 0 0 ++10:25:35 dm_uevent 0 0 2664 12 8 0 0 ++10:25:35 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:25:35 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:25:35 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:25:35 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:25:35 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:25:35 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:25:35 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:25:35 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:25:35 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:25:35 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:25:35 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:25:35 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:25:35 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:25:35 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:25:35 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:25:35 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:25:35 dnotify_struct 0 0 32 128 1 0 0 ++10:25:35 dquot 0 0 256 16 1 0 0 ++10:25:35 eventpoll_pwq 728 728 72 56 1 13 13 ++10:25:35 file_lock_cache 90 90 216 18 1 5 5 ++10:25:35 files_cache 230 230 704 23 4 10 10 ++10:25:35 filp 10438 12000 256 16 1 750 750 ++10:25:35 fscrypt_ctx 0 0 80 51 1 0 0 ++10:25:35 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:25:35 fuse_inode 19 19 832 19 4 1 1 ++10:25:35 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:25:35 iint_cache 0 0 120 34 1 0 0 ++10:25:35 inode_cache 26084 27100 640 25 4 1084 1084 ++10:25:35 ip4-frags 68 68 232 17 1 4 4 ++10:25:35 isofs_inode_cache 69 69 688 23 4 3 3 ++10:25:35 kcopyd_job 0 0 3312 9 8 0 0 ++10:25:35 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:25:35 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:25:35 kioctx 92 92 704 23 4 4 4 ++10:25:35 kmalloc-128 5748 5856 128 32 1 183 183 ++10:25:35 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:25:35 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:25:35 kmalloc-1k 4055 4352 1024 16 4 272 272 ++10:25:35 kmalloc-256 15322 15376 256 16 1 961 961 ++10:25:35 kmalloc-2k 697 768 2048 16 8 48 48 ++10:25:35 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:25:35 kmalloc-4k 1664 1728 4096 8 8 216 216 ++10:25:35 kmalloc-512 4200 8144 512 16 2 509 509 ++10:25:35 kmalloc-64 306657 307328 64 64 1 4802 4802 ++10:25:35 kmalloc-8 424448 424448 8 512 1 829 829 ++10:25:35 kmalloc-8k 69 84 8192 4 8 21 21 ++10:25:35 kmalloc-96 6342 6342 96 42 1 151 151 ++10:25:35 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:25:35 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:25:35 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:25:35 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:25:35 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:25:35 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:25:35 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:25:35 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:25:35 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:25:35 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:25:35 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:25:35 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:25:35 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:25:35 kmem_cache 176 176 512 16 2 11 11 ++10:25:35 kmem_cache_node 256 256 64 64 1 4 4 ++10:25:35 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:25:35 mm_struct 224 224 1152 28 8 8 8 ++10:25:35 mnt_cache 1500 1500 320 25 2 60 60 ++10:25:35 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:25:35 names_cache 56 56 4096 8 8 7 7 ++10:25:35 net_namespace 12 12 5312 6 8 2 2 ++10:25:35 nf_conntrack 225 225 320 25 2 9 9 ++10:25:35 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:25:35 numa_policy 31 31 264 31 2 1 1 ++10:25:35 pde_opener 408 408 40 102 1 4 4 ++10:25:35 pid 992 992 128 32 1 31 31 ++10:25:35 pid_namespace 0 0 240 17 1 0 0 ++10:25:35 PINGv6 0 0 1344 24 8 0 0 ++10:25:35 pool_workqueue 640 640 256 16 1 40 40 ++10:25:35 proc_dir_entry 819 819 192 21 1 39 39 ++10:25:35 proc_inode_cache 10450 10902 712 23 4 474 474 ++10:25:35 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:25:35 RAW 84 84 1152 28 8 3 3 ++10:25:35 RAWv6 72 72 1344 24 8 3 3 ++10:25:35 request_queue 39 39 2488 13 8 3 3 ++10:25:35 request_sock_TCP 0 0 336 24 2 0 0 ++10:25:35 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:25:35 rpc_inode_cache 23 23 704 23 4 1 1 ++10:25:35 scsi_sense_cache 160 160 128 32 1 5 5 ++10:25:35 search 0 0 680 24 4 0 0 ++10:25:35 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:25:35 sighand_cache 338 360 2112 15 8 24 24 ++10:25:35 signal_cache 1119 1232 1152 28 8 44 44 ++10:25:35 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:25:35 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:25:35 skbuff_head_cache 608 608 256 16 1 38 38 ++10:25:35 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:25:35 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:25:35 task_delay_info 8721 8721 80 51 1 171 171 ++10:25:35 task_group 0 0 832 19 4 0 0 ++10:25:35 task_struct 566 640 5824 5 8 128 128 ++10:25:35 taskstats 92 92 344 23 2 4 4 ++10:25:35 TCP 52 52 2432 13 8 4 4 ++10:25:35 TCPv6 48 48 2560 12 8 4 4 ++10:25:35 trace_event_file 2024 2024 88 46 1 44 44 ++10:25:35 tw_sock_TCP 87 87 280 29 2 3 3 ++10:25:35 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:25:35 UDP 100 100 1280 25 8 4 4 ++10:25:35 UDPv6 88 88 1472 22 8 4 4 ++10:25:35 user_namespace 0 0 600 27 4 0 0 ++10:25:35 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:25:35 uts_namespace 0 0 440 18 2 0 0 ++10:25:35 vm_area_struct 33972 34340 232 17 1 2020 2020 ++10:25:35 vmap_area 26432 26432 64 64 1 413 413 ++10:25:35 xfrm_dst_cache 756 756 384 21 2 36 36 ++10:25:35 xfs_btree_cur 72 72 224 18 1 4 4 ++10:25:35 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:25:35 xfs_buf_item 240 240 272 30 2 8 8 ++10:25:35 xfs_da_state 68 68 480 17 2 4 4 ++10:25:35 xfs_dqtrx 0 0 528 31 4 0 0 ++10:25:35 xfs_dquot 0 0 496 16 2 0 0 ++10:25:35 xfs_efd_item 468 468 440 18 2 26 26 ++10:25:35 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:25:35 xfs_log_ticket 88 88 184 22 1 4 4 ++10:25:35 xfs_rud_item 92 92 176 23 1 4 4 ++10:25:35 xfs_rui_item 0 0 696 23 4 0 0 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:25:38 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:25:38 Acpi-Parse 314417 315652 56 73 1 4324 4324 ++10:25:38 Acpi-State 765 765 80 51 1 15 15 ++10:25:38 anon_vma 11423 11895 104 39 1 305 305 ++10:25:38 anon_vma_chain 18153 19264 64 64 1 301 301 ++10:25:38 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:25:38 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:25:38 avtab_node 401880 401880 24 170 1 2364 2364 ++10:25:38 bdev_cache 72 72 896 18 4 4 4 ++10:25:38 bfq_io_cq 0 0 160 25 1 0 0 ++10:25:38 biovec-128 64 64 2048 16 8 4 4 ++10:25:38 biovec-64 64 64 1024 16 4 4 4 ++10:25:38 biovec-max 156 184 4096 8 8 23 23 ++10:25:38 blkdev_ioc 210 210 136 30 1 7 7 ++10:25:38 buffer_head 117 117 104 39 1 3 3 ++10:25:38 cred_jar 1651 1848 192 21 1 88 88 ++10:25:38 dax_cache 57 57 832 19 4 3 3 ++10:25:38 dentry 346367 346522 208 19 1 18238 18238 ++10:25:38 dio 0 0 640 25 4 0 0 ++10:25:38 dm_uevent 0 0 2664 12 8 0 0 ++10:25:38 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:25:38 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:25:38 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:25:38 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:25:38 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:25:38 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:25:38 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:25:38 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:25:38 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:25:38 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:25:38 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:25:38 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:25:38 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:25:38 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:25:38 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:25:38 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:25:38 dnotify_struct 0 0 32 128 1 0 0 ++10:25:38 dquot 0 0 256 16 1 0 0 ++10:25:38 eventpoll_pwq 728 728 72 56 1 13 13 ++10:25:38 file_lock_cache 90 90 216 18 1 5 5 ++10:25:38 files_cache 230 230 704 23 4 10 10 ++10:25:38 filp 10210 11808 256 16 1 738 738 ++10:25:38 fscrypt_ctx 0 0 80 51 1 0 0 ++10:25:38 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:25:38 fuse_inode 19 19 832 19 4 1 1 ++10:25:38 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:25:38 iint_cache 0 0 120 34 1 0 0 ++10:25:38 inode_cache 26084 27100 640 25 4 1084 1084 ++10:25:38 ip4-frags 68 68 232 17 1 4 4 ++10:25:38 isofs_inode_cache 69 69 688 23 4 3 3 ++10:25:38 kcopyd_job 0 0 3312 9 8 0 0 ++10:25:38 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:25:38 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:25:38 kioctx 92 92 704 23 4 4 4 ++10:25:38 kmalloc-128 5391 5696 128 32 1 178 178 ++10:25:38 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:25:38 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:25:38 kmalloc-1k 4432 4432 1024 16 4 277 277 ++10:25:38 kmalloc-256 15322 15376 256 16 1 961 961 ++10:25:38 kmalloc-2k 697 768 2048 16 8 48 48 ++10:25:38 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:25:38 kmalloc-4k 1648 1728 4096 8 8 216 216 ++10:25:38 kmalloc-512 3961 8144 512 16 2 509 509 ++10:25:38 kmalloc-64 306564 307328 64 64 1 4802 4802 ++10:25:38 kmalloc-8 424448 424448 8 512 1 829 829 ++10:25:38 kmalloc-8k 69 84 8192 4 8 21 21 ++10:25:38 kmalloc-96 6342 6342 96 42 1 151 151 ++10:25:38 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:25:38 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:25:38 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:25:38 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:25:38 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:25:38 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:25:38 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:25:38 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:25:38 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:25:38 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:25:38 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:25:38 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:25:38 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:25:38 kmem_cache 176 176 512 16 2 11 11 ++10:25:38 kmem_cache_node 256 256 64 64 1 4 4 ++10:25:38 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:25:38 mm_struct 224 224 1152 28 8 8 8 ++10:25:38 mnt_cache 1500 1500 320 25 2 60 60 ++10:25:38 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:25:38 names_cache 56 56 4096 8 8 7 7 ++10:25:38 net_namespace 12 12 5312 6 8 2 2 ++10:25:38 nf_conntrack 225 225 320 25 2 9 9 ++10:25:38 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:25:38 numa_policy 31 31 264 31 2 1 1 ++10:25:38 pde_opener 408 408 40 102 1 4 4 ++10:25:38 pid 992 992 128 32 1 31 31 ++10:25:38 pid_namespace 0 0 240 17 1 0 0 ++10:25:38 PINGv6 0 0 1344 24 8 0 0 ++10:25:38 pool_workqueue 640 640 256 16 1 40 40 ++10:25:38 proc_dir_entry 819 819 192 21 1 39 39 ++10:25:38 proc_inode_cache 10265 10902 712 23 4 474 474 ++10:25:38 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:25:38 RAW 84 84 1152 28 8 3 3 ++10:25:38 RAWv6 72 72 1344 24 8 3 3 ++10:25:38 request_queue 39 39 2488 13 8 3 3 ++10:25:38 request_sock_TCP 0 0 336 24 2 0 0 ++10:25:38 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:25:38 rpc_inode_cache 23 23 704 23 4 1 1 ++10:25:38 scsi_sense_cache 160 160 128 32 1 5 5 ++10:25:38 search 0 0 680 24 4 0 0 ++10:25:38 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:25:38 sighand_cache 338 360 2112 15 8 24 24 ++10:25:38 signal_cache 1119 1232 1152 28 8 44 44 ++10:25:38 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:25:38 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:25:38 skbuff_head_cache 624 624 256 16 1 39 39 ++10:25:38 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:25:38 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:25:38 task_delay_info 8721 8721 80 51 1 171 171 ++10:25:38 task_group 0 0 832 19 4 0 0 ++10:25:38 task_struct 557 640 5824 5 8 128 128 ++10:25:38 taskstats 92 92 344 23 2 4 4 ++10:25:38 TCP 52 52 2432 13 8 4 4 ++10:25:38 TCPv6 48 48 2560 12 8 4 4 ++10:25:38 trace_event_file 2024 2024 88 46 1 44 44 ++10:25:38 tw_sock_TCP 87 87 280 29 2 3 3 ++10:25:38 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:25:38 UDP 100 100 1280 25 8 4 4 ++10:25:38 UDPv6 88 88 1472 22 8 4 4 ++10:25:38 user_namespace 0 0 600 27 4 0 0 ++10:25:38 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:25:38 uts_namespace 0 0 440 18 2 0 0 ++10:25:38 vm_area_struct 33862 34340 232 17 1 2020 2020 ++10:25:38 vmap_area 26496 26496 64 64 1 414 414 ++10:25:38 xfrm_dst_cache 798 798 384 21 2 38 38 ++10:25:38 xfs_btree_cur 72 72 224 18 1 4 4 ++10:25:38 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:25:38 xfs_buf_item 240 240 272 30 2 8 8 ++10:25:38 xfs_da_state 68 68 480 17 2 4 4 ++10:25:38 xfs_dqtrx 0 0 528 31 4 0 0 ++10:25:38 xfs_dquot 0 0 496 16 2 0 0 ++10:25:38 xfs_efd_item 216 288 440 18 2 16 16 ++10:25:38 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:25:38 xfs_log_ticket 88 88 184 22 1 4 4 ++10:25:38 xfs_rud_item 92 92 176 23 1 4 4 ++10:25:38 xfs_rui_item 0 0 696 23 4 0 0 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:25:41 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:25:41 Acpi-Parse 314417 315652 56 73 1 4324 4324 ++10:25:41 Acpi-State 765 765 80 51 1 15 15 ++10:25:41 anon_vma 11423 11895 104 39 1 305 305 ++10:25:41 anon_vma_chain 18153 19264 64 64 1 301 301 ++10:25:41 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:25:41 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:25:41 avtab_node 401880 401880 24 170 1 2364 2364 ++10:25:41 bdev_cache 72 72 896 18 4 4 4 ++10:25:41 bfq_io_cq 0 0 160 25 1 0 0 ++10:25:41 biovec-128 64 64 2048 16 8 4 4 ++10:25:41 biovec-64 64 64 1024 16 4 4 4 ++10:25:41 biovec-max 156 184 4096 8 8 23 23 ++10:25:41 blkdev_ioc 210 210 136 30 1 7 7 ++10:25:41 buffer_head 117 117 104 39 1 3 3 ++10:25:41 cred_jar 1651 1848 192 21 1 88 88 ++10:25:41 dax_cache 57 57 832 19 4 3 3 ++10:25:41 dentry 346367 346522 208 19 1 18238 18238 ++10:25:41 dio 0 0 640 25 4 0 0 ++10:25:41 dm_uevent 0 0 2664 12 8 0 0 ++10:25:41 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:25:41 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:25:41 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:25:41 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:25:41 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:25:41 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:25:41 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:25:41 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:25:41 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:25:41 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:25:41 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:25:41 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:25:41 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:25:41 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:25:41 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:25:41 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:25:41 dnotify_struct 0 0 32 128 1 0 0 ++10:25:41 dquot 0 0 256 16 1 0 0 ++10:25:41 eventpoll_pwq 728 728 72 56 1 13 13 ++10:25:41 file_lock_cache 90 90 216 18 1 5 5 ++10:25:41 files_cache 230 230 704 23 4 10 10 ++10:25:41 filp 10210 11808 256 16 1 738 738 ++10:25:41 fscrypt_ctx 0 0 80 51 1 0 0 ++10:25:41 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:25:41 fuse_inode 19 19 832 19 4 1 1 ++10:25:41 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:25:41 iint_cache 0 0 120 34 1 0 0 ++10:25:41 inode_cache 26084 27100 640 25 4 1084 1084 ++10:25:41 ip4-frags 68 68 232 17 1 4 4 ++10:25:41 isofs_inode_cache 69 69 688 23 4 3 3 ++10:25:41 kcopyd_job 0 0 3312 9 8 0 0 ++10:25:41 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:25:41 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:25:41 kioctx 92 92 704 23 4 4 4 ++10:25:41 kmalloc-128 5391 5696 128 32 1 178 178 ++10:25:41 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:25:41 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:25:41 kmalloc-1k 4432 4432 1024 16 4 277 277 ++10:25:41 kmalloc-256 15322 15376 256 16 1 961 961 ++10:25:41 kmalloc-2k 697 768 2048 16 8 48 48 ++10:25:41 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:25:41 kmalloc-4k 1648 1728 4096 8 8 216 216 ++10:25:41 kmalloc-512 3961 8144 512 16 2 509 509 ++10:25:41 kmalloc-64 306564 307328 64 64 1 4802 4802 ++10:25:41 kmalloc-8 424448 424448 8 512 1 829 829 ++10:25:41 kmalloc-8k 69 84 8192 4 8 21 21 ++10:25:41 kmalloc-96 6342 6342 96 42 1 151 151 ++10:25:41 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:25:41 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:25:41 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:25:41 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:25:41 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:25:41 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:25:41 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:25:41 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:25:41 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:25:41 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:25:41 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:25:41 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:25:41 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:25:41 kmem_cache 176 176 512 16 2 11 11 ++10:25:41 kmem_cache_node 256 256 64 64 1 4 4 ++10:25:41 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:25:41 mm_struct 224 224 1152 28 8 8 8 ++10:25:41 mnt_cache 1500 1500 320 25 2 60 60 ++10:25:41 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:25:41 names_cache 56 56 4096 8 8 7 7 ++10:25:41 net_namespace 12 12 5312 6 8 2 2 ++10:25:41 nf_conntrack 225 225 320 25 2 9 9 ++10:25:41 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:25:41 numa_policy 31 31 264 31 2 1 1 ++10:25:41 pde_opener 408 408 40 102 1 4 4 ++10:25:41 pid 992 992 128 32 1 31 31 ++10:25:41 pid_namespace 0 0 240 17 1 0 0 ++10:25:41 PINGv6 0 0 1344 24 8 0 0 ++10:25:41 pool_workqueue 640 640 256 16 1 40 40 ++10:25:41 proc_dir_entry 819 819 192 21 1 39 39 ++10:25:41 proc_inode_cache 10265 10902 712 23 4 474 474 ++10:25:41 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:25:41 RAW 84 84 1152 28 8 3 3 ++10:25:41 RAWv6 72 72 1344 24 8 3 3 ++10:25:41 request_queue 39 39 2488 13 8 3 3 ++10:25:41 request_sock_TCP 0 0 336 24 2 0 0 ++10:25:41 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:25:41 rpc_inode_cache 23 23 704 23 4 1 1 ++10:25:41 scsi_sense_cache 160 160 128 32 1 5 5 ++10:25:41 search 0 0 680 24 4 0 0 ++10:25:41 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:25:41 sighand_cache 338 360 2112 15 8 24 24 ++10:25:41 signal_cache 1119 1232 1152 28 8 44 44 ++10:25:41 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:25:41 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:25:41 skbuff_head_cache 624 624 256 16 1 39 39 ++10:25:41 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:25:41 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:25:41 task_delay_info 8721 8721 80 51 1 171 171 ++10:25:41 task_group 0 0 832 19 4 0 0 ++10:25:41 task_struct 557 640 5824 5 8 128 128 ++10:25:41 taskstats 92 92 344 23 2 4 4 ++10:25:41 TCP 52 52 2432 13 8 4 4 ++10:25:41 TCPv6 48 48 2560 12 8 4 4 ++10:25:41 trace_event_file 2024 2024 88 46 1 44 44 ++10:25:41 tw_sock_TCP 87 87 280 29 2 3 3 ++10:25:41 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:25:41 UDP 100 100 1280 25 8 4 4 ++10:25:41 UDPv6 88 88 1472 22 8 4 4 ++10:25:41 user_namespace 0 0 600 27 4 0 0 ++10:25:41 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:25:41 uts_namespace 0 0 440 18 2 0 0 ++10:25:41 vm_area_struct 33862 34340 232 17 1 2020 2020 ++10:25:41 vmap_area 26496 26496 64 64 1 414 414 ++10:25:41 xfrm_dst_cache 798 798 384 21 2 38 38 ++10:25:41 xfs_btree_cur 72 72 224 18 1 4 4 ++10:25:41 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:25:41 xfs_buf_item 240 240 272 30 2 8 8 ++10:25:41 xfs_da_state 68 68 480 17 2 4 4 ++10:25:41 xfs_dqtrx 0 0 528 31 4 0 0 ++10:25:41 xfs_dquot 0 0 496 16 2 0 0 ++10:25:41 xfs_efd_item 216 288 440 18 2 16 16 ++10:25:41 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:25:41 xfs_log_ticket 88 88 184 22 1 4 4 ++10:25:41 xfs_rud_item 92 92 176 23 1 4 4 ++10:25:41 xfs_rui_item 0 0 696 23 4 0 0 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:25:44 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:25:44 Acpi-Parse 314417 315652 56 73 1 4324 4324 ++10:25:44 Acpi-State 765 765 80 51 1 15 15 ++10:25:44 anon_vma 11423 11895 104 39 1 305 305 ++10:25:44 anon_vma_chain 18153 19264 64 64 1 301 301 ++10:25:44 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:25:44 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:25:44 avtab_node 401880 401880 24 170 1 2364 2364 ++10:25:44 bdev_cache 72 72 896 18 4 4 4 ++10:25:44 bfq_io_cq 0 0 160 25 1 0 0 ++10:25:44 biovec-128 64 64 2048 16 8 4 4 ++10:25:44 biovec-64 64 64 1024 16 4 4 4 ++10:25:44 biovec-max 156 184 4096 8 8 23 23 ++10:25:44 blkdev_ioc 210 210 136 30 1 7 7 ++10:25:44 buffer_head 117 117 104 39 1 3 3 ++10:25:44 cred_jar 1651 1848 192 21 1 88 88 ++10:25:44 dax_cache 57 57 832 19 4 3 3 ++10:25:44 dentry 346367 346522 208 19 1 18238 18238 ++10:25:44 dio 0 0 640 25 4 0 0 ++10:25:44 dm_uevent 0 0 2664 12 8 0 0 ++10:25:44 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:25:44 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:25:44 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:25:44 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:25:44 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:25:44 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:25:44 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:25:44 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:25:44 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:25:44 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:25:44 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:25:44 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:25:44 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:25:44 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:25:44 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:25:44 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:25:44 dnotify_struct 0 0 32 128 1 0 0 ++10:25:44 dquot 0 0 256 16 1 0 0 ++10:25:44 eventpoll_pwq 728 728 72 56 1 13 13 ++10:25:44 file_lock_cache 90 90 216 18 1 5 5 ++10:25:44 files_cache 230 230 704 23 4 10 10 ++10:25:44 filp 10210 11808 256 16 1 738 738 ++10:25:44 fscrypt_ctx 0 0 80 51 1 0 0 ++10:25:44 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:25:44 fuse_inode 19 19 832 19 4 1 1 ++10:25:44 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:25:44 iint_cache 0 0 120 34 1 0 0 ++10:25:44 inode_cache 26084 27100 640 25 4 1084 1084 ++10:25:44 ip4-frags 68 68 232 17 1 4 4 ++10:25:44 isofs_inode_cache 69 69 688 23 4 3 3 ++10:25:44 kcopyd_job 0 0 3312 9 8 0 0 ++10:25:44 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:25:44 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:25:44 kioctx 92 92 704 23 4 4 4 ++10:25:44 kmalloc-128 5391 5696 128 32 1 178 178 ++10:25:44 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:25:44 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:25:44 kmalloc-1k 4432 4432 1024 16 4 277 277 ++10:25:44 kmalloc-256 15322 15376 256 16 1 961 961 ++10:25:44 kmalloc-2k 697 768 2048 16 8 48 48 ++10:25:44 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:25:44 kmalloc-4k 1648 1728 4096 8 8 216 216 ++10:25:44 kmalloc-512 3961 8144 512 16 2 509 509 ++10:25:44 kmalloc-64 306564 307328 64 64 1 4802 4802 ++10:25:44 kmalloc-8 424448 424448 8 512 1 829 829 ++10:25:44 kmalloc-8k 69 84 8192 4 8 21 21 ++10:25:44 kmalloc-96 6342 6342 96 42 1 151 151 ++10:25:44 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:25:44 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:25:44 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:25:44 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:25:44 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:25:44 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:25:44 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:25:44 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:25:44 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:25:44 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:25:44 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:25:44 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:25:44 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:25:44 kmem_cache 176 176 512 16 2 11 11 ++10:25:44 kmem_cache_node 256 256 64 64 1 4 4 ++10:25:44 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:25:44 mm_struct 224 224 1152 28 8 8 8 ++10:25:44 mnt_cache 1500 1500 320 25 2 60 60 ++10:25:44 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:25:44 names_cache 56 56 4096 8 8 7 7 ++10:25:44 net_namespace 12 12 5312 6 8 2 2 ++10:25:44 nf_conntrack 225 225 320 25 2 9 9 ++10:25:44 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:25:44 numa_policy 31 31 264 31 2 1 1 ++10:25:44 pde_opener 408 408 40 102 1 4 4 ++10:25:44 pid 992 992 128 32 1 31 31 ++10:25:44 pid_namespace 0 0 240 17 1 0 0 ++10:25:44 PINGv6 0 0 1344 24 8 0 0 ++10:25:44 pool_workqueue 640 640 256 16 1 40 40 ++10:25:44 proc_dir_entry 819 819 192 21 1 39 39 ++10:25:44 proc_inode_cache 10265 10902 712 23 4 474 474 ++10:25:44 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:25:44 RAW 84 84 1152 28 8 3 3 ++10:25:44 RAWv6 72 72 1344 24 8 3 3 ++10:25:44 request_queue 39 39 2488 13 8 3 3 ++10:25:44 request_sock_TCP 0 0 336 24 2 0 0 ++10:25:44 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:25:44 rpc_inode_cache 23 23 704 23 4 1 1 ++10:25:44 scsi_sense_cache 160 160 128 32 1 5 5 ++10:25:44 search 0 0 680 24 4 0 0 ++10:25:44 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:25:44 sighand_cache 338 360 2112 15 8 24 24 ++10:25:44 signal_cache 1119 1232 1152 28 8 44 44 ++10:25:44 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:25:44 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:25:44 skbuff_head_cache 624 624 256 16 1 39 39 ++10:25:44 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:25:44 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:25:44 task_delay_info 8721 8721 80 51 1 171 171 ++10:25:44 task_group 0 0 832 19 4 0 0 ++10:25:44 task_struct 557 640 5824 5 8 128 128 ++10:25:44 taskstats 92 92 344 23 2 4 4 ++10:25:44 TCP 52 52 2432 13 8 4 4 ++10:25:44 TCPv6 48 48 2560 12 8 4 4 ++10:25:44 trace_event_file 2024 2024 88 46 1 44 44 ++10:25:44 tw_sock_TCP 87 87 280 29 2 3 3 ++10:25:44 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:25:44 UDP 100 100 1280 25 8 4 4 ++10:25:44 UDPv6 88 88 1472 22 8 4 4 ++10:25:44 user_namespace 0 0 600 27 4 0 0 ++10:25:44 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:25:44 uts_namespace 0 0 440 18 2 0 0 ++10:25:44 vm_area_struct 33862 34340 232 17 1 2020 2020 ++10:25:44 vmap_area 26496 26496 64 64 1 414 414 ++10:25:44 xfrm_dst_cache 798 798 384 21 2 38 38 ++10:25:44 xfs_btree_cur 72 72 224 18 1 4 4 ++10:25:44 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:25:44 xfs_buf_item 240 240 272 30 2 8 8 ++10:25:44 xfs_da_state 68 68 480 17 2 4 4 ++10:25:44 xfs_dqtrx 0 0 528 31 4 0 0 ++10:25:44 xfs_dquot 0 0 496 16 2 0 0 ++10:25:44 xfs_efd_item 216 288 440 18 2 16 16 ++10:25:44 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:25:44 xfs_log_ticket 88 88 184 22 1 4 4 ++10:25:44 xfs_rud_item 92 92 176 23 1 4 4 ++10:25:44 xfs_rui_item 0 0 696 23 4 0 0 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:25:47 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:25:47 Acpi-Parse 314417 315652 56 73 1 4324 4324 ++10:25:47 Acpi-State 765 765 80 51 1 15 15 ++10:25:47 anon_vma 11423 11895 104 39 1 305 305 ++10:25:47 anon_vma_chain 18153 19264 64 64 1 301 301 ++10:25:47 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:25:47 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:25:47 avtab_node 401880 401880 24 170 1 2364 2364 ++10:25:47 bdev_cache 72 72 896 18 4 4 4 ++10:25:47 bfq_io_cq 0 0 160 25 1 0 0 ++10:25:47 biovec-128 64 64 2048 16 8 4 4 ++10:25:47 biovec-64 64 64 1024 16 4 4 4 ++10:25:47 biovec-max 156 184 4096 8 8 23 23 ++10:25:47 blkdev_ioc 210 210 136 30 1 7 7 ++10:25:47 buffer_head 117 117 104 39 1 3 3 ++10:25:47 cred_jar 1651 1848 192 21 1 88 88 ++10:25:47 dax_cache 57 57 832 19 4 3 3 ++10:25:47 dentry 346367 346522 208 19 1 18238 18238 ++10:25:47 dio 0 0 640 25 4 0 0 ++10:25:47 dm_uevent 0 0 2664 12 8 0 0 ++10:25:47 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:25:47 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:25:47 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:25:47 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:25:47 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:25:47 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:25:47 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:25:47 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:25:47 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:25:47 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:25:47 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:25:47 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:25:47 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:25:47 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:25:47 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:25:47 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:25:47 dnotify_struct 0 0 32 128 1 0 0 ++10:25:47 dquot 0 0 256 16 1 0 0 ++10:25:47 eventpoll_pwq 728 728 72 56 1 13 13 ++10:25:47 file_lock_cache 90 90 216 18 1 5 5 ++10:25:47 files_cache 230 230 704 23 4 10 10 ++10:25:47 filp 10210 11808 256 16 1 738 738 ++10:25:47 fscrypt_ctx 0 0 80 51 1 0 0 ++10:25:47 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:25:47 fuse_inode 19 19 832 19 4 1 1 ++10:25:47 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:25:47 iint_cache 0 0 120 34 1 0 0 ++10:25:47 inode_cache 26084 27100 640 25 4 1084 1084 ++10:25:47 ip4-frags 68 68 232 17 1 4 4 ++10:25:47 isofs_inode_cache 69 69 688 23 4 3 3 ++10:25:47 kcopyd_job 0 0 3312 9 8 0 0 ++10:25:47 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:25:47 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:25:47 kioctx 92 92 704 23 4 4 4 ++10:25:47 kmalloc-128 5391 5696 128 32 1 178 178 ++10:25:47 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:25:47 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:25:47 kmalloc-1k 4432 4432 1024 16 4 277 277 ++10:25:47 kmalloc-256 15322 15376 256 16 1 961 961 ++10:25:47 kmalloc-2k 697 768 2048 16 8 48 48 ++10:25:47 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:25:47 kmalloc-4k 1648 1728 4096 8 8 216 216 ++10:25:47 kmalloc-512 3961 8144 512 16 2 509 509 ++10:25:47 kmalloc-64 306564 307328 64 64 1 4802 4802 ++10:25:47 kmalloc-8 424448 424448 8 512 1 829 829 ++10:25:47 kmalloc-8k 69 84 8192 4 8 21 21 ++10:25:47 kmalloc-96 6342 6342 96 42 1 151 151 ++10:25:47 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:25:47 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:25:47 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:25:47 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:25:47 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:25:47 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:25:47 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:25:47 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:25:47 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:25:47 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:25:47 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:25:47 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:25:47 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:25:47 kmem_cache 176 176 512 16 2 11 11 ++10:25:47 kmem_cache_node 256 256 64 64 1 4 4 ++10:25:47 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:25:47 mm_struct 224 224 1152 28 8 8 8 ++10:25:47 mnt_cache 1500 1500 320 25 2 60 60 ++10:25:47 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:25:47 names_cache 56 56 4096 8 8 7 7 ++10:25:47 net_namespace 12 12 5312 6 8 2 2 ++10:25:47 nf_conntrack 225 225 320 25 2 9 9 ++10:25:47 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:25:47 numa_policy 31 31 264 31 2 1 1 ++10:25:47 pde_opener 408 408 40 102 1 4 4 ++10:25:47 pid 992 992 128 32 1 31 31 ++10:25:47 pid_namespace 0 0 240 17 1 0 0 ++10:25:47 PINGv6 0 0 1344 24 8 0 0 ++10:25:47 pool_workqueue 640 640 256 16 1 40 40 ++10:25:47 proc_dir_entry 819 819 192 21 1 39 39 ++10:25:47 proc_inode_cache 10265 10902 712 23 4 474 474 ++10:25:47 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:25:47 RAW 84 84 1152 28 8 3 3 ++10:25:47 RAWv6 72 72 1344 24 8 3 3 ++10:25:47 request_queue 39 39 2488 13 8 3 3 ++10:25:47 request_sock_TCP 0 0 336 24 2 0 0 ++10:25:47 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:25:47 rpc_inode_cache 23 23 704 23 4 1 1 ++10:25:47 scsi_sense_cache 160 160 128 32 1 5 5 ++10:25:47 search 0 0 680 24 4 0 0 ++10:25:47 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:25:47 sighand_cache 338 360 2112 15 8 24 24 ++10:25:47 signal_cache 1119 1232 1152 28 8 44 44 ++10:25:47 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:25:47 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:25:47 skbuff_head_cache 624 624 256 16 1 39 39 ++10:25:47 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:25:47 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:25:47 task_delay_info 8721 8721 80 51 1 171 171 ++10:25:47 task_group 0 0 832 19 4 0 0 ++10:25:47 task_struct 557 640 5824 5 8 128 128 ++10:25:47 taskstats 92 92 344 23 2 4 4 ++10:25:47 TCP 52 52 2432 13 8 4 4 ++10:25:47 TCPv6 48 48 2560 12 8 4 4 ++10:25:47 trace_event_file 2024 2024 88 46 1 44 44 ++10:25:47 tw_sock_TCP 87 87 280 29 2 3 3 ++10:25:47 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:25:47 UDP 100 100 1280 25 8 4 4 ++10:25:47 UDPv6 88 88 1472 22 8 4 4 ++10:25:47 user_namespace 0 0 600 27 4 0 0 ++10:25:47 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:25:47 uts_namespace 0 0 440 18 2 0 0 ++10:25:47 vm_area_struct 33862 34340 232 17 1 2020 2020 ++10:25:47 vmap_area 26496 26496 64 64 1 414 414 ++10:25:47 xfrm_dst_cache 798 798 384 21 2 38 38 ++10:25:47 xfs_btree_cur 72 72 224 18 1 4 4 ++10:25:47 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:25:47 xfs_buf_item 240 240 272 30 2 8 8 ++10:25:47 xfs_da_state 68 68 480 17 2 4 4 ++10:25:47 xfs_dqtrx 0 0 528 31 4 0 0 ++10:25:47 xfs_dquot 0 0 496 16 2 0 0 ++10:25:47 xfs_efd_item 216 288 440 18 2 16 16 ++10:25:47 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:25:47 xfs_log_ticket 88 88 184 22 1 4 4 ++10:25:47 xfs_rud_item 92 92 176 23 1 4 4 ++10:25:47 xfs_rui_item 0 0 696 23 4 0 0 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:25:50 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:25:50 Acpi-Parse 314406 315652 56 73 1 4324 4324 ++10:25:50 Acpi-State 765 765 80 51 1 15 15 ++10:25:50 anon_vma 11423 11895 104 39 1 305 305 ++10:25:50 anon_vma_chain 18206 19264 64 64 1 301 301 ++10:25:50 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:25:50 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:25:50 avtab_node 401880 401880 24 170 1 2364 2364 ++10:25:50 bdev_cache 72 72 896 18 4 4 4 ++10:25:50 bfq_io_cq 0 0 160 25 1 0 0 ++10:25:50 biovec-128 64 64 2048 16 8 4 4 ++10:25:50 biovec-64 64 64 1024 16 4 4 4 ++10:25:50 biovec-max 136 176 4096 8 8 22 22 ++10:25:50 blkdev_ioc 210 210 136 30 1 7 7 ++10:25:50 buffer_head 117 117 104 39 1 3 3 ++10:25:50 cred_jar 1651 1848 192 21 1 88 88 ++10:25:50 dax_cache 57 57 832 19 4 3 3 ++10:25:50 dentry 346366 346522 208 19 1 18238 18238 ++10:25:50 dio 0 0 640 25 4 0 0 ++10:25:50 dm_uevent 0 0 2664 12 8 0 0 ++10:25:50 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:25:50 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:25:50 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:25:50 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:25:50 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:25:50 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:25:50 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:25:50 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:25:50 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:25:50 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:25:50 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:25:50 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:25:50 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:25:50 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:25:50 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:25:50 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:25:50 dnotify_struct 0 0 32 128 1 0 0 ++10:25:50 dquot 0 0 256 16 1 0 0 ++10:25:50 eventpoll_pwq 728 728 72 56 1 13 13 ++10:25:50 file_lock_cache 90 90 216 18 1 5 5 ++10:25:50 files_cache 230 230 704 23 4 10 10 ++10:25:50 filp 10241 11808 256 16 1 738 738 ++10:25:50 fscrypt_ctx 0 0 80 51 1 0 0 ++10:25:50 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:25:50 fuse_inode 19 19 832 19 4 1 1 ++10:25:50 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:25:50 iint_cache 0 0 120 34 1 0 0 ++10:25:50 inode_cache 26084 27100 640 25 4 1084 1084 ++10:25:50 ip4-frags 68 68 232 17 1 4 4 ++10:25:50 isofs_inode_cache 69 69 688 23 4 3 3 ++10:25:50 kcopyd_job 0 0 3312 9 8 0 0 ++10:25:50 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:25:50 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:25:50 kioctx 92 92 704 23 4 4 4 ++10:25:50 kmalloc-128 5391 5696 128 32 1 178 178 ++10:25:50 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:25:50 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:25:50 kmalloc-1k 4624 4624 1024 16 4 289 289 ++10:25:50 kmalloc-256 15322 15376 256 16 1 961 961 ++10:25:50 kmalloc-2k 697 768 2048 16 8 48 48 ++10:25:50 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:25:50 kmalloc-4k 1648 1728 4096 8 8 216 216 ++10:25:50 kmalloc-512 3914 8144 512 16 2 509 509 ++10:25:50 kmalloc-64 306563 307328 64 64 1 4802 4802 ++10:25:50 kmalloc-8 424448 424448 8 512 1 829 829 ++10:25:50 kmalloc-8k 69 84 8192 4 8 21 21 ++10:25:50 kmalloc-96 6342 6342 96 42 1 151 151 ++10:25:50 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:25:50 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:25:50 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:25:50 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:25:50 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:25:50 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:25:50 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:25:50 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:25:50 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:25:50 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:25:50 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:25:50 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:25:50 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:25:50 kmem_cache 176 176 512 16 2 11 11 ++10:25:50 kmem_cache_node 256 256 64 64 1 4 4 ++10:25:50 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:25:50 mm_struct 224 224 1152 28 8 8 8 ++10:25:50 mnt_cache 1500 1500 320 25 2 60 60 ++10:25:50 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:25:50 names_cache 56 56 4096 8 8 7 7 ++10:25:50 net_namespace 12 12 5312 6 8 2 2 ++10:25:50 nf_conntrack 225 225 320 25 2 9 9 ++10:25:50 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:25:50 numa_policy 31 31 264 31 2 1 1 ++10:25:50 pde_opener 408 408 40 102 1 4 4 ++10:25:50 pid 992 992 128 32 1 31 31 ++10:25:50 pid_namespace 0 0 240 17 1 0 0 ++10:25:50 PINGv6 0 0 1344 24 8 0 0 ++10:25:50 pool_workqueue 640 640 256 16 1 40 40 ++10:25:50 proc_dir_entry 819 819 192 21 1 39 39 ++10:25:50 proc_inode_cache 10224 10902 712 23 4 474 474 ++10:25:50 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:25:50 RAW 84 84 1152 28 8 3 3 ++10:25:50 RAWv6 72 72 1344 24 8 3 3 ++10:25:50 request_queue 39 39 2488 13 8 3 3 ++10:25:50 request_sock_TCP 0 0 336 24 2 0 0 ++10:25:50 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:25:50 rpc_inode_cache 23 23 704 23 4 1 1 ++10:25:50 scsi_sense_cache 160 160 128 32 1 5 5 ++10:25:50 search 0 0 680 24 4 0 0 ++10:25:50 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:25:50 sighand_cache 338 360 2112 15 8 24 24 ++10:25:50 signal_cache 1119 1232 1152 28 8 44 44 ++10:25:50 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:25:50 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:25:50 skbuff_head_cache 624 624 256 16 1 39 39 ++10:25:50 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:25:50 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:25:50 task_delay_info 8721 8721 80 51 1 171 171 ++10:25:50 task_group 0 0 832 19 4 0 0 ++10:25:50 task_struct 558 640 5824 5 8 128 128 ++10:25:50 taskstats 92 92 344 23 2 4 4 ++10:25:50 TCP 52 52 2432 13 8 4 4 ++10:25:50 TCPv6 48 48 2560 12 8 4 4 ++10:25:50 trace_event_file 2024 2024 88 46 1 44 44 ++10:25:50 tw_sock_TCP 87 87 280 29 2 3 3 ++10:25:50 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:25:50 UDP 100 100 1280 25 8 4 4 ++10:25:50 UDPv6 88 88 1472 22 8 4 4 ++10:25:50 user_namespace 0 0 600 27 4 0 0 ++10:25:50 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:25:50 uts_namespace 0 0 440 18 2 0 0 ++10:25:50 vm_area_struct 33756 34340 232 17 1 2020 2020 ++10:25:50 vmap_area 26496 26496 64 64 1 414 414 ++10:25:50 xfrm_dst_cache 798 798 384 21 2 38 38 ++10:25:50 xfs_btree_cur 72 72 224 18 1 4 4 ++10:25:50 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:25:50 xfs_buf_item 240 240 272 30 2 8 8 ++10:25:50 xfs_da_state 68 68 480 17 2 4 4 ++10:25:50 xfs_dqtrx 0 0 528 31 4 0 0 ++10:25:50 xfs_dquot 0 0 496 16 2 0 0 ++10:25:50 xfs_efd_item 216 288 440 18 2 16 16 ++10:25:50 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:25:50 xfs_log_ticket 88 88 184 22 1 4 4 ++10:25:50 xfs_rud_item 92 92 176 23 1 4 4 ++10:25:50 xfs_rui_item 0 0 696 23 4 0 0 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:25:53 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:25:53 Acpi-Parse 314406 315652 56 73 1 4324 4324 ++10:25:53 Acpi-State 765 765 80 51 1 15 15 ++10:25:53 anon_vma 11423 11895 104 39 1 305 305 ++10:25:53 anon_vma_chain 18206 19264 64 64 1 301 301 ++10:25:53 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:25:53 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:25:53 avtab_node 401880 401880 24 170 1 2364 2364 ++10:25:53 bdev_cache 72 72 896 18 4 4 4 ++10:25:53 bfq_io_cq 0 0 160 25 1 0 0 ++10:25:53 biovec-128 64 64 2048 16 8 4 4 ++10:25:53 biovec-64 64 64 1024 16 4 4 4 ++10:25:53 biovec-max 136 176 4096 8 8 22 22 ++10:25:53 blkdev_ioc 210 210 136 30 1 7 7 ++10:25:53 buffer_head 117 117 104 39 1 3 3 ++10:25:53 cred_jar 1651 1848 192 21 1 88 88 ++10:25:53 dax_cache 57 57 832 19 4 3 3 ++10:25:53 dentry 346366 346522 208 19 1 18238 18238 ++10:25:53 dio 0 0 640 25 4 0 0 ++10:25:53 dm_uevent 0 0 2664 12 8 0 0 ++10:25:53 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:25:53 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:25:53 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:25:53 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:25:53 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:25:53 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:25:53 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:25:53 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:25:53 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:25:53 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:25:53 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:25:53 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:25:53 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:25:53 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:25:53 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:25:53 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:25:53 dnotify_struct 0 0 32 128 1 0 0 ++10:25:53 dquot 0 0 256 16 1 0 0 ++10:25:53 eventpoll_pwq 728 728 72 56 1 13 13 ++10:25:53 file_lock_cache 90 90 216 18 1 5 5 ++10:25:53 files_cache 230 230 704 23 4 10 10 ++10:25:53 filp 10241 11808 256 16 1 738 738 ++10:25:53 fscrypt_ctx 0 0 80 51 1 0 0 ++10:25:53 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:25:53 fuse_inode 19 19 832 19 4 1 1 ++10:25:53 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:25:53 iint_cache 0 0 120 34 1 0 0 ++10:25:53 inode_cache 26084 27100 640 25 4 1084 1084 ++10:25:53 ip4-frags 68 68 232 17 1 4 4 ++10:25:53 isofs_inode_cache 69 69 688 23 4 3 3 ++10:25:53 kcopyd_job 0 0 3312 9 8 0 0 ++10:25:53 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:25:53 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:25:53 kioctx 92 92 704 23 4 4 4 ++10:25:53 kmalloc-128 5391 5696 128 32 1 178 178 ++10:25:53 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:25:53 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:25:53 kmalloc-1k 4624 4624 1024 16 4 289 289 ++10:25:53 kmalloc-256 15322 15376 256 16 1 961 961 ++10:25:53 kmalloc-2k 697 768 2048 16 8 48 48 ++10:25:53 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:25:53 kmalloc-4k 1648 1728 4096 8 8 216 216 ++10:25:53 kmalloc-512 3914 8144 512 16 2 509 509 ++10:25:53 kmalloc-64 306563 307328 64 64 1 4802 4802 ++10:25:53 kmalloc-8 424448 424448 8 512 1 829 829 ++10:25:53 kmalloc-8k 69 84 8192 4 8 21 21 ++10:25:53 kmalloc-96 6342 6342 96 42 1 151 151 ++10:25:53 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:25:53 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:25:53 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:25:53 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:25:53 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:25:53 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:25:53 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:25:53 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:25:53 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:25:53 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:25:53 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:25:53 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:25:53 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:25:53 kmem_cache 176 176 512 16 2 11 11 ++10:25:53 kmem_cache_node 256 256 64 64 1 4 4 ++10:25:53 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:25:53 mm_struct 224 224 1152 28 8 8 8 ++10:25:53 mnt_cache 1500 1500 320 25 2 60 60 ++10:25:53 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:25:53 names_cache 56 56 4096 8 8 7 7 ++10:25:53 net_namespace 12 12 5312 6 8 2 2 ++10:25:53 nf_conntrack 225 225 320 25 2 9 9 ++10:25:53 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:25:53 numa_policy 31 31 264 31 2 1 1 ++10:25:53 pde_opener 408 408 40 102 1 4 4 ++10:25:53 pid 992 992 128 32 1 31 31 ++10:25:53 pid_namespace 0 0 240 17 1 0 0 ++10:25:53 PINGv6 0 0 1344 24 8 0 0 ++10:25:53 pool_workqueue 640 640 256 16 1 40 40 ++10:25:53 proc_dir_entry 819 819 192 21 1 39 39 ++10:25:53 proc_inode_cache 10224 10902 712 23 4 474 474 ++10:25:53 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:25:53 RAW 84 84 1152 28 8 3 3 ++10:25:53 RAWv6 72 72 1344 24 8 3 3 ++10:25:53 request_queue 39 39 2488 13 8 3 3 ++10:25:53 request_sock_TCP 0 0 336 24 2 0 0 ++10:25:53 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:25:53 rpc_inode_cache 23 23 704 23 4 1 1 ++10:25:53 scsi_sense_cache 160 160 128 32 1 5 5 ++10:25:53 search 0 0 680 24 4 0 0 ++10:25:53 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:25:53 sighand_cache 338 360 2112 15 8 24 24 ++10:25:53 signal_cache 1119 1232 1152 28 8 44 44 ++10:25:53 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:25:53 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:25:53 skbuff_head_cache 624 624 256 16 1 39 39 ++10:25:53 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:25:53 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:25:53 task_delay_info 8721 8721 80 51 1 171 171 ++10:25:53 task_group 0 0 832 19 4 0 0 ++10:25:53 task_struct 558 640 5824 5 8 128 128 ++10:25:53 taskstats 92 92 344 23 2 4 4 ++10:25:53 TCP 52 52 2432 13 8 4 4 ++10:25:53 TCPv6 48 48 2560 12 8 4 4 ++10:25:53 trace_event_file 2024 2024 88 46 1 44 44 ++10:25:53 tw_sock_TCP 87 87 280 29 2 3 3 ++10:25:53 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:25:53 UDP 100 100 1280 25 8 4 4 ++10:25:53 UDPv6 88 88 1472 22 8 4 4 ++10:25:53 user_namespace 0 0 600 27 4 0 0 ++10:25:53 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:25:53 uts_namespace 0 0 440 18 2 0 0 ++10:25:53 vm_area_struct 33756 34340 232 17 1 2020 2020 ++10:25:53 vmap_area 26496 26496 64 64 1 414 414 ++10:25:53 xfrm_dst_cache 798 798 384 21 2 38 38 ++10:25:53 xfs_btree_cur 72 72 224 18 1 4 4 ++10:25:53 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:25:53 xfs_buf_item 240 240 272 30 2 8 8 ++10:25:53 xfs_da_state 68 68 480 17 2 4 4 ++10:25:53 xfs_dqtrx 0 0 528 31 4 0 0 ++10:25:53 xfs_dquot 0 0 496 16 2 0 0 ++10:25:53 xfs_efd_item 216 288 440 18 2 16 16 ++10:25:53 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:25:53 xfs_log_ticket 88 88 184 22 1 4 4 ++10:25:53 xfs_rud_item 92 92 176 23 1 4 4 ++10:25:53 xfs_rui_item 0 0 696 23 4 0 0 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:25:56 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:25:56 Acpi-Parse 314406 315652 56 73 1 4324 4324 ++10:25:56 Acpi-State 765 765 80 51 1 15 15 ++10:25:56 anon_vma 11423 11895 104 39 1 305 305 ++10:25:56 anon_vma_chain 18206 19264 64 64 1 301 301 ++10:25:56 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:25:56 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:25:56 avtab_node 401880 401880 24 170 1 2364 2364 ++10:25:56 bdev_cache 72 72 896 18 4 4 4 ++10:25:56 bfq_io_cq 0 0 160 25 1 0 0 ++10:25:56 biovec-128 64 64 2048 16 8 4 4 ++10:25:56 biovec-64 64 64 1024 16 4 4 4 ++10:25:56 biovec-max 136 176 4096 8 8 22 22 ++10:25:56 blkdev_ioc 210 210 136 30 1 7 7 ++10:25:56 buffer_head 117 117 104 39 1 3 3 ++10:25:56 cred_jar 1651 1848 192 21 1 88 88 ++10:25:56 dax_cache 57 57 832 19 4 3 3 ++10:25:56 dentry 346366 346522 208 19 1 18238 18238 ++10:25:56 dio 0 0 640 25 4 0 0 ++10:25:56 dm_uevent 0 0 2664 12 8 0 0 ++10:25:56 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:25:56 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:25:56 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:25:56 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:25:56 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:25:56 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:25:56 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:25:56 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:25:56 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:25:56 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:25:56 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:25:56 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:25:56 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:25:56 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:25:56 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:25:56 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:25:56 dnotify_struct 0 0 32 128 1 0 0 ++10:25:56 dquot 0 0 256 16 1 0 0 ++10:25:56 eventpoll_pwq 728 728 72 56 1 13 13 ++10:25:56 file_lock_cache 90 90 216 18 1 5 5 ++10:25:56 files_cache 230 230 704 23 4 10 10 ++10:25:56 filp 10241 11808 256 16 1 738 738 ++10:25:56 fscrypt_ctx 0 0 80 51 1 0 0 ++10:25:56 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:25:56 fuse_inode 19 19 832 19 4 1 1 ++10:25:56 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:25:56 iint_cache 0 0 120 34 1 0 0 ++10:25:56 inode_cache 26084 27100 640 25 4 1084 1084 ++10:25:56 ip4-frags 68 68 232 17 1 4 4 ++10:25:56 isofs_inode_cache 69 69 688 23 4 3 3 ++10:25:56 kcopyd_job 0 0 3312 9 8 0 0 ++10:25:56 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:25:56 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:25:56 kioctx 92 92 704 23 4 4 4 ++10:25:56 kmalloc-128 5391 5696 128 32 1 178 178 ++10:25:56 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:25:56 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:25:56 kmalloc-1k 4624 4624 1024 16 4 289 289 ++10:25:56 kmalloc-256 15322 15376 256 16 1 961 961 ++10:25:56 kmalloc-2k 697 768 2048 16 8 48 48 ++10:25:56 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:25:56 kmalloc-4k 1648 1728 4096 8 8 216 216 ++10:25:56 kmalloc-512 3914 8144 512 16 2 509 509 ++10:25:56 kmalloc-64 306563 307328 64 64 1 4802 4802 ++10:25:56 kmalloc-8 424448 424448 8 512 1 829 829 ++10:25:56 kmalloc-8k 69 84 8192 4 8 21 21 ++10:25:56 kmalloc-96 6342 6342 96 42 1 151 151 ++10:25:56 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:25:56 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:25:56 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:25:56 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:25:56 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:25:56 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:25:56 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:25:56 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:25:56 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:25:56 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:25:56 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:25:56 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:25:56 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:25:56 kmem_cache 176 176 512 16 2 11 11 ++10:25:56 kmem_cache_node 256 256 64 64 1 4 4 ++10:25:56 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:25:56 mm_struct 224 224 1152 28 8 8 8 ++10:25:56 mnt_cache 1500 1500 320 25 2 60 60 ++10:25:56 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:25:56 names_cache 56 56 4096 8 8 7 7 ++10:25:56 net_namespace 12 12 5312 6 8 2 2 ++10:25:56 nf_conntrack 225 225 320 25 2 9 9 ++10:25:56 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:25:56 numa_policy 31 31 264 31 2 1 1 ++10:25:56 pde_opener 408 408 40 102 1 4 4 ++10:25:56 pid 992 992 128 32 1 31 31 ++10:25:56 pid_namespace 0 0 240 17 1 0 0 ++10:25:56 PINGv6 0 0 1344 24 8 0 0 ++10:25:56 pool_workqueue 640 640 256 16 1 40 40 ++10:25:56 proc_dir_entry 819 819 192 21 1 39 39 ++10:25:56 proc_inode_cache 10224 10902 712 23 4 474 474 ++10:25:56 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:25:56 RAW 84 84 1152 28 8 3 3 ++10:25:56 RAWv6 72 72 1344 24 8 3 3 ++10:25:56 request_queue 39 39 2488 13 8 3 3 ++10:25:56 request_sock_TCP 0 0 336 24 2 0 0 ++10:25:56 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:25:56 rpc_inode_cache 23 23 704 23 4 1 1 ++10:25:56 scsi_sense_cache 160 160 128 32 1 5 5 ++10:25:56 search 0 0 680 24 4 0 0 ++10:25:56 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:25:56 sighand_cache 338 360 2112 15 8 24 24 ++10:25:56 signal_cache 1119 1232 1152 28 8 44 44 ++10:25:56 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:25:56 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:25:56 skbuff_head_cache 624 624 256 16 1 39 39 ++10:25:56 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:25:56 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:25:56 task_delay_info 8721 8721 80 51 1 171 171 ++10:25:56 task_group 0 0 832 19 4 0 0 ++10:25:56 task_struct 558 640 5824 5 8 128 128 ++10:25:56 taskstats 92 92 344 23 2 4 4 ++10:25:56 TCP 52 52 2432 13 8 4 4 ++10:25:56 TCPv6 48 48 2560 12 8 4 4 ++10:25:56 trace_event_file 2024 2024 88 46 1 44 44 ++10:25:56 tw_sock_TCP 87 87 280 29 2 3 3 ++10:25:56 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:25:56 UDP 100 100 1280 25 8 4 4 ++10:25:56 UDPv6 88 88 1472 22 8 4 4 ++10:25:56 user_namespace 0 0 600 27 4 0 0 ++10:25:56 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:25:56 uts_namespace 0 0 440 18 2 0 0 ++10:25:56 vm_area_struct 33756 34340 232 17 1 2020 2020 ++10:25:56 vmap_area 26496 26496 64 64 1 414 414 ++10:25:56 xfrm_dst_cache 798 798 384 21 2 38 38 ++10:25:56 xfs_btree_cur 72 72 224 18 1 4 4 ++10:25:56 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:25:56 xfs_buf_item 240 240 272 30 2 8 8 ++10:25:56 xfs_da_state 68 68 480 17 2 4 4 ++10:25:56 xfs_dqtrx 0 0 528 31 4 0 0 ++10:25:56 xfs_dquot 0 0 496 16 2 0 0 ++10:25:56 xfs_efd_item 216 288 440 18 2 16 16 ++10:25:56 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:25:56 xfs_log_ticket 88 88 184 22 1 4 4 ++10:25:56 xfs_rud_item 92 92 176 23 1 4 4 ++10:25:56 xfs_rui_item 0 0 696 23 4 0 0 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:25:59 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:25:59 Acpi-Parse 314406 315652 56 73 1 4324 4324 ++10:25:59 Acpi-State 765 765 80 51 1 15 15 ++10:25:59 anon_vma 11423 11895 104 39 1 305 305 ++10:25:59 anon_vma_chain 18206 19264 64 64 1 301 301 ++10:25:59 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:25:59 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:25:59 avtab_node 401880 401880 24 170 1 2364 2364 ++10:25:59 bdev_cache 72 72 896 18 4 4 4 ++10:25:59 bfq_io_cq 0 0 160 25 1 0 0 ++10:25:59 biovec-128 64 64 2048 16 8 4 4 ++10:25:59 biovec-64 64 64 1024 16 4 4 4 ++10:25:59 biovec-max 136 176 4096 8 8 22 22 ++10:25:59 blkdev_ioc 210 210 136 30 1 7 7 ++10:25:59 buffer_head 117 117 104 39 1 3 3 ++10:25:59 cred_jar 1651 1848 192 21 1 88 88 ++10:25:59 dax_cache 57 57 832 19 4 3 3 ++10:25:59 dentry 346446 346522 208 19 1 18238 18238 ++10:25:59 dio 0 0 640 25 4 0 0 ++10:25:59 dm_uevent 0 0 2664 12 8 0 0 ++10:25:59 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:25:59 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:25:59 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:25:59 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:25:59 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:25:59 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:25:59 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:25:59 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:25:59 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:25:59 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:25:59 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:25:59 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:25:59 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:25:59 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:25:59 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:25:59 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:25:59 dnotify_struct 0 0 32 128 1 0 0 ++10:25:59 dquot 0 0 256 16 1 0 0 ++10:25:59 eventpoll_pwq 728 728 72 56 1 13 13 ++10:25:59 file_lock_cache 90 90 216 18 1 5 5 ++10:25:59 files_cache 230 230 704 23 4 10 10 ++10:25:59 filp 10301 11824 256 16 1 739 739 ++10:25:59 fscrypt_ctx 0 0 80 51 1 0 0 ++10:25:59 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:25:59 fuse_inode 19 19 832 19 4 1 1 ++10:25:59 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:25:59 iint_cache 0 0 120 34 1 0 0 ++10:25:59 inode_cache 26084 27100 640 25 4 1084 1084 ++10:25:59 ip4-frags 68 68 232 17 1 4 4 ++10:25:59 isofs_inode_cache 69 69 688 23 4 3 3 ++10:25:59 kcopyd_job 0 0 3312 9 8 0 0 ++10:25:59 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:25:59 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:25:59 kioctx 92 92 704 23 4 4 4 ++10:25:59 kmalloc-128 5391 5696 128 32 1 178 178 ++10:25:59 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:25:59 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:25:59 kmalloc-1k 4624 4624 1024 16 4 289 289 ++10:25:59 kmalloc-256 15322 15376 256 16 1 961 961 ++10:25:59 kmalloc-2k 697 768 2048 16 8 48 48 ++10:25:59 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:25:59 kmalloc-4k 1652 1728 4096 8 8 216 216 ++10:25:59 kmalloc-512 3912 8144 512 16 2 509 509 ++10:25:59 kmalloc-64 306563 307328 64 64 1 4802 4802 ++10:25:59 kmalloc-8 424448 424448 8 512 1 829 829 ++10:25:59 kmalloc-8k 69 84 8192 4 8 21 21 ++10:25:59 kmalloc-96 6342 6342 96 42 1 151 151 ++10:25:59 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:25:59 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:25:59 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:25:59 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:25:59 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:25:59 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:25:59 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:25:59 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:25:59 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:25:59 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:25:59 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:25:59 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:25:59 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:25:59 kmem_cache 176 176 512 16 2 11 11 ++10:25:59 kmem_cache_node 256 256 64 64 1 4 4 ++10:25:59 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:25:59 mm_struct 224 224 1152 28 8 8 8 ++10:25:59 mnt_cache 1500 1500 320 25 2 60 60 ++10:25:59 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:25:59 names_cache 56 56 4096 8 8 7 7 ++10:25:59 net_namespace 12 12 5312 6 8 2 2 ++10:25:59 nf_conntrack 225 225 320 25 2 9 9 ++10:25:59 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:25:59 numa_policy 31 31 264 31 2 1 1 ++10:25:59 pde_opener 408 408 40 102 1 4 4 ++10:25:59 pid 992 992 128 32 1 31 31 ++10:25:59 pid_namespace 0 0 240 17 1 0 0 ++10:25:59 PINGv6 0 0 1344 24 8 0 0 ++10:25:59 pool_workqueue 640 640 256 16 1 40 40 ++10:25:59 proc_dir_entry 819 819 192 21 1 39 39 ++10:25:59 proc_inode_cache 10235 10902 712 23 4 474 474 ++10:25:59 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:25:59 RAW 84 84 1152 28 8 3 3 ++10:25:59 RAWv6 72 72 1344 24 8 3 3 ++10:25:59 request_queue 39 39 2488 13 8 3 3 ++10:25:59 request_sock_TCP 0 0 336 24 2 0 0 ++10:25:59 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:25:59 rpc_inode_cache 23 23 704 23 4 1 1 ++10:25:59 scsi_sense_cache 160 160 128 32 1 5 5 ++10:25:59 search 0 0 680 24 4 0 0 ++10:25:59 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:25:59 sighand_cache 338 360 2112 15 8 24 24 ++10:25:59 signal_cache 1119 1232 1152 28 8 44 44 ++10:25:59 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:25:59 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:25:59 skbuff_head_cache 624 624 256 16 1 39 39 ++10:25:59 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:25:59 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:25:59 task_delay_info 8721 8721 80 51 1 171 171 ++10:25:59 task_group 0 0 832 19 4 0 0 ++10:25:59 task_struct 558 640 5824 5 8 128 128 ++10:25:59 taskstats 92 92 344 23 2 4 4 ++10:25:59 TCP 52 52 2432 13 8 4 4 ++10:25:59 TCPv6 48 48 2560 12 8 4 4 ++10:25:59 trace_event_file 2024 2024 88 46 1 44 44 ++10:25:59 tw_sock_TCP 87 87 280 29 2 3 3 ++10:25:59 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:25:59 UDP 100 100 1280 25 8 4 4 ++10:25:59 UDPv6 88 88 1472 22 8 4 4 ++10:25:59 user_namespace 0 0 600 27 4 0 0 ++10:25:59 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:25:59 uts_namespace 0 0 440 18 2 0 0 ++10:25:59 vm_area_struct 33756 34340 232 17 1 2020 2020 ++10:25:59 vmap_area 26496 26496 64 64 1 414 414 ++10:25:59 xfrm_dst_cache 798 798 384 21 2 38 38 ++10:25:59 xfs_btree_cur 72 72 224 18 1 4 4 ++10:25:59 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:25:59 xfs_buf_item 240 240 272 30 2 8 8 ++10:25:59 xfs_da_state 68 68 480 17 2 4 4 ++10:25:59 xfs_dqtrx 0 0 528 31 4 0 0 ++10:25:59 xfs_dquot 0 0 496 16 2 0 0 ++10:25:59 xfs_efd_item 216 288 440 18 2 16 16 ++10:25:59 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:25:59 xfs_log_ticket 88 88 184 22 1 4 4 ++10:25:59 xfs_rud_item 92 92 176 23 1 4 4 ++10:25:59 xfs_rui_item 0 0 696 23 4 0 0 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:26:02 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:26:02 Acpi-Parse 314406 315652 56 73 1 4324 4324 ++10:26:02 Acpi-State 765 765 80 51 1 15 15 ++10:26:02 anon_vma 11423 11895 104 39 1 305 305 ++10:26:02 anon_vma_chain 18206 19264 64 64 1 301 301 ++10:26:02 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:26:02 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:26:02 avtab_node 401880 401880 24 170 1 2364 2364 ++10:26:02 bdev_cache 72 72 896 18 4 4 4 ++10:26:02 bfq_io_cq 0 0 160 25 1 0 0 ++10:26:02 biovec-128 64 64 2048 16 8 4 4 ++10:26:02 biovec-64 64 64 1024 16 4 4 4 ++10:26:02 biovec-max 136 176 4096 8 8 22 22 ++10:26:02 blkdev_ioc 210 210 136 30 1 7 7 ++10:26:02 buffer_head 117 117 104 39 1 3 3 ++10:26:02 cred_jar 1651 1848 192 21 1 88 88 ++10:26:02 dax_cache 57 57 832 19 4 3 3 ++10:26:02 dentry 346446 346522 208 19 1 18238 18238 ++10:26:02 dio 0 0 640 25 4 0 0 ++10:26:02 dm_uevent 0 0 2664 12 8 0 0 ++10:26:02 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:26:02 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:26:02 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:26:02 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:26:02 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:26:02 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:26:02 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:26:02 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:26:02 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:26:02 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:26:02 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:26:02 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:26:02 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:26:02 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:26:02 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:26:02 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:26:02 dnotify_struct 0 0 32 128 1 0 0 ++10:26:02 dquot 0 0 256 16 1 0 0 ++10:26:02 eventpoll_pwq 728 728 72 56 1 13 13 ++10:26:02 file_lock_cache 90 90 216 18 1 5 5 ++10:26:02 files_cache 230 230 704 23 4 10 10 ++10:26:02 filp 10301 11824 256 16 1 739 739 ++10:26:02 fscrypt_ctx 0 0 80 51 1 0 0 ++10:26:02 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:26:02 fuse_inode 19 19 832 19 4 1 1 ++10:26:02 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:26:02 iint_cache 0 0 120 34 1 0 0 ++10:26:02 inode_cache 26084 27100 640 25 4 1084 1084 ++10:26:02 ip4-frags 68 68 232 17 1 4 4 ++10:26:02 isofs_inode_cache 69 69 688 23 4 3 3 ++10:26:02 kcopyd_job 0 0 3312 9 8 0 0 ++10:26:02 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:26:02 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:26:02 kioctx 92 92 704 23 4 4 4 ++10:26:02 kmalloc-128 5391 5696 128 32 1 178 178 ++10:26:02 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:26:02 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:26:02 kmalloc-1k 4624 4624 1024 16 4 289 289 ++10:26:02 kmalloc-256 15322 15376 256 16 1 961 961 ++10:26:02 kmalloc-2k 697 768 2048 16 8 48 48 ++10:26:02 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:26:02 kmalloc-4k 1652 1728 4096 8 8 216 216 ++10:26:02 kmalloc-512 3912 8144 512 16 2 509 509 ++10:26:02 kmalloc-64 306563 307328 64 64 1 4802 4802 ++10:26:02 kmalloc-8 424448 424448 8 512 1 829 829 ++10:26:02 kmalloc-8k 69 84 8192 4 8 21 21 ++10:26:02 kmalloc-96 6342 6342 96 42 1 151 151 ++10:26:02 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:26:02 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:26:02 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:26:02 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:26:02 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:26:02 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:26:02 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:26:02 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:26:02 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:26:02 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:26:02 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:26:02 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:26:02 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:26:02 kmem_cache 176 176 512 16 2 11 11 ++10:26:02 kmem_cache_node 256 256 64 64 1 4 4 ++10:26:02 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:26:02 mm_struct 224 224 1152 28 8 8 8 ++10:26:02 mnt_cache 1500 1500 320 25 2 60 60 ++10:26:02 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:26:02 names_cache 56 56 4096 8 8 7 7 ++10:26:02 net_namespace 12 12 5312 6 8 2 2 ++10:26:02 nf_conntrack 225 225 320 25 2 9 9 ++10:26:02 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:26:02 numa_policy 31 31 264 31 2 1 1 ++10:26:02 pde_opener 408 408 40 102 1 4 4 ++10:26:02 pid 992 992 128 32 1 31 31 ++10:26:02 pid_namespace 0 0 240 17 1 0 0 ++10:26:02 PINGv6 0 0 1344 24 8 0 0 ++10:26:02 pool_workqueue 640 640 256 16 1 40 40 ++10:26:02 proc_dir_entry 819 819 192 21 1 39 39 ++10:26:02 proc_inode_cache 10235 10902 712 23 4 474 474 ++10:26:02 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:26:02 RAW 84 84 1152 28 8 3 3 ++10:26:02 RAWv6 72 72 1344 24 8 3 3 ++10:26:02 request_queue 39 39 2488 13 8 3 3 ++10:26:02 request_sock_TCP 0 0 336 24 2 0 0 ++10:26:02 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:26:02 rpc_inode_cache 23 23 704 23 4 1 1 ++10:26:02 scsi_sense_cache 160 160 128 32 1 5 5 ++10:26:02 search 0 0 680 24 4 0 0 ++10:26:02 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:26:02 sighand_cache 338 360 2112 15 8 24 24 ++10:26:02 signal_cache 1119 1232 1152 28 8 44 44 ++10:26:02 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:26:02 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:26:02 skbuff_head_cache 624 624 256 16 1 39 39 ++10:26:02 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:26:02 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:26:02 task_delay_info 8721 8721 80 51 1 171 171 ++10:26:02 task_group 0 0 832 19 4 0 0 ++10:26:02 task_struct 558 640 5824 5 8 128 128 ++10:26:02 taskstats 92 92 344 23 2 4 4 ++10:26:02 TCP 52 52 2432 13 8 4 4 ++10:26:02 TCPv6 48 48 2560 12 8 4 4 ++10:26:02 trace_event_file 2024 2024 88 46 1 44 44 ++10:26:02 tw_sock_TCP 87 87 280 29 2 3 3 ++10:26:02 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:26:02 UDP 100 100 1280 25 8 4 4 ++10:26:02 UDPv6 88 88 1472 22 8 4 4 ++10:26:02 user_namespace 0 0 600 27 4 0 0 ++10:26:02 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:26:02 uts_namespace 0 0 440 18 2 0 0 ++10:26:02 vm_area_struct 33756 34340 232 17 1 2020 2020 ++10:26:02 vmap_area 26496 26496 64 64 1 414 414 ++10:26:02 xfrm_dst_cache 798 798 384 21 2 38 38 ++10:26:02 xfs_btree_cur 72 72 224 18 1 4 4 ++10:26:02 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:26:02 xfs_buf_item 240 240 272 30 2 8 8 ++10:26:02 xfs_da_state 68 68 480 17 2 4 4 ++10:26:02 xfs_dqtrx 0 0 528 31 4 0 0 ++10:26:02 xfs_dquot 0 0 496 16 2 0 0 ++10:26:02 xfs_efd_item 216 288 440 18 2 16 16 ++10:26:02 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:26:02 xfs_log_ticket 88 88 184 22 1 4 4 ++10:26:02 xfs_rud_item 92 92 176 23 1 4 4 ++10:26:02 xfs_rui_item 0 0 696 23 4 0 0 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:26:05 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:26:05 Acpi-Parse 314406 315652 56 73 1 4324 4324 ++10:26:05 Acpi-State 765 765 80 51 1 15 15 ++10:26:05 anon_vma 11423 11895 104 39 1 305 305 ++10:26:05 anon_vma_chain 18206 19264 64 64 1 301 301 ++10:26:05 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:26:05 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:26:05 avtab_node 401880 401880 24 170 1 2364 2364 ++10:26:05 bdev_cache 72 72 896 18 4 4 4 ++10:26:05 bfq_io_cq 0 0 160 25 1 0 0 ++10:26:05 biovec-128 64 64 2048 16 8 4 4 ++10:26:05 biovec-64 64 64 1024 16 4 4 4 ++10:26:05 biovec-max 136 176 4096 8 8 22 22 ++10:26:05 blkdev_ioc 210 210 136 30 1 7 7 ++10:26:05 buffer_head 117 117 104 39 1 3 3 ++10:26:05 cred_jar 1651 1848 192 21 1 88 88 ++10:26:05 dax_cache 57 57 832 19 4 3 3 ++10:26:05 dentry 346446 346522 208 19 1 18238 18238 ++10:26:05 dio 0 0 640 25 4 0 0 ++10:26:05 dm_uevent 0 0 2664 12 8 0 0 ++10:26:05 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:26:05 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:26:05 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:26:05 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:26:05 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:26:05 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:26:05 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:26:05 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:26:05 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:26:05 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:26:05 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:26:05 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:26:05 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:26:05 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:26:05 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:26:05 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:26:05 dnotify_struct 0 0 32 128 1 0 0 ++10:26:05 dquot 0 0 256 16 1 0 0 ++10:26:05 eventpoll_pwq 728 728 72 56 1 13 13 ++10:26:05 file_lock_cache 90 90 216 18 1 5 5 ++10:26:05 files_cache 230 230 704 23 4 10 10 ++10:26:05 filp 10301 11824 256 16 1 739 739 ++10:26:05 fscrypt_ctx 0 0 80 51 1 0 0 ++10:26:05 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:26:05 fuse_inode 19 19 832 19 4 1 1 ++10:26:05 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:26:05 iint_cache 0 0 120 34 1 0 0 ++10:26:05 inode_cache 26084 27100 640 25 4 1084 1084 ++10:26:05 ip4-frags 68 68 232 17 1 4 4 ++10:26:05 isofs_inode_cache 69 69 688 23 4 3 3 ++10:26:05 kcopyd_job 0 0 3312 9 8 0 0 ++10:26:05 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:26:05 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:26:05 kioctx 92 92 704 23 4 4 4 ++10:26:05 kmalloc-128 5391 5696 128 32 1 178 178 ++10:26:05 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:26:05 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:26:05 kmalloc-1k 4624 4624 1024 16 4 289 289 ++10:26:05 kmalloc-256 15322 15376 256 16 1 961 961 ++10:26:05 kmalloc-2k 697 768 2048 16 8 48 48 ++10:26:05 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:26:05 kmalloc-4k 1652 1728 4096 8 8 216 216 ++10:26:05 kmalloc-512 3912 8144 512 16 2 509 509 ++10:26:05 kmalloc-64 306563 307328 64 64 1 4802 4802 ++10:26:05 kmalloc-8 424448 424448 8 512 1 829 829 ++10:26:05 kmalloc-8k 69 84 8192 4 8 21 21 ++10:26:05 kmalloc-96 6342 6342 96 42 1 151 151 ++10:26:05 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:26:05 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:26:05 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:26:05 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:26:05 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:26:05 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:26:05 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:26:05 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:26:05 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:26:05 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:26:05 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:26:05 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:26:05 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:26:05 kmem_cache 176 176 512 16 2 11 11 ++10:26:05 kmem_cache_node 256 256 64 64 1 4 4 ++10:26:05 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:26:05 mm_struct 224 224 1152 28 8 8 8 ++10:26:05 mnt_cache 1500 1500 320 25 2 60 60 ++10:26:05 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:26:05 names_cache 56 56 4096 8 8 7 7 ++10:26:05 net_namespace 12 12 5312 6 8 2 2 ++10:26:05 nf_conntrack 225 225 320 25 2 9 9 ++10:26:05 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:26:05 numa_policy 31 31 264 31 2 1 1 ++10:26:05 pde_opener 408 408 40 102 1 4 4 ++10:26:05 pid 992 992 128 32 1 31 31 ++10:26:05 pid_namespace 0 0 240 17 1 0 0 ++10:26:05 PINGv6 0 0 1344 24 8 0 0 ++10:26:05 pool_workqueue 640 640 256 16 1 40 40 ++10:26:05 proc_dir_entry 819 819 192 21 1 39 39 ++10:26:05 proc_inode_cache 10235 10902 712 23 4 474 474 ++10:26:05 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:26:05 RAW 84 84 1152 28 8 3 3 ++10:26:05 RAWv6 72 72 1344 24 8 3 3 ++10:26:05 request_queue 39 39 2488 13 8 3 3 ++10:26:05 request_sock_TCP 0 0 336 24 2 0 0 ++10:26:05 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:26:05 rpc_inode_cache 23 23 704 23 4 1 1 ++10:26:05 scsi_sense_cache 160 160 128 32 1 5 5 ++10:26:05 search 0 0 680 24 4 0 0 ++10:26:05 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:26:05 sighand_cache 338 360 2112 15 8 24 24 ++10:26:05 signal_cache 1119 1232 1152 28 8 44 44 ++10:26:05 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:26:05 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:26:05 skbuff_head_cache 624 624 256 16 1 39 39 ++10:26:05 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:26:05 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:26:05 task_delay_info 8721 8721 80 51 1 171 171 ++10:26:05 task_group 0 0 832 19 4 0 0 ++10:26:05 task_struct 558 640 5824 5 8 128 128 ++10:26:05 taskstats 92 92 344 23 2 4 4 ++10:26:05 TCP 52 52 2432 13 8 4 4 ++10:26:05 TCPv6 48 48 2560 12 8 4 4 ++10:26:05 trace_event_file 2024 2024 88 46 1 44 44 ++10:26:05 tw_sock_TCP 87 87 280 29 2 3 3 ++10:26:05 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:26:05 UDP 100 100 1280 25 8 4 4 ++10:26:05 UDPv6 88 88 1472 22 8 4 4 ++10:26:05 user_namespace 0 0 600 27 4 0 0 ++10:26:05 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:26:05 uts_namespace 0 0 440 18 2 0 0 ++10:26:05 vm_area_struct 33756 34340 232 17 1 2020 2020 ++10:26:05 vmap_area 26496 26496 64 64 1 414 414 ++10:26:05 xfrm_dst_cache 798 798 384 21 2 38 38 ++10:26:05 xfs_btree_cur 72 72 224 18 1 4 4 ++10:26:05 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:26:05 xfs_buf_item 240 240 272 30 2 8 8 ++10:26:05 xfs_da_state 68 68 480 17 2 4 4 ++10:26:05 xfs_dqtrx 0 0 528 31 4 0 0 ++10:26:05 xfs_dquot 0 0 496 16 2 0 0 ++10:26:05 xfs_efd_item 216 288 440 18 2 16 16 ++10:26:05 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:26:05 xfs_log_ticket 88 88 184 22 1 4 4 ++10:26:05 xfs_rud_item 92 92 176 23 1 4 4 ++10:26:05 xfs_rui_item 0 0 696 23 4 0 0 ++ ++pcp-slabinfo output : Display output ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:25:18 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:25:18 Acpi-Parse 314423 315652 56 73 1 4324 4324 ++10:25:18 Acpi-State 765 765 80 51 1 15 15 ++10:25:18 anon_vma 11481 11895 104 39 1 305 305 ++10:25:18 anon_vma_chain 18269 19264 64 64 1 301 301 ++10:25:18 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:25:18 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:25:18 avtab_node 401880 401880 24 170 1 2364 2364 ++10:25:18 bdev_cache 72 72 896 18 4 4 4 ++10:25:18 bfq_io_cq 0 0 160 25 1 0 0 ++10:25:18 biovec-128 64 64 2048 16 8 4 4 ++10:25:18 biovec-64 64 64 1024 16 4 4 4 ++10:25:18 biovec-max 148 192 4096 8 8 24 24 ++10:25:18 blkdev_ioc 210 210 136 30 1 7 7 ++10:25:18 buffer_head 117 117 104 39 1 3 3 ++10:25:18 cred_jar 1651 1848 192 21 1 88 88 ++10:25:18 dax_cache 57 57 832 19 4 3 3 ++10:25:18 dentry 346540 346655 208 19 1 18245 18245 ++10:25:18 dio 0 0 640 25 4 0 0 ++10:25:18 dm_uevent 0 0 2664 12 8 0 0 ++10:25:18 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:25:18 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:25:18 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:25:18 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:25:18 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:25:18 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:25:18 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:25:18 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:25:18 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:25:18 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:25:18 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:25:18 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:25:18 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:25:18 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:25:18 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:25:18 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:25:18 dnotify_struct 0 0 32 128 1 0 0 ++10:25:18 dquot 0 0 256 16 1 0 0 ++10:25:18 eventpoll_pwq 728 728 72 56 1 13 13 ++10:25:18 file_lock_cache 90 90 216 18 1 5 5 ++10:25:18 files_cache 230 230 704 23 4 10 10 ++10:25:18 filp 10324 11808 256 16 1 738 738 ++10:25:18 fscrypt_ctx 0 0 80 51 1 0 0 ++10:25:18 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:25:18 fuse_inode 19 19 832 19 4 1 1 ++10:25:18 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:25:18 iint_cache 0 0 120 34 1 0 0 ++10:25:18 inode_cache 26084 27100 640 25 4 1084 1084 ++10:25:18 ip4-frags 68 68 232 17 1 4 4 ++10:25:18 isofs_inode_cache 69 69 688 23 4 3 3 ++10:25:18 kcopyd_job 0 0 3312 9 8 0 0 ++10:25:18 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:25:18 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:25:18 kioctx 92 92 704 23 4 4 4 ++10:25:18 kmalloc-128 5693 5856 128 32 1 183 183 ++10:25:18 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:25:18 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:25:18 kmalloc-1k 4037 4352 1024 16 4 272 272 ++10:25:18 kmalloc-256 15322 15376 256 16 1 961 961 ++10:25:18 kmalloc-2k 697 768 2048 16 8 48 48 ++10:25:18 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:25:18 kmalloc-4k 1657 1728 4096 8 8 216 216 ++10:25:18 kmalloc-512 4174 8144 512 16 2 509 509 ++10:25:18 kmalloc-64 306657 307328 64 64 1 4802 4802 ++10:25:18 kmalloc-8 424448 424448 8 512 1 829 829 ++10:25:18 kmalloc-8k 69 84 8192 4 8 21 21 ++10:25:18 kmalloc-96 6342 6342 96 42 1 151 151 ++10:25:18 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:25:18 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:25:18 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:25:18 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:25:18 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:25:18 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:25:18 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:25:18 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:25:18 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:25:18 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:25:18 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:25:18 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:25:18 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:25:18 kmem_cache 176 176 512 16 2 11 11 ++10:25:18 kmem_cache_node 256 256 64 64 1 4 4 ++10:25:18 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:25:18 mm_struct 224 224 1152 28 8 8 8 ++10:25:18 mnt_cache 1500 1500 320 25 2 60 60 ++10:25:18 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:25:18 names_cache 56 56 4096 8 8 7 7 ++10:25:18 net_namespace 12 12 5312 6 8 2 2 ++10:25:18 nf_conntrack 225 225 320 25 2 9 9 ++10:25:18 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:25:18 numa_policy 31 31 264 31 2 1 1 ++10:25:18 pde_opener 408 408 40 102 1 4 4 ++10:25:18 pid 992 992 128 32 1 31 31 ++10:25:18 pid_namespace 0 0 240 17 1 0 0 ++10:25:18 PINGv6 0 0 1344 24 8 0 0 ++10:25:18 pool_workqueue 640 640 256 16 1 40 40 ++10:25:18 proc_dir_entry 819 819 192 21 1 39 39 ++10:25:18 proc_inode_cache 10403 10902 712 23 4 474 474 ++10:25:18 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:25:18 RAW 84 84 1152 28 8 3 3 ++10:25:18 RAWv6 72 72 1344 24 8 3 3 ++10:25:18 request_queue 39 39 2488 13 8 3 3 ++10:25:18 request_sock_TCP 0 0 336 24 2 0 0 ++10:25:18 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:25:18 rpc_inode_cache 23 23 704 23 4 1 1 ++10:25:18 scsi_sense_cache 160 160 128 32 1 5 5 ++10:25:18 search 0 0 680 24 4 0 0 ++10:25:18 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:25:18 sighand_cache 338 360 2112 15 8 24 24 ++10:25:18 signal_cache 1119 1232 1152 28 8 44 44 ++10:25:18 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:25:18 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:25:18 skbuff_head_cache 608 608 256 16 1 38 38 ++10:25:18 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:25:18 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:25:18 task_delay_info 8721 8721 80 51 1 171 171 ++10:25:18 task_group 0 0 832 19 4 0 0 ++10:25:18 task_struct 566 640 5824 5 8 128 128 ++10:25:18 taskstats 92 92 344 23 2 4 4 ++10:25:18 TCP 52 52 2432 13 8 4 4 ++10:25:18 TCPv6 48 48 2560 12 8 4 4 ++10:25:18 trace_event_file 2024 2024 88 46 1 44 44 ++10:25:18 tw_sock_TCP 87 87 280 29 2 3 3 ++10:25:18 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:25:18 UDP 100 100 1280 25 8 4 4 ++10:25:18 UDPv6 88 88 1472 22 8 4 4 ++10:25:18 user_namespace 0 0 600 27 4 0 0 ++10:25:18 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:25:18 uts_namespace 0 0 440 18 2 0 0 ++10:25:18 vm_area_struct 33984 34340 232 17 1 2020 2020 ++10:25:18 vmap_area 26304 26304 64 64 1 411 411 ++10:25:18 xfrm_dst_cache 756 756 384 21 2 36 36 ++10:25:18 xfs_btree_cur 72 72 224 18 1 4 4 ++10:25:18 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:25:18 xfs_buf_item 240 240 272 30 2 8 8 ++10:25:18 xfs_da_state 68 68 480 17 2 4 4 ++10:25:18 xfs_dqtrx 0 0 528 31 4 0 0 ++10:25:18 xfs_dquot 0 0 496 16 2 0 0 ++10:25:18 xfs_efd_item 414 414 440 18 2 23 23 ++10:25:18 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:25:18 xfs_log_ticket 88 88 184 22 1 4 4 ++10:25:18 xfs_rud_item 92 92 176 23 1 4 4 ++10:25:18 xfs_rui_item 0 0 696 23 4 0 0 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:25:21 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:25:21 Acpi-Parse 314423 315652 56 73 1 4324 4324 ++10:25:21 Acpi-State 765 765 80 51 1 15 15 ++10:25:21 anon_vma 11481 11895 104 39 1 305 305 ++10:25:21 anon_vma_chain 18269 19264 64 64 1 301 301 ++10:25:21 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:25:21 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:25:21 avtab_node 401880 401880 24 170 1 2364 2364 ++10:25:21 bdev_cache 72 72 896 18 4 4 4 ++10:25:21 bfq_io_cq 0 0 160 25 1 0 0 ++10:25:21 biovec-128 64 64 2048 16 8 4 4 ++10:25:21 biovec-64 64 64 1024 16 4 4 4 ++10:25:21 biovec-max 148 192 4096 8 8 24 24 ++10:25:21 blkdev_ioc 210 210 136 30 1 7 7 ++10:25:21 buffer_head 117 117 104 39 1 3 3 ++10:25:21 cred_jar 1651 1848 192 21 1 88 88 ++10:25:21 dax_cache 57 57 832 19 4 3 3 ++10:25:21 dentry 346540 346655 208 19 1 18245 18245 ++10:25:21 dio 0 0 640 25 4 0 0 ++10:25:21 dm_uevent 0 0 2664 12 8 0 0 ++10:25:21 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:25:21 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:25:21 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:25:21 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:25:21 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:25:21 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:25:21 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:25:21 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:25:21 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:25:21 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:25:21 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:25:21 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:25:21 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:25:21 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:25:21 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:25:21 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:25:21 dnotify_struct 0 0 32 128 1 0 0 ++10:25:21 dquot 0 0 256 16 1 0 0 ++10:25:21 eventpoll_pwq 728 728 72 56 1 13 13 ++10:25:21 file_lock_cache 90 90 216 18 1 5 5 ++10:25:21 files_cache 230 230 704 23 4 10 10 ++10:25:21 filp 10324 11808 256 16 1 738 738 ++10:25:21 fscrypt_ctx 0 0 80 51 1 0 0 ++10:25:21 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:25:21 fuse_inode 19 19 832 19 4 1 1 ++10:25:21 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:25:21 iint_cache 0 0 120 34 1 0 0 ++10:25:21 inode_cache 26084 27100 640 25 4 1084 1084 ++10:25:21 ip4-frags 68 68 232 17 1 4 4 ++10:25:21 isofs_inode_cache 69 69 688 23 4 3 3 ++10:25:21 kcopyd_job 0 0 3312 9 8 0 0 ++10:25:21 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:25:21 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:25:21 kioctx 92 92 704 23 4 4 4 ++10:25:21 kmalloc-128 5693 5856 128 32 1 183 183 ++10:25:21 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:25:21 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:25:21 kmalloc-1k 4037 4352 1024 16 4 272 272 ++10:25:21 kmalloc-256 15322 15376 256 16 1 961 961 ++10:25:21 kmalloc-2k 697 768 2048 16 8 48 48 ++10:25:21 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:25:21 kmalloc-4k 1657 1728 4096 8 8 216 216 ++10:25:21 kmalloc-512 4174 8144 512 16 2 509 509 ++10:25:21 kmalloc-64 306657 307328 64 64 1 4802 4802 ++10:25:21 kmalloc-8 424448 424448 8 512 1 829 829 ++10:25:21 kmalloc-8k 69 84 8192 4 8 21 21 ++10:25:21 kmalloc-96 6342 6342 96 42 1 151 151 ++10:25:21 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:25:21 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:25:21 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:25:21 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:25:21 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:25:21 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:25:21 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:25:21 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:25:21 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:25:21 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:25:21 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:25:21 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:25:21 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:25:21 kmem_cache 176 176 512 16 2 11 11 ++10:25:21 kmem_cache_node 256 256 64 64 1 4 4 ++10:25:21 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:25:21 mm_struct 224 224 1152 28 8 8 8 ++10:25:21 mnt_cache 1500 1500 320 25 2 60 60 ++10:25:21 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:25:21 names_cache 56 56 4096 8 8 7 7 ++10:25:21 net_namespace 12 12 5312 6 8 2 2 ++10:25:21 nf_conntrack 225 225 320 25 2 9 9 ++10:25:21 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:25:21 numa_policy 31 31 264 31 2 1 1 ++10:25:21 pde_opener 408 408 40 102 1 4 4 ++10:25:21 pid 992 992 128 32 1 31 31 ++10:25:21 pid_namespace 0 0 240 17 1 0 0 ++10:25:21 PINGv6 0 0 1344 24 8 0 0 ++10:25:21 pool_workqueue 640 640 256 16 1 40 40 ++10:25:21 proc_dir_entry 819 819 192 21 1 39 39 ++10:25:21 proc_inode_cache 10403 10902 712 23 4 474 474 ++10:25:21 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:25:21 RAW 84 84 1152 28 8 3 3 ++10:25:21 RAWv6 72 72 1344 24 8 3 3 ++10:25:21 request_queue 39 39 2488 13 8 3 3 ++10:25:21 request_sock_TCP 0 0 336 24 2 0 0 ++10:25:21 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:25:21 rpc_inode_cache 23 23 704 23 4 1 1 ++10:25:21 scsi_sense_cache 160 160 128 32 1 5 5 ++10:25:21 search 0 0 680 24 4 0 0 ++10:25:21 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:25:21 sighand_cache 338 360 2112 15 8 24 24 ++10:25:21 signal_cache 1119 1232 1152 28 8 44 44 ++10:25:21 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:25:21 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:25:21 skbuff_head_cache 608 608 256 16 1 38 38 ++10:25:21 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:25:21 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:25:21 task_delay_info 8721 8721 80 51 1 171 171 ++10:25:21 task_group 0 0 832 19 4 0 0 ++10:25:21 task_struct 566 640 5824 5 8 128 128 ++10:25:21 taskstats 92 92 344 23 2 4 4 ++10:25:21 TCP 52 52 2432 13 8 4 4 ++10:25:21 TCPv6 48 48 2560 12 8 4 4 ++10:25:21 trace_event_file 2024 2024 88 46 1 44 44 ++10:25:21 tw_sock_TCP 87 87 280 29 2 3 3 ++10:25:21 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:25:21 UDP 100 100 1280 25 8 4 4 ++10:25:21 UDPv6 88 88 1472 22 8 4 4 ++10:25:21 user_namespace 0 0 600 27 4 0 0 ++10:25:21 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:25:21 uts_namespace 0 0 440 18 2 0 0 ++10:25:21 vm_area_struct 33984 34340 232 17 1 2020 2020 ++10:25:21 vmap_area 26304 26304 64 64 1 411 411 ++10:25:21 xfrm_dst_cache 756 756 384 21 2 36 36 ++10:25:21 xfs_btree_cur 72 72 224 18 1 4 4 ++10:25:21 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:25:21 xfs_buf_item 240 240 272 30 2 8 8 ++10:25:21 xfs_da_state 68 68 480 17 2 4 4 ++10:25:21 xfs_dqtrx 0 0 528 31 4 0 0 ++10:25:21 xfs_dquot 0 0 496 16 2 0 0 ++10:25:21 xfs_efd_item 414 414 440 18 2 23 23 ++10:25:21 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:25:21 xfs_log_ticket 88 88 184 22 1 4 4 ++10:25:21 xfs_rud_item 92 92 176 23 1 4 4 ++10:25:21 xfs_rui_item 0 0 696 23 4 0 0 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:25:24 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:25:24 Acpi-Parse 314423 315652 56 73 1 4324 4324 ++10:25:24 Acpi-State 765 765 80 51 1 15 15 ++10:25:24 anon_vma 11481 11895 104 39 1 305 305 ++10:25:24 anon_vma_chain 18269 19264 64 64 1 301 301 ++10:25:24 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:25:24 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:25:24 avtab_node 401880 401880 24 170 1 2364 2364 ++10:25:24 bdev_cache 72 72 896 18 4 4 4 ++10:25:24 bfq_io_cq 0 0 160 25 1 0 0 ++10:25:24 biovec-128 64 64 2048 16 8 4 4 ++10:25:24 biovec-64 64 64 1024 16 4 4 4 ++10:25:24 biovec-max 148 192 4096 8 8 24 24 ++10:25:24 blkdev_ioc 210 210 136 30 1 7 7 ++10:25:24 buffer_head 117 117 104 39 1 3 3 ++10:25:24 cred_jar 1651 1848 192 21 1 88 88 ++10:25:24 dax_cache 57 57 832 19 4 3 3 ++10:25:24 dentry 346540 346655 208 19 1 18245 18245 ++10:25:24 dio 0 0 640 25 4 0 0 ++10:25:24 dm_uevent 0 0 2664 12 8 0 0 ++10:25:24 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:25:24 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:25:24 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:25:24 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:25:24 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:25:24 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:25:24 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:25:24 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:25:24 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:25:24 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:25:24 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:25:24 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:25:24 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:25:24 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:25:24 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:25:24 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:25:24 dnotify_struct 0 0 32 128 1 0 0 ++10:25:24 dquot 0 0 256 16 1 0 0 ++10:25:24 eventpoll_pwq 728 728 72 56 1 13 13 ++10:25:24 file_lock_cache 90 90 216 18 1 5 5 ++10:25:24 files_cache 230 230 704 23 4 10 10 ++10:25:24 filp 10324 11808 256 16 1 738 738 ++10:25:24 fscrypt_ctx 0 0 80 51 1 0 0 ++10:25:24 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:25:24 fuse_inode 19 19 832 19 4 1 1 ++10:25:24 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:25:24 iint_cache 0 0 120 34 1 0 0 ++10:25:24 inode_cache 26084 27100 640 25 4 1084 1084 ++10:25:24 ip4-frags 68 68 232 17 1 4 4 ++10:25:24 isofs_inode_cache 69 69 688 23 4 3 3 ++10:25:24 kcopyd_job 0 0 3312 9 8 0 0 ++10:25:24 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:25:24 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:25:24 kioctx 92 92 704 23 4 4 4 ++10:25:24 kmalloc-128 5693 5856 128 32 1 183 183 ++10:25:24 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:25:24 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:25:24 kmalloc-1k 4037 4352 1024 16 4 272 272 ++10:25:24 kmalloc-256 15322 15376 256 16 1 961 961 ++10:25:24 kmalloc-2k 697 768 2048 16 8 48 48 ++10:25:24 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:25:24 kmalloc-4k 1657 1728 4096 8 8 216 216 ++10:25:24 kmalloc-512 4174 8144 512 16 2 509 509 ++10:25:24 kmalloc-64 306657 307328 64 64 1 4802 4802 ++10:25:24 kmalloc-8 424448 424448 8 512 1 829 829 ++10:25:24 kmalloc-8k 69 84 8192 4 8 21 21 ++10:25:24 kmalloc-96 6342 6342 96 42 1 151 151 ++10:25:24 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:25:24 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:25:24 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:25:24 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:25:24 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:25:24 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:25:24 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:25:24 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:25:24 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:25:24 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:25:24 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:25:24 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:25:24 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:25:24 kmem_cache 176 176 512 16 2 11 11 ++10:25:24 kmem_cache_node 256 256 64 64 1 4 4 ++10:25:24 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:25:24 mm_struct 224 224 1152 28 8 8 8 ++10:25:24 mnt_cache 1500 1500 320 25 2 60 60 ++10:25:24 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:25:24 names_cache 56 56 4096 8 8 7 7 ++10:25:24 net_namespace 12 12 5312 6 8 2 2 ++10:25:24 nf_conntrack 225 225 320 25 2 9 9 ++10:25:24 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:25:24 numa_policy 31 31 264 31 2 1 1 ++10:25:24 pde_opener 408 408 40 102 1 4 4 ++10:25:24 pid 992 992 128 32 1 31 31 ++10:25:24 pid_namespace 0 0 240 17 1 0 0 ++10:25:24 PINGv6 0 0 1344 24 8 0 0 ++10:25:24 pool_workqueue 640 640 256 16 1 40 40 ++10:25:24 proc_dir_entry 819 819 192 21 1 39 39 ++10:25:24 proc_inode_cache 10403 10902 712 23 4 474 474 ++10:25:24 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:25:24 RAW 84 84 1152 28 8 3 3 ++10:25:24 RAWv6 72 72 1344 24 8 3 3 ++10:25:24 request_queue 39 39 2488 13 8 3 3 ++10:25:24 request_sock_TCP 0 0 336 24 2 0 0 ++10:25:24 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:25:24 rpc_inode_cache 23 23 704 23 4 1 1 ++10:25:24 scsi_sense_cache 160 160 128 32 1 5 5 ++10:25:24 search 0 0 680 24 4 0 0 ++10:25:24 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:25:24 sighand_cache 338 360 2112 15 8 24 24 ++10:25:24 signal_cache 1119 1232 1152 28 8 44 44 ++10:25:24 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:25:24 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:25:24 skbuff_head_cache 608 608 256 16 1 38 38 ++10:25:24 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:25:24 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:25:24 task_delay_info 8721 8721 80 51 1 171 171 ++10:25:24 task_group 0 0 832 19 4 0 0 ++10:25:24 task_struct 566 640 5824 5 8 128 128 ++10:25:24 taskstats 92 92 344 23 2 4 4 ++10:25:24 TCP 52 52 2432 13 8 4 4 ++10:25:24 TCPv6 48 48 2560 12 8 4 4 ++10:25:24 trace_event_file 2024 2024 88 46 1 44 44 ++10:25:24 tw_sock_TCP 87 87 280 29 2 3 3 ++10:25:24 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:25:24 UDP 100 100 1280 25 8 4 4 ++10:25:24 UDPv6 88 88 1472 22 8 4 4 ++10:25:24 user_namespace 0 0 600 27 4 0 0 ++10:25:24 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:25:24 uts_namespace 0 0 440 18 2 0 0 ++10:25:24 vm_area_struct 33984 34340 232 17 1 2020 2020 ++10:25:24 vmap_area 26304 26304 64 64 1 411 411 ++10:25:24 xfrm_dst_cache 756 756 384 21 2 36 36 ++10:25:24 xfs_btree_cur 72 72 224 18 1 4 4 ++10:25:24 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:25:24 xfs_buf_item 240 240 272 30 2 8 8 ++10:25:24 xfs_da_state 68 68 480 17 2 4 4 ++10:25:24 xfs_dqtrx 0 0 528 31 4 0 0 ++10:25:24 xfs_dquot 0 0 496 16 2 0 0 ++10:25:24 xfs_efd_item 414 414 440 18 2 23 23 ++10:25:24 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:25:24 xfs_log_ticket 88 88 184 22 1 4 4 ++10:25:24 xfs_rud_item 92 92 176 23 1 4 4 ++10:25:24 xfs_rui_item 0 0 696 23 4 0 0 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:25:27 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:25:27 Acpi-Parse 314423 315652 56 73 1 4324 4324 ++10:25:27 Acpi-State 765 765 80 51 1 15 15 ++10:25:27 anon_vma 11481 11895 104 39 1 305 305 ++10:25:27 anon_vma_chain 18269 19264 64 64 1 301 301 ++10:25:27 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:25:27 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:25:27 avtab_node 401880 401880 24 170 1 2364 2364 ++10:25:27 bdev_cache 72 72 896 18 4 4 4 ++10:25:27 bfq_io_cq 0 0 160 25 1 0 0 ++10:25:27 biovec-128 64 64 2048 16 8 4 4 ++10:25:27 biovec-64 64 64 1024 16 4 4 4 ++10:25:27 biovec-max 148 192 4096 8 8 24 24 ++10:25:27 blkdev_ioc 210 210 136 30 1 7 7 ++10:25:27 buffer_head 117 117 104 39 1 3 3 ++10:25:27 cred_jar 1651 1848 192 21 1 88 88 ++10:25:27 dax_cache 57 57 832 19 4 3 3 ++10:25:27 dentry 346540 346655 208 19 1 18245 18245 ++10:25:27 dio 0 0 640 25 4 0 0 ++10:25:27 dm_uevent 0 0 2664 12 8 0 0 ++10:25:27 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:25:27 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:25:27 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:25:27 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:25:27 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:25:27 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:25:27 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:25:27 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:25:27 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:25:27 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:25:27 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:25:27 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:25:27 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:25:27 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:25:27 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:25:27 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:25:27 dnotify_struct 0 0 32 128 1 0 0 ++10:25:27 dquot 0 0 256 16 1 0 0 ++10:25:27 eventpoll_pwq 728 728 72 56 1 13 13 ++10:25:27 file_lock_cache 90 90 216 18 1 5 5 ++10:25:27 files_cache 230 230 704 23 4 10 10 ++10:25:27 filp 10324 11808 256 16 1 738 738 ++10:25:27 fscrypt_ctx 0 0 80 51 1 0 0 ++10:25:27 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:25:27 fuse_inode 19 19 832 19 4 1 1 ++10:25:27 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:25:27 iint_cache 0 0 120 34 1 0 0 ++10:25:27 inode_cache 26084 27100 640 25 4 1084 1084 ++10:25:27 ip4-frags 68 68 232 17 1 4 4 ++10:25:27 isofs_inode_cache 69 69 688 23 4 3 3 ++10:25:27 kcopyd_job 0 0 3312 9 8 0 0 ++10:25:27 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:25:27 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:25:27 kioctx 92 92 704 23 4 4 4 ++10:25:27 kmalloc-128 5693 5856 128 32 1 183 183 ++10:25:27 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:25:27 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:25:27 kmalloc-1k 4037 4352 1024 16 4 272 272 ++10:25:27 kmalloc-256 15322 15376 256 16 1 961 961 ++10:25:27 kmalloc-2k 697 768 2048 16 8 48 48 ++10:25:27 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:25:27 kmalloc-4k 1657 1728 4096 8 8 216 216 ++10:25:27 kmalloc-512 4174 8144 512 16 2 509 509 ++10:25:27 kmalloc-64 306657 307328 64 64 1 4802 4802 ++10:25:27 kmalloc-8 424448 424448 8 512 1 829 829 ++10:25:27 kmalloc-8k 69 84 8192 4 8 21 21 ++10:25:27 kmalloc-96 6342 6342 96 42 1 151 151 ++10:25:27 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:25:27 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:25:27 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:25:27 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:25:27 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:25:27 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:25:27 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:25:27 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:25:27 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:25:27 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:25:27 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:25:27 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:25:27 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:25:27 kmem_cache 176 176 512 16 2 11 11 ++10:25:27 kmem_cache_node 256 256 64 64 1 4 4 ++10:25:27 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:25:27 mm_struct 224 224 1152 28 8 8 8 ++10:25:27 mnt_cache 1500 1500 320 25 2 60 60 ++10:25:27 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:25:27 names_cache 56 56 4096 8 8 7 7 ++10:25:27 net_namespace 12 12 5312 6 8 2 2 ++10:25:27 nf_conntrack 225 225 320 25 2 9 9 ++10:25:27 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:25:27 numa_policy 31 31 264 31 2 1 1 ++10:25:27 pde_opener 408 408 40 102 1 4 4 ++10:25:27 pid 992 992 128 32 1 31 31 ++10:25:27 pid_namespace 0 0 240 17 1 0 0 ++10:25:27 PINGv6 0 0 1344 24 8 0 0 ++10:25:27 pool_workqueue 640 640 256 16 1 40 40 ++10:25:27 proc_dir_entry 819 819 192 21 1 39 39 ++10:25:27 proc_inode_cache 10403 10902 712 23 4 474 474 ++10:25:27 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:25:27 RAW 84 84 1152 28 8 3 3 ++10:25:27 RAWv6 72 72 1344 24 8 3 3 ++10:25:27 request_queue 39 39 2488 13 8 3 3 ++10:25:27 request_sock_TCP 0 0 336 24 2 0 0 ++10:25:27 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:25:27 rpc_inode_cache 23 23 704 23 4 1 1 ++10:25:27 scsi_sense_cache 160 160 128 32 1 5 5 ++10:25:27 search 0 0 680 24 4 0 0 ++10:25:27 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:25:27 sighand_cache 338 360 2112 15 8 24 24 ++10:25:27 signal_cache 1119 1232 1152 28 8 44 44 ++10:25:27 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:25:27 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:25:27 skbuff_head_cache 608 608 256 16 1 38 38 ++10:25:27 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:25:27 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:25:27 task_delay_info 8721 8721 80 51 1 171 171 ++10:25:27 task_group 0 0 832 19 4 0 0 ++10:25:27 task_struct 566 640 5824 5 8 128 128 ++10:25:27 taskstats 92 92 344 23 2 4 4 ++10:25:27 TCP 52 52 2432 13 8 4 4 ++10:25:27 TCPv6 48 48 2560 12 8 4 4 ++10:25:27 trace_event_file 2024 2024 88 46 1 44 44 ++10:25:27 tw_sock_TCP 87 87 280 29 2 3 3 ++10:25:27 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:25:27 UDP 100 100 1280 25 8 4 4 ++10:25:27 UDPv6 88 88 1472 22 8 4 4 ++10:25:27 user_namespace 0 0 600 27 4 0 0 ++10:25:27 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:25:27 uts_namespace 0 0 440 18 2 0 0 ++10:25:27 vm_area_struct 33984 34340 232 17 1 2020 2020 ++10:25:27 vmap_area 26304 26304 64 64 1 411 411 ++10:25:27 xfrm_dst_cache 756 756 384 21 2 36 36 ++10:25:27 xfs_btree_cur 72 72 224 18 1 4 4 ++10:25:27 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:25:27 xfs_buf_item 240 240 272 30 2 8 8 ++10:25:27 xfs_da_state 68 68 480 17 2 4 4 ++10:25:27 xfs_dqtrx 0 0 528 31 4 0 0 ++10:25:27 xfs_dquot 0 0 496 16 2 0 0 ++10:25:27 xfs_efd_item 414 414 440 18 2 23 23 ++10:25:27 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:25:27 xfs_log_ticket 88 88 184 22 1 4 4 ++10:25:27 xfs_rud_item 92 92 176 23 1 4 4 ++10:25:27 xfs_rui_item 0 0 696 23 4 0 0 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:25:30 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:25:30 Acpi-Parse 314423 315652 56 73 1 4324 4324 ++10:25:30 Acpi-State 765 765 80 51 1 15 15 ++10:25:30 anon_vma 11502 11895 104 39 1 305 305 ++10:25:30 anon_vma_chain 17920 19264 64 64 1 301 301 ++10:25:30 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:25:30 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:25:30 avtab_node 401880 401880 24 170 1 2364 2364 ++10:25:30 bdev_cache 72 72 896 18 4 4 4 ++10:25:30 bfq_io_cq 0 0 160 25 1 0 0 ++10:25:30 biovec-128 64 64 2048 16 8 4 4 ++10:25:30 biovec-64 64 64 1024 16 4 4 4 ++10:25:30 biovec-max 148 192 4096 8 8 24 24 ++10:25:30 blkdev_ioc 210 210 136 30 1 7 7 ++10:25:30 buffer_head 117 117 104 39 1 3 3 ++10:25:30 cred_jar 1651 1848 192 21 1 88 88 ++10:25:30 dax_cache 57 57 832 19 4 3 3 ++10:25:30 dentry 346562 346655 208 19 1 18245 18245 ++10:25:30 dio 0 0 640 25 4 0 0 ++10:25:30 dm_uevent 0 0 2664 12 8 0 0 ++10:25:30 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:25:30 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:25:30 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:25:30 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:25:30 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:25:30 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:25:30 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:25:30 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:25:30 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:25:30 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:25:30 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:25:30 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:25:30 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:25:30 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:25:30 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:25:30 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:25:30 dnotify_struct 0 0 32 128 1 0 0 ++10:25:30 dquot 0 0 256 16 1 0 0 ++10:25:30 eventpoll_pwq 728 728 72 56 1 13 13 ++10:25:30 file_lock_cache 90 90 216 18 1 5 5 ++10:25:30 files_cache 230 230 704 23 4 10 10 ++10:25:30 filp 10438 12000 256 16 1 750 750 ++10:25:30 fscrypt_ctx 0 0 80 51 1 0 0 ++10:25:30 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:25:30 fuse_inode 19 19 832 19 4 1 1 ++10:25:30 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:25:30 iint_cache 0 0 120 34 1 0 0 ++10:25:30 inode_cache 26084 27100 640 25 4 1084 1084 ++10:25:30 ip4-frags 68 68 232 17 1 4 4 ++10:25:30 isofs_inode_cache 69 69 688 23 4 3 3 ++10:25:30 kcopyd_job 0 0 3312 9 8 0 0 ++10:25:30 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:25:30 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:25:30 kioctx 92 92 704 23 4 4 4 ++10:25:30 kmalloc-128 5748 5856 128 32 1 183 183 ++10:25:30 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:25:30 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:25:30 kmalloc-1k 4055 4352 1024 16 4 272 272 ++10:25:30 kmalloc-256 15322 15376 256 16 1 961 961 ++10:25:30 kmalloc-2k 697 768 2048 16 8 48 48 ++10:25:30 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:25:30 kmalloc-4k 1664 1728 4096 8 8 216 216 ++10:25:30 kmalloc-512 4200 8144 512 16 2 509 509 ++10:25:30 kmalloc-64 306657 307328 64 64 1 4802 4802 ++10:25:30 kmalloc-8 424448 424448 8 512 1 829 829 ++10:25:30 kmalloc-8k 69 84 8192 4 8 21 21 ++10:25:30 kmalloc-96 6342 6342 96 42 1 151 151 ++10:25:30 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:25:30 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:25:30 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:25:30 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:25:30 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:25:30 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:25:30 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:25:30 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:25:30 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:25:30 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:25:30 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:25:30 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:25:30 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:25:30 kmem_cache 176 176 512 16 2 11 11 ++10:25:30 kmem_cache_node 256 256 64 64 1 4 4 ++10:25:30 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:25:30 mm_struct 224 224 1152 28 8 8 8 ++10:25:30 mnt_cache 1500 1500 320 25 2 60 60 ++10:25:30 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:25:30 names_cache 56 56 4096 8 8 7 7 ++10:25:30 net_namespace 12 12 5312 6 8 2 2 ++10:25:30 nf_conntrack 225 225 320 25 2 9 9 ++10:25:30 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:25:30 numa_policy 31 31 264 31 2 1 1 ++10:25:30 pde_opener 408 408 40 102 1 4 4 ++10:25:30 pid 992 992 128 32 1 31 31 ++10:25:30 pid_namespace 0 0 240 17 1 0 0 ++10:25:30 PINGv6 0 0 1344 24 8 0 0 ++10:25:30 pool_workqueue 640 640 256 16 1 40 40 ++10:25:30 proc_dir_entry 819 819 192 21 1 39 39 ++10:25:30 proc_inode_cache 10450 10902 712 23 4 474 474 ++10:25:30 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:25:30 RAW 84 84 1152 28 8 3 3 ++10:25:30 RAWv6 72 72 1344 24 8 3 3 ++10:25:30 request_queue 39 39 2488 13 8 3 3 ++10:25:30 request_sock_TCP 0 0 336 24 2 0 0 ++10:25:30 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:25:30 rpc_inode_cache 23 23 704 23 4 1 1 ++10:25:30 scsi_sense_cache 160 160 128 32 1 5 5 ++10:25:30 search 0 0 680 24 4 0 0 ++10:25:30 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:25:30 sighand_cache 338 360 2112 15 8 24 24 ++10:25:30 signal_cache 1119 1232 1152 28 8 44 44 ++10:25:30 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:25:30 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:25:30 skbuff_head_cache 608 608 256 16 1 38 38 ++10:25:30 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:25:30 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:25:30 task_delay_info 8721 8721 80 51 1 171 171 ++10:25:30 task_group 0 0 832 19 4 0 0 ++10:25:30 task_struct 566 640 5824 5 8 128 128 ++10:25:30 taskstats 92 92 344 23 2 4 4 ++10:25:30 TCP 52 52 2432 13 8 4 4 ++10:25:30 TCPv6 48 48 2560 12 8 4 4 ++10:25:30 trace_event_file 2024 2024 88 46 1 44 44 ++10:25:30 tw_sock_TCP 87 87 280 29 2 3 3 ++10:25:30 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:25:30 UDP 100 100 1280 25 8 4 4 ++10:25:30 UDPv6 88 88 1472 22 8 4 4 ++10:25:30 user_namespace 0 0 600 27 4 0 0 ++10:25:30 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:25:30 uts_namespace 0 0 440 18 2 0 0 ++10:25:30 vm_area_struct 33972 34340 232 17 1 2020 2020 ++10:25:30 vmap_area 26432 26432 64 64 1 413 413 ++10:25:30 xfrm_dst_cache 756 756 384 21 2 36 36 ++10:25:30 xfs_btree_cur 72 72 224 18 1 4 4 ++10:25:30 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:25:30 xfs_buf_item 240 240 272 30 2 8 8 ++10:25:30 xfs_da_state 68 68 480 17 2 4 4 ++10:25:30 xfs_dqtrx 0 0 528 31 4 0 0 ++10:25:30 xfs_dquot 0 0 496 16 2 0 0 ++10:25:30 xfs_efd_item 468 468 440 18 2 26 26 ++10:25:30 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:25:30 xfs_log_ticket 88 88 184 22 1 4 4 ++10:25:30 xfs_rud_item 92 92 176 23 1 4 4 ++10:25:30 xfs_rui_item 0 0 696 23 4 0 0 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:25:33 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:25:33 Acpi-Parse 314423 315652 56 73 1 4324 4324 ++10:25:33 Acpi-State 765 765 80 51 1 15 15 ++10:25:33 anon_vma 11502 11895 104 39 1 305 305 ++10:25:33 anon_vma_chain 17920 19264 64 64 1 301 301 ++10:25:33 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:25:33 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:25:33 avtab_node 401880 401880 24 170 1 2364 2364 ++10:25:33 bdev_cache 72 72 896 18 4 4 4 ++10:25:33 bfq_io_cq 0 0 160 25 1 0 0 ++10:25:33 biovec-128 64 64 2048 16 8 4 4 ++10:25:33 biovec-64 64 64 1024 16 4 4 4 ++10:25:33 biovec-max 148 192 4096 8 8 24 24 ++10:25:33 blkdev_ioc 210 210 136 30 1 7 7 ++10:25:33 buffer_head 117 117 104 39 1 3 3 ++10:25:33 cred_jar 1651 1848 192 21 1 88 88 ++10:25:33 dax_cache 57 57 832 19 4 3 3 ++10:25:33 dentry 346562 346655 208 19 1 18245 18245 ++10:25:33 dio 0 0 640 25 4 0 0 ++10:25:33 dm_uevent 0 0 2664 12 8 0 0 ++10:25:33 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:25:33 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:25:33 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:25:33 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:25:33 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:25:33 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:25:33 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:25:33 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:25:33 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:25:33 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:25:33 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:25:33 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:25:33 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:25:33 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:25:33 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:25:33 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:25:33 dnotify_struct 0 0 32 128 1 0 0 ++10:25:33 dquot 0 0 256 16 1 0 0 ++10:25:33 eventpoll_pwq 728 728 72 56 1 13 13 ++10:25:33 file_lock_cache 90 90 216 18 1 5 5 ++10:25:33 files_cache 230 230 704 23 4 10 10 ++10:25:33 filp 10438 12000 256 16 1 750 750 ++10:25:33 fscrypt_ctx 0 0 80 51 1 0 0 ++10:25:33 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:25:33 fuse_inode 19 19 832 19 4 1 1 ++10:25:33 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:25:33 iint_cache 0 0 120 34 1 0 0 ++10:25:33 inode_cache 26084 27100 640 25 4 1084 1084 ++10:25:33 ip4-frags 68 68 232 17 1 4 4 ++10:25:33 isofs_inode_cache 69 69 688 23 4 3 3 ++10:25:33 kcopyd_job 0 0 3312 9 8 0 0 ++10:25:33 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:25:33 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:25:33 kioctx 92 92 704 23 4 4 4 ++10:25:33 kmalloc-128 5748 5856 128 32 1 183 183 ++10:25:33 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:25:33 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:25:33 kmalloc-1k 4055 4352 1024 16 4 272 272 ++10:25:33 kmalloc-256 15322 15376 256 16 1 961 961 ++10:25:33 kmalloc-2k 697 768 2048 16 8 48 48 ++10:25:33 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:25:33 kmalloc-4k 1664 1728 4096 8 8 216 216 ++10:25:33 kmalloc-512 4200 8144 512 16 2 509 509 ++10:25:33 kmalloc-64 306657 307328 64 64 1 4802 4802 ++10:25:33 kmalloc-8 424448 424448 8 512 1 829 829 ++10:25:33 kmalloc-8k 69 84 8192 4 8 21 21 ++10:25:33 kmalloc-96 6342 6342 96 42 1 151 151 ++10:25:33 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:25:33 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:25:33 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:25:33 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:25:33 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:25:33 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:25:33 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:25:33 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:25:33 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:25:33 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:25:33 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:25:33 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:25:33 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:25:33 kmem_cache 176 176 512 16 2 11 11 ++10:25:33 kmem_cache_node 256 256 64 64 1 4 4 ++10:25:33 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:25:33 mm_struct 224 224 1152 28 8 8 8 ++10:25:33 mnt_cache 1500 1500 320 25 2 60 60 ++10:25:33 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:25:33 names_cache 56 56 4096 8 8 7 7 ++10:25:33 net_namespace 12 12 5312 6 8 2 2 ++10:25:33 nf_conntrack 225 225 320 25 2 9 9 ++10:25:33 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:25:33 numa_policy 31 31 264 31 2 1 1 ++10:25:33 pde_opener 408 408 40 102 1 4 4 ++10:25:33 pid 992 992 128 32 1 31 31 ++10:25:33 pid_namespace 0 0 240 17 1 0 0 ++10:25:33 PINGv6 0 0 1344 24 8 0 0 ++10:25:33 pool_workqueue 640 640 256 16 1 40 40 ++10:25:33 proc_dir_entry 819 819 192 21 1 39 39 ++10:25:33 proc_inode_cache 10450 10902 712 23 4 474 474 ++10:25:33 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:25:33 RAW 84 84 1152 28 8 3 3 ++10:25:33 RAWv6 72 72 1344 24 8 3 3 ++10:25:33 request_queue 39 39 2488 13 8 3 3 ++10:25:33 request_sock_TCP 0 0 336 24 2 0 0 ++10:25:33 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:25:33 rpc_inode_cache 23 23 704 23 4 1 1 ++10:25:33 scsi_sense_cache 160 160 128 32 1 5 5 ++10:25:33 search 0 0 680 24 4 0 0 ++10:25:33 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:25:33 sighand_cache 338 360 2112 15 8 24 24 ++10:25:33 signal_cache 1119 1232 1152 28 8 44 44 ++10:25:33 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:25:33 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:25:33 skbuff_head_cache 608 608 256 16 1 38 38 ++10:25:33 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:25:33 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:25:33 task_delay_info 8721 8721 80 51 1 171 171 ++10:25:33 task_group 0 0 832 19 4 0 0 ++10:25:33 task_struct 566 640 5824 5 8 128 128 ++10:25:33 taskstats 92 92 344 23 2 4 4 ++10:25:33 TCP 52 52 2432 13 8 4 4 ++10:25:33 TCPv6 48 48 2560 12 8 4 4 ++10:25:33 trace_event_file 2024 2024 88 46 1 44 44 ++10:25:33 tw_sock_TCP 87 87 280 29 2 3 3 ++10:25:33 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:25:33 UDP 100 100 1280 25 8 4 4 ++10:25:33 UDPv6 88 88 1472 22 8 4 4 ++10:25:33 user_namespace 0 0 600 27 4 0 0 ++10:25:33 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:25:33 uts_namespace 0 0 440 18 2 0 0 ++10:25:33 vm_area_struct 33972 34340 232 17 1 2020 2020 ++10:25:33 vmap_area 26432 26432 64 64 1 413 413 ++10:25:33 xfrm_dst_cache 756 756 384 21 2 36 36 ++10:25:33 xfs_btree_cur 72 72 224 18 1 4 4 ++10:25:33 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:25:33 xfs_buf_item 240 240 272 30 2 8 8 ++10:25:33 xfs_da_state 68 68 480 17 2 4 4 ++10:25:33 xfs_dqtrx 0 0 528 31 4 0 0 ++10:25:33 xfs_dquot 0 0 496 16 2 0 0 ++10:25:33 xfs_efd_item 468 468 440 18 2 26 26 ++10:25:33 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:25:33 xfs_log_ticket 88 88 184 22 1 4 4 ++10:25:33 xfs_rud_item 92 92 176 23 1 4 4 ++10:25:33 xfs_rui_item 0 0 696 23 4 0 0 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:25:36 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:25:36 Acpi-Parse 314423 315652 56 73 1 4324 4324 ++10:25:36 Acpi-State 765 765 80 51 1 15 15 ++10:25:36 anon_vma 11502 11895 104 39 1 305 305 ++10:25:36 anon_vma_chain 17920 19264 64 64 1 301 301 ++10:25:36 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:25:36 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:25:36 avtab_node 401880 401880 24 170 1 2364 2364 ++10:25:36 bdev_cache 72 72 896 18 4 4 4 ++10:25:36 bfq_io_cq 0 0 160 25 1 0 0 ++10:25:36 biovec-128 64 64 2048 16 8 4 4 ++10:25:36 biovec-64 64 64 1024 16 4 4 4 ++10:25:36 biovec-max 148 192 4096 8 8 24 24 ++10:25:36 blkdev_ioc 210 210 136 30 1 7 7 ++10:25:36 buffer_head 117 117 104 39 1 3 3 ++10:25:36 cred_jar 1651 1848 192 21 1 88 88 ++10:25:36 dax_cache 57 57 832 19 4 3 3 ++10:25:36 dentry 346562 346655 208 19 1 18245 18245 ++10:25:36 dio 0 0 640 25 4 0 0 ++10:25:36 dm_uevent 0 0 2664 12 8 0 0 ++10:25:36 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:25:36 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:25:36 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:25:36 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:25:36 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:25:36 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:25:36 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:25:36 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:25:36 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:25:36 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:25:36 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:25:36 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:25:36 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:25:36 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:25:36 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:25:36 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:25:36 dnotify_struct 0 0 32 128 1 0 0 ++10:25:36 dquot 0 0 256 16 1 0 0 ++10:25:36 eventpoll_pwq 728 728 72 56 1 13 13 ++10:25:36 file_lock_cache 90 90 216 18 1 5 5 ++10:25:36 files_cache 230 230 704 23 4 10 10 ++10:25:36 filp 10438 12000 256 16 1 750 750 ++10:25:36 fscrypt_ctx 0 0 80 51 1 0 0 ++10:25:36 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:25:36 fuse_inode 19 19 832 19 4 1 1 ++10:25:36 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:25:36 iint_cache 0 0 120 34 1 0 0 ++10:25:36 inode_cache 26084 27100 640 25 4 1084 1084 ++10:25:36 ip4-frags 68 68 232 17 1 4 4 ++10:25:36 isofs_inode_cache 69 69 688 23 4 3 3 ++10:25:36 kcopyd_job 0 0 3312 9 8 0 0 ++10:25:36 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:25:36 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:25:36 kioctx 92 92 704 23 4 4 4 ++10:25:36 kmalloc-128 5748 5856 128 32 1 183 183 ++10:25:36 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:25:36 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:25:36 kmalloc-1k 4055 4352 1024 16 4 272 272 ++10:25:36 kmalloc-256 15322 15376 256 16 1 961 961 ++10:25:36 kmalloc-2k 697 768 2048 16 8 48 48 ++10:25:36 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:25:36 kmalloc-4k 1664 1728 4096 8 8 216 216 ++10:25:36 kmalloc-512 4200 8144 512 16 2 509 509 ++10:25:36 kmalloc-64 306657 307328 64 64 1 4802 4802 ++10:25:36 kmalloc-8 424448 424448 8 512 1 829 829 ++10:25:36 kmalloc-8k 69 84 8192 4 8 21 21 ++10:25:36 kmalloc-96 6342 6342 96 42 1 151 151 ++10:25:36 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:25:36 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:25:36 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:25:36 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:25:36 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:25:36 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:25:36 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:25:36 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:25:36 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:25:36 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:25:36 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:25:36 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:25:36 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:25:36 kmem_cache 176 176 512 16 2 11 11 ++10:25:36 kmem_cache_node 256 256 64 64 1 4 4 ++10:25:36 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:25:36 mm_struct 224 224 1152 28 8 8 8 ++10:25:36 mnt_cache 1500 1500 320 25 2 60 60 ++10:25:36 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:25:36 names_cache 56 56 4096 8 8 7 7 ++10:25:36 net_namespace 12 12 5312 6 8 2 2 ++10:25:36 nf_conntrack 225 225 320 25 2 9 9 ++10:25:36 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:25:36 numa_policy 31 31 264 31 2 1 1 ++10:25:36 pde_opener 408 408 40 102 1 4 4 ++10:25:36 pid 992 992 128 32 1 31 31 ++10:25:36 pid_namespace 0 0 240 17 1 0 0 ++10:25:36 PINGv6 0 0 1344 24 8 0 0 ++10:25:36 pool_workqueue 640 640 256 16 1 40 40 ++10:25:36 proc_dir_entry 819 819 192 21 1 39 39 ++10:25:36 proc_inode_cache 10450 10902 712 23 4 474 474 ++10:25:36 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:25:36 RAW 84 84 1152 28 8 3 3 ++10:25:36 RAWv6 72 72 1344 24 8 3 3 ++10:25:36 request_queue 39 39 2488 13 8 3 3 ++10:25:36 request_sock_TCP 0 0 336 24 2 0 0 ++10:25:36 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:25:36 rpc_inode_cache 23 23 704 23 4 1 1 ++10:25:36 scsi_sense_cache 160 160 128 32 1 5 5 ++10:25:36 search 0 0 680 24 4 0 0 ++10:25:36 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:25:36 sighand_cache 338 360 2112 15 8 24 24 ++10:25:36 signal_cache 1119 1232 1152 28 8 44 44 ++10:25:36 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:25:36 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:25:36 skbuff_head_cache 608 608 256 16 1 38 38 ++10:25:36 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:25:36 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:25:36 task_delay_info 8721 8721 80 51 1 171 171 ++10:25:36 task_group 0 0 832 19 4 0 0 ++10:25:36 task_struct 566 640 5824 5 8 128 128 ++10:25:36 taskstats 92 92 344 23 2 4 4 ++10:25:36 TCP 52 52 2432 13 8 4 4 ++10:25:36 TCPv6 48 48 2560 12 8 4 4 ++10:25:36 trace_event_file 2024 2024 88 46 1 44 44 ++10:25:36 tw_sock_TCP 87 87 280 29 2 3 3 ++10:25:36 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:25:36 UDP 100 100 1280 25 8 4 4 ++10:25:36 UDPv6 88 88 1472 22 8 4 4 ++10:25:36 user_namespace 0 0 600 27 4 0 0 ++10:25:36 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:25:36 uts_namespace 0 0 440 18 2 0 0 ++10:25:36 vm_area_struct 33972 34340 232 17 1 2020 2020 ++10:25:36 vmap_area 26432 26432 64 64 1 413 413 ++10:25:36 xfrm_dst_cache 756 756 384 21 2 36 36 ++10:25:36 xfs_btree_cur 72 72 224 18 1 4 4 ++10:25:36 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:25:36 xfs_buf_item 240 240 272 30 2 8 8 ++10:25:36 xfs_da_state 68 68 480 17 2 4 4 ++10:25:36 xfs_dqtrx 0 0 528 31 4 0 0 ++10:25:36 xfs_dquot 0 0 496 16 2 0 0 ++10:25:36 xfs_efd_item 468 468 440 18 2 26 26 ++10:25:36 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:25:36 xfs_log_ticket 88 88 184 22 1 4 4 ++10:25:36 xfs_rud_item 92 92 176 23 1 4 4 ++10:25:36 xfs_rui_item 0 0 696 23 4 0 0 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:25:39 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:25:39 Acpi-Parse 314417 315652 56 73 1 4324 4324 ++10:25:39 Acpi-State 765 765 80 51 1 15 15 ++10:25:39 anon_vma 11423 11895 104 39 1 305 305 ++10:25:39 anon_vma_chain 18153 19264 64 64 1 301 301 ++10:25:39 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:25:39 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:25:39 avtab_node 401880 401880 24 170 1 2364 2364 ++10:25:39 bdev_cache 72 72 896 18 4 4 4 ++10:25:39 bfq_io_cq 0 0 160 25 1 0 0 ++10:25:39 biovec-128 64 64 2048 16 8 4 4 ++10:25:39 biovec-64 64 64 1024 16 4 4 4 ++10:25:39 biovec-max 156 184 4096 8 8 23 23 ++10:25:39 blkdev_ioc 210 210 136 30 1 7 7 ++10:25:39 buffer_head 117 117 104 39 1 3 3 ++10:25:39 cred_jar 1651 1848 192 21 1 88 88 ++10:25:39 dax_cache 57 57 832 19 4 3 3 ++10:25:39 dentry 346367 346522 208 19 1 18238 18238 ++10:25:39 dio 0 0 640 25 4 0 0 ++10:25:39 dm_uevent 0 0 2664 12 8 0 0 ++10:25:39 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:25:39 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:25:39 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:25:39 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:25:39 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:25:39 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:25:39 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:25:39 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:25:39 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:25:39 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:25:39 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:25:39 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:25:39 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:25:39 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:25:39 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:25:39 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:25:39 dnotify_struct 0 0 32 128 1 0 0 ++10:25:39 dquot 0 0 256 16 1 0 0 ++10:25:39 eventpoll_pwq 728 728 72 56 1 13 13 ++10:25:39 file_lock_cache 90 90 216 18 1 5 5 ++10:25:39 files_cache 230 230 704 23 4 10 10 ++10:25:39 filp 10210 11808 256 16 1 738 738 ++10:25:39 fscrypt_ctx 0 0 80 51 1 0 0 ++10:25:39 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:25:39 fuse_inode 19 19 832 19 4 1 1 ++10:25:39 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:25:39 iint_cache 0 0 120 34 1 0 0 ++10:25:39 inode_cache 26084 27100 640 25 4 1084 1084 ++10:25:39 ip4-frags 68 68 232 17 1 4 4 ++10:25:39 isofs_inode_cache 69 69 688 23 4 3 3 ++10:25:39 kcopyd_job 0 0 3312 9 8 0 0 ++10:25:39 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:25:39 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:25:39 kioctx 92 92 704 23 4 4 4 ++10:25:39 kmalloc-128 5391 5696 128 32 1 178 178 ++10:25:39 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:25:39 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:25:39 kmalloc-1k 4432 4432 1024 16 4 277 277 ++10:25:39 kmalloc-256 15322 15376 256 16 1 961 961 ++10:25:39 kmalloc-2k 697 768 2048 16 8 48 48 ++10:25:39 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:25:39 kmalloc-4k 1648 1728 4096 8 8 216 216 ++10:25:39 kmalloc-512 3961 8144 512 16 2 509 509 ++10:25:39 kmalloc-64 306564 307328 64 64 1 4802 4802 ++10:25:39 kmalloc-8 424448 424448 8 512 1 829 829 ++10:25:39 kmalloc-8k 69 84 8192 4 8 21 21 ++10:25:39 kmalloc-96 6342 6342 96 42 1 151 151 ++10:25:39 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:25:39 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:25:39 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:25:39 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:25:39 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:25:39 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:25:39 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:25:39 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:25:39 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:25:39 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:25:39 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:25:39 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:25:39 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:25:39 kmem_cache 176 176 512 16 2 11 11 ++10:25:39 kmem_cache_node 256 256 64 64 1 4 4 ++10:25:39 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:25:39 mm_struct 224 224 1152 28 8 8 8 ++10:25:39 mnt_cache 1500 1500 320 25 2 60 60 ++10:25:39 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:25:39 names_cache 56 56 4096 8 8 7 7 ++10:25:39 net_namespace 12 12 5312 6 8 2 2 ++10:25:39 nf_conntrack 225 225 320 25 2 9 9 ++10:25:39 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:25:39 numa_policy 31 31 264 31 2 1 1 ++10:25:39 pde_opener 408 408 40 102 1 4 4 ++10:25:39 pid 992 992 128 32 1 31 31 ++10:25:39 pid_namespace 0 0 240 17 1 0 0 ++10:25:39 PINGv6 0 0 1344 24 8 0 0 ++10:25:39 pool_workqueue 640 640 256 16 1 40 40 ++10:25:39 proc_dir_entry 819 819 192 21 1 39 39 ++10:25:39 proc_inode_cache 10265 10902 712 23 4 474 474 ++10:25:39 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:25:39 RAW 84 84 1152 28 8 3 3 ++10:25:39 RAWv6 72 72 1344 24 8 3 3 ++10:25:39 request_queue 39 39 2488 13 8 3 3 ++10:25:39 request_sock_TCP 0 0 336 24 2 0 0 ++10:25:39 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:25:39 rpc_inode_cache 23 23 704 23 4 1 1 ++10:25:39 scsi_sense_cache 160 160 128 32 1 5 5 ++10:25:39 search 0 0 680 24 4 0 0 ++10:25:39 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:25:39 sighand_cache 338 360 2112 15 8 24 24 ++10:25:39 signal_cache 1119 1232 1152 28 8 44 44 ++10:25:39 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:25:39 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:25:39 skbuff_head_cache 624 624 256 16 1 39 39 ++10:25:39 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:25:39 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:25:39 task_delay_info 8721 8721 80 51 1 171 171 ++10:25:39 task_group 0 0 832 19 4 0 0 ++10:25:39 task_struct 557 640 5824 5 8 128 128 ++10:25:39 taskstats 92 92 344 23 2 4 4 ++10:25:39 TCP 52 52 2432 13 8 4 4 ++10:25:39 TCPv6 48 48 2560 12 8 4 4 ++10:25:39 trace_event_file 2024 2024 88 46 1 44 44 ++10:25:39 tw_sock_TCP 87 87 280 29 2 3 3 ++10:25:39 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:25:39 UDP 100 100 1280 25 8 4 4 ++10:25:39 UDPv6 88 88 1472 22 8 4 4 ++10:25:39 user_namespace 0 0 600 27 4 0 0 ++10:25:39 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:25:39 uts_namespace 0 0 440 18 2 0 0 ++10:25:39 vm_area_struct 33862 34340 232 17 1 2020 2020 ++10:25:39 vmap_area 26496 26496 64 64 1 414 414 ++10:25:39 xfrm_dst_cache 798 798 384 21 2 38 38 ++10:25:39 xfs_btree_cur 72 72 224 18 1 4 4 ++10:25:39 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:25:39 xfs_buf_item 240 240 272 30 2 8 8 ++10:25:39 xfs_da_state 68 68 480 17 2 4 4 ++10:25:39 xfs_dqtrx 0 0 528 31 4 0 0 ++10:25:39 xfs_dquot 0 0 496 16 2 0 0 ++10:25:39 xfs_efd_item 216 288 440 18 2 16 16 ++10:25:39 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:25:39 xfs_log_ticket 88 88 184 22 1 4 4 ++10:25:39 xfs_rud_item 92 92 176 23 1 4 4 ++10:25:39 xfs_rui_item 0 0 696 23 4 0 0 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:25:42 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:25:42 Acpi-Parse 314417 315652 56 73 1 4324 4324 ++10:25:42 Acpi-State 765 765 80 51 1 15 15 ++10:25:42 anon_vma 11423 11895 104 39 1 305 305 ++10:25:42 anon_vma_chain 18153 19264 64 64 1 301 301 ++10:25:42 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:25:42 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:25:42 avtab_node 401880 401880 24 170 1 2364 2364 ++10:25:42 bdev_cache 72 72 896 18 4 4 4 ++10:25:42 bfq_io_cq 0 0 160 25 1 0 0 ++10:25:42 biovec-128 64 64 2048 16 8 4 4 ++10:25:42 biovec-64 64 64 1024 16 4 4 4 ++10:25:42 biovec-max 156 184 4096 8 8 23 23 ++10:25:42 blkdev_ioc 210 210 136 30 1 7 7 ++10:25:42 buffer_head 117 117 104 39 1 3 3 ++10:25:42 cred_jar 1651 1848 192 21 1 88 88 ++10:25:42 dax_cache 57 57 832 19 4 3 3 ++10:25:42 dentry 346367 346522 208 19 1 18238 18238 ++10:25:42 dio 0 0 640 25 4 0 0 ++10:25:42 dm_uevent 0 0 2664 12 8 0 0 ++10:25:42 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:25:42 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:25:42 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:25:42 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:25:42 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:25:42 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:25:42 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:25:42 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:25:42 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:25:42 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:25:42 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:25:42 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:25:42 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:25:42 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:25:42 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:25:42 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:25:42 dnotify_struct 0 0 32 128 1 0 0 ++10:25:42 dquot 0 0 256 16 1 0 0 ++10:25:42 eventpoll_pwq 728 728 72 56 1 13 13 ++10:25:42 file_lock_cache 90 90 216 18 1 5 5 ++10:25:42 files_cache 230 230 704 23 4 10 10 ++10:25:42 filp 10210 11808 256 16 1 738 738 ++10:25:42 fscrypt_ctx 0 0 80 51 1 0 0 ++10:25:42 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:25:42 fuse_inode 19 19 832 19 4 1 1 ++10:25:42 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:25:42 iint_cache 0 0 120 34 1 0 0 ++10:25:42 inode_cache 26084 27100 640 25 4 1084 1084 ++10:25:42 ip4-frags 68 68 232 17 1 4 4 ++10:25:42 isofs_inode_cache 69 69 688 23 4 3 3 ++10:25:42 kcopyd_job 0 0 3312 9 8 0 0 ++10:25:42 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:25:42 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:25:42 kioctx 92 92 704 23 4 4 4 ++10:25:42 kmalloc-128 5391 5696 128 32 1 178 178 ++10:25:42 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:25:42 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:25:42 kmalloc-1k 4432 4432 1024 16 4 277 277 ++10:25:42 kmalloc-256 15322 15376 256 16 1 961 961 ++10:25:42 kmalloc-2k 697 768 2048 16 8 48 48 ++10:25:42 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:25:42 kmalloc-4k 1648 1728 4096 8 8 216 216 ++10:25:42 kmalloc-512 3961 8144 512 16 2 509 509 ++10:25:42 kmalloc-64 306564 307328 64 64 1 4802 4802 ++10:25:42 kmalloc-8 424448 424448 8 512 1 829 829 ++10:25:42 kmalloc-8k 69 84 8192 4 8 21 21 ++10:25:42 kmalloc-96 6342 6342 96 42 1 151 151 ++10:25:42 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:25:42 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:25:42 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:25:42 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:25:42 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:25:42 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:25:42 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:25:42 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:25:42 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:25:42 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:25:42 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:25:42 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:25:42 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:25:42 kmem_cache 176 176 512 16 2 11 11 ++10:25:42 kmem_cache_node 256 256 64 64 1 4 4 ++10:25:42 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:25:42 mm_struct 224 224 1152 28 8 8 8 ++10:25:42 mnt_cache 1500 1500 320 25 2 60 60 ++10:25:42 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:25:42 names_cache 56 56 4096 8 8 7 7 ++10:25:42 net_namespace 12 12 5312 6 8 2 2 ++10:25:42 nf_conntrack 225 225 320 25 2 9 9 ++10:25:42 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:25:42 numa_policy 31 31 264 31 2 1 1 ++10:25:42 pde_opener 408 408 40 102 1 4 4 ++10:25:42 pid 992 992 128 32 1 31 31 ++10:25:42 pid_namespace 0 0 240 17 1 0 0 ++10:25:42 PINGv6 0 0 1344 24 8 0 0 ++10:25:42 pool_workqueue 640 640 256 16 1 40 40 ++10:25:42 proc_dir_entry 819 819 192 21 1 39 39 ++10:25:42 proc_inode_cache 10265 10902 712 23 4 474 474 ++10:25:42 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:25:42 RAW 84 84 1152 28 8 3 3 ++10:25:42 RAWv6 72 72 1344 24 8 3 3 ++10:25:42 request_queue 39 39 2488 13 8 3 3 ++10:25:42 request_sock_TCP 0 0 336 24 2 0 0 ++10:25:42 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:25:42 rpc_inode_cache 23 23 704 23 4 1 1 ++10:25:42 scsi_sense_cache 160 160 128 32 1 5 5 ++10:25:42 search 0 0 680 24 4 0 0 ++10:25:42 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:25:42 sighand_cache 338 360 2112 15 8 24 24 ++10:25:42 signal_cache 1119 1232 1152 28 8 44 44 ++10:25:42 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:25:42 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:25:42 skbuff_head_cache 624 624 256 16 1 39 39 ++10:25:42 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:25:42 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:25:42 task_delay_info 8721 8721 80 51 1 171 171 ++10:25:42 task_group 0 0 832 19 4 0 0 ++10:25:42 task_struct 557 640 5824 5 8 128 128 ++10:25:42 taskstats 92 92 344 23 2 4 4 ++10:25:42 TCP 52 52 2432 13 8 4 4 ++10:25:42 TCPv6 48 48 2560 12 8 4 4 ++10:25:42 trace_event_file 2024 2024 88 46 1 44 44 ++10:25:42 tw_sock_TCP 87 87 280 29 2 3 3 ++10:25:42 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:25:42 UDP 100 100 1280 25 8 4 4 ++10:25:42 UDPv6 88 88 1472 22 8 4 4 ++10:25:42 user_namespace 0 0 600 27 4 0 0 ++10:25:42 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:25:42 uts_namespace 0 0 440 18 2 0 0 ++10:25:42 vm_area_struct 33862 34340 232 17 1 2020 2020 ++10:25:42 vmap_area 26496 26496 64 64 1 414 414 ++10:25:42 xfrm_dst_cache 798 798 384 21 2 38 38 ++10:25:42 xfs_btree_cur 72 72 224 18 1 4 4 ++10:25:42 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:25:42 xfs_buf_item 240 240 272 30 2 8 8 ++10:25:42 xfs_da_state 68 68 480 17 2 4 4 ++10:25:42 xfs_dqtrx 0 0 528 31 4 0 0 ++10:25:42 xfs_dquot 0 0 496 16 2 0 0 ++10:25:42 xfs_efd_item 216 288 440 18 2 16 16 ++10:25:42 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:25:42 xfs_log_ticket 88 88 184 22 1 4 4 ++10:25:42 xfs_rud_item 92 92 176 23 1 4 4 ++10:25:42 xfs_rui_item 0 0 696 23 4 0 0 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:25:45 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:25:45 Acpi-Parse 314417 315652 56 73 1 4324 4324 ++10:25:45 Acpi-State 765 765 80 51 1 15 15 ++10:25:45 anon_vma 11423 11895 104 39 1 305 305 ++10:25:45 anon_vma_chain 18153 19264 64 64 1 301 301 ++10:25:45 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:25:45 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:25:45 avtab_node 401880 401880 24 170 1 2364 2364 ++10:25:45 bdev_cache 72 72 896 18 4 4 4 ++10:25:45 bfq_io_cq 0 0 160 25 1 0 0 ++10:25:45 biovec-128 64 64 2048 16 8 4 4 ++10:25:45 biovec-64 64 64 1024 16 4 4 4 ++10:25:45 biovec-max 156 184 4096 8 8 23 23 ++10:25:45 blkdev_ioc 210 210 136 30 1 7 7 ++10:25:45 buffer_head 117 117 104 39 1 3 3 ++10:25:45 cred_jar 1651 1848 192 21 1 88 88 ++10:25:45 dax_cache 57 57 832 19 4 3 3 ++10:25:45 dentry 346367 346522 208 19 1 18238 18238 ++10:25:45 dio 0 0 640 25 4 0 0 ++10:25:45 dm_uevent 0 0 2664 12 8 0 0 ++10:25:45 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:25:45 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:25:45 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:25:45 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:25:45 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:25:45 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:25:45 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:25:45 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:25:45 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:25:45 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:25:45 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:25:45 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:25:45 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:25:45 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:25:45 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:25:45 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:25:45 dnotify_struct 0 0 32 128 1 0 0 ++10:25:45 dquot 0 0 256 16 1 0 0 ++10:25:45 eventpoll_pwq 728 728 72 56 1 13 13 ++10:25:45 file_lock_cache 90 90 216 18 1 5 5 ++10:25:45 files_cache 230 230 704 23 4 10 10 ++10:25:45 filp 10210 11808 256 16 1 738 738 ++10:25:45 fscrypt_ctx 0 0 80 51 1 0 0 ++10:25:45 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:25:45 fuse_inode 19 19 832 19 4 1 1 ++10:25:45 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:25:45 iint_cache 0 0 120 34 1 0 0 ++10:25:45 inode_cache 26084 27100 640 25 4 1084 1084 ++10:25:45 ip4-frags 68 68 232 17 1 4 4 ++10:25:45 isofs_inode_cache 69 69 688 23 4 3 3 ++10:25:45 kcopyd_job 0 0 3312 9 8 0 0 ++10:25:45 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:25:45 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:25:45 kioctx 92 92 704 23 4 4 4 ++10:25:45 kmalloc-128 5391 5696 128 32 1 178 178 ++10:25:45 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:25:45 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:25:45 kmalloc-1k 4432 4432 1024 16 4 277 277 ++10:25:45 kmalloc-256 15322 15376 256 16 1 961 961 ++10:25:45 kmalloc-2k 697 768 2048 16 8 48 48 ++10:25:45 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:25:45 kmalloc-4k 1648 1728 4096 8 8 216 216 ++10:25:45 kmalloc-512 3961 8144 512 16 2 509 509 ++10:25:45 kmalloc-64 306564 307328 64 64 1 4802 4802 ++10:25:45 kmalloc-8 424448 424448 8 512 1 829 829 ++10:25:45 kmalloc-8k 69 84 8192 4 8 21 21 ++10:25:45 kmalloc-96 6342 6342 96 42 1 151 151 ++10:25:45 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:25:45 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:25:45 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:25:45 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:25:45 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:25:45 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:25:45 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:25:45 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:25:45 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:25:45 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:25:45 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:25:45 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:25:45 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:25:45 kmem_cache 176 176 512 16 2 11 11 ++10:25:45 kmem_cache_node 256 256 64 64 1 4 4 ++10:25:45 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:25:45 mm_struct 224 224 1152 28 8 8 8 ++10:25:45 mnt_cache 1500 1500 320 25 2 60 60 ++10:25:45 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:25:45 names_cache 56 56 4096 8 8 7 7 ++10:25:45 net_namespace 12 12 5312 6 8 2 2 ++10:25:45 nf_conntrack 225 225 320 25 2 9 9 ++10:25:45 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:25:45 numa_policy 31 31 264 31 2 1 1 ++10:25:45 pde_opener 408 408 40 102 1 4 4 ++10:25:45 pid 992 992 128 32 1 31 31 ++10:25:45 pid_namespace 0 0 240 17 1 0 0 ++10:25:45 PINGv6 0 0 1344 24 8 0 0 ++10:25:45 pool_workqueue 640 640 256 16 1 40 40 ++10:25:45 proc_dir_entry 819 819 192 21 1 39 39 ++10:25:45 proc_inode_cache 10265 10902 712 23 4 474 474 ++10:25:45 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:25:45 RAW 84 84 1152 28 8 3 3 ++10:25:45 RAWv6 72 72 1344 24 8 3 3 ++10:25:45 request_queue 39 39 2488 13 8 3 3 ++10:25:45 request_sock_TCP 0 0 336 24 2 0 0 ++10:25:45 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:25:45 rpc_inode_cache 23 23 704 23 4 1 1 ++10:25:45 scsi_sense_cache 160 160 128 32 1 5 5 ++10:25:45 search 0 0 680 24 4 0 0 ++10:25:45 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:25:45 sighand_cache 338 360 2112 15 8 24 24 ++10:25:45 signal_cache 1119 1232 1152 28 8 44 44 ++10:25:45 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:25:45 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:25:45 skbuff_head_cache 624 624 256 16 1 39 39 ++10:25:45 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:25:45 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:25:45 task_delay_info 8721 8721 80 51 1 171 171 ++10:25:45 task_group 0 0 832 19 4 0 0 ++10:25:45 task_struct 557 640 5824 5 8 128 128 ++10:25:45 taskstats 92 92 344 23 2 4 4 ++10:25:45 TCP 52 52 2432 13 8 4 4 ++10:25:45 TCPv6 48 48 2560 12 8 4 4 ++10:25:45 trace_event_file 2024 2024 88 46 1 44 44 ++10:25:45 tw_sock_TCP 87 87 280 29 2 3 3 ++10:25:45 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:25:45 UDP 100 100 1280 25 8 4 4 ++10:25:45 UDPv6 88 88 1472 22 8 4 4 ++10:25:45 user_namespace 0 0 600 27 4 0 0 ++10:25:45 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:25:45 uts_namespace 0 0 440 18 2 0 0 ++10:25:45 vm_area_struct 33862 34340 232 17 1 2020 2020 ++10:25:45 vmap_area 26496 26496 64 64 1 414 414 ++10:25:45 xfrm_dst_cache 798 798 384 21 2 38 38 ++10:25:45 xfs_btree_cur 72 72 224 18 1 4 4 ++10:25:45 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:25:45 xfs_buf_item 240 240 272 30 2 8 8 ++10:25:45 xfs_da_state 68 68 480 17 2 4 4 ++10:25:45 xfs_dqtrx 0 0 528 31 4 0 0 ++10:25:45 xfs_dquot 0 0 496 16 2 0 0 ++10:25:45 xfs_efd_item 216 288 440 18 2 16 16 ++10:25:45 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:25:45 xfs_log_ticket 88 88 184 22 1 4 4 ++10:25:45 xfs_rud_item 92 92 176 23 1 4 4 ++10:25:45 xfs_rui_item 0 0 696 23 4 0 0 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:25:48 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:25:48 Acpi-Parse 314406 315652 56 73 1 4324 4324 ++10:25:48 Acpi-State 765 765 80 51 1 15 15 ++10:25:48 anon_vma 11423 11895 104 39 1 305 305 ++10:25:48 anon_vma_chain 18206 19264 64 64 1 301 301 ++10:25:48 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:25:48 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:25:48 avtab_node 401880 401880 24 170 1 2364 2364 ++10:25:48 bdev_cache 72 72 896 18 4 4 4 ++10:25:48 bfq_io_cq 0 0 160 25 1 0 0 ++10:25:48 biovec-128 64 64 2048 16 8 4 4 ++10:25:48 biovec-64 64 64 1024 16 4 4 4 ++10:25:48 biovec-max 136 176 4096 8 8 22 22 ++10:25:48 blkdev_ioc 210 210 136 30 1 7 7 ++10:25:48 buffer_head 117 117 104 39 1 3 3 ++10:25:48 cred_jar 1651 1848 192 21 1 88 88 ++10:25:48 dax_cache 57 57 832 19 4 3 3 ++10:25:48 dentry 346366 346522 208 19 1 18238 18238 ++10:25:48 dio 0 0 640 25 4 0 0 ++10:25:48 dm_uevent 0 0 2664 12 8 0 0 ++10:25:48 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:25:48 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:25:48 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:25:48 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:25:48 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:25:48 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:25:48 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:25:48 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:25:48 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:25:48 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:25:48 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:25:48 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:25:48 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:25:48 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:25:48 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:25:48 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:25:48 dnotify_struct 0 0 32 128 1 0 0 ++10:25:48 dquot 0 0 256 16 1 0 0 ++10:25:48 eventpoll_pwq 728 728 72 56 1 13 13 ++10:25:48 file_lock_cache 90 90 216 18 1 5 5 ++10:25:48 files_cache 230 230 704 23 4 10 10 ++10:25:48 filp 10241 11808 256 16 1 738 738 ++10:25:48 fscrypt_ctx 0 0 80 51 1 0 0 ++10:25:48 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:25:48 fuse_inode 19 19 832 19 4 1 1 ++10:25:48 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:25:48 iint_cache 0 0 120 34 1 0 0 ++10:25:48 inode_cache 26084 27100 640 25 4 1084 1084 ++10:25:48 ip4-frags 68 68 232 17 1 4 4 ++10:25:48 isofs_inode_cache 69 69 688 23 4 3 3 ++10:25:48 kcopyd_job 0 0 3312 9 8 0 0 ++10:25:48 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:25:48 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:25:48 kioctx 92 92 704 23 4 4 4 ++10:25:48 kmalloc-128 5391 5696 128 32 1 178 178 ++10:25:48 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:25:48 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:25:48 kmalloc-1k 4624 4624 1024 16 4 289 289 ++10:25:48 kmalloc-256 15322 15376 256 16 1 961 961 ++10:25:48 kmalloc-2k 697 768 2048 16 8 48 48 ++10:25:48 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:25:48 kmalloc-4k 1648 1728 4096 8 8 216 216 ++10:25:48 kmalloc-512 3914 8144 512 16 2 509 509 ++10:25:48 kmalloc-64 306563 307328 64 64 1 4802 4802 ++10:25:48 kmalloc-8 424448 424448 8 512 1 829 829 ++10:25:48 kmalloc-8k 69 84 8192 4 8 21 21 ++10:25:48 kmalloc-96 6342 6342 96 42 1 151 151 ++10:25:48 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:25:48 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:25:48 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:25:48 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:25:48 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:25:48 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:25:48 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:25:48 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:25:48 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:25:48 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:25:48 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:25:48 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:25:48 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:25:48 kmem_cache 176 176 512 16 2 11 11 ++10:25:48 kmem_cache_node 256 256 64 64 1 4 4 ++10:25:48 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:25:48 mm_struct 224 224 1152 28 8 8 8 ++10:25:48 mnt_cache 1500 1500 320 25 2 60 60 ++10:25:48 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:25:48 names_cache 56 56 4096 8 8 7 7 ++10:25:48 net_namespace 12 12 5312 6 8 2 2 ++10:25:48 nf_conntrack 225 225 320 25 2 9 9 ++10:25:48 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:25:48 numa_policy 31 31 264 31 2 1 1 ++10:25:48 pde_opener 408 408 40 102 1 4 4 ++10:25:48 pid 992 992 128 32 1 31 31 ++10:25:48 pid_namespace 0 0 240 17 1 0 0 ++10:25:48 PINGv6 0 0 1344 24 8 0 0 ++10:25:48 pool_workqueue 640 640 256 16 1 40 40 ++10:25:48 proc_dir_entry 819 819 192 21 1 39 39 ++10:25:48 proc_inode_cache 10224 10902 712 23 4 474 474 ++10:25:48 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:25:48 RAW 84 84 1152 28 8 3 3 ++10:25:48 RAWv6 72 72 1344 24 8 3 3 ++10:25:48 request_queue 39 39 2488 13 8 3 3 ++10:25:48 request_sock_TCP 0 0 336 24 2 0 0 ++10:25:48 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:25:48 rpc_inode_cache 23 23 704 23 4 1 1 ++10:25:48 scsi_sense_cache 160 160 128 32 1 5 5 ++10:25:48 search 0 0 680 24 4 0 0 ++10:25:48 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:25:48 sighand_cache 338 360 2112 15 8 24 24 ++10:25:48 signal_cache 1119 1232 1152 28 8 44 44 ++10:25:48 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:25:48 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:25:48 skbuff_head_cache 624 624 256 16 1 39 39 ++10:25:48 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:25:48 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:25:48 task_delay_info 8721 8721 80 51 1 171 171 ++10:25:48 task_group 0 0 832 19 4 0 0 ++10:25:48 task_struct 558 640 5824 5 8 128 128 ++10:25:48 taskstats 92 92 344 23 2 4 4 ++10:25:48 TCP 52 52 2432 13 8 4 4 ++10:25:48 TCPv6 48 48 2560 12 8 4 4 ++10:25:48 trace_event_file 2024 2024 88 46 1 44 44 ++10:25:48 tw_sock_TCP 87 87 280 29 2 3 3 ++10:25:48 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:25:48 UDP 100 100 1280 25 8 4 4 ++10:25:48 UDPv6 88 88 1472 22 8 4 4 ++10:25:48 user_namespace 0 0 600 27 4 0 0 ++10:25:48 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:25:48 uts_namespace 0 0 440 18 2 0 0 ++10:25:48 vm_area_struct 33756 34340 232 17 1 2020 2020 ++10:25:48 vmap_area 26496 26496 64 64 1 414 414 ++10:25:48 xfrm_dst_cache 798 798 384 21 2 38 38 ++10:25:48 xfs_btree_cur 72 72 224 18 1 4 4 ++10:25:48 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:25:48 xfs_buf_item 240 240 272 30 2 8 8 ++10:25:48 xfs_da_state 68 68 480 17 2 4 4 ++10:25:48 xfs_dqtrx 0 0 528 31 4 0 0 ++10:25:48 xfs_dquot 0 0 496 16 2 0 0 ++10:25:48 xfs_efd_item 216 288 440 18 2 16 16 ++10:25:48 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:25:48 xfs_log_ticket 88 88 184 22 1 4 4 ++10:25:48 xfs_rud_item 92 92 176 23 1 4 4 ++10:25:48 xfs_rui_item 0 0 696 23 4 0 0 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:25:51 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:25:51 Acpi-Parse 314406 315652 56 73 1 4324 4324 ++10:25:51 Acpi-State 765 765 80 51 1 15 15 ++10:25:51 anon_vma 11423 11895 104 39 1 305 305 ++10:25:51 anon_vma_chain 18206 19264 64 64 1 301 301 ++10:25:51 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:25:51 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:25:51 avtab_node 401880 401880 24 170 1 2364 2364 ++10:25:51 bdev_cache 72 72 896 18 4 4 4 ++10:25:51 bfq_io_cq 0 0 160 25 1 0 0 ++10:25:51 biovec-128 64 64 2048 16 8 4 4 ++10:25:51 biovec-64 64 64 1024 16 4 4 4 ++10:25:51 biovec-max 136 176 4096 8 8 22 22 ++10:25:51 blkdev_ioc 210 210 136 30 1 7 7 ++10:25:51 buffer_head 117 117 104 39 1 3 3 ++10:25:51 cred_jar 1651 1848 192 21 1 88 88 ++10:25:51 dax_cache 57 57 832 19 4 3 3 ++10:25:51 dentry 346366 346522 208 19 1 18238 18238 ++10:25:51 dio 0 0 640 25 4 0 0 ++10:25:51 dm_uevent 0 0 2664 12 8 0 0 ++10:25:51 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:25:51 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:25:51 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:25:51 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:25:51 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:25:51 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:25:51 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:25:51 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:25:51 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:25:51 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:25:51 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:25:51 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:25:51 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:25:51 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:25:51 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:25:51 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:25:51 dnotify_struct 0 0 32 128 1 0 0 ++10:25:51 dquot 0 0 256 16 1 0 0 ++10:25:51 eventpoll_pwq 728 728 72 56 1 13 13 ++10:25:51 file_lock_cache 90 90 216 18 1 5 5 ++10:25:51 files_cache 230 230 704 23 4 10 10 ++10:25:51 filp 10241 11808 256 16 1 738 738 ++10:25:51 fscrypt_ctx 0 0 80 51 1 0 0 ++10:25:51 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:25:51 fuse_inode 19 19 832 19 4 1 1 ++10:25:51 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:25:51 iint_cache 0 0 120 34 1 0 0 ++10:25:51 inode_cache 26084 27100 640 25 4 1084 1084 ++10:25:51 ip4-frags 68 68 232 17 1 4 4 ++10:25:51 isofs_inode_cache 69 69 688 23 4 3 3 ++10:25:51 kcopyd_job 0 0 3312 9 8 0 0 ++10:25:51 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:25:51 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:25:51 kioctx 92 92 704 23 4 4 4 ++10:25:51 kmalloc-128 5391 5696 128 32 1 178 178 ++10:25:51 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:25:51 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:25:51 kmalloc-1k 4624 4624 1024 16 4 289 289 ++10:25:51 kmalloc-256 15322 15376 256 16 1 961 961 ++10:25:51 kmalloc-2k 697 768 2048 16 8 48 48 ++10:25:51 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:25:51 kmalloc-4k 1648 1728 4096 8 8 216 216 ++10:25:51 kmalloc-512 3914 8144 512 16 2 509 509 ++10:25:51 kmalloc-64 306563 307328 64 64 1 4802 4802 ++10:25:51 kmalloc-8 424448 424448 8 512 1 829 829 ++10:25:51 kmalloc-8k 69 84 8192 4 8 21 21 ++10:25:51 kmalloc-96 6342 6342 96 42 1 151 151 ++10:25:51 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:25:51 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:25:51 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:25:51 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:25:51 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:25:51 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:25:51 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:25:51 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:25:51 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:25:51 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:25:51 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:25:51 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:25:51 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:25:51 kmem_cache 176 176 512 16 2 11 11 ++10:25:51 kmem_cache_node 256 256 64 64 1 4 4 ++10:25:51 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:25:51 mm_struct 224 224 1152 28 8 8 8 ++10:25:51 mnt_cache 1500 1500 320 25 2 60 60 ++10:25:51 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:25:51 names_cache 56 56 4096 8 8 7 7 ++10:25:51 net_namespace 12 12 5312 6 8 2 2 ++10:25:51 nf_conntrack 225 225 320 25 2 9 9 ++10:25:51 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:25:51 numa_policy 31 31 264 31 2 1 1 ++10:25:51 pde_opener 408 408 40 102 1 4 4 ++10:25:51 pid 992 992 128 32 1 31 31 ++10:25:51 pid_namespace 0 0 240 17 1 0 0 ++10:25:51 PINGv6 0 0 1344 24 8 0 0 ++10:25:51 pool_workqueue 640 640 256 16 1 40 40 ++10:25:51 proc_dir_entry 819 819 192 21 1 39 39 ++10:25:51 proc_inode_cache 10224 10902 712 23 4 474 474 ++10:25:51 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:25:51 RAW 84 84 1152 28 8 3 3 ++10:25:51 RAWv6 72 72 1344 24 8 3 3 ++10:25:51 request_queue 39 39 2488 13 8 3 3 ++10:25:51 request_sock_TCP 0 0 336 24 2 0 0 ++10:25:51 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:25:51 rpc_inode_cache 23 23 704 23 4 1 1 ++10:25:51 scsi_sense_cache 160 160 128 32 1 5 5 ++10:25:51 search 0 0 680 24 4 0 0 ++10:25:51 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:25:51 sighand_cache 338 360 2112 15 8 24 24 ++10:25:51 signal_cache 1119 1232 1152 28 8 44 44 ++10:25:51 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:25:51 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:25:51 skbuff_head_cache 624 624 256 16 1 39 39 ++10:25:51 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:25:51 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:25:51 task_delay_info 8721 8721 80 51 1 171 171 ++10:25:51 task_group 0 0 832 19 4 0 0 ++10:25:51 task_struct 558 640 5824 5 8 128 128 ++10:25:51 taskstats 92 92 344 23 2 4 4 ++10:25:51 TCP 52 52 2432 13 8 4 4 ++10:25:51 TCPv6 48 48 2560 12 8 4 4 ++10:25:51 trace_event_file 2024 2024 88 46 1 44 44 ++10:25:51 tw_sock_TCP 87 87 280 29 2 3 3 ++10:25:51 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:25:51 UDP 100 100 1280 25 8 4 4 ++10:25:51 UDPv6 88 88 1472 22 8 4 4 ++10:25:51 user_namespace 0 0 600 27 4 0 0 ++10:25:51 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:25:51 uts_namespace 0 0 440 18 2 0 0 ++10:25:51 vm_area_struct 33756 34340 232 17 1 2020 2020 ++10:25:51 vmap_area 26496 26496 64 64 1 414 414 ++10:25:51 xfrm_dst_cache 798 798 384 21 2 38 38 ++10:25:51 xfs_btree_cur 72 72 224 18 1 4 4 ++10:25:51 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:25:51 xfs_buf_item 240 240 272 30 2 8 8 ++10:25:51 xfs_da_state 68 68 480 17 2 4 4 ++10:25:51 xfs_dqtrx 0 0 528 31 4 0 0 ++10:25:51 xfs_dquot 0 0 496 16 2 0 0 ++10:25:51 xfs_efd_item 216 288 440 18 2 16 16 ++10:25:51 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:25:51 xfs_log_ticket 88 88 184 22 1 4 4 ++10:25:51 xfs_rud_item 92 92 176 23 1 4 4 ++10:25:51 xfs_rui_item 0 0 696 23 4 0 0 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:25:54 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:25:54 Acpi-Parse 314406 315652 56 73 1 4324 4324 ++10:25:54 Acpi-State 765 765 80 51 1 15 15 ++10:25:54 anon_vma 11423 11895 104 39 1 305 305 ++10:25:54 anon_vma_chain 18206 19264 64 64 1 301 301 ++10:25:54 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:25:54 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:25:54 avtab_node 401880 401880 24 170 1 2364 2364 ++10:25:54 bdev_cache 72 72 896 18 4 4 4 ++10:25:54 bfq_io_cq 0 0 160 25 1 0 0 ++10:25:54 biovec-128 64 64 2048 16 8 4 4 ++10:25:54 biovec-64 64 64 1024 16 4 4 4 ++10:25:54 biovec-max 136 176 4096 8 8 22 22 ++10:25:54 blkdev_ioc 210 210 136 30 1 7 7 ++10:25:54 buffer_head 117 117 104 39 1 3 3 ++10:25:54 cred_jar 1651 1848 192 21 1 88 88 ++10:25:54 dax_cache 57 57 832 19 4 3 3 ++10:25:54 dentry 346366 346522 208 19 1 18238 18238 ++10:25:54 dio 0 0 640 25 4 0 0 ++10:25:54 dm_uevent 0 0 2664 12 8 0 0 ++10:25:54 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:25:54 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:25:54 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:25:54 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:25:54 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:25:54 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:25:54 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:25:54 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:25:54 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:25:54 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:25:54 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:25:54 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:25:54 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:25:54 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:25:54 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:25:54 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:25:54 dnotify_struct 0 0 32 128 1 0 0 ++10:25:54 dquot 0 0 256 16 1 0 0 ++10:25:54 eventpoll_pwq 728 728 72 56 1 13 13 ++10:25:54 file_lock_cache 90 90 216 18 1 5 5 ++10:25:54 files_cache 230 230 704 23 4 10 10 ++10:25:54 filp 10241 11808 256 16 1 738 738 ++10:25:54 fscrypt_ctx 0 0 80 51 1 0 0 ++10:25:54 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:25:54 fuse_inode 19 19 832 19 4 1 1 ++10:25:54 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:25:54 iint_cache 0 0 120 34 1 0 0 ++10:25:54 inode_cache 26084 27100 640 25 4 1084 1084 ++10:25:54 ip4-frags 68 68 232 17 1 4 4 ++10:25:54 isofs_inode_cache 69 69 688 23 4 3 3 ++10:25:54 kcopyd_job 0 0 3312 9 8 0 0 ++10:25:54 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:25:54 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:25:54 kioctx 92 92 704 23 4 4 4 ++10:25:54 kmalloc-128 5391 5696 128 32 1 178 178 ++10:25:54 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:25:54 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:25:54 kmalloc-1k 4624 4624 1024 16 4 289 289 ++10:25:54 kmalloc-256 15322 15376 256 16 1 961 961 ++10:25:54 kmalloc-2k 697 768 2048 16 8 48 48 ++10:25:54 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:25:54 kmalloc-4k 1648 1728 4096 8 8 216 216 ++10:25:54 kmalloc-512 3914 8144 512 16 2 509 509 ++10:25:54 kmalloc-64 306563 307328 64 64 1 4802 4802 ++10:25:54 kmalloc-8 424448 424448 8 512 1 829 829 ++10:25:54 kmalloc-8k 69 84 8192 4 8 21 21 ++10:25:54 kmalloc-96 6342 6342 96 42 1 151 151 ++10:25:54 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:25:54 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:25:54 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:25:54 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:25:54 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:25:54 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:25:54 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:25:54 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:25:54 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:25:54 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:25:54 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:25:54 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:25:54 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:25:54 kmem_cache 176 176 512 16 2 11 11 ++10:25:54 kmem_cache_node 256 256 64 64 1 4 4 ++10:25:54 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:25:54 mm_struct 224 224 1152 28 8 8 8 ++10:25:54 mnt_cache 1500 1500 320 25 2 60 60 ++10:25:54 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:25:54 names_cache 56 56 4096 8 8 7 7 ++10:25:54 net_namespace 12 12 5312 6 8 2 2 ++10:25:54 nf_conntrack 225 225 320 25 2 9 9 ++10:25:54 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:25:54 numa_policy 31 31 264 31 2 1 1 ++10:25:54 pde_opener 408 408 40 102 1 4 4 ++10:25:54 pid 992 992 128 32 1 31 31 ++10:25:54 pid_namespace 0 0 240 17 1 0 0 ++10:25:54 PINGv6 0 0 1344 24 8 0 0 ++10:25:54 pool_workqueue 640 640 256 16 1 40 40 ++10:25:54 proc_dir_entry 819 819 192 21 1 39 39 ++10:25:54 proc_inode_cache 10224 10902 712 23 4 474 474 ++10:25:54 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:25:54 RAW 84 84 1152 28 8 3 3 ++10:25:54 RAWv6 72 72 1344 24 8 3 3 ++10:25:54 request_queue 39 39 2488 13 8 3 3 ++10:25:54 request_sock_TCP 0 0 336 24 2 0 0 ++10:25:54 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:25:54 rpc_inode_cache 23 23 704 23 4 1 1 ++10:25:54 scsi_sense_cache 160 160 128 32 1 5 5 ++10:25:54 search 0 0 680 24 4 0 0 ++10:25:54 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:25:54 sighand_cache 338 360 2112 15 8 24 24 ++10:25:54 signal_cache 1119 1232 1152 28 8 44 44 ++10:25:54 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:25:54 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:25:54 skbuff_head_cache 624 624 256 16 1 39 39 ++10:25:54 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:25:54 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:25:54 task_delay_info 8721 8721 80 51 1 171 171 ++10:25:54 task_group 0 0 832 19 4 0 0 ++10:25:54 task_struct 558 640 5824 5 8 128 128 ++10:25:54 taskstats 92 92 344 23 2 4 4 ++10:25:54 TCP 52 52 2432 13 8 4 4 ++10:25:54 TCPv6 48 48 2560 12 8 4 4 ++10:25:54 trace_event_file 2024 2024 88 46 1 44 44 ++10:25:54 tw_sock_TCP 87 87 280 29 2 3 3 ++10:25:54 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:25:54 UDP 100 100 1280 25 8 4 4 ++10:25:54 UDPv6 88 88 1472 22 8 4 4 ++10:25:54 user_namespace 0 0 600 27 4 0 0 ++10:25:54 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:25:54 uts_namespace 0 0 440 18 2 0 0 ++10:25:54 vm_area_struct 33756 34340 232 17 1 2020 2020 ++10:25:54 vmap_area 26496 26496 64 64 1 414 414 ++10:25:54 xfrm_dst_cache 798 798 384 21 2 38 38 ++10:25:54 xfs_btree_cur 72 72 224 18 1 4 4 ++10:25:54 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:25:54 xfs_buf_item 240 240 272 30 2 8 8 ++10:25:54 xfs_da_state 68 68 480 17 2 4 4 ++10:25:54 xfs_dqtrx 0 0 528 31 4 0 0 ++10:25:54 xfs_dquot 0 0 496 16 2 0 0 ++10:25:54 xfs_efd_item 216 288 440 18 2 16 16 ++10:25:54 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:25:54 xfs_log_ticket 88 88 184 22 1 4 4 ++10:25:54 xfs_rud_item 92 92 176 23 1 4 4 ++10:25:54 xfs_rui_item 0 0 696 23 4 0 0 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:25:57 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:25:57 Acpi-Parse 314406 315652 56 73 1 4324 4324 ++10:25:57 Acpi-State 765 765 80 51 1 15 15 ++10:25:57 anon_vma 11423 11895 104 39 1 305 305 ++10:25:57 anon_vma_chain 18206 19264 64 64 1 301 301 ++10:25:57 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:25:57 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:25:57 avtab_node 401880 401880 24 170 1 2364 2364 ++10:25:57 bdev_cache 72 72 896 18 4 4 4 ++10:25:57 bfq_io_cq 0 0 160 25 1 0 0 ++10:25:57 biovec-128 64 64 2048 16 8 4 4 ++10:25:57 biovec-64 64 64 1024 16 4 4 4 ++10:25:57 biovec-max 136 176 4096 8 8 22 22 ++10:25:57 blkdev_ioc 210 210 136 30 1 7 7 ++10:25:57 buffer_head 117 117 104 39 1 3 3 ++10:25:57 cred_jar 1651 1848 192 21 1 88 88 ++10:25:57 dax_cache 57 57 832 19 4 3 3 ++10:25:57 dentry 346366 346522 208 19 1 18238 18238 ++10:25:57 dio 0 0 640 25 4 0 0 ++10:25:57 dm_uevent 0 0 2664 12 8 0 0 ++10:25:57 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:25:57 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:25:57 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:25:57 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:25:57 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:25:57 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:25:57 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:25:57 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:25:57 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:25:57 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:25:57 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:25:57 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:25:57 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:25:57 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:25:57 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:25:57 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:25:57 dnotify_struct 0 0 32 128 1 0 0 ++10:25:57 dquot 0 0 256 16 1 0 0 ++10:25:57 eventpoll_pwq 728 728 72 56 1 13 13 ++10:25:57 file_lock_cache 90 90 216 18 1 5 5 ++10:25:57 files_cache 230 230 704 23 4 10 10 ++10:25:57 filp 10241 11808 256 16 1 738 738 ++10:25:57 fscrypt_ctx 0 0 80 51 1 0 0 ++10:25:57 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:25:57 fuse_inode 19 19 832 19 4 1 1 ++10:25:57 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:25:57 iint_cache 0 0 120 34 1 0 0 ++10:25:57 inode_cache 26084 27100 640 25 4 1084 1084 ++10:25:57 ip4-frags 68 68 232 17 1 4 4 ++10:25:57 isofs_inode_cache 69 69 688 23 4 3 3 ++10:25:57 kcopyd_job 0 0 3312 9 8 0 0 ++10:25:57 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:25:57 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:25:57 kioctx 92 92 704 23 4 4 4 ++10:25:57 kmalloc-128 5391 5696 128 32 1 178 178 ++10:25:57 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:25:57 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:25:57 kmalloc-1k 4624 4624 1024 16 4 289 289 ++10:25:57 kmalloc-256 15322 15376 256 16 1 961 961 ++10:25:57 kmalloc-2k 697 768 2048 16 8 48 48 ++10:25:57 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:25:57 kmalloc-4k 1648 1728 4096 8 8 216 216 ++10:25:57 kmalloc-512 3914 8144 512 16 2 509 509 ++10:25:57 kmalloc-64 306563 307328 64 64 1 4802 4802 ++10:25:57 kmalloc-8 424448 424448 8 512 1 829 829 ++10:25:57 kmalloc-8k 69 84 8192 4 8 21 21 ++10:25:57 kmalloc-96 6342 6342 96 42 1 151 151 ++10:25:57 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:25:57 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:25:57 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:25:57 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:25:57 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:25:57 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:25:57 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:25:57 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:25:57 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:25:57 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:25:57 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:25:57 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:25:57 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:25:57 kmem_cache 176 176 512 16 2 11 11 ++10:25:57 kmem_cache_node 256 256 64 64 1 4 4 ++10:25:57 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:25:57 mm_struct 224 224 1152 28 8 8 8 ++10:25:57 mnt_cache 1500 1500 320 25 2 60 60 ++10:25:57 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:25:57 names_cache 56 56 4096 8 8 7 7 ++10:25:57 net_namespace 12 12 5312 6 8 2 2 ++10:25:57 nf_conntrack 225 225 320 25 2 9 9 ++10:25:57 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:25:57 numa_policy 31 31 264 31 2 1 1 ++10:25:57 pde_opener 408 408 40 102 1 4 4 ++10:25:57 pid 992 992 128 32 1 31 31 ++10:25:57 pid_namespace 0 0 240 17 1 0 0 ++10:25:57 PINGv6 0 0 1344 24 8 0 0 ++10:25:57 pool_workqueue 640 640 256 16 1 40 40 ++10:25:57 proc_dir_entry 819 819 192 21 1 39 39 ++10:25:57 proc_inode_cache 10224 10902 712 23 4 474 474 ++10:25:57 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:25:57 RAW 84 84 1152 28 8 3 3 ++10:25:57 RAWv6 72 72 1344 24 8 3 3 ++10:25:57 request_queue 39 39 2488 13 8 3 3 ++10:25:57 request_sock_TCP 0 0 336 24 2 0 0 ++10:25:57 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:25:57 rpc_inode_cache 23 23 704 23 4 1 1 ++10:25:57 scsi_sense_cache 160 160 128 32 1 5 5 ++10:25:57 search 0 0 680 24 4 0 0 ++10:25:57 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:25:57 sighand_cache 338 360 2112 15 8 24 24 ++10:25:57 signal_cache 1119 1232 1152 28 8 44 44 ++10:25:57 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:25:57 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:25:57 skbuff_head_cache 624 624 256 16 1 39 39 ++10:25:57 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:25:57 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:25:57 task_delay_info 8721 8721 80 51 1 171 171 ++10:25:57 task_group 0 0 832 19 4 0 0 ++10:25:57 task_struct 558 640 5824 5 8 128 128 ++10:25:57 taskstats 92 92 344 23 2 4 4 ++10:25:57 TCP 52 52 2432 13 8 4 4 ++10:25:57 TCPv6 48 48 2560 12 8 4 4 ++10:25:57 trace_event_file 2024 2024 88 46 1 44 44 ++10:25:57 tw_sock_TCP 87 87 280 29 2 3 3 ++10:25:57 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:25:57 UDP 100 100 1280 25 8 4 4 ++10:25:57 UDPv6 88 88 1472 22 8 4 4 ++10:25:57 user_namespace 0 0 600 27 4 0 0 ++10:25:57 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:25:57 uts_namespace 0 0 440 18 2 0 0 ++10:25:57 vm_area_struct 33756 34340 232 17 1 2020 2020 ++10:25:57 vmap_area 26496 26496 64 64 1 414 414 ++10:25:57 xfrm_dst_cache 798 798 384 21 2 38 38 ++10:25:57 xfs_btree_cur 72 72 224 18 1 4 4 ++10:25:57 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:25:57 xfs_buf_item 240 240 272 30 2 8 8 ++10:25:57 xfs_da_state 68 68 480 17 2 4 4 ++10:25:57 xfs_dqtrx 0 0 528 31 4 0 0 ++10:25:57 xfs_dquot 0 0 496 16 2 0 0 ++10:25:57 xfs_efd_item 216 288 440 18 2 16 16 ++10:25:57 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:25:57 xfs_log_ticket 88 88 184 22 1 4 4 ++10:25:57 xfs_rud_item 92 92 176 23 1 4 4 ++10:25:57 xfs_rui_item 0 0 696 23 4 0 0 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:26:00 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:26:00 Acpi-Parse 314406 315652 56 73 1 4324 4324 ++10:26:00 Acpi-State 765 765 80 51 1 15 15 ++10:26:00 anon_vma 11423 11895 104 39 1 305 305 ++10:26:00 anon_vma_chain 18206 19264 64 64 1 301 301 ++10:26:00 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:26:00 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:26:00 avtab_node 401880 401880 24 170 1 2364 2364 ++10:26:00 bdev_cache 72 72 896 18 4 4 4 ++10:26:00 bfq_io_cq 0 0 160 25 1 0 0 ++10:26:00 biovec-128 64 64 2048 16 8 4 4 ++10:26:00 biovec-64 64 64 1024 16 4 4 4 ++10:26:00 biovec-max 136 176 4096 8 8 22 22 ++10:26:00 blkdev_ioc 210 210 136 30 1 7 7 ++10:26:00 buffer_head 117 117 104 39 1 3 3 ++10:26:00 cred_jar 1651 1848 192 21 1 88 88 ++10:26:00 dax_cache 57 57 832 19 4 3 3 ++10:26:00 dentry 346446 346522 208 19 1 18238 18238 ++10:26:00 dio 0 0 640 25 4 0 0 ++10:26:00 dm_uevent 0 0 2664 12 8 0 0 ++10:26:00 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:26:00 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:26:00 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:26:00 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:26:00 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:26:00 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:26:00 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:26:00 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:26:00 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:26:00 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:26:00 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:26:00 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:26:00 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:26:00 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:26:00 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:26:00 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:26:00 dnotify_struct 0 0 32 128 1 0 0 ++10:26:00 dquot 0 0 256 16 1 0 0 ++10:26:00 eventpoll_pwq 728 728 72 56 1 13 13 ++10:26:00 file_lock_cache 90 90 216 18 1 5 5 ++10:26:00 files_cache 230 230 704 23 4 10 10 ++10:26:00 filp 10301 11824 256 16 1 739 739 ++10:26:00 fscrypt_ctx 0 0 80 51 1 0 0 ++10:26:00 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:26:00 fuse_inode 19 19 832 19 4 1 1 ++10:26:00 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:26:00 iint_cache 0 0 120 34 1 0 0 ++10:26:00 inode_cache 26084 27100 640 25 4 1084 1084 ++10:26:00 ip4-frags 68 68 232 17 1 4 4 ++10:26:00 isofs_inode_cache 69 69 688 23 4 3 3 ++10:26:00 kcopyd_job 0 0 3312 9 8 0 0 ++10:26:00 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:26:00 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:26:00 kioctx 92 92 704 23 4 4 4 ++10:26:00 kmalloc-128 5391 5696 128 32 1 178 178 ++10:26:00 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:26:00 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:26:00 kmalloc-1k 4624 4624 1024 16 4 289 289 ++10:26:00 kmalloc-256 15322 15376 256 16 1 961 961 ++10:26:00 kmalloc-2k 697 768 2048 16 8 48 48 ++10:26:00 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:26:00 kmalloc-4k 1652 1728 4096 8 8 216 216 ++10:26:00 kmalloc-512 3912 8144 512 16 2 509 509 ++10:26:00 kmalloc-64 306563 307328 64 64 1 4802 4802 ++10:26:00 kmalloc-8 424448 424448 8 512 1 829 829 ++10:26:00 kmalloc-8k 69 84 8192 4 8 21 21 ++10:26:00 kmalloc-96 6342 6342 96 42 1 151 151 ++10:26:00 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:26:00 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:26:00 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:26:00 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:26:00 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:26:00 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:26:00 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:26:00 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:26:00 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:26:00 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:26:00 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:26:00 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:26:00 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:26:00 kmem_cache 176 176 512 16 2 11 11 ++10:26:00 kmem_cache_node 256 256 64 64 1 4 4 ++10:26:00 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:26:00 mm_struct 224 224 1152 28 8 8 8 ++10:26:00 mnt_cache 1500 1500 320 25 2 60 60 ++10:26:00 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:26:00 names_cache 56 56 4096 8 8 7 7 ++10:26:00 net_namespace 12 12 5312 6 8 2 2 ++10:26:00 nf_conntrack 225 225 320 25 2 9 9 ++10:26:00 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:26:00 numa_policy 31 31 264 31 2 1 1 ++10:26:00 pde_opener 408 408 40 102 1 4 4 ++10:26:00 pid 992 992 128 32 1 31 31 ++10:26:00 pid_namespace 0 0 240 17 1 0 0 ++10:26:00 PINGv6 0 0 1344 24 8 0 0 ++10:26:00 pool_workqueue 640 640 256 16 1 40 40 ++10:26:00 proc_dir_entry 819 819 192 21 1 39 39 ++10:26:00 proc_inode_cache 10235 10902 712 23 4 474 474 ++10:26:00 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:26:00 RAW 84 84 1152 28 8 3 3 ++10:26:00 RAWv6 72 72 1344 24 8 3 3 ++10:26:00 request_queue 39 39 2488 13 8 3 3 ++10:26:00 request_sock_TCP 0 0 336 24 2 0 0 ++10:26:00 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:26:00 rpc_inode_cache 23 23 704 23 4 1 1 ++10:26:00 scsi_sense_cache 160 160 128 32 1 5 5 ++10:26:00 search 0 0 680 24 4 0 0 ++10:26:00 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:26:00 sighand_cache 338 360 2112 15 8 24 24 ++10:26:00 signal_cache 1119 1232 1152 28 8 44 44 ++10:26:00 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:26:00 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:26:00 skbuff_head_cache 624 624 256 16 1 39 39 ++10:26:00 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:26:00 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:26:00 task_delay_info 8721 8721 80 51 1 171 171 ++10:26:00 task_group 0 0 832 19 4 0 0 ++10:26:00 task_struct 558 640 5824 5 8 128 128 ++10:26:00 taskstats 92 92 344 23 2 4 4 ++10:26:00 TCP 52 52 2432 13 8 4 4 ++10:26:00 TCPv6 48 48 2560 12 8 4 4 ++10:26:00 trace_event_file 2024 2024 88 46 1 44 44 ++10:26:00 tw_sock_TCP 87 87 280 29 2 3 3 ++10:26:00 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:26:00 UDP 100 100 1280 25 8 4 4 ++10:26:00 UDPv6 88 88 1472 22 8 4 4 ++10:26:00 user_namespace 0 0 600 27 4 0 0 ++10:26:00 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:26:00 uts_namespace 0 0 440 18 2 0 0 ++10:26:00 vm_area_struct 33756 34340 232 17 1 2020 2020 ++10:26:00 vmap_area 26496 26496 64 64 1 414 414 ++10:26:00 xfrm_dst_cache 798 798 384 21 2 38 38 ++10:26:00 xfs_btree_cur 72 72 224 18 1 4 4 ++10:26:00 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:26:00 xfs_buf_item 240 240 272 30 2 8 8 ++10:26:00 xfs_da_state 68 68 480 17 2 4 4 ++10:26:00 xfs_dqtrx 0 0 528 31 4 0 0 ++10:26:00 xfs_dquot 0 0 496 16 2 0 0 ++10:26:00 xfs_efd_item 216 288 440 18 2 16 16 ++10:26:00 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:26:00 xfs_log_ticket 88 88 184 22 1 4 4 ++10:26:00 xfs_rud_item 92 92 176 23 1 4 4 ++10:26:00 xfs_rui_item 0 0 696 23 4 0 0 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:26:03 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:26:03 Acpi-Parse 314406 315652 56 73 1 4324 4324 ++10:26:03 Acpi-State 765 765 80 51 1 15 15 ++10:26:03 anon_vma 11423 11895 104 39 1 305 305 ++10:26:03 anon_vma_chain 18206 19264 64 64 1 301 301 ++10:26:03 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:26:03 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:26:03 avtab_node 401880 401880 24 170 1 2364 2364 ++10:26:03 bdev_cache 72 72 896 18 4 4 4 ++10:26:03 bfq_io_cq 0 0 160 25 1 0 0 ++10:26:03 biovec-128 64 64 2048 16 8 4 4 ++10:26:03 biovec-64 64 64 1024 16 4 4 4 ++10:26:03 biovec-max 136 176 4096 8 8 22 22 ++10:26:03 blkdev_ioc 210 210 136 30 1 7 7 ++10:26:03 buffer_head 117 117 104 39 1 3 3 ++10:26:03 cred_jar 1651 1848 192 21 1 88 88 ++10:26:03 dax_cache 57 57 832 19 4 3 3 ++10:26:03 dentry 346446 346522 208 19 1 18238 18238 ++10:26:03 dio 0 0 640 25 4 0 0 ++10:26:03 dm_uevent 0 0 2664 12 8 0 0 ++10:26:03 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:26:03 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:26:03 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:26:03 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:26:03 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:26:03 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:26:03 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:26:03 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:26:03 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:26:03 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:26:03 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:26:03 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:26:03 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:26:03 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:26:03 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:26:03 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:26:03 dnotify_struct 0 0 32 128 1 0 0 ++10:26:03 dquot 0 0 256 16 1 0 0 ++10:26:03 eventpoll_pwq 728 728 72 56 1 13 13 ++10:26:03 file_lock_cache 90 90 216 18 1 5 5 ++10:26:03 files_cache 230 230 704 23 4 10 10 ++10:26:03 filp 10301 11824 256 16 1 739 739 ++10:26:03 fscrypt_ctx 0 0 80 51 1 0 0 ++10:26:03 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:26:03 fuse_inode 19 19 832 19 4 1 1 ++10:26:03 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:26:03 iint_cache 0 0 120 34 1 0 0 ++10:26:03 inode_cache 26084 27100 640 25 4 1084 1084 ++10:26:03 ip4-frags 68 68 232 17 1 4 4 ++10:26:03 isofs_inode_cache 69 69 688 23 4 3 3 ++10:26:03 kcopyd_job 0 0 3312 9 8 0 0 ++10:26:03 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:26:03 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:26:03 kioctx 92 92 704 23 4 4 4 ++10:26:03 kmalloc-128 5391 5696 128 32 1 178 178 ++10:26:03 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:26:03 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:26:03 kmalloc-1k 4624 4624 1024 16 4 289 289 ++10:26:03 kmalloc-256 15322 15376 256 16 1 961 961 ++10:26:03 kmalloc-2k 697 768 2048 16 8 48 48 ++10:26:03 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:26:03 kmalloc-4k 1652 1728 4096 8 8 216 216 ++10:26:03 kmalloc-512 3912 8144 512 16 2 509 509 ++10:26:03 kmalloc-64 306563 307328 64 64 1 4802 4802 ++10:26:03 kmalloc-8 424448 424448 8 512 1 829 829 ++10:26:03 kmalloc-8k 69 84 8192 4 8 21 21 ++10:26:03 kmalloc-96 6342 6342 96 42 1 151 151 ++10:26:03 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:26:03 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:26:03 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:26:03 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:26:03 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:26:03 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:26:03 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:26:03 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:26:03 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:26:03 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:26:03 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:26:03 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:26:03 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:26:03 kmem_cache 176 176 512 16 2 11 11 ++10:26:03 kmem_cache_node 256 256 64 64 1 4 4 ++10:26:03 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:26:03 mm_struct 224 224 1152 28 8 8 8 ++10:26:03 mnt_cache 1500 1500 320 25 2 60 60 ++10:26:03 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:26:03 names_cache 56 56 4096 8 8 7 7 ++10:26:03 net_namespace 12 12 5312 6 8 2 2 ++10:26:03 nf_conntrack 225 225 320 25 2 9 9 ++10:26:03 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:26:03 numa_policy 31 31 264 31 2 1 1 ++10:26:03 pde_opener 408 408 40 102 1 4 4 ++10:26:03 pid 992 992 128 32 1 31 31 ++10:26:03 pid_namespace 0 0 240 17 1 0 0 ++10:26:03 PINGv6 0 0 1344 24 8 0 0 ++10:26:03 pool_workqueue 640 640 256 16 1 40 40 ++10:26:03 proc_dir_entry 819 819 192 21 1 39 39 ++10:26:03 proc_inode_cache 10235 10902 712 23 4 474 474 ++10:26:03 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:26:03 RAW 84 84 1152 28 8 3 3 ++10:26:03 RAWv6 72 72 1344 24 8 3 3 ++10:26:03 request_queue 39 39 2488 13 8 3 3 ++10:26:03 request_sock_TCP 0 0 336 24 2 0 0 ++10:26:03 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:26:03 rpc_inode_cache 23 23 704 23 4 1 1 ++10:26:03 scsi_sense_cache 160 160 128 32 1 5 5 ++10:26:03 search 0 0 680 24 4 0 0 ++10:26:03 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:26:03 sighand_cache 338 360 2112 15 8 24 24 ++10:26:03 signal_cache 1119 1232 1152 28 8 44 44 ++10:26:03 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:26:03 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:26:03 skbuff_head_cache 624 624 256 16 1 39 39 ++10:26:03 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:26:03 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:26:03 task_delay_info 8721 8721 80 51 1 171 171 ++10:26:03 task_group 0 0 832 19 4 0 0 ++10:26:03 task_struct 558 640 5824 5 8 128 128 ++10:26:03 taskstats 92 92 344 23 2 4 4 ++10:26:03 TCP 52 52 2432 13 8 4 4 ++10:26:03 TCPv6 48 48 2560 12 8 4 4 ++10:26:03 trace_event_file 2024 2024 88 46 1 44 44 ++10:26:03 tw_sock_TCP 87 87 280 29 2 3 3 ++10:26:03 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:26:03 UDP 100 100 1280 25 8 4 4 ++10:26:03 UDPv6 88 88 1472 22 8 4 4 ++10:26:03 user_namespace 0 0 600 27 4 0 0 ++10:26:03 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:26:03 uts_namespace 0 0 440 18 2 0 0 ++10:26:03 vm_area_struct 33756 34340 232 17 1 2020 2020 ++10:26:03 vmap_area 26496 26496 64 64 1 414 414 ++10:26:03 xfrm_dst_cache 798 798 384 21 2 38 38 ++10:26:03 xfs_btree_cur 72 72 224 18 1 4 4 ++10:26:03 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:26:03 xfs_buf_item 240 240 272 30 2 8 8 ++10:26:03 xfs_da_state 68 68 480 17 2 4 4 ++10:26:03 xfs_dqtrx 0 0 528 31 4 0 0 ++10:26:03 xfs_dquot 0 0 496 16 2 0 0 ++10:26:03 xfs_efd_item 216 288 440 18 2 16 16 ++10:26:03 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:26:03 xfs_log_ticket 88 88 184 22 1 4 4 ++10:26:03 xfs_rud_item 92 92 176 23 1 4 4 ++10:26:03 xfs_rui_item 0 0 696 23 4 0 0 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:26:06 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:26:06 Acpi-Parse 314406 315652 56 73 1 4324 4324 ++10:26:06 Acpi-State 765 765 80 51 1 15 15 ++10:26:06 anon_vma 11423 11895 104 39 1 305 305 ++10:26:06 anon_vma_chain 18206 19264 64 64 1 301 301 ++10:26:06 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:26:06 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:26:06 avtab_node 401880 401880 24 170 1 2364 2364 ++10:26:06 bdev_cache 72 72 896 18 4 4 4 ++10:26:06 bfq_io_cq 0 0 160 25 1 0 0 ++10:26:06 biovec-128 64 64 2048 16 8 4 4 ++10:26:06 biovec-64 64 64 1024 16 4 4 4 ++10:26:06 biovec-max 136 176 4096 8 8 22 22 ++10:26:06 blkdev_ioc 210 210 136 30 1 7 7 ++10:26:06 buffer_head 117 117 104 39 1 3 3 ++10:26:06 cred_jar 1651 1848 192 21 1 88 88 ++10:26:06 dax_cache 57 57 832 19 4 3 3 ++10:26:06 dentry 346446 346522 208 19 1 18238 18238 ++10:26:06 dio 0 0 640 25 4 0 0 ++10:26:06 dm_uevent 0 0 2664 12 8 0 0 ++10:26:06 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:26:06 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:26:06 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:26:06 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:26:06 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:26:06 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:26:06 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:26:06 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:26:06 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:26:06 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:26:06 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:26:06 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:26:06 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:26:06 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:26:06 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:26:06 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:26:06 dnotify_struct 0 0 32 128 1 0 0 ++10:26:06 dquot 0 0 256 16 1 0 0 ++10:26:06 eventpoll_pwq 728 728 72 56 1 13 13 ++10:26:06 file_lock_cache 90 90 216 18 1 5 5 ++10:26:06 files_cache 230 230 704 23 4 10 10 ++10:26:06 filp 10301 11824 256 16 1 739 739 ++10:26:06 fscrypt_ctx 0 0 80 51 1 0 0 ++10:26:06 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:26:06 fuse_inode 19 19 832 19 4 1 1 ++10:26:06 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:26:06 iint_cache 0 0 120 34 1 0 0 ++10:26:06 inode_cache 26084 27100 640 25 4 1084 1084 ++10:26:06 ip4-frags 68 68 232 17 1 4 4 ++10:26:06 isofs_inode_cache 69 69 688 23 4 3 3 ++10:26:06 kcopyd_job 0 0 3312 9 8 0 0 ++10:26:06 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:26:06 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:26:06 kioctx 92 92 704 23 4 4 4 ++10:26:06 kmalloc-128 5391 5696 128 32 1 178 178 ++10:26:06 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:26:06 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:26:06 kmalloc-1k 4624 4624 1024 16 4 289 289 ++10:26:06 kmalloc-256 15322 15376 256 16 1 961 961 ++10:26:06 kmalloc-2k 697 768 2048 16 8 48 48 ++10:26:06 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:26:06 kmalloc-4k 1652 1728 4096 8 8 216 216 ++10:26:06 kmalloc-512 3912 8144 512 16 2 509 509 ++10:26:06 kmalloc-64 306563 307328 64 64 1 4802 4802 ++10:26:06 kmalloc-8 424448 424448 8 512 1 829 829 ++10:26:06 kmalloc-8k 69 84 8192 4 8 21 21 ++10:26:06 kmalloc-96 6342 6342 96 42 1 151 151 ++10:26:06 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:26:06 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:26:06 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:26:06 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:26:06 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:26:06 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:26:06 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:26:06 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:26:06 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:26:06 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:26:06 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:26:06 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:26:06 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:26:06 kmem_cache 176 176 512 16 2 11 11 ++10:26:06 kmem_cache_node 256 256 64 64 1 4 4 ++10:26:06 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:26:06 mm_struct 224 224 1152 28 8 8 8 ++10:26:06 mnt_cache 1500 1500 320 25 2 60 60 ++10:26:06 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:26:06 names_cache 56 56 4096 8 8 7 7 ++10:26:06 net_namespace 12 12 5312 6 8 2 2 ++10:26:06 nf_conntrack 225 225 320 25 2 9 9 ++10:26:06 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:26:06 numa_policy 31 31 264 31 2 1 1 ++10:26:06 pde_opener 408 408 40 102 1 4 4 ++10:26:06 pid 992 992 128 32 1 31 31 ++10:26:06 pid_namespace 0 0 240 17 1 0 0 ++10:26:06 PINGv6 0 0 1344 24 8 0 0 ++10:26:06 pool_workqueue 640 640 256 16 1 40 40 ++10:26:06 proc_dir_entry 819 819 192 21 1 39 39 ++10:26:06 proc_inode_cache 10235 10902 712 23 4 474 474 ++10:26:06 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:26:06 RAW 84 84 1152 28 8 3 3 ++10:26:06 RAWv6 72 72 1344 24 8 3 3 ++10:26:06 request_queue 39 39 2488 13 8 3 3 ++10:26:06 request_sock_TCP 0 0 336 24 2 0 0 ++10:26:06 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:26:06 rpc_inode_cache 23 23 704 23 4 1 1 ++10:26:06 scsi_sense_cache 160 160 128 32 1 5 5 ++10:26:06 search 0 0 680 24 4 0 0 ++10:26:06 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:26:06 sighand_cache 338 360 2112 15 8 24 24 ++10:26:06 signal_cache 1119 1232 1152 28 8 44 44 ++10:26:06 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:26:06 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:26:06 skbuff_head_cache 624 624 256 16 1 39 39 ++10:26:06 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:26:06 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:26:06 task_delay_info 8721 8721 80 51 1 171 171 ++10:26:06 task_group 0 0 832 19 4 0 0 ++10:26:06 task_struct 558 640 5824 5 8 128 128 ++10:26:06 taskstats 92 92 344 23 2 4 4 ++10:26:06 TCP 52 52 2432 13 8 4 4 ++10:26:06 TCPv6 48 48 2560 12 8 4 4 ++10:26:06 trace_event_file 2024 2024 88 46 1 44 44 ++10:26:06 tw_sock_TCP 87 87 280 29 2 3 3 ++10:26:06 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:26:06 UDP 100 100 1280 25 8 4 4 ++10:26:06 UDPv6 88 88 1472 22 8 4 4 ++10:26:06 user_namespace 0 0 600 27 4 0 0 ++10:26:06 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:26:06 uts_namespace 0 0 440 18 2 0 0 ++10:26:06 vm_area_struct 33756 34340 232 17 1 2020 2020 ++10:26:06 vmap_area 26496 26496 64 64 1 414 414 ++10:26:06 xfrm_dst_cache 798 798 384 21 2 38 38 ++10:26:06 xfs_btree_cur 72 72 224 18 1 4 4 ++10:26:06 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:26:06 xfs_buf_item 240 240 272 30 2 8 8 ++10:26:06 xfs_da_state 68 68 480 17 2 4 4 ++10:26:06 xfs_dqtrx 0 0 528 31 4 0 0 ++10:26:06 xfs_dquot 0 0 496 16 2 0 0 ++10:26:06 xfs_efd_item 216 288 440 18 2 16 16 ++10:26:06 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:26:06 xfs_log_ticket 88 88 184 22 1 4 4 ++10:26:06 xfs_rud_item 92 92 176 23 1 4 4 ++10:26:06 xfs_rui_item 0 0 696 23 4 0 0 ++ ++pcp-slabinfo output : Display output when given specified number of samples ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:25:18 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:25:18 Acpi-Parse 314423 315652 56 73 1 4324 4324 ++10:25:18 Acpi-State 765 765 80 51 1 15 15 ++10:25:18 anon_vma 11481 11895 104 39 1 305 305 ++10:25:18 anon_vma_chain 18269 19264 64 64 1 301 301 ++10:25:18 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:25:18 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:25:18 avtab_node 401880 401880 24 170 1 2364 2364 ++10:25:18 bdev_cache 72 72 896 18 4 4 4 ++10:25:18 bfq_io_cq 0 0 160 25 1 0 0 ++10:25:18 biovec-128 64 64 2048 16 8 4 4 ++10:25:18 biovec-64 64 64 1024 16 4 4 4 ++10:25:18 biovec-max 148 192 4096 8 8 24 24 ++10:25:18 blkdev_ioc 210 210 136 30 1 7 7 ++10:25:18 buffer_head 117 117 104 39 1 3 3 ++10:25:18 cred_jar 1651 1848 192 21 1 88 88 ++10:25:18 dax_cache 57 57 832 19 4 3 3 ++10:25:18 dentry 346540 346655 208 19 1 18245 18245 ++10:25:18 dio 0 0 640 25 4 0 0 ++10:25:18 dm_uevent 0 0 2664 12 8 0 0 ++10:25:18 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:25:18 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:25:18 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:25:18 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:25:18 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:25:18 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:25:18 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:25:18 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:25:18 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:25:18 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:25:18 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:25:18 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:25:18 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:25:18 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:25:18 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:25:18 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:25:18 dnotify_struct 0 0 32 128 1 0 0 ++10:25:18 dquot 0 0 256 16 1 0 0 ++10:25:18 eventpoll_pwq 728 728 72 56 1 13 13 ++10:25:18 file_lock_cache 90 90 216 18 1 5 5 ++10:25:18 files_cache 230 230 704 23 4 10 10 ++10:25:18 filp 10324 11808 256 16 1 738 738 ++10:25:18 fscrypt_ctx 0 0 80 51 1 0 0 ++10:25:18 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:25:18 fuse_inode 19 19 832 19 4 1 1 ++10:25:18 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:25:18 iint_cache 0 0 120 34 1 0 0 ++10:25:18 inode_cache 26084 27100 640 25 4 1084 1084 ++10:25:18 ip4-frags 68 68 232 17 1 4 4 ++10:25:18 isofs_inode_cache 69 69 688 23 4 3 3 ++10:25:18 kcopyd_job 0 0 3312 9 8 0 0 ++10:25:18 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:25:18 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:25:18 kioctx 92 92 704 23 4 4 4 ++10:25:18 kmalloc-128 5693 5856 128 32 1 183 183 ++10:25:18 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:25:18 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:25:18 kmalloc-1k 4037 4352 1024 16 4 272 272 ++10:25:18 kmalloc-256 15322 15376 256 16 1 961 961 ++10:25:18 kmalloc-2k 697 768 2048 16 8 48 48 ++10:25:18 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:25:18 kmalloc-4k 1657 1728 4096 8 8 216 216 ++10:25:18 kmalloc-512 4174 8144 512 16 2 509 509 ++10:25:18 kmalloc-64 306657 307328 64 64 1 4802 4802 ++10:25:18 kmalloc-8 424448 424448 8 512 1 829 829 ++10:25:18 kmalloc-8k 69 84 8192 4 8 21 21 ++10:25:18 kmalloc-96 6342 6342 96 42 1 151 151 ++10:25:18 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:25:18 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:25:18 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:25:18 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:25:18 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:25:18 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:25:18 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:25:18 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:25:18 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:25:18 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:25:18 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:25:18 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:25:18 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:25:18 kmem_cache 176 176 512 16 2 11 11 ++10:25:18 kmem_cache_node 256 256 64 64 1 4 4 ++10:25:18 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:25:18 mm_struct 224 224 1152 28 8 8 8 ++10:25:18 mnt_cache 1500 1500 320 25 2 60 60 ++10:25:18 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:25:18 names_cache 56 56 4096 8 8 7 7 ++10:25:18 net_namespace 12 12 5312 6 8 2 2 ++10:25:18 nf_conntrack 225 225 320 25 2 9 9 ++10:25:18 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:25:18 numa_policy 31 31 264 31 2 1 1 ++10:25:18 pde_opener 408 408 40 102 1 4 4 ++10:25:18 pid 992 992 128 32 1 31 31 ++10:25:18 pid_namespace 0 0 240 17 1 0 0 ++10:25:18 PINGv6 0 0 1344 24 8 0 0 ++10:25:18 pool_workqueue 640 640 256 16 1 40 40 ++10:25:18 proc_dir_entry 819 819 192 21 1 39 39 ++10:25:18 proc_inode_cache 10403 10902 712 23 4 474 474 ++10:25:18 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:25:18 RAW 84 84 1152 28 8 3 3 ++10:25:18 RAWv6 72 72 1344 24 8 3 3 ++10:25:18 request_queue 39 39 2488 13 8 3 3 ++10:25:18 request_sock_TCP 0 0 336 24 2 0 0 ++10:25:18 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:25:18 rpc_inode_cache 23 23 704 23 4 1 1 ++10:25:18 scsi_sense_cache 160 160 128 32 1 5 5 ++10:25:18 search 0 0 680 24 4 0 0 ++10:25:18 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:25:18 sighand_cache 338 360 2112 15 8 24 24 ++10:25:18 signal_cache 1119 1232 1152 28 8 44 44 ++10:25:18 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:25:18 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:25:18 skbuff_head_cache 608 608 256 16 1 38 38 ++10:25:18 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:25:18 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:25:18 task_delay_info 8721 8721 80 51 1 171 171 ++10:25:18 task_group 0 0 832 19 4 0 0 ++10:25:18 task_struct 566 640 5824 5 8 128 128 ++10:25:18 taskstats 92 92 344 23 2 4 4 ++10:25:18 TCP 52 52 2432 13 8 4 4 ++10:25:18 TCPv6 48 48 2560 12 8 4 4 ++10:25:18 trace_event_file 2024 2024 88 46 1 44 44 ++10:25:18 tw_sock_TCP 87 87 280 29 2 3 3 ++10:25:18 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:25:18 UDP 100 100 1280 25 8 4 4 ++10:25:18 UDPv6 88 88 1472 22 8 4 4 ++10:25:18 user_namespace 0 0 600 27 4 0 0 ++10:25:18 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:25:18 uts_namespace 0 0 440 18 2 0 0 ++10:25:18 vm_area_struct 33984 34340 232 17 1 2020 2020 ++10:25:18 vmap_area 26304 26304 64 64 1 411 411 ++10:25:18 xfrm_dst_cache 756 756 384 21 2 36 36 ++10:25:18 xfs_btree_cur 72 72 224 18 1 4 4 ++10:25:18 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:25:18 xfs_buf_item 240 240 272 30 2 8 8 ++10:25:18 xfs_da_state 68 68 480 17 2 4 4 ++10:25:18 xfs_dqtrx 0 0 528 31 4 0 0 ++10:25:18 xfs_dquot 0 0 496 16 2 0 0 ++10:25:18 xfs_efd_item 414 414 440 18 2 23 23 ++10:25:18 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:25:18 xfs_log_ticket 88 88 184 22 1 4 4 ++10:25:18 xfs_rud_item 92 92 176 23 1 4 4 ++10:25:18 xfs_rui_item 0 0 696 23 4 0 0 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:25:21 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:25:21 Acpi-Parse 314423 315652 56 73 1 4324 4324 ++10:25:21 Acpi-State 765 765 80 51 1 15 15 ++10:25:21 anon_vma 11481 11895 104 39 1 305 305 ++10:25:21 anon_vma_chain 18269 19264 64 64 1 301 301 ++10:25:21 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:25:21 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:25:21 avtab_node 401880 401880 24 170 1 2364 2364 ++10:25:21 bdev_cache 72 72 896 18 4 4 4 ++10:25:21 bfq_io_cq 0 0 160 25 1 0 0 ++10:25:21 biovec-128 64 64 2048 16 8 4 4 ++10:25:21 biovec-64 64 64 1024 16 4 4 4 ++10:25:21 biovec-max 148 192 4096 8 8 24 24 ++10:25:21 blkdev_ioc 210 210 136 30 1 7 7 ++10:25:21 buffer_head 117 117 104 39 1 3 3 ++10:25:21 cred_jar 1651 1848 192 21 1 88 88 ++10:25:21 dax_cache 57 57 832 19 4 3 3 ++10:25:21 dentry 346540 346655 208 19 1 18245 18245 ++10:25:21 dio 0 0 640 25 4 0 0 ++10:25:21 dm_uevent 0 0 2664 12 8 0 0 ++10:25:21 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:25:21 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:25:21 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:25:21 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:25:21 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:25:21 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:25:21 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:25:21 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:25:21 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:25:21 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:25:21 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:25:21 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:25:21 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:25:21 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:25:21 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:25:21 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:25:21 dnotify_struct 0 0 32 128 1 0 0 ++10:25:21 dquot 0 0 256 16 1 0 0 ++10:25:21 eventpoll_pwq 728 728 72 56 1 13 13 ++10:25:21 file_lock_cache 90 90 216 18 1 5 5 ++10:25:21 files_cache 230 230 704 23 4 10 10 ++10:25:21 filp 10324 11808 256 16 1 738 738 ++10:25:21 fscrypt_ctx 0 0 80 51 1 0 0 ++10:25:21 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:25:21 fuse_inode 19 19 832 19 4 1 1 ++10:25:21 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:25:21 iint_cache 0 0 120 34 1 0 0 ++10:25:21 inode_cache 26084 27100 640 25 4 1084 1084 ++10:25:21 ip4-frags 68 68 232 17 1 4 4 ++10:25:21 isofs_inode_cache 69 69 688 23 4 3 3 ++10:25:21 kcopyd_job 0 0 3312 9 8 0 0 ++10:25:21 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:25:21 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:25:21 kioctx 92 92 704 23 4 4 4 ++10:25:21 kmalloc-128 5693 5856 128 32 1 183 183 ++10:25:21 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:25:21 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:25:21 kmalloc-1k 4037 4352 1024 16 4 272 272 ++10:25:21 kmalloc-256 15322 15376 256 16 1 961 961 ++10:25:21 kmalloc-2k 697 768 2048 16 8 48 48 ++10:25:21 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:25:21 kmalloc-4k 1657 1728 4096 8 8 216 216 ++10:25:21 kmalloc-512 4174 8144 512 16 2 509 509 ++10:25:21 kmalloc-64 306657 307328 64 64 1 4802 4802 ++10:25:21 kmalloc-8 424448 424448 8 512 1 829 829 ++10:25:21 kmalloc-8k 69 84 8192 4 8 21 21 ++10:25:21 kmalloc-96 6342 6342 96 42 1 151 151 ++10:25:21 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:25:21 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:25:21 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:25:21 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:25:21 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:25:21 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:25:21 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:25:21 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:25:21 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:25:21 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:25:21 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:25:21 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:25:21 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:25:21 kmem_cache 176 176 512 16 2 11 11 ++10:25:21 kmem_cache_node 256 256 64 64 1 4 4 ++10:25:21 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:25:21 mm_struct 224 224 1152 28 8 8 8 ++10:25:21 mnt_cache 1500 1500 320 25 2 60 60 ++10:25:21 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:25:21 names_cache 56 56 4096 8 8 7 7 ++10:25:21 net_namespace 12 12 5312 6 8 2 2 ++10:25:21 nf_conntrack 225 225 320 25 2 9 9 ++10:25:21 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:25:21 numa_policy 31 31 264 31 2 1 1 ++10:25:21 pde_opener 408 408 40 102 1 4 4 ++10:25:21 pid 992 992 128 32 1 31 31 ++10:25:21 pid_namespace 0 0 240 17 1 0 0 ++10:25:21 PINGv6 0 0 1344 24 8 0 0 ++10:25:21 pool_workqueue 640 640 256 16 1 40 40 ++10:25:21 proc_dir_entry 819 819 192 21 1 39 39 ++10:25:21 proc_inode_cache 10403 10902 712 23 4 474 474 ++10:25:21 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:25:21 RAW 84 84 1152 28 8 3 3 ++10:25:21 RAWv6 72 72 1344 24 8 3 3 ++10:25:21 request_queue 39 39 2488 13 8 3 3 ++10:25:21 request_sock_TCP 0 0 336 24 2 0 0 ++10:25:21 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:25:21 rpc_inode_cache 23 23 704 23 4 1 1 ++10:25:21 scsi_sense_cache 160 160 128 32 1 5 5 ++10:25:21 search 0 0 680 24 4 0 0 ++10:25:21 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:25:21 sighand_cache 338 360 2112 15 8 24 24 ++10:25:21 signal_cache 1119 1232 1152 28 8 44 44 ++10:25:21 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:25:21 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:25:21 skbuff_head_cache 608 608 256 16 1 38 38 ++10:25:21 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:25:21 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:25:21 task_delay_info 8721 8721 80 51 1 171 171 ++10:25:21 task_group 0 0 832 19 4 0 0 ++10:25:21 task_struct 566 640 5824 5 8 128 128 ++10:25:21 taskstats 92 92 344 23 2 4 4 ++10:25:21 TCP 52 52 2432 13 8 4 4 ++10:25:21 TCPv6 48 48 2560 12 8 4 4 ++10:25:21 trace_event_file 2024 2024 88 46 1 44 44 ++10:25:21 tw_sock_TCP 87 87 280 29 2 3 3 ++10:25:21 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:25:21 UDP 100 100 1280 25 8 4 4 ++10:25:21 UDPv6 88 88 1472 22 8 4 4 ++10:25:21 user_namespace 0 0 600 27 4 0 0 ++10:25:21 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:25:21 uts_namespace 0 0 440 18 2 0 0 ++10:25:21 vm_area_struct 33984 34340 232 17 1 2020 2020 ++10:25:21 vmap_area 26304 26304 64 64 1 411 411 ++10:25:21 xfrm_dst_cache 756 756 384 21 2 36 36 ++10:25:21 xfs_btree_cur 72 72 224 18 1 4 4 ++10:25:21 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:25:21 xfs_buf_item 240 240 272 30 2 8 8 ++10:25:21 xfs_da_state 68 68 480 17 2 4 4 ++10:25:21 xfs_dqtrx 0 0 528 31 4 0 0 ++10:25:21 xfs_dquot 0 0 496 16 2 0 0 ++10:25:21 xfs_efd_item 414 414 440 18 2 23 23 ++10:25:21 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:25:21 xfs_log_ticket 88 88 184 22 1 4 4 ++10:25:21 xfs_rud_item 92 92 176 23 1 4 4 ++10:25:21 xfs_rui_item 0 0 696 23 4 0 0 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Name active_objs num_objs objsize byte objperslab pagesperslab active_slabs num_slabs ++10:25:24 Acpi-Operand 4592 4592 72 56 1 82 82 ++10:25:24 Acpi-Parse 314423 315652 56 73 1 4324 4324 ++10:25:24 Acpi-State 765 765 80 51 1 15 15 ++10:25:24 anon_vma 11481 11895 104 39 1 305 305 ++10:25:24 anon_vma_chain 18269 19264 64 64 1 301 301 ++10:25:24 avc_xperms_data 8192 8192 32 128 1 64 64 ++10:25:24 avtab_extended_perms 276216 276216 40 102 1 2708 2708 ++10:25:24 avtab_node 401880 401880 24 170 1 2364 2364 ++10:25:24 bdev_cache 72 72 896 18 4 4 4 ++10:25:24 bfq_io_cq 0 0 160 25 1 0 0 ++10:25:24 biovec-128 64 64 2048 16 8 4 4 ++10:25:24 biovec-64 64 64 1024 16 4 4 4 ++10:25:24 biovec-max 148 192 4096 8 8 24 24 ++10:25:24 blkdev_ioc 210 210 136 30 1 7 7 ++10:25:24 buffer_head 117 117 104 39 1 3 3 ++10:25:24 cred_jar 1651 1848 192 21 1 88 88 ++10:25:24 dax_cache 57 57 832 19 4 3 3 ++10:25:24 dentry 346540 346655 208 19 1 18245 18245 ++10:25:24 dio 0 0 640 25 4 0 0 ++10:25:24 dm_uevent 0 0 2664 12 8 0 0 ++10:25:24 dma-kmalloc-128 0 0 128 32 1 0 0 ++10:25:24 dma-kmalloc-16 0 0 16 256 1 0 0 ++10:25:24 dma-kmalloc-192 0 0 192 21 1 0 0 ++10:25:24 dma-kmalloc-1k 0 0 1024 16 4 0 0 ++10:25:24 dma-kmalloc-256 0 0 256 16 1 0 0 ++10:25:24 dma-kmalloc-2k 0 0 2048 16 8 0 0 ++10:25:24 dma-kmalloc-32 0 0 32 128 1 0 0 ++10:25:24 dma-kmalloc-4k 0 0 4096 8 8 0 0 ++10:25:24 dma-kmalloc-512 0 0 512 16 2 0 0 ++10:25:24 dma-kmalloc-64 0 0 64 64 1 0 0 ++10:25:24 dma-kmalloc-8 0 0 8 512 1 0 0 ++10:25:24 dma-kmalloc-8k 0 0 8192 4 8 0 0 ++10:25:24 dma-kmalloc-96 0 0 96 42 1 0 0 ++10:25:24 dmaengine-unmap-128 30 30 1088 30 8 1 1 ++10:25:24 dmaengine-unmap-16 35280 35280 192 21 1 1680 1680 ++10:25:24 dmaengine-unmap-256 15 15 2112 15 8 1 1 ++10:25:24 dnotify_struct 0 0 32 128 1 0 0 ++10:25:24 dquot 0 0 256 16 1 0 0 ++10:25:24 eventpoll_pwq 728 728 72 56 1 13 13 ++10:25:24 file_lock_cache 90 90 216 18 1 5 5 ++10:25:24 files_cache 230 230 704 23 4 10 10 ++10:25:24 filp 10324 11808 256 16 1 738 738 ++10:25:24 fscrypt_ctx 0 0 80 51 1 0 0 ++10:25:24 ftrace_event_field 4505 4505 48 85 1 53 53 ++10:25:24 fuse_inode 19 19 832 19 4 1 1 ++10:25:24 hugetlbfs_inode_cache 69 69 704 23 4 3 3 ++10:25:24 iint_cache 0 0 120 34 1 0 0 ++10:25:24 inode_cache 26084 27100 640 25 4 1084 1084 ++10:25:24 ip4-frags 68 68 232 17 1 4 4 ++10:25:24 isofs_inode_cache 69 69 688 23 4 3 3 ++10:25:24 kcopyd_job 0 0 3312 9 8 0 0 ++10:25:24 kernfs_node_cache 30207 31230 136 30 1 1041 1041 ++10:25:24 khugepaged_mm_slot 144 144 112 36 1 4 4 ++10:25:24 kioctx 92 92 704 23 4 4 4 ++10:25:24 kmalloc-128 5693 5856 128 32 1 183 183 ++10:25:24 kmalloc-16 301056 301056 16 256 1 1176 1176 ++10:25:24 kmalloc-192 26187 26187 192 21 1 1247 1247 ++10:25:24 kmalloc-1k 4037 4352 1024 16 4 272 272 ++10:25:24 kmalloc-256 15322 15376 256 16 1 961 961 ++10:25:24 kmalloc-2k 697 768 2048 16 8 48 48 ++10:25:24 kmalloc-32 324323 326144 32 128 1 2548 2548 ++10:25:24 kmalloc-4k 1657 1728 4096 8 8 216 216 ++10:25:24 kmalloc-512 4174 8144 512 16 2 509 509 ++10:25:24 kmalloc-64 306657 307328 64 64 1 4802 4802 ++10:25:24 kmalloc-8 424448 424448 8 512 1 829 829 ++10:25:24 kmalloc-8k 69 84 8192 4 8 21 21 ++10:25:24 kmalloc-96 6342 6342 96 42 1 151 151 ++10:25:24 kmalloc-rcl-128 2848 2848 128 32 1 89 89 ++10:25:24 kmalloc-rcl-16 0 0 16 256 1 0 0 ++10:25:24 kmalloc-rcl-192 1554 1554 192 21 1 74 74 ++10:25:24 kmalloc-rcl-1k 0 0 1024 16 4 0 0 ++10:25:24 kmalloc-rcl-256 224 224 256 16 1 14 14 ++10:25:24 kmalloc-rcl-2k 0 0 2048 16 8 0 0 ++10:25:24 kmalloc-rcl-32 0 0 32 128 1 0 0 ++10:25:24 kmalloc-rcl-4k 0 0 4096 8 8 0 0 ++10:25:24 kmalloc-rcl-512 64 64 512 16 2 4 4 ++10:25:24 kmalloc-rcl-64 11648 11648 64 64 1 182 182 ++10:25:24 kmalloc-rcl-8 0 0 8 512 1 0 0 ++10:25:24 kmalloc-rcl-8k 0 0 8192 4 8 0 0 ++10:25:24 kmalloc-rcl-96 5334 5334 96 42 1 127 127 ++10:25:24 kmem_cache 176 176 512 16 2 11 11 ++10:25:24 kmem_cache_node 256 256 64 64 1 4 4 ++10:25:24 lsm_file_cache 12032 12032 16 256 1 47 47 ++10:25:24 mm_struct 224 224 1152 28 8 8 8 ++10:25:24 mnt_cache 1500 1500 320 25 2 60 60 ++10:25:24 mqueue_inode_cache 17 17 960 17 4 1 1 ++10:25:24 names_cache 56 56 4096 8 8 7 7 ++10:25:24 net_namespace 12 12 5312 6 8 2 2 ++10:25:24 nf_conntrack 225 225 320 25 2 9 9 ++10:25:24 nf_conntrack_expect 0 0 248 16 1 0 0 ++10:25:24 numa_policy 31 31 264 31 2 1 1 ++10:25:24 pde_opener 408 408 40 102 1 4 4 ++10:25:24 pid 992 992 128 32 1 31 31 ++10:25:24 pid_namespace 0 0 240 17 1 0 0 ++10:25:24 PINGv6 0 0 1344 24 8 0 0 ++10:25:24 pool_workqueue 640 640 256 16 1 40 40 ++10:25:24 proc_dir_entry 819 819 192 21 1 39 39 ++10:25:24 proc_inode_cache 10403 10902 712 23 4 474 474 ++10:25:24 radix_tree_node 30352 30352 584 28 4 1084 1084 ++10:25:24 RAW 84 84 1152 28 8 3 3 ++10:25:24 RAWv6 72 72 1344 24 8 3 3 ++10:25:24 request_queue 39 39 2488 13 8 3 3 ++10:25:24 request_sock_TCP 0 0 336 24 2 0 0 ++10:25:24 request_sock_TCPv6 0 0 336 24 2 0 0 ++10:25:24 rpc_inode_cache 23 23 704 23 4 1 1 ++10:25:24 scsi_sense_cache 160 160 128 32 1 5 5 ++10:25:24 search 0 0 680 24 4 0 0 ++10:25:24 shmem_inode_cache 1533 1533 752 21 4 73 73 ++10:25:24 sighand_cache 338 360 2112 15 8 24 24 ++10:25:24 signal_cache 1119 1232 1152 28 8 44 44 ++10:25:24 skbuff_ext_cache 128 128 128 32 1 4 4 ++10:25:24 skbuff_fclone_cache 64 64 512 16 2 4 4 ++10:25:24 skbuff_head_cache 608 608 256 16 1 38 38 ++10:25:24 sock_inode_cache 1089 1159 832 19 4 61 61 ++10:25:24 squashfs_inode_cache 69 69 704 23 4 3 3 ++10:25:24 task_delay_info 8721 8721 80 51 1 171 171 ++10:25:24 task_group 0 0 832 19 4 0 0 ++10:25:24 task_struct 566 640 5824 5 8 128 128 ++10:25:24 taskstats 92 92 344 23 2 4 4 ++10:25:24 TCP 52 52 2432 13 8 4 4 ++10:25:24 TCPv6 48 48 2560 12 8 4 4 ++10:25:24 trace_event_file 2024 2024 88 46 1 44 44 ++10:25:24 tw_sock_TCP 87 87 280 29 2 3 3 ++10:25:24 tw_sock_TCPv6 0 0 280 29 2 0 0 ++10:25:24 UDP 100 100 1280 25 8 4 4 ++10:25:24 UDPv6 88 88 1472 22 8 4 4 ++10:25:24 user_namespace 0 0 600 27 4 0 0 ++10:25:24 userfaultfd_ctx_cache 0 0 192 21 1 0 0 ++10:25:24 uts_namespace 0 0 440 18 2 0 0 ++10:25:24 vm_area_struct 33984 34340 232 17 1 2020 2020 ++10:25:24 vmap_area 26304 26304 64 64 1 411 411 ++10:25:24 xfrm_dst_cache 756 756 384 21 2 36 36 ++10:25:24 xfs_btree_cur 72 72 224 18 1 4 4 ++10:25:24 xfs_buf 20718 20718 448 18 2 1151 1151 ++10:25:24 xfs_buf_item 240 240 272 30 2 8 8 ++10:25:24 xfs_da_state 68 68 480 17 2 4 4 ++10:25:24 xfs_dqtrx 0 0 528 31 4 0 0 ++10:25:24 xfs_dquot 0 0 496 16 2 0 0 ++10:25:24 xfs_efd_item 414 414 440 18 2 23 23 ++10:25:24 xfs_inode 275430 275430 1088 30 8 9181 9181 ++10:25:24 xfs_log_ticket 88 88 184 22 1 4 4 ++10:25:24 xfs_rud_item 92 92 176 23 1 4 4 ++10:25:24 xfs_rui_item 0 0 696 23 4 0 0 +diff --git a/qa/archives/GNUmakefile b/qa/archives/GNUmakefile +index 2abf6425f..424ef2513 100644 +--- a/qa/archives/GNUmakefile ++++ b/qa/archives/GNUmakefile +@@ -66,7 +66,7 @@ SCRIPTS = mk.diff mk.gap mk.mysql mk.schizo mk.foo+ \ + mk.atop mk.hotatop mk.atop-boot mk.atop-nvidia mk.atop-threads \ + mk.log-derived mk.vmstat mk.rep mk.procsched \ + mk.ipcs mk.value-test mk.rank-pred mk.cputime mk.meminfo \ +- mk.sample-labels mk.pmproxy mk.mmv.help ++ mk.sample-labels mk.pmproxy mk.mmv.help mk.slabinfo + + CONFIGS = config.verify config.shping YWhcCi.toium.config \ + kenj-pc-2.config reduce.config uwrap.config wrap.config \ +diff --git a/qa/archives/mk.slabinfo b/qa/archives/mk.slabinfo +new file mode 100755 +index 000000000..012c60bfa +--- /dev/null ++++ b/qa/archives/mk.slabinfo +@@ -0,0 +1,45 @@ ++#!/bin/sh ++# ++# remake the pcp-slabinfo archive ... ++# this archive is intended to be checked in and not remade, this script is ++# simply a record of how it was created ++# ++ ++. /etc/pcp.env ++ ++tmp=/var/tmp/$$ ++rm -f $tmp.* ++trap "rm -f $tmp.*; exit 0" 0 1 2 3 15 ++ ++cat <>$tmp.config ++log advisory on once{ ++ kernel.uname.sysname ++ kernel.uname.release ++ kernel.uname.nodename ++ kernel.uname.machine ++ hinv.ncpu ++} ++log advisory on 10 seconds { ++ mem.slabinfo.slabs.active ++ mem.slabinfo.slabs.pages_per_slab ++ mem.slabinfo.slabs.total_size ++ mem.slabinfo.slabs.objects_per_slab ++ mem.slabinfo.objects.active ++ mem.slabinfo.objects.total ++ mem.slabinfo.objects.size ++ mem.slabinfo.slabs.total ++} ++End-of-File ++ ++rm -f pcp-slabinfo.0 pcp-slabinfo.index pcp-slabinfo.meta pcp-slabinfo.* ++ ++if pmlogger -T 60sec -t 10sec -c $tmp.config pcp-slabinfo; then ++ xz pcp-slabinfo.0 ++ xz pcp-slabinfo.index ++ xz pcp-slabinfo.meta ++else ++ echo "Argh: pmlogger failed ..." ++ cat pmlogger.log ++fi ++ ++ +diff --git a/qa/group b/qa/group +index 96b901278..254e6cb42 100644 +--- a/qa/group ++++ b/qa/group +@@ -369,6 +369,7 @@ tapestat + ipcs + meminfo + mpstat ++slabinfo + + # full test search + pmsearch +@@ -1978,8 +1979,9 @@ x11 + 1985 pmfind local valgrind + 1986 pmfind local + 1988 pcp meminfo python local ++1989 pcp slabinfo python local + 2101 pmda.sockets local security + 2104 libpcp local security + 2100 pmproxy local security + 2105 libpcp pmcd local security pmcd.pdu + 4751 libpcp threads valgrind local pcp helgrind +diff --git a/src/pcp/GNUmakefile b/src/pcp/GNUmakefile +index 8eee01260..d4675a8d9 100644 +--- a/src/pcp/GNUmakefile ++++ b/src/pcp/GNUmakefile +@@ -28,8 +28,11 @@ SUBDIRS = \ + mpstat \ + numastat \ + pidstat \ ++ ps \ + python \ + shping \ ++ slabinfo \ ++ ss \ + summary \ + tapestat \ + uptime \ +diff --git a/src/pcp/slabinfo/GNUmakefile b/src/pcp/slabinfo/GNUmakefile +new file mode 100644 +index 000000000..ab3ec3c46 +--- /dev/null ++++ b/src/pcp/slabinfo/GNUmakefile +@@ -0,0 +1,44 @@ ++# ++# Copyright (c) 2023 Oracle and/or its affiliates. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++# This program is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation; either version 2 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++# for more details. ++# ++ ++TOPDIR = ../../.. ++include $(TOPDIR)/src/include/builddefs ++ ++TARGET = pcp-slabinfo ++SCRIPT = $(TARGET).py ++MAN_SECTION = 1 ++MAN_PAGES = $(TARGET).$(MAN_SECTION) ++MAN_DEST = $(PCP_MAN_DIR)/man$(MAN_SECTION) ++ ++default: $(SCRIPT) $(MAN_PAGES) ++ ++include $(BUILDRULES) ++ ++install: default ++ifeq "$(HAVE_PYTHON)" "true" ++ $(INSTALL) -m 755 $(SCRIPT) $(PCP_BINADM_DIR)/$(TARGET) ++ @$(INSTALL_MAN) ++endif ++ ++default_pcp : default ++ ++install_pcp : install ++ ++check:: $(SCRIPT) ++ $(PYLINT) $^ ++ ++check :: $(MAN_PAGES) ++ $(MANLINT) $^ ++ +diff --git a/src/pcp/slabinfo/pcp-slabinfo.1 b/src/pcp/slabinfo/pcp-slabinfo.1 +new file mode 100644 +index 000000000..b1d30cf37 +--- /dev/null ++++ b/src/pcp/slabinfo/pcp-slabinfo.1 +@@ -0,0 +1,83 @@ ++'\"! tbl | mmdoc ++'\"macro stdmacro ++.\" ++.\" Man page for pcp-slabinfo ++.\" Copyright (c) 2023 Oracle and/or its affiliates. ++.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++.\" ++.\" This program is free software; you can redistribute it and/or modify it ++.\" under the terms of the GNU General Public License as published by the ++.\" Free Software Foundation; either version 2 of the License, or (at your ++.\" option) any later version. ++.\" ++.\" This program is distributed in the hope that it will be useful, but ++.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++.\" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++.\" for more details. ++.\" ++ ++.TH PCP-SLABINFO 1 "PCP" "Performance Co-Pilot" ++ ++.SH NAME ++\fBpcp-slabinfo\fP \- Report statistics for kernel slab allocator statistics ++ ++.SH SYNOPSIS ++\fBpcp\fP [\fBpcp options\fP] \fBslabinfo\fP [\fB-s\fP \fBsamples\fP] [\fB-a\fP \fBarchive\fP] [\fB-Z\fP \fB--timezone\fP] [\fB-z\fP \fB--hostzone\fP] [\fB-V\fP \fBVersion\fP] ++ ++.SH DESCRIPTION ++The \fBpcp-slabinfo\fP command is used for viewing different stats related to slab. It helps users analyze useful information related to the slab allocator. The information includes the total number of objects that are currently active, allocated objects, pages per slab, etc. By default, \fBpcp-slabinfo\fP reports live data for the local host. ++ ++The statistics shown are as follows: ++ ++.TS ++lfB lfB ++l lx. ++HEADER DESCRIPTION ++_ _ ++active_objs The number of objects that are currently active (i.e., in use) ++num_objs The total number of allocated objects (i.e., objects that are both in use and not in use). ++objsize The size of objects in this slab, in bytes. ++objperslab The number of objects stored in each slab. ++pagesperslab The number of pages allocated for each slab ++active_slabs The number of active slabs. ++num_slabs The total number of slabs. ++.TE ++ ++.SH OPTIONS ++.TP ++\fB-a\fP, \fB\-\-archive\fP ++Fetch /proc/slabinfo for a specified archive file ++ ++.TP ++\fB-s\fP, \fB\-\-samples\fP ++Get the slabinfo for the specified number of samples count ++ ++.TP ++\fB-z\fP, \fB\-\-hostzone\fP ++Set the reporting timezone to the local time of metrics source ++ ++.TP ++\fB-Z\fP, \fB\-\-timezone\fP ++Set the reporting timezone ++ ++.TP ++\fB-V\fP, \fB\-\-version\fP ++Display the version number and exit. ++ ++.TP ++\fB-?\fP, \fB\-\-help\fP ++Display the usage message and exit. ++ ++.SH NOTES ++\fBpcp-slabinfo\fP collects information from \fI/proc/slabinfo\fP and aims to be command-line and output compatible with it. ++ ++.SH PCP ENVIRONMENT ++Environment variables with the prefix \fBPCP_\fP are used to parameterize the file and directory names used by PCP. On each installation, the file \fI/etc/pcp.conf\fP contains the local values for these variables. The \fB$PCP_CONF\fP variable may be used to specify an alternative configuration file, as described in \fBpcp.conf\fP(5). ++ ++For environment variables affecting PCP tools, see \fBpmGetOptions\fP(3). ++ ++.SH SEE ALSO ++.BR PCPIntro(1), ++.BR pcp(1), ++.BR pmParseInterval(3), ++.BR environ(7). +diff --git a/src/pcp/slabinfo/pcp-slabinfo.py b/src/pcp/slabinfo/pcp-slabinfo.py +new file mode 100644 +index 000000000..36cf81a4a +--- /dev/null ++++ b/src/pcp/slabinfo/pcp-slabinfo.py +@@ -0,0 +1,208 @@ ++#!/usr/bin/env pmpython ++# ++# Copyright (c) 2023 Oracle and/or its affiliates. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++# This program is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation; either version 2 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++# for more details. ++# ++# pylint: disable=bad-whitespace,too-many-arguments,too-many-lines, bad-continuation ++# pylint: disable=redefined-outer-name,unnecessary-lambda ++# ++import signal ++import sys ++import time ++from pcp import pmapi, pmcc ++from cpmapi import PM_CONTEXT_ARCHIVE ++ ++SYS_MECTRICS= ["kernel.uname.sysname","kernel.uname.release", ++ "kernel.uname.nodename","kernel.uname.machine","hinv.ncpu"] ++SLABSTAT_METRICS = ["mem.slabinfo.slabs.active", ++ "mem.slabinfo.slabs.pages_per_slab","mem.slabinfo.slabs.total_size", ++ "mem.slabinfo.slabs.objects_per_slab","mem.slabinfo.objects.active", ++ "mem.slabinfo.objects.total","mem.slabinfo.objects.size", ++ "mem.slabinfo.slabs.total" ] ++ALL_METRICS = SLABSTAT_METRICS + SYS_MECTRICS ++def adjust_length(name): ++ return name.ljust(25) ++class ReportingMetricRepository: ++ ++ def __init__(self,group): ++ self.group=group ++ self.current_cached_values = {} ++ ++ def __sorted(self,data): ++ return dict(sorted(data.items(), key=lambda item: item[0].lower())) ++ ++ def __fetch_current_value(self,metric): ++ val=dict(map(lambda x: (x[1], x[2]), self.group[metric].netValues)) ++ val=self.__sorted(val) ++ return dict(val) ++ ++ def current_value(self,metric): ++ if not metric in self.group: ++ return None ++ if self.current_cached_values.get(metric) is None: ++ first_value=self.__fetch_current_value(metric) ++ self.current_cached_values[metric]=first_value ++ return self.current_cached_values[metric] ++ ++class SlabStatUtil: ++ def __init__(self,metrics_repository): ++ self.__metric_repository=metrics_repository ++ self.report=ReportingMetricRepository(self.__metric_repository) ++ ++ def active_objs(self): ++ return self.report.current_value('mem.slabinfo.objects.active') ++ ++ def objs_size(self): ++ return self.report.current_value('mem.slabinfo.objects.size') ++ ++ def obj_total(self): ++ return self.report.current_value('mem.slabinfo.objects.total') ++ ++ def slab_total_size(self): ++ return self.report.current_value('mem.slabinfo.slabs.total_size') ++ ++ def objects_per_slab(self): ++ return self.report.current_value('mem.slabinfo.slabs.objects_per_slab') ++ ++ def page_per_slab(self): ++ return self.report.current_value('mem.slabinfo.slabs.pages_per_slab') ++ ++ def slab_active(self): ++ return self.report.current_value('mem.slabinfo.slabs.active') ++ ++ def slabs_total(self): ++ return self.report.current_value('mem.slabinfo.slabs.total') ++ ++ def names(self): ++ data = self.report.current_value('mem.slabinfo.objects.active') ++ return data.keys() ++ ++class SlabinfoReport(pmcc.MetricGroupPrinter): ++ def __init__(self,samples,group,context): ++ self.samples = samples ++ self.group=group ++ self.context=context ++ ++ def __get_ncpu(self, group): ++ return group['hinv.ncpu'].netValues[0][2] ++ ++ def __print_machine_info(self, context): ++ timestamp = self.group.pmLocaltime(context.timestamp.tv_sec) ++ # Please check strftime(3) for different formatting options. ++ # Also check TZ and LC_TIME environment variables for more ++ # information on how to override the default formatting of ++ # the date display in the header ++ time_string = time.strftime("%x", timestamp.struct_time()) ++ header_string = '' ++ header_string += context['kernel.uname.sysname'].netValues[0][2] + ' ' ++ header_string += context['kernel.uname.release'].netValues[0][2] + ' ' ++ header_string += '(' + context['kernel.uname.nodename'].netValues[0][2] + ') ' ++ header_string += time_string + ' ' ++ header_string += context['kernel.uname.machine'].netValues[0][2] + ' ' ++ print("%s (%s CPU)" % (header_string, self.__get_ncpu(context))) ++ ++ def __print_header(self,header_indentation,value_indentation): ++ print("TimeStamp"+ " "+header_indentation + "Name" + " "*22 +value_indentation+ "active_objs" + ++ value_indentation +"num_objs" + value_indentation + "objsize byte" + value_indentation + ++ "objperslab" + value_indentation +"pagesperslab" + value_indentation + "active_slabs" + ++ value_indentation + "num_slabs") ++ ++ def __print_values(self,timestamp,header_indentation,\ ++ value_indentation,slabstatus): ++ names=slabstatus.names() ++ active_objects=slabstatus.active_objs() ++ num_objs=slabstatus.objs_size() ++ objsize=slabstatus.obj_total() ++ objperslab=slabstatus.objects_per_slab() ++ pageperslab=slabstatus.page_per_slab() ++ active_slabs=slabstatus.slab_active() ++ num_slabs=slabstatus.slabs_total() ++ for name in names: ++ data = adjust_length(name) if len(name) < 25 else name ++ print("%s %s %s %s %8d %s %8d %s %8d %s %7d %s %9d %s %8d %s %8d" ++ % (timestamp, header_indentation,data, value_indentation, active_objects[name], ++ value_indentation,objsize[name],value_indentation, num_objs[name], ++ value_indentation, objperslab[name],value_indentation,pageperslab[name], ++ value_indentation, active_slabs[name], value_indentation, num_slabs[name])) ++ ++ def print_report(self,group,timestamp,header_indentation,value_indentation,manager_slabinfo): ++ def __print_slab_status(): ++ slabstatus = SlabStatUtil(manager_slabinfo) ++ if slabstatus.names(): ++ try: ++ self.__print_machine_info(group) ++ self.__print_header(header_indentation, value_indentation) ++ self.__print_values(timestamp, header_indentation, value_indentation, slabstatus) ++ except IndexError: ++ print("Incorrect machine info due to some missing metrics") ++ return ++ else: ++ pass ++ ++ if self.context != PM_CONTEXT_ARCHIVE and self.samples is None: ++ __print_slab_status() ++ sys.exit(0) ++ elif self.context == PM_CONTEXT_ARCHIVE and self.samples is None: ++ __print_slab_status() ++ elif self.samples >=1: ++ __print_slab_status() ++ self.samples-=1 ++ else: ++ pass ++ ++ def report(self, manager): ++ group = manager["sysinfo"] ++ self.samples=opts.pmGetOptionSamples() ++ t_s = group.contextCache.pmLocaltime(int(group.timestamp)) ++ timestamp = time.strftime(SlabinfoOptions.timefmt, t_s.struct_time()) ++ header_indentation = " " if len(timestamp) < 9 else (len(timestamp) - 7) * " " ++ value_indentation = ((len(header_indentation) + 9) - len(timestamp)) * " " ++ self.print_report(group,timestamp,header_indentation,value_indentation,manager['slabinfo']) ++ ++class SlabinfoOptions(pmapi.pmOptions): ++ timefmt = "%H:%M:%S" ++ def __init__(self): ++ pmapi.pmOptions.__init__(self, "a:s:Z:zV?") ++ self.pmSetLongOptionHeader("General options") ++ self.pmSetLongOptionHostZone() ++ self.pmSetLongOptionTimeZone() ++ self.pmSetLongOptionHelp() ++ self.pmSetLongOptionSamples() ++ self.pmSetLongOptionVersion() ++ self.samples=None ++ self.context=None ++ ++if __name__ == '__main__': ++ try: ++ opts = SlabinfoOptions() ++ mngr = pmcc.MetricGroupManager.builder(opts,sys.argv) ++ opts.context=mngr.type ++ missing = mngr.checkMissingMetrics(ALL_METRICS) ++ if missing is not None: ++ sys.stderr.write("Error:some metrics are unavailable",missing) ++ sys.exit(1) ++ mngr["slabinfo"] = SLABSTAT_METRICS ++ mngr["sysinfo"] = SYS_MECTRICS ++ mngr["allinfo"]=ALL_METRICS ++ mngr.printer = SlabinfoReport(opts.samples,mngr,opts.context) ++ sts = mngr.run() ++ sys.exit(sts) ++ except pmapi.pmErr as error: ++ sys.stderr.write('%s\n' % (error.message())) ++ except pmapi.pmUsageErr as usage: ++ usage.message() ++ sys.exit(1) ++ except IOError: ++ signal.signal(signal.SIGPIPE, signal.SIG_DFL) ++ except KeyboardInterrupt: ++ pass +-- +2.39.3 diff --git a/SOURCES/1008-pcp-buddyinfo-initial-commit-of-pcp-implementation.patch b/SOURCES/1008-pcp-buddyinfo-initial-commit-of-pcp-implementation.patch new file mode 100644 index 0000000..d036b0c --- /dev/null +++ b/SOURCES/1008-pcp-buddyinfo-initial-commit-of-pcp-implementation.patch @@ -0,0 +1,623 @@ +From 80c92de1ac7e589956d974cb6f8c00dfcb999764 Mon Sep 17 00:00:00 2001 +From: Sagar Sagar +Date: Mon, 4 Sep 2023 13:52:49 +0000 +Subject: [PATCH] pcp-buddyinfo: initial commit of pcp implementation of + buddyinfo + +(cherry picked from commit ebf62cada9887eb521d8269ff9bb9b84345d326a) +Orabug: 35660932 +Signed-off-by: Sagar Sagar +--- + qa/1990 | 42 ++++++ + qa/1990.out | 117 +++++++++++++++++ + qa/archives/mk.buddyinfo | 39 ++++++ + qa/group | 1 + + src/pcp/GNUmakefile | 1 + + src/pcp/buddyinfo/GNUmakefile | 44 +++++++ + src/pcp/buddyinfo/pcp-buddyinfo.1 | 94 ++++++++++++++ + src/pcp/buddyinfo/pcp-buddyinfo.py | 197 +++++++++++++++++++++++++++++ + 8 files changed, 535 insertions(+) + create mode 100755 qa/1990 + create mode 100644 qa/1990.out + create mode 100755 qa/archives/mk.buddyinfo + create mode 100644 src/pcp/buddyinfo/GNUmakefile + create mode 100644 src/pcp/buddyinfo/pcp-buddyinfo.1 + create mode 100644 src/pcp/buddyinfo/pcp-buddyinfo.py + +diff --git a/qa/1990 b/qa/1990 +new file mode 100755 +index 000000000..47a5f70f9 +--- /dev/null ++++ b/qa/1990 +@@ -0,0 +1,42 @@ ++#!/bin/sh ++# PCP QA Test No. 1990 ++# Exercise various pcp-buddyinfo(1) command options. ++# ++# Copyright (c) 2023 Oracle and/or its affiliates. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++ ++seq=`basename $0` ++echo "QA output created by $seq" ++ ++. ./common.python ++ ++__version=`$python --version 2>&1 | sed -e 's/Python //'` ++case "$__version" ++in ++ 2.7.5) _notrun "Python $__version reports start seconds off-by one for some processes" ++ ;; ++esac ++ ++status=1 # failure is the default! ++$sudo rm -rf $tmp.* $seq.full ++trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15 ++ ++pcp_buddyinfo="$PCP_BINADM_DIR/pcp-buddyinfo" ++test -x $pcp_buddyinfo || _notrun "No pcp-buddyinfo(1) installed" ++pcp_buddyinfo="$python $pcp_buddyinfo" ++ ++# real QA test starts here ++echo && echo pcp-buddyinfo output : Display default output ++PCP_ARCHIVE="archives/pcp-buddyinfo" PCP_HOSTZONE=1 $pcp_buddyinfo ++ ++archive_first="-a archives/pcp-buddyinfo -z -O +1" ++ ++echo && echo pcp-buddyinfo output : Display output ++pcp $archive_first buddyinfo ++ ++echo && echo pcp-buddyinfo output : Display output when given specified number of samples ++pcp $archive_first buddyinfo -s 3 ++ ++status=0 ++exit +diff --git a/qa/1990.out b/qa/1990.out +new file mode 100644 +index 000000000..adafa9287 +--- /dev/null ++++ b/qa/1990.out +@@ -0,0 +1,117 @@ ++QA output created by 1990 ++ ++pcp-buddyinfo output : Display default output ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Normal Nodes Order0 Order1 Order2 Order3 Order4 Order5 Order6 Order7 Order8 Order9 Order10 ++15:53:21 DMA node0 0 0 0 0 0 0 0 0 1 1 3 ++15:53:21 DMA32 node0 3 1 1 1 2 3 2 3 3 2 803 ++15:53:21 Normal node0 1720 4118 1862 671 220 120 66 29 21 26 3040 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Normal Nodes Order0 Order1 Order2 Order3 Order4 Order5 Order6 Order7 Order8 Order9 Order10 ++15:53:24 DMA node0 0 0 0 0 0 0 0 0 1 1 3 ++15:53:24 DMA32 node0 3 1 1 1 2 3 2 3 3 2 803 ++15:53:24 Normal node0 1720 4118 1862 671 220 120 66 29 21 26 3040 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Normal Nodes Order0 Order1 Order2 Order3 Order4 Order5 Order6 Order7 Order8 Order9 Order10 ++15:53:27 DMA node0 0 0 0 0 0 0 0 0 1 1 3 ++15:53:27 DMA32 node0 3 1 1 1 2 3 2 3 3 2 803 ++15:53:27 Normal node0 1720 4118 1862 671 220 120 66 29 21 26 3040 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Normal Nodes Order0 Order1 Order2 Order3 Order4 Order5 Order6 Order7 Order8 Order9 Order10 ++15:53:30 DMA node0 0 0 0 0 0 0 0 0 1 1 3 ++15:53:30 DMA32 node0 3 1 1 1 2 3 2 3 3 2 803 ++15:53:30 Normal node0 1657 4118 1862 671 220 120 66 29 21 26 3040 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Normal Nodes Order0 Order1 Order2 Order3 Order4 Order5 Order6 Order7 Order8 Order9 Order10 ++15:53:33 DMA node0 0 0 0 0 0 0 0 0 1 1 3 ++15:53:33 DMA32 node0 3 1 1 1 2 3 2 3 3 2 803 ++15:53:33 Normal node0 1657 4118 1862 671 220 120 66 29 21 26 3040 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Normal Nodes Order0 Order1 Order2 Order3 Order4 Order5 Order6 Order7 Order8 Order9 Order10 ++15:53:36 DMA node0 0 0 0 0 0 0 0 0 1 1 3 ++15:53:36 DMA32 node0 3 1 1 1 2 3 2 3 3 2 803 ++15:53:36 Normal node0 1657 4118 1862 671 220 120 66 29 21 26 3040 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Normal Nodes Order0 Order1 Order2 Order3 Order4 Order5 Order6 Order7 Order8 Order9 Order10 ++15:53:39 DMA node0 0 0 0 0 0 0 0 0 1 1 3 ++15:53:39 DMA32 node0 3 1 1 1 2 3 2 3 3 2 803 ++15:53:39 Normal node0 1657 4118 1862 671 220 120 66 29 21 26 3040 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Normal Nodes Order0 Order1 Order2 Order3 Order4 Order5 Order6 Order7 Order8 Order9 Order10 ++15:53:42 DMA node0 0 0 0 0 0 0 0 0 1 1 3 ++15:53:42 DMA32 node0 3 1 1 1 2 3 2 3 3 2 803 ++15:53:42 Normal node0 1657 4118 1862 671 220 120 66 29 21 26 3040 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Normal Nodes Order0 Order1 Order2 Order3 Order4 Order5 Order6 Order7 Order8 Order9 Order10 ++15:53:45 DMA node0 0 0 0 0 0 0 0 0 1 1 3 ++15:53:45 DMA32 node0 3 1 1 1 2 3 2 3 3 2 803 ++15:53:45 Normal node0 1657 4118 1862 671 220 120 66 29 21 26 3040 ++ ++pcp-buddyinfo output : Display output ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Normal Nodes Order0 Order1 Order2 Order3 Order4 Order5 Order6 Order7 Order8 Order9 Order10 ++15:53:19 DMA node0 0 0 0 0 0 0 0 0 1 1 3 ++15:53:19 DMA32 node0 3 1 1 1 2 3 2 3 3 2 803 ++15:53:19 Normal node0 1720 4118 1862 671 220 120 66 29 21 26 3040 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Normal Nodes Order0 Order1 Order2 Order3 Order4 Order5 Order6 Order7 Order8 Order9 Order10 ++15:53:22 DMA node0 0 0 0 0 0 0 0 0 1 1 3 ++15:53:22 DMA32 node0 3 1 1 1 2 3 2 3 3 2 803 ++15:53:22 Normal node0 1720 4118 1862 671 220 120 66 29 21 26 3040 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Normal Nodes Order0 Order1 Order2 Order3 Order4 Order5 Order6 Order7 Order8 Order9 Order10 ++15:53:25 DMA node0 0 0 0 0 0 0 0 0 1 1 3 ++15:53:25 DMA32 node0 3 1 1 1 2 3 2 3 3 2 803 ++15:53:25 Normal node0 1720 4118 1862 671 220 120 66 29 21 26 3040 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Normal Nodes Order0 Order1 Order2 Order3 Order4 Order5 Order6 Order7 Order8 Order9 Order10 ++15:53:28 DMA node0 0 0 0 0 0 0 0 0 1 1 3 ++15:53:28 DMA32 node0 3 1 1 1 2 3 2 3 3 2 803 ++15:53:28 Normal node0 1720 4118 1862 671 220 120 66 29 21 26 3040 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Normal Nodes Order0 Order1 Order2 Order3 Order4 Order5 Order6 Order7 Order8 Order9 Order10 ++15:53:31 DMA node0 0 0 0 0 0 0 0 0 1 1 3 ++15:53:31 DMA32 node0 3 1 1 1 2 3 2 3 3 2 803 ++15:53:31 Normal node0 1657 4118 1862 671 220 120 66 29 21 26 3040 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Normal Nodes Order0 Order1 Order2 Order3 Order4 Order5 Order6 Order7 Order8 Order9 Order10 ++15:53:34 DMA node0 0 0 0 0 0 0 0 0 1 1 3 ++15:53:34 DMA32 node0 3 1 1 1 2 3 2 3 3 2 803 ++15:53:34 Normal node0 1657 4118 1862 671 220 120 66 29 21 26 3040 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Normal Nodes Order0 Order1 Order2 Order3 Order4 Order5 Order6 Order7 Order8 Order9 Order10 ++15:53:37 DMA node0 0 0 0 0 0 0 0 0 1 1 3 ++15:53:37 DMA32 node0 3 1 1 1 2 3 2 3 3 2 803 ++15:53:37 Normal node0 1657 4118 1862 671 220 120 66 29 21 26 3040 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Normal Nodes Order0 Order1 Order2 Order3 Order4 Order5 Order6 Order7 Order8 Order9 Order10 ++15:53:40 DMA node0 0 0 0 0 0 0 0 0 1 1 3 ++15:53:40 DMA32 node0 3 1 1 1 2 3 2 3 3 2 803 ++15:53:40 Normal node0 1657 4118 1862 671 220 120 66 29 21 26 3040 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Normal Nodes Order0 Order1 Order2 Order3 Order4 Order5 Order6 Order7 Order8 Order9 Order10 ++15:53:43 DMA node0 0 0 0 0 0 0 0 0 1 1 3 ++15:53:43 DMA32 node0 3 1 1 1 2 3 2 3 3 2 803 ++15:53:43 Normal node0 1657 4118 1862 671 220 120 66 29 21 26 3040 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Normal Nodes Order0 Order1 Order2 Order3 Order4 Order5 Order6 Order7 Order8 Order9 Order10 ++15:53:46 DMA node0 0 0 0 0 0 0 0 0 1 1 3 ++15:53:46 DMA32 node0 3 1 1 1 2 3 2 3 3 2 803 ++15:53:46 Normal node0 1657 4118 1862 671 220 120 66 29 21 26 3040 ++ ++pcp-buddyinfo output : Display output when given specified number of samples ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Normal Nodes Order0 Order1 Order2 Order3 Order4 Order5 Order6 Order7 Order8 Order9 Order10 ++15:53:19 DMA node0 0 0 0 0 0 0 0 0 1 1 3 ++15:53:19 DMA32 node0 3 1 1 1 2 3 2 3 3 2 803 ++15:53:19 Normal node0 1720 4118 1862 671 220 120 66 29 21 26 3040 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Normal Nodes Order0 Order1 Order2 Order3 Order4 Order5 Order6 Order7 Order8 Order9 Order10 ++15:53:22 DMA node0 0 0 0 0 0 0 0 0 1 1 3 ++15:53:22 DMA32 node0 3 1 1 1 2 3 2 3 3 2 803 ++15:53:22 Normal node0 1720 4118 1862 671 220 120 66 29 21 26 3040 ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/02/23 x86_64 (4 CPU) ++TimeStamp Normal Nodes Order0 Order1 Order2 Order3 Order4 Order5 Order6 Order7 Order8 Order9 Order10 ++15:53:25 DMA node0 0 0 0 0 0 0 0 0 1 1 3 ++15:53:25 DMA32 node0 3 1 1 1 2 3 2 3 3 2 803 ++15:53:25 Normal node0 1720 4118 1862 671 220 120 66 29 21 26 3040 +diff --git a/qa/archives/mk.buddyinfo b/qa/archives/mk.buddyinfo +new file mode 100755 +index 000000000..c9a6707ca +--- /dev/null ++++ b/qa/archives/mk.buddyinfo +@@ -0,0 +1,39 @@ ++#!/bin/sh ++# ++# remake the pcp-buddyinfo archive ... ++# this archive is intended to be checked in and not remade, this script is ++# simply a record of how it was created ++# ++ ++. /etc/pcp.env ++ ++tmp=/var/tmp/$$ ++rm -f $tmp.* ++trap "rm -f $tmp.*; exit 0" 0 1 2 3 15 ++ ++cat <>$tmp.config ++log advisory on once{ ++ kernel.uname.sysname ++ kernel.uname.release ++ kernel.uname.nodename ++ kernel.uname.machine ++ hinv.ncpu ++} ++log advisory on 10 seconds { ++ mem.buddyinfo.pages ++ mem.buddyinfo.total ++} ++End-of-File ++ ++rm -f pcp-buddyinfo.0 pcp-buddyinfo.index pcp-buddyinfo.meta pcp-buddyinfo.* ++ ++if pmlogger -s 5 -c $tmp.config pcp-buddyinfo; then ++ xz pcp-buddyinfo.0 ++ xz pcp-buddyinfo.index ++ xz pcp-buddyinfo.meta ++else ++ echo "Argh: pmlogger failed ..." ++ cat pmlogger.log ++fi ++ ++ +diff --git a/qa/group b/qa/group +index 254e6cb42..42863daa4 100644 +--- a/qa/group ++++ b/qa/group +@@ -1980,8 +1980,9 @@ x11 + 1986 pmfind local + 1988 pcp meminfo python local + 1989 pcp slabinfo python local ++1990 pcp buddyinfo python local + 2101 pmda.sockets local security + 2104 libpcp local security + 2100 pmproxy local security + 2105 libpcp pmcd local security pmcd.pdu + 4751 libpcp threads valgrind local pcp helgrind +diff --git a/src/pcp/GNUmakefile b/src/pcp/GNUmakefile +index d4675a8d9..4f656ce5b 100644 +--- a/src/pcp/GNUmakefile ++++ b/src/pcp/GNUmakefile +@@ -18,6 +18,7 @@ include $(TOPDIR)/src/include/builddefs + + SUBDIRS = \ + atop \ ++ buddyinfo \ + dmcache \ + dstat \ + free \ +diff --git a/src/pcp/buddyinfo/GNUmakefile b/src/pcp/buddyinfo/GNUmakefile +new file mode 100644 +index 000000000..121b358d3 +--- /dev/null ++++ b/src/pcp/buddyinfo/GNUmakefile +@@ -0,0 +1,44 @@ ++# ++# Copyright (c) 2023 Oracle and/or its affiliates. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++# This program is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation; either version 2 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++# for more details. ++# ++ ++TOPDIR = ../../.. ++include $(TOPDIR)/src/include/builddefs ++ ++TARGET = pcp-buddyinfo ++SCRIPT = $(TARGET).py ++MAN_SECTION = 1 ++MAN_PAGES = $(TARGET).$(MAN_SECTION) ++MAN_DEST = $(PCP_MAN_DIR)/man$(MAN_SECTION) ++ ++default: $(SCRIPT) $(MAN_PAGES) ++ ++include $(BUILDRULES) ++ ++install: default ++ifeq "$(HAVE_PYTHON)" "true" ++ $(INSTALL) -m 755 $(SCRIPT) $(PCP_BINADM_DIR)/$(TARGET) ++ @$(INSTALL_MAN) ++endif ++ ++default_pcp : default ++ ++install_pcp : install ++ ++check:: $(SCRIPT) ++ $(PYLINT) $^ ++ ++check :: $(MAN_PAGES) ++ $(MANLINT) $^ ++ +diff --git a/src/pcp/buddyinfo/pcp-buddyinfo.1 b/src/pcp/buddyinfo/pcp-buddyinfo.1 +new file mode 100644 +index 000000000..26c06ba69 +--- /dev/null ++++ b/src/pcp/buddyinfo/pcp-buddyinfo.1 +@@ -0,0 +1,94 @@ ++'\"! tbl | mmdoc ++'\"macro stdmacro ++.\" ++.\" Man page for pcp-buddyinfo ++.\" Copyright (c) 2023 Oracle and/or its affiliates. ++.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++.\" ++.\" This program is free software; you can redistribute it and/or modify it ++.\" under the terms of the GNU General Public License as published by the ++.\" Free Software Foundation; either version 2 of the License, or (at your ++.\" option) any later version. ++.\" ++.\" This program is distributed in the hope that it will be useful, but ++.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++.\" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++.\" for more details. ++.\" ++ ++.TH PCP-BUDDYINFO 1 "PCP" "Performance Co-Pilot" ++ ++.SH NAME ++\fBpcp-buddyinfo\fP \- Report statistics for buddy algorithm shown in cat /proc/buddyinfo ++ ++.SH SYNOPSIS ++\fBpcp\fP [\fBpcp options\fP] \fBbuddyinfo\fP [\fB-s\fP \fBsamples\fP] [\fB-a\fP \fBarchive\fP] [\fB-Z\fP \fB--timezone\fP] [\fB-z\fP \fB--hostzone\fP] [\fB-V\fP \fBVersion\fP] ++ ++.SH DESCRIPTION ++The \fBpcp-buddyinfo\fP command is used for viewing different stats related to buddyinfo. It helps users analyze useful information related to the buddy algorithm. The information includes the total number of zones that are currently active, order pages etc. By default, \fBpcp-buddyinfo\fP reports live data for the local host. ++ ++The statistics shown are as follows: ++ ++.TS ++lfB lfB ++l lx. ++HEADER DESCRIPTION ++_ _ ++Normal zones available ++Nodes available nodes ++Order0 available pages of order 0 ++Order1 available pages of order 1 ++Order2 available pages of order 2 ++Order3 available pages of order 3 ++Order4 available pages of order 4 ++Order5 available pages of order 5 ++Order6 available pages of order 6 ++Order7 available pages of order 7 ++Order8 available pages of order 8 ++Order9 available pages of order 9 ++Order10 available pages of order 10 ++.TE ++ ++ ++Each column represents the number of pages of a certain order (a certain size) that are available at any given time. For example, for zone DMA (direct memory access), there are 90 of 2^(0*PAGE_SIZE) chunks of memory. Similarly, there are 6 of 2^(1*PAGE_SIZE) chunks, and 2 of 2^(2*PAGE_SIZE) chunks of memory available. ++ ++The DMA row references the first 16 MB on a system, the HighMem row references all memory greater than 4 GB on a system, and the Normal row references all memory in between. ++ ++.SH OPTIONS ++.TP ++\fB-a\fP, \fB\-\-archive\fP ++Fetch /proc/buddyinfo for a specified archive file ++ ++.TP ++\fB-s\fP, \fB\-\-samples\fP ++Get the buddyinfo for the specified number of samples count ++ ++.TP ++\fB-z\fP, \fB\-\-hostzone\fP ++Set the reporting timezone to the local time of metrics source ++ ++.TP ++\fB-Z\fP, \fB\-\-timezone\fP ++Set the reporting timezone ++ ++.TP ++\fB-V\fP, \fB\-\-version\fP ++Display the version number and exit. ++ ++.TP ++\fB-?\fP, \fB\-\-help\fP ++Display the usage message and exit. ++ ++.SH NOTES ++\fBpcp-buddyinfo\fP collects information from \fI/proc/buddyinfo\fP and aims to be command-line and output compatible with it. ++ ++.SH PCP ENVIRONMENT ++Environment variables with the prefix \fBPCP_\fP are used to parameterize the file and directory names used by PCP. On each installation, the file \fI/etc/pcp.conf\fP contains the local values for these variables. The \fB$PCP_CONF\fP variable may be used to specify an alternative configuration file, as described in \fBpcp.conf\fP(5). ++ ++For environment variables affecting PCP tools, see \fBpmGetOptions\fP(3). ++ ++.SH SEE ALSO ++.BR PCPIntro(1), ++.BR pcp(1), ++.BR pmParseInterval(3), ++.BR environ(7). +diff --git a/src/pcp/buddyinfo/pcp-buddyinfo.py b/src/pcp/buddyinfo/pcp-buddyinfo.py +new file mode 100644 +index 000000000..012fe7cec +--- /dev/null ++++ b/src/pcp/buddyinfo/pcp-buddyinfo.py +@@ -0,0 +1,197 @@ ++#!/usr/bin/env pmpython ++# ++# Copyright (c) 2023 Oracle and/or its affiliates. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++# This program is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation; either version 2 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++# for more details. ++# ++# pylint: disable=bad-whitespace,too-many-arguments,too-many-lines, bad-continuation ++# pylint: disable=redefined-outer-name,unnecessary-lambda ++# ++import signal ++import sys ++import time ++from pcp import pmapi, pmcc ++from cpmapi import PM_CONTEXT_ARCHIVE ++ ++SYS_MECTRICS= ["kernel.uname.sysname","kernel.uname.release", ++ "kernel.uname.nodename","kernel.uname.machine","hinv.ncpu"] ++BUDDYSTAT_METRICS = ["mem.buddyinfo.pages","mem.buddyinfo.total"] ++ ++ALL_METRICS = BUDDYSTAT_METRICS + SYS_MECTRICS ++ ++def adjust_length(name,size): ++ return name.ljust(size) ++ ++class ReportingMetricRepository: ++ ++ def __init__(self,group): ++ self.group=group ++ self.current_cached_values = {} ++ ++ def __fetch_current_value(self,metric): ++ val=dict(map(lambda x: (x[1], x[2]), self.group[metric].netValues)) ++ return dict(val) ++ ++ def current_value(self,metric): ++ if metric not in self.group: ++ return None ++ if self.current_cached_values.get(metric) is None: ++ first_value=self.__fetch_current_value(metric) ++ self.current_cached_values[metric]=first_value ++ return self.current_cached_values[metric] ++ ++class BuddyStatUtil: ++ def __init__(self,metrics_repository): ++ self.__metric_repository=metrics_repository ++ self.report=ReportingMetricRepository(self.__metric_repository) ++ ++ def buddy_pages(self): ++ return self.report.current_value('mem.buddyinfo.pages') ++ ++ def buddy_total_pages(self): ++ return self.report.current_value('mem.buddyinfo.total') ++ ++ def names(self): ++ data = self.report.current_value('mem.buddyinfo.pages') ++ return data.keys() ++ ++class BuddyinfoReport(pmcc.MetricGroupPrinter): ++ def __init__(self,samples,group,context): ++ self.samples = samples ++ self.group=group ++ self.context=context ++ ++ def __get_ncpu(self, group): ++ return group['hinv.ncpu'].netValues[0][2] ++ ++ def __print_machine_info(self, context): ++ timestamp = self.group.pmLocaltime(context.timestamp.tv_sec) ++ # Please check strftime(3) for different formatting options. ++ # Also check TZ and LC_TIME environment variables for more ++ # information on how to override the default formatting of ++ # the date display in the header ++ time_string = time.strftime("%x", timestamp.struct_time()) ++ header_string = '' ++ header_string += context['kernel.uname.sysname'].netValues[0][2] + ' ' ++ header_string += context['kernel.uname.release'].netValues[0][2] + ' ' ++ header_string += '(' + context['kernel.uname.nodename'].netValues[0][2] + ') ' ++ header_string += time_string + ' ' ++ header_string += context['kernel.uname.machine'].netValues[0][2] + ' ' ++ print("%s (%s CPU)" % (header_string, self.__get_ncpu(context))) ++ ++ def __print_header(self,header_indentation,value_indentation): ++ value_indentation+=" "*2 ++ print("TimeStamp"+ " "+header_indentation + "Normal" + header_indentation+value_indentation+" " + ++ "Nodes" + header_indentation + "Order0" + value_indentation + ++ "Order1" + value_indentation +"Order2" + value_indentation + "Order3" + value_indentation + ++ "Order4" + value_indentation +"Order5" + value_indentation + "Order6" + value_indentation + ++ "Order7" + value_indentation +"Order8" + value_indentation + "Order9" + ++ value_indentation + "Order10") ++ ++ def __print_values(self,timestamp,header_indentation,\ ++ value_indentation,buddystatus): ++ names=buddystatus.names() ++ pages=buddystatus.buddy_pages() ++ order_set = set() ++ nodes_set = set() ++ no_of_nodes_set = set() ++ for name in names: ++ part=name.split('::') ++ if len(part)==3: ++ nodes_set.add(part[0]) ++ order_set.add(part[1]) ++ no_of_nodes_set.add(part[2]) ++ def __extract_numeric_part(element): ++ return int(element[5:]) ++ for Normal in sorted(nodes_set): ++ for node in no_of_nodes_set: ++ value="" ++ for order in sorted(order_set,key=__extract_numeric_part): ++ nodename = adjust_length(Normal,9) if len(Normal) < 9 else Normal ++ key = f"{Normal}::{order}::{node}" ++ data = str(pages.get(key,0)) ++ value += adjust_length(data,8) if len(data) < 8 else data ++ value += value_indentation ++ ++ print("%s %s %s %s %s %s %s "%(timestamp,header_indentation,nodename,header_indentation,node, ++ header_indentation,value)) ++ ++ def print_report(self,group,timestamp,header_indentation,value_indentation,manager_buddyinfo): ++ ++ def __print_buddy_status(): ++ buddystatus = BuddyStatUtil(manager_buddyinfo) ++ if buddystatus.names(): ++ try: ++ self.__print_machine_info(group) ++ self.__print_header(header_indentation, value_indentation) ++ self.__print_values(timestamp, header_indentation, value_indentation, buddystatus) ++ except IndexError: ++ print("Incorrect machine info due to some missing metrics") ++ return ++ else: ++ return ++ ++ if self.context != PM_CONTEXT_ARCHIVE and self.samples is None: ++ __print_buddy_status() ++ sys.exit(0) ++ elif self.context == PM_CONTEXT_ARCHIVE and self.samples is None: ++ __print_buddy_status() ++ elif self.samples >=1: ++ __print_buddy_status() ++ self.samples-=1 ++ ++ def report(self, manager): ++ group = manager["sysinfo"] ++ self.samples=opts.pmGetOptionSamples() ++ t_s = group.contextCache.pmLocaltime(int(group.timestamp)) ++ timestamp = time.strftime(BuddyinfoOptions.timefmt, t_s.struct_time()) ++ header_indentation = " " if len(timestamp) < 9 else (len(timestamp) - 7) * " " ++ value_indentation = ((len(header_indentation) + 2) - len(timestamp)) * " " ++ self.print_report(group,timestamp,header_indentation,value_indentation,manager['buddyinfo']) ++ ++class BuddyinfoOptions(pmapi.pmOptions): ++ timefmt = "%H:%M:%S" ++ def __init__(self): ++ pmapi.pmOptions.__init__(self, "a:s:Z:zV?") ++ self.pmSetLongOptionHeader("General options") ++ self.pmSetLongOptionHostZone() ++ self.pmSetLongOptionTimeZone() ++ self.pmSetLongOptionHelp() ++ self.pmSetLongOptionSamples() ++ self.pmSetLongOptionVersion() ++ self.samples=None ++ self.context=None ++ ++if __name__ == '__main__': ++ try: ++ opts = BuddyinfoOptions() ++ mngr = pmcc.MetricGroupManager.builder(opts,sys.argv) ++ opts.context=mngr.type ++ missing = mngr.checkMissingMetrics(ALL_METRICS) ++ if missing is not None: ++ sys.stderr.write("Error:some metrics are unavailable",missing) ++ sys.exit(1) ++ mngr["buddyinfo"] = BUDDYSTAT_METRICS ++ mngr["sysinfo"] = SYS_MECTRICS ++ mngr["allinfo"]=ALL_METRICS ++ mngr.printer = BuddyinfoReport(opts.samples,mngr,opts.context) ++ sts = mngr.run() ++ sys.exit(sts) ++ except pmapi.pmErr as error: ++ sys.stderr.write('%s\n' % (error.message())) ++ except pmapi.pmUsageErr as usage: ++ usage.message() ++ sys.exit(1) ++ except IOError: ++ signal.signal(signal.SIGPIPE, signal.SIG_DFL) ++ except KeyboardInterrupt: ++ pass +-- +2.39.3 diff --git a/SOURCES/1009-pcp-netstat-Initial-implemenation-of-pcp-netstat-tool.patch b/SOURCES/1009-pcp-netstat-Initial-implemenation-of-pcp-netstat-tool.patch new file mode 100644 index 0000000..8c3528f --- /dev/null +++ b/SOURCES/1009-pcp-netstat-Initial-implemenation-of-pcp-netstat-tool.patch @@ -0,0 +1,1659 @@ +From dad4bb6d394f665e361ba5584fe91724e1bf1202 Mon Sep 17 00:00:00 2001 +From: Sagar Sagar +Date: Mon, 4 Sep 2023 19:07:45 +0000 +Subject: [PATCH] pcp-netstat:Initial implemenation of pcp-netstat tool + +This patch is for backward porting of upstream patches +present in the given upstream links to introduce the +pcp-netstat tool into the pcp. + +It gives the output like the /proc/netstat + +Upstream commit-links:- + 5ee6c1c98fd74a6f9573218453f09d50c1c79143 + b5dee57319e8b8808a5c3e9a27a1d30e1122b6f9 + 13a69b5e47f5185a1daf225d3d2d5845ef552e34 + 701e6ff0bf41d30cd7c7d9b2ac1b140eabbdc24d + 7b14f3a5e5db915d75993aa556b6ac18c8029628 + 23da1f72b8e8d3166c53517b420d50d3bd69c5b3 + 4805d126adedbb3964199ac2c8963bf75c82238c + 31e430aeb304f1b59f8ff1f3cd9ebf55b38d0adb + 90fd043032935111715243d5b1e914dcc8f2b74a + +Orabug: 34324779 +Signed-off-by: Sagar Sagar +--- + qa/1991 | 55 +++ + qa/1991.out | 761 +++++++++++++++++++++++++++++++++ + qa/archives/GNUmakefile | 2 +- + qa/archives/mk.netstat | 124 ++++++ + qa/group | 3 + + src/pcp/GNUmakefile | 1 + + src/pcp/netstat/GNUmakefile | 44 ++ + src/pcp/netstat/pcp-netstat.1 | 84 ++++ + src/pcp/netstat/pcp-netstat.py | 463 ++++++++++++++++++++ + 9 files changed, 1536 insertions(+), 1 deletion(-) + create mode 100755 qa/1991 + create mode 100644 qa/1991.out + create mode 100755 qa/archives/mk.netstat + create mode 100755 src/pcp/netstat/GNUmakefile + create mode 100755 src/pcp/netstat/pcp-netstat.1 + create mode 100755 src/pcp/netstat/pcp-netstat.py + +diff --git a/qa/1991 b/qa/1991 +new file mode 100755 +index 000000000..f564a9f83 +--- /dev/null ++++ b/qa/1991 +@@ -0,0 +1,55 @@ ++#!/bin/sh ++# PCP QA Test No. 1991 ++# Exercise various pcp-netstat(1) command options. ++# ++# Copyright (c) 2023 Oracle and/or its affiliates. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++ ++seq=`basename $0` ++echo "QA output created by $seq" ++ ++. ./common.python ++ ++__version=`$python --version 2>&1 | sed -e 's/Python //'` ++case "$__version" ++in ++ 2.7.5) _notrun "Python $__version reports start seconds off-by one for some processes" ++ ;; ++esac ++ ++status=1 # failure is the default! ++$sudo rm -rf $tmp.* $seq.full ++trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15 ++ ++pcp_netstat="$PCP_BINADM_DIR/pcp-netstat" ++test -x $pcp_netstat || _notrun "No pcp-netstat(1) installed" ++pcp_netstat="$python $pcp_netstat" ++ ++# real QA test starts here ++echo && echo pcp-netstat output : Display default output ++PCP_ARCHIVE="archives/pcp-netstat" PCP_HOSTZONE=1 PCP_ORIGIN=1 $pcp_netstat -s 2 ++ ++archive_first="-a archives/pcp-netstat -z -O +1" ++ ++echo && echo pcp-netstat output : Display output of all the network protocol statistics ++pcp $archive_first netstat --statistics -s 2 ++ ++echo && echo pcp-netstat output : Display output when filtered IP protocol ++pcp $archive_first netstat -s 2 -p IP ++ ++echo && echo pcp-netstat output : Display output when filtered TCP protocol ++pcp $archive_first netstat -s 2 -p TCP ++ ++echo && echo pcp-netstat output : Display output when filtered UDP protocol ++pcp $archive_first netstat -s 2 -p UDP ++ ++echo && echo pcp-netstat output : Display output when filtered ICMP protocol ++pcp $archive_first netstat -s 2 -p ICMP ++ ++echo && echo pcp-netstat output : Display output when asked for interface statistics ++pcp $archive_first netstat -s 2 -i ++ ++ ++status=0 ++exit +diff --git a/qa/1991.out b/qa/1991.out +new file mode 100644 +index 000000000..bca0c7f9f +--- /dev/null ++++ b/qa/1991.out +@@ -0,0 +1,761 @@ ++QA output created by 1991 ++ ++pcp-netstat output : Display default output ++02:37:13 ++ ++Ip: ++ Forwarding: 2 ++ 765150 total packets received ++ 5 with invalid addresses ++ 0 forwarded ++ 0 incoming packets discarded ++ 106573 incoming packets delivered ++ 108126 requests sent out ++ 162 dropped because of missing route ++ ++ ++Icmp: ++ 615 ICMP messages received ++ 8 Input ICMP message failed ++ ICMP input histogram: ++ destination unreachable: 615 ++ 2 ICMP messages sent ++ 0 ICMP messages failed ++ ICMP input histogram: ++ Output destination unreachable: 2 ++ ++ ++IcmpMsg: ++ InType3: 615 ++ OutType0: 2 ++ ++ ++Tcp: ++ 316 active connections openings ++ 118 passive connection openings ++ 15 failed connection attempts ++ 6 connection resets received ++ 5 connections established ++ 106265 segments received ++ 109496 segments send out ++ 256 segments retransmited ++ 0 bad segments received. ++ 54 resets sent ++ ++ ++Udp: ++ 1381 packets received ++ 2 packets to unknown port received ++ 0 packet receive errors ++ 2274 packets sent ++ 0 receive buffer errors ++ 0 send buffer errors ++ ++ ++UdpLite: ++ 0 packets received ++ 0 packets to unknown port received ++ 0 packet receive errors ++ 0 packets sent ++ 0 receive buffer errors ++ 0 send buffer errors ++ 0 checksum errors ++ ++ ++TcpExt: ++ 1334 delayed acks sent ++ 0 delayed acks further delayed because of locked socket ++ 27349 packet headers predicted ++ 49683 predicted acknowledgments ++ TCPSackRecovery: 27 ++ Detected reordering 4 times using SACK ++ TCPDSACKUndo: 7 ++ TCPLostRetransmitt: 58 ++ TCPSackFailures: 0 ++ 134 fast retransmits ++ TCPTimeouts: 58 ++ TCPLossProbes: 67 ++ TCPLossProbeRecovery: 29 ++ TCPBacklogCoalesce: 16 ++ TCPDSACKOldSent: 105 ++ TCPDSACKOfoSent: 0 ++ TCPDSACKRecv: 28 ++ TCPDSACKOfoRecv: 3 ++ 21 connections aborted due to data ++ 0 connections reset due to early user close ++ 1 connections aborted due to timeout ++ TCPDSACKIgnoredNoUndo: 15 ++ TCPSackShifted: 136 ++ TCPSackMerged: 256 ++ TCPSackShiftFallback: 94 ++ IPReversePathFilter: 1 ++ TCPRcvCoalesce: 624 ++ TCPOFOQueue: 18 ++ TCPOFOMerge: 0 ++ TCPChallengeAck: 0 ++ TCPSynChallenge: 0 ++ TCPSpuriousRtxHostQueues: 0 ++ TCPAutoCorking: 26 ++ TCPSynRetrans: 16 ++ TCPOrigDataSent: 62147 ++ TCPHystartTrainDetect: 0 ++ TCPHystartTrainCwnd: 0 ++ TCPHystartDelayDetect: 1 ++ TCPHystartDelayCwnd: 56 ++ TCPACKSkippedSeq: 0 ++ TCPKeepAlive: 0 ++ TCPDelivered: 62436 ++ TCPAckCompressed: 0 ++ ++ ++IpExt: ++ InMcastPkts: 4489 ++ InBcastPkts: 8988 ++ InOctets: 79657243 ++ OutOctets: 18010239 ++ InMcastOctets: 143648 ++ InBcastOctets: 1267835 ++ InNoECTpkts: 765276 ++ ++ ++Kernel Interface table ++ Iface MTU RX-OK RX-ERR RX-DRP TX-OK TX-ERR TX-DRP ++ ens2 1500 2686851 0 0 64550 0 0 ++ ens3 1500 9615 0 0 0 0 0 ++ ens4 1500 9615 0 0 0 0 0 ++ lo 65536 69740 0 0 69740 0 0 ++ ++02:37:14 ++ ++Ip: ++ Forwarding: 2 ++ 765155 total packets received ++ 5 with invalid addresses ++ 0 forwarded ++ 0 incoming packets discarded ++ 106576 incoming packets delivered ++ 108129 requests sent out ++ 162 dropped because of missing route ++ ++ ++Icmp: ++ 615 ICMP messages received ++ 8 Input ICMP message failed ++ ICMP input histogram: ++ destination unreachable: 615 ++ 2 ICMP messages sent ++ 0 ICMP messages failed ++ ICMP input histogram: ++ Output destination unreachable: 2 ++ ++ ++IcmpMsg: ++ InType3: 615 ++ OutType0: 2 ++ ++ ++Tcp: ++ 316 active connections openings ++ 118 passive connection openings ++ 15 failed connection attempts ++ 6 connection resets received ++ 5 connections established ++ 106268 segments received ++ 109499 segments send out ++ 256 segments retransmited ++ 0 bad segments received. ++ 54 resets sent ++ ++ ++Udp: ++ 1381 packets received ++ 2 packets to unknown port received ++ 0 packet receive errors ++ 2274 packets sent ++ 0 receive buffer errors ++ 0 send buffer errors ++ ++ ++UdpLite: ++ 0 packets received ++ 0 packets to unknown port received ++ 0 packet receive errors ++ 0 packets sent ++ 0 receive buffer errors ++ 0 send buffer errors ++ 0 checksum errors ++ ++ ++TcpExt: ++ 1334 delayed acks sent ++ 0 delayed acks further delayed because of locked socket ++ 27349 packet headers predicted ++ 49685 predicted acknowledgments ++ TCPSackRecovery: 27 ++ Detected reordering 4 times using SACK ++ TCPDSACKUndo: 7 ++ TCPLostRetransmitt: 58 ++ TCPSackFailures: 0 ++ 134 fast retransmits ++ TCPTimeouts: 58 ++ TCPLossProbes: 67 ++ TCPLossProbeRecovery: 29 ++ TCPBacklogCoalesce: 16 ++ TCPDSACKOldSent: 105 ++ TCPDSACKOfoSent: 0 ++ TCPDSACKRecv: 28 ++ TCPDSACKOfoRecv: 3 ++ 21 connections aborted due to data ++ 0 connections reset due to early user close ++ 1 connections aborted due to timeout ++ TCPDSACKIgnoredNoUndo: 15 ++ TCPSackShifted: 136 ++ TCPSackMerged: 256 ++ TCPSackShiftFallback: 94 ++ IPReversePathFilter: 1 ++ TCPRcvCoalesce: 624 ++ TCPOFOQueue: 18 ++ TCPOFOMerge: 0 ++ TCPChallengeAck: 0 ++ TCPSynChallenge: 0 ++ TCPSpuriousRtxHostQueues: 0 ++ TCPAutoCorking: 26 ++ TCPSynRetrans: 16 ++ TCPOrigDataSent: 62149 ++ TCPHystartTrainDetect: 0 ++ TCPHystartTrainCwnd: 0 ++ TCPHystartDelayDetect: 1 ++ TCPHystartDelayCwnd: 56 ++ TCPACKSkippedSeq: 0 ++ TCPKeepAlive: 0 ++ TCPDelivered: 62438 ++ TCPAckCompressed: 0 ++ ++ ++IpExt: ++ InMcastPkts: 4489 ++ InBcastPkts: 8988 ++ InOctets: 79657618 ++ OutOctets: 18010450 ++ InMcastOctets: 143648 ++ InBcastOctets: 1267835 ++ InNoECTpkts: 765281 ++ ++ ++Kernel Interface table ++ Iface MTU RX-OK RX-ERR RX-DRP TX-OK TX-ERR TX-DRP ++ ens2 1500 2686856 0 0 64551 0 0 ++ ens3 1500 9615 0 0 0 0 0 ++ ens4 1500 9615 0 0 0 0 0 ++ lo 65536 69742 0 0 69742 0 0 ++ ++ ++pcp-netstat output : Display output of all the network protocol statistics ++02:37:13 ++ ++Ip: ++ Forwarding: 2 ++ 765150 total packets received ++ 5 with invalid addresses ++ 0 forwarded ++ 0 incoming packets discarded ++ 106573 incoming packets delivered ++ 108126 requests sent out ++ 162 dropped because of missing route ++ ++ ++Icmp: ++ 615 ICMP messages received ++ 8 Input ICMP message failed ++ ICMP input histogram: ++ destination unreachable: 615 ++ 2 ICMP messages sent ++ 0 ICMP messages failed ++ ICMP input histogram: ++ Output destination unreachable: 2 ++ ++ ++IcmpMsg: ++ InType3: 615 ++ OutType0: 2 ++ ++ ++Tcp: ++ 316 active connections openings ++ 118 passive connection openings ++ 15 failed connection attempts ++ 6 connection resets received ++ 5 connections established ++ 106265 segments received ++ 109496 segments send out ++ 256 segments retransmited ++ 0 bad segments received. ++ 54 resets sent ++ ++ ++Udp: ++ 1381 packets received ++ 2 packets to unknown port received ++ 0 packet receive errors ++ 2274 packets sent ++ 0 receive buffer errors ++ 0 send buffer errors ++ ++ ++UdpLite: ++ 0 packets received ++ 0 packets to unknown port received ++ 0 packet receive errors ++ 0 packets sent ++ 0 receive buffer errors ++ 0 send buffer errors ++ 0 checksum errors ++ ++ ++TcpExt: ++ 1334 delayed acks sent ++ 0 delayed acks further delayed because of locked socket ++ 27349 packet headers predicted ++ 49683 predicted acknowledgments ++ TCPSackRecovery: 27 ++ Detected reordering 4 times using SACK ++ TCPDSACKUndo: 7 ++ TCPLostRetransmitt: 58 ++ TCPSackFailures: 0 ++ 134 fast retransmits ++ TCPTimeouts: 58 ++ TCPLossProbes: 67 ++ TCPLossProbeRecovery: 29 ++ TCPBacklogCoalesce: 16 ++ TCPDSACKOldSent: 105 ++ TCPDSACKOfoSent: 0 ++ TCPDSACKRecv: 28 ++ TCPDSACKOfoRecv: 3 ++ 21 connections aborted due to data ++ 0 connections reset due to early user close ++ 1 connections aborted due to timeout ++ TCPDSACKIgnoredNoUndo: 15 ++ TCPSackShifted: 136 ++ TCPSackMerged: 256 ++ TCPSackShiftFallback: 94 ++ IPReversePathFilter: 1 ++ TCPRcvCoalesce: 624 ++ TCPOFOQueue: 18 ++ TCPOFOMerge: 0 ++ TCPChallengeAck: 0 ++ TCPSynChallenge: 0 ++ TCPSpuriousRtxHostQueues: 0 ++ TCPAutoCorking: 26 ++ TCPSynRetrans: 16 ++ TCPOrigDataSent: 62147 ++ TCPHystartTrainDetect: 0 ++ TCPHystartTrainCwnd: 0 ++ TCPHystartDelayDetect: 1 ++ TCPHystartDelayCwnd: 56 ++ TCPACKSkippedSeq: 0 ++ TCPKeepAlive: 0 ++ TCPDelivered: 62436 ++ TCPAckCompressed: 0 ++ ++ ++IpExt: ++ InMcastPkts: 4489 ++ InBcastPkts: 8988 ++ InOctets: 79657243 ++ OutOctets: 18010239 ++ InMcastOctets: 143648 ++ InBcastOctets: 1267835 ++ InNoECTpkts: 765276 ++ ++ ++02:37:14 ++ ++Ip: ++ Forwarding: 2 ++ 765155 total packets received ++ 5 with invalid addresses ++ 0 forwarded ++ 0 incoming packets discarded ++ 106576 incoming packets delivered ++ 108129 requests sent out ++ 162 dropped because of missing route ++ ++ ++Icmp: ++ 615 ICMP messages received ++ 8 Input ICMP message failed ++ ICMP input histogram: ++ destination unreachable: 615 ++ 2 ICMP messages sent ++ 0 ICMP messages failed ++ ICMP input histogram: ++ Output destination unreachable: 2 ++ ++ ++IcmpMsg: ++ InType3: 615 ++ OutType0: 2 ++ ++ ++Tcp: ++ 316 active connections openings ++ 118 passive connection openings ++ 15 failed connection attempts ++ 6 connection resets received ++ 5 connections established ++ 106268 segments received ++ 109499 segments send out ++ 256 segments retransmited ++ 0 bad segments received. ++ 54 resets sent ++ ++ ++Udp: ++ 1381 packets received ++ 2 packets to unknown port received ++ 0 packet receive errors ++ 2274 packets sent ++ 0 receive buffer errors ++ 0 send buffer errors ++ ++ ++UdpLite: ++ 0 packets received ++ 0 packets to unknown port received ++ 0 packet receive errors ++ 0 packets sent ++ 0 receive buffer errors ++ 0 send buffer errors ++ 0 checksum errors ++ ++ ++TcpExt: ++ 1334 delayed acks sent ++ 0 delayed acks further delayed because of locked socket ++ 27349 packet headers predicted ++ 49685 predicted acknowledgments ++ TCPSackRecovery: 27 ++ Detected reordering 4 times using SACK ++ TCPDSACKUndo: 7 ++ TCPLostRetransmitt: 58 ++ TCPSackFailures: 0 ++ 134 fast retransmits ++ TCPTimeouts: 58 ++ TCPLossProbes: 67 ++ TCPLossProbeRecovery: 29 ++ TCPBacklogCoalesce: 16 ++ TCPDSACKOldSent: 105 ++ TCPDSACKOfoSent: 0 ++ TCPDSACKRecv: 28 ++ TCPDSACKOfoRecv: 3 ++ 21 connections aborted due to data ++ 0 connections reset due to early user close ++ 1 connections aborted due to timeout ++ TCPDSACKIgnoredNoUndo: 15 ++ TCPSackShifted: 136 ++ TCPSackMerged: 256 ++ TCPSackShiftFallback: 94 ++ IPReversePathFilter: 1 ++ TCPRcvCoalesce: 624 ++ TCPOFOQueue: 18 ++ TCPOFOMerge: 0 ++ TCPChallengeAck: 0 ++ TCPSynChallenge: 0 ++ TCPSpuriousRtxHostQueues: 0 ++ TCPAutoCorking: 26 ++ TCPSynRetrans: 16 ++ TCPOrigDataSent: 62149 ++ TCPHystartTrainDetect: 0 ++ TCPHystartTrainCwnd: 0 ++ TCPHystartDelayDetect: 1 ++ TCPHystartDelayCwnd: 56 ++ TCPACKSkippedSeq: 0 ++ TCPKeepAlive: 0 ++ TCPDelivered: 62438 ++ TCPAckCompressed: 0 ++ ++ ++IpExt: ++ InMcastPkts: 4489 ++ InBcastPkts: 8988 ++ InOctets: 79657618 ++ OutOctets: 18010450 ++ InMcastOctets: 143648 ++ InBcastOctets: 1267835 ++ InNoECTpkts: 765281 ++ ++ ++ ++pcp-netstat output : Display output when filtered IP protocol ++02:37:13 ++ ++Ip: ++ Forwarding: 2 ++ 765150 total packets received ++ 5 with invalid addresses ++ 0 forwarded ++ 0 incoming packets discarded ++ 106573 incoming packets delivered ++ 108126 requests sent out ++ 162 dropped because of missing route ++ ++ ++IpExt: ++ InMcastPkts: 4489 ++ InBcastPkts: 8988 ++ InOctets: 79657243 ++ OutOctets: 18010239 ++ InMcastOctets: 143648 ++ InBcastOctets: 1267835 ++ InNoECTpkts: 765276 ++ ++ ++02:37:14 ++ ++Ip: ++ Forwarding: 2 ++ 765155 total packets received ++ 5 with invalid addresses ++ 0 forwarded ++ 0 incoming packets discarded ++ 106576 incoming packets delivered ++ 108129 requests sent out ++ 162 dropped because of missing route ++ ++ ++IpExt: ++ InMcastPkts: 4489 ++ InBcastPkts: 8988 ++ InOctets: 79657618 ++ OutOctets: 18010450 ++ InMcastOctets: 143648 ++ InBcastOctets: 1267835 ++ InNoECTpkts: 765281 ++ ++ ++ ++pcp-netstat output : Display output when filtered TCP protocol ++02:37:13 ++ ++Tcp: ++ 316 active connections openings ++ 118 passive connection openings ++ 15 failed connection attempts ++ 6 connection resets received ++ 5 connections established ++ 106265 segments received ++ 109496 segments send out ++ 256 segments retransmited ++ 0 bad segments received. ++ 54 resets sent ++ ++ ++TcpExt: ++ 1334 delayed acks sent ++ 0 delayed acks further delayed because of locked socket ++ 27349 packet headers predicted ++ 49683 predicted acknowledgments ++ TCPSackRecovery: 27 ++ Detected reordering 4 times using SACK ++ TCPDSACKUndo: 7 ++ TCPLostRetransmitt: 58 ++ TCPSackFailures: 0 ++ 134 fast retransmits ++ TCPTimeouts: 58 ++ TCPLossProbes: 67 ++ TCPLossProbeRecovery: 29 ++ TCPBacklogCoalesce: 16 ++ TCPDSACKOldSent: 105 ++ TCPDSACKOfoSent: 0 ++ TCPDSACKRecv: 28 ++ TCPDSACKOfoRecv: 3 ++ 21 connections aborted due to data ++ 0 connections reset due to early user close ++ 1 connections aborted due to timeout ++ TCPDSACKIgnoredNoUndo: 15 ++ TCPSackShifted: 136 ++ TCPSackMerged: 256 ++ TCPSackShiftFallback: 94 ++ IPReversePathFilter: 1 ++ TCPRcvCoalesce: 624 ++ TCPOFOQueue: 18 ++ TCPOFOMerge: 0 ++ TCPChallengeAck: 0 ++ TCPSynChallenge: 0 ++ TCPSpuriousRtxHostQueues: 0 ++ TCPAutoCorking: 26 ++ TCPSynRetrans: 16 ++ TCPOrigDataSent: 62147 ++ TCPHystartTrainDetect: 0 ++ TCPHystartTrainCwnd: 0 ++ TCPHystartDelayDetect: 1 ++ TCPHystartDelayCwnd: 56 ++ TCPACKSkippedSeq: 0 ++ TCPKeepAlive: 0 ++ TCPDelivered: 62436 ++ TCPAckCompressed: 0 ++ ++ ++02:37:14 ++ ++Tcp: ++ 316 active connections openings ++ 118 passive connection openings ++ 15 failed connection attempts ++ 6 connection resets received ++ 5 connections established ++ 106268 segments received ++ 109499 segments send out ++ 256 segments retransmited ++ 0 bad segments received. ++ 54 resets sent ++ ++ ++TcpExt: ++ 1334 delayed acks sent ++ 0 delayed acks further delayed because of locked socket ++ 27349 packet headers predicted ++ 49685 predicted acknowledgments ++ TCPSackRecovery: 27 ++ Detected reordering 4 times using SACK ++ TCPDSACKUndo: 7 ++ TCPLostRetransmitt: 58 ++ TCPSackFailures: 0 ++ 134 fast retransmits ++ TCPTimeouts: 58 ++ TCPLossProbes: 67 ++ TCPLossProbeRecovery: 29 ++ TCPBacklogCoalesce: 16 ++ TCPDSACKOldSent: 105 ++ TCPDSACKOfoSent: 0 ++ TCPDSACKRecv: 28 ++ TCPDSACKOfoRecv: 3 ++ 21 connections aborted due to data ++ 0 connections reset due to early user close ++ 1 connections aborted due to timeout ++ TCPDSACKIgnoredNoUndo: 15 ++ TCPSackShifted: 136 ++ TCPSackMerged: 256 ++ TCPSackShiftFallback: 94 ++ IPReversePathFilter: 1 ++ TCPRcvCoalesce: 624 ++ TCPOFOQueue: 18 ++ TCPOFOMerge: 0 ++ TCPChallengeAck: 0 ++ TCPSynChallenge: 0 ++ TCPSpuriousRtxHostQueues: 0 ++ TCPAutoCorking: 26 ++ TCPSynRetrans: 16 ++ TCPOrigDataSent: 62149 ++ TCPHystartTrainDetect: 0 ++ TCPHystartTrainCwnd: 0 ++ TCPHystartDelayDetect: 1 ++ TCPHystartDelayCwnd: 56 ++ TCPACKSkippedSeq: 0 ++ TCPKeepAlive: 0 ++ TCPDelivered: 62438 ++ TCPAckCompressed: 0 ++ ++ ++ ++pcp-netstat output : Display output when filtered UDP protocol ++02:37:13 ++ ++Udp: ++ 1381 packets received ++ 2 packets to unknown port received ++ 0 packet receive errors ++ 2274 packets sent ++ 0 receive buffer errors ++ 0 send buffer errors ++ ++ ++UdpLite: ++ 0 packets received ++ 0 packets to unknown port received ++ 0 packet receive errors ++ 0 packets sent ++ 0 receive buffer errors ++ 0 send buffer errors ++ 0 checksum errors ++ ++ ++02:37:14 ++ ++Udp: ++ 1381 packets received ++ 2 packets to unknown port received ++ 0 packet receive errors ++ 2274 packets sent ++ 0 receive buffer errors ++ 0 send buffer errors ++ ++ ++UdpLite: ++ 0 packets received ++ 0 packets to unknown port received ++ 0 packet receive errors ++ 0 packets sent ++ 0 receive buffer errors ++ 0 send buffer errors ++ 0 checksum errors ++ ++ ++ ++pcp-netstat output : Display output when filtered ICMP protocol ++02:37:13 ++ ++Icmp: ++ 615 ICMP messages received ++ 8 Input ICMP message failed ++ ICMP input histogram: ++ destination unreachable: 615 ++ 2 ICMP messages sent ++ 0 ICMP messages failed ++ ICMP input histogram: ++ Output destination unreachable: 2 ++ ++ ++IcmpMsg: ++ InType3: 615 ++ OutType0: 2 ++ ++ ++02:37:14 ++ ++Icmp: ++ 615 ICMP messages received ++ 8 Input ICMP message failed ++ ICMP input histogram: ++ destination unreachable: 615 ++ 2 ICMP messages sent ++ 0 ICMP messages failed ++ ICMP input histogram: ++ Output destination unreachable: 2 ++ ++ ++IcmpMsg: ++ InType3: 615 ++ OutType0: 2 ++ ++ ++ ++pcp-netstat output : Display output when asked for interface statistics ++02:37:13 ++ ++Kernel Interface table ++ Iface MTU RX-OK RX-ERR RX-DRP TX-OK TX-ERR TX-DRP ++ ens2 1500 2686851 0 0 64550 0 0 ++ ens3 1500 9615 0 0 0 0 0 ++ ens4 1500 9615 0 0 0 0 0 ++ lo 65536 69740 0 0 69740 0 0 ++ ++02:37:14 ++ ++Kernel Interface table ++ Iface MTU RX-OK RX-ERR RX-DRP TX-OK TX-ERR TX-DRP ++ ens2 1500 2686856 0 0 64551 0 0 ++ ens3 1500 9615 0 0 0 0 0 ++ ens4 1500 9615 0 0 0 0 0 ++ lo 65536 69742 0 0 69742 0 0 ++ +diff --git a/qa/archives/GNUmakefile b/qa/archives/GNUmakefile +index 424ef2513..5f46b07c1 100644 +--- a/qa/archives/GNUmakefile ++++ b/qa/archives/GNUmakefile +@@ -64,7 +64,7 @@ SCRIPTS = mk.diff mk.gap mk.mysql mk.schizo mk.foo+ \ + mk.numa mk.rewrite mk.eventrec mk.interpmark mk.multihost \ + mk.sample_expr mk.tzchange mk.arch-all \ + mk.atop mk.hotatop mk.atop-boot mk.atop-nvidia mk.atop-threads \ +- mk.log-derived mk.vmstat mk.rep mk.procsched \ ++ mk.log-derived mk.vmstat mk.rep mk.procsched mk.netstat \ + mk.ipcs mk.value-test mk.rank-pred mk.cputime mk.meminfo \ + mk.sample-labels mk.pmproxy mk.mmv.help mk.slabinfo + +diff --git a/qa/archives/mk.netstat b/qa/archives/mk.netstat +new file mode 100755 +index 000000000..a08440b6c +--- /dev/null ++++ b/qa/archives/mk.netstat +@@ -0,0 +1,124 @@ ++#!/bin/sh ++# ++# remake the pcp-netstat archive ... ++# this archive is intended to be checked in and not remade, this script is ++# simply a record of how it was created ++# ++ ++. /etc/pcp.env ++ ++tmp=/var/tmp/$$ ++rm -f $tmp.* ++trap "rm -f $tmp.*; exit 0" 0 1 2 3 15 ++ ++cat <>$tmp.config ++log mandatory on 1 sec { ++ network.tcp.activeopens ++ network.tcp.passiveopens ++ network.tcp.attemptfails ++ network.tcp.estabresets ++ network.tcpconn.established ++ network.tcp.insegs ++ network.tcp.outsegs ++ network.tcp.retranssegs ++ network.tcp.inerrs ++ network.tcp.outrsts ++ network.tcp.delayedacks ++ network.tcp.delayedacklocked ++ network.tcp.hphits ++ network.tcp.hpacks ++ network.tcp.sackrecovery ++ network.tcp.sackreorder ++ network.tcp.dsackundo ++ network.tcp.lostretransmit ++ network.tcp.sackfailures ++ network.tcp.fastretrans ++ network.tcp.timeouts ++ network.tcp.lossprobes ++ network.tcp.lossproberecovery ++ network.tcp.tcpbacklogcoalesce ++ network.tcp.dsackoldsent ++ network.tcp.dsackofosent ++ network.tcp.dsackrecv ++ network.tcp.dsackoforecv ++ network.tcp.abortondata ++ network.tcp.abortonclose ++ network.tcp.abortontimeout ++ network.tcp.dsackignorednoundo ++ network.tcp.sackshifted ++ network.tcp.sackmerged ++ network.tcp.sackshiftfallback ++ network.tcp.iprpfilter ++ network.tcp.rcvcoalesce ++ network.tcp.ofoqueue ++ network.tcp.ofomerge ++ network.tcp.challengeack ++ network.tcp.synchallenge ++ network.tcp.spuriousrtxhostqueues ++ network.tcp.autocorking ++ network.tcp.synretrans ++ network.tcp.origdatasent ++ network.tcp.tcphystarttraindetect ++ network.tcp.tcphystarttraincwnd ++ network.tcp.tcphystartdelaydetect ++ network.tcp.tcphystartdelaycwnd ++ network.tcp.tcpackskippedseq ++ network.tcp.tcpkeepalive ++ network.tcp.tcpdelivered ++ network.tcp.tcpackcompressed ++ network.ip.forwarding ++ network.ip.inreceives ++ network.ip.inaddrerrors ++ network.ip.forwdatagrams ++ network.ip.indiscards ++ network.ip.indelivers ++ network.ip.outrequests ++ network.ip.outnoroutes ++ network.ip.inmcastpkts ++ network.ip.inbcastpkts ++ network.ip.inoctets ++ network.ip.outoctets ++ network.ip.inmcastoctets ++ network.ip.inbcastoctets ++ network.ip.noectpkts ++ network.icmp.inmsgs ++ network.icmp.inerrors ++ network.icmp.indestunreachs ++ network.icmp.outmsgs ++ network.icmp.outerrors ++ network.icmp.outdestunreachs ++ network.icmpmsg.intype ++ network.icmpmsg.outtype ++ network.udp.indatagrams ++ network.udp.noports ++ network.udp.inerrors ++ network.udp.outdatagrams ++ network.udp.recvbuferrors ++ network.udp.sndbuferrors ++ network.udplite.indatagrams ++ network.udplite.noports ++ network.udplite.inerrors ++ network.udplite.outdatagrams ++ network.udplite.recvbuferrors ++ network.udplite.sndbuferrors ++ network.udplite.incsumerrors ++ network.interface.mtu ++ network.interface.in.packets ++ network.interface.in.errors ++ network.interface.in.drops ++ network.interface.out.packets ++ network.interface.out.errors ++ network.interface.out.drops ++} ++End-of-File ++ ++rm -f pcp-netstat.0 pcp-netstat.meta pcp-netstat.index ++ ++if pmlogger -s 10 -c $tmp.config pcp-netstat ++then ++ xz pcp-netstat.0 ++ xz pcp-netstat.meta ++else ++ echo "Argh: pmlogger failed ..." ++ cat pmlogger.log ++fi +diff --git a/qa/group b/qa/group +index 42863daa4..16e5d54b5 100644 +--- a/qa/group ++++ b/qa/group +@@ -369,6 +369,8 @@ tapestat + ipcs + meminfo + mpstat ++netstat ++ps + slabinfo + + # full test search +@@ -1981,8 +1983,9 @@ x11 + 1988 pcp meminfo python local + 1989 pcp slabinfo python local + 1990 pcp buddyinfo python local ++1991 pcp netstat python local + 2101 pmda.sockets local security + 2104 libpcp local security + 2100 pmproxy local security + 2105 libpcp pmcd local security pmcd.pdu + 4751 libpcp threads valgrind local pcp helgrind +diff --git a/src/pcp/GNUmakefile b/src/pcp/GNUmakefile +index 4f656ce5b..fb754e9c5 100644 +--- a/src/pcp/GNUmakefile ++++ b/src/pcp/GNUmakefile +@@ -27,6 +27,7 @@ SUBDIRS = \ + ipcs \ + meminfo \ + mpstat \ ++ netstat \ + numastat \ + pidstat \ + ps \ +diff --git a/src/pcp/netstat/GNUmakefile b/src/pcp/netstat/GNUmakefile +new file mode 100755 +index 000000000..1a7539f50 +--- /dev/null ++++ b/src/pcp/netstat/GNUmakefile +@@ -0,0 +1,44 @@ ++# ++# Copyright (c) 2023 Oracle and/or its affiliates. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++# This program is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation; either version 2 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++# for more details. ++# ++ ++TOPDIR = ../../.. ++include $(TOPDIR)/src/include/builddefs ++ ++TARGET = pcp-netstat ++SCRIPT = $(TARGET).py ++MAN_SECTION = 1 ++MAN_PAGES = $(TARGET).$(MAN_SECTION) ++MAN_DEST = $(PCP_MAN_DIR)/man$(MAN_SECTION) ++ ++default: $(SCRIPT) $(MAN_PAGES) ++ ++include $(BUILDRULES) ++ ++install: default ++ifeq "$(HAVE_PYTHON)" "true" ++ $(INSTALL) -m 755 $(SCRIPT) $(PCP_BINADM_DIR)/$(TARGET) ++ @$(INSTALL_MAN) ++endif ++ ++default_pcp : default ++ ++install_pcp : install ++ ++check:: $(SCRIPT) ++ $(PYLINT) $^ ++ ++check :: $(MAN_PAGES) ++ $(MANLINT) $^ ++ +diff --git a/src/pcp/netstat/pcp-netstat.1 b/src/pcp/netstat/pcp-netstat.1 +new file mode 100755 +index 000000000..da4e3a356 +--- /dev/null ++++ b/src/pcp/netstat/pcp-netstat.1 +@@ -0,0 +1,84 @@ ++'\"! tbl | mmdoc ++'\"macro stdmacro ++.\" ++.\" Copyright (c) 2023 Oracle and/or its affiliates. ++.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++.\" ++.\" This program is free software; you can redistribute it and/or modify it ++.\" under the terms of the GNU General Public License as published by the ++.\" Free Software Foundation; either version 2 of the License, or (at your ++.\" option) any later version. ++.\" ++.\" This program is distributed in the hope that it will be useful, but ++.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++.\" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++.\" for more details. ++.\" ++.TH PCP-NETSTAT 1 "PCP" "Performance Co-Pilot" ++.SH NAME ++\f3pcp-netstat\f1 \- Report statistics for different network protocols and network interfaces. ++.SH SYNOPSIS ++\f3pcp\f1 ++[\f2pcp\ options\f1] ++\f3netstat\f1 ++[\f3\--statistics\f1] ++[\f3\-p\f1 \f2[TCP|IP|UDP|ICMP]\f1] ++[\f3\-i\f1] ++[\f3\-s\f1 \f2samples\f1] ++[\f3\-a\f1 \f2archive\f1] ++[\f3\-S\f1 \f2start_time\f1] ++[\f3\-T\f1 \f2end_time\f1] ++ ++.SH DESCRIPTION ++The ++.B pcp-netstat ++command is used for viewing the different kinds of statistics related to the network protocols and the network interfaces. This tool is useful for checking the status of your network interfaces, network connections and for troubleshooting network issues. ++This tool can also be used to analyze network statistics for all available protocols, including TCP, UDP, ICMP, and IP protocols. ++.PP ++By default ++.B pcp-netstat ++reports live data for the local host. It has the capabilities to analyze the data on the archives as well. ++.SH OPTIONS ++.TP ++\fB\-\-statistics\fP ++shows output similar to netstat -s, which displays summary statistics for each protocol ++.TP ++\fB\-i\fP ++shows output similar to netstat -i -a -n, which displays a table of all network interfaces ++.TP ++\fB\-p\fP, \fB\-\-TCP|IP|UDP|ICMP\fP ++filter network statistics specific to a protocol ++.TP ++\fB\-a\fP, \fB\-\-archive\fP ++Fetch /proc/netstat for a specified archive file ++.TP ++\fB\-s\fP, \fB\-\-samples\fP ++Get the network statistics for specified number of samples count ++.TP ++\fB\-S\fP, \fB\-\-START TIME\fP ++Filter the samples from the archive from the given time ++.TP ++\fB\-T\fP, \fB\-\-END TIME\fP ++Filter the samples from the archive till the given time ++.TP ++\fB\-V\fR, \fB\-\-version\fR ++Display version number and exit. ++.TP ++\fB\-?\fR, \fB\-\-help\fR ++Display usage message and exit. ++.SH PCP ENVIRONMENT ++Environment variables with the prefix \fBPCP_\fP are used to parameterize ++the file and directory names used by PCP. ++On each installation, the ++file \fI/etc/pcp.conf\fP contains the local values for these variables. ++The \fB$PCP_CONF\fP variable may be used to specify an alternative ++configuration file, as described in \fBpcp.conf\fP(5). ++.PP ++For environment variables affecting PCP tools, see \fBpmGetOptions\fP(3). ++.SH SEE ALSO ++.BR PCPIntro (1), ++.BR pcp (1), ++.BR pmParseInterval (3) ++and ++.BR environ (7). ++ +diff --git a/src/pcp/netstat/pcp-netstat.py b/src/pcp/netstat/pcp-netstat.py +new file mode 100755 +index 000000000..e42f1b0dc +--- /dev/null ++++ b/src/pcp/netstat/pcp-netstat.py +@@ -0,0 +1,463 @@ ++#!/usr/bin/env pmpython ++# ++# Copyright (c) 2023 Oracle and/or its affiliates. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++# This program is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation; either version 2 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++# for more details. ++# ++# pylint: disable=bad-whitespace,too-many-arguments,too-many-lines, bad-continuation, line-too-long ++# pylint: disable=redefined-outer-name,unnecessary-lambda, wildcard-import, unused-wildcard-import ++# ++ ++import sys ++import time ++from pcp import pmapi ++from pcp import pmcc ++from collections import OrderedDict ++ ++IFF_UP = 1<<0 ++IFF_BROADCAST = 1<<1 ++IFF_DEBUG = 1<<2 ++IFF_LOOPBACK = 1<<3 ++IFF_POINTOPOINT = 1<<4 ++IFF_NOTRAILERS = 1<<5 ++IFF_RUNNING = 1<<6 ++IFF_NOARP = 1<<7 ++IFF_PROMISC = 1<<8 ++IFF_ALLMULTI = 1<<9 ++IFF_MASTER = 1<<10 ++IFF_SLAVE = 1<<11 ++IFF_MULTICAST = 1<<12 ++IFF_PORTSEL = 1<<13 ++IFF_AUTOMEDIA = 1<<14 ++IFF_DYNAMIC = 1<<15 ++IFF_LOWER_UP = 1<<16 ++IFF_DORMANT = 1<<17 ++IFF_ECHO = 1<<18 ++ ++TCP_METRICS = ["network.tcp.activeopens", ++ "network.tcp.passiveopens", ++ "network.tcp.attemptfails", ++ "network.tcp.estabresets", ++ "network.tcpconn.established", ++ "network.tcp.insegs", ++ "network.tcp.outsegs", ++ "network.tcp.retranssegs", ++ "network.tcp.inerrs", ++ "network.tcp.outrsts"] ++ ++TCP_METRICS_DESC = [ ++ "__ active connections openings", ++ "__ passive connection openings", ++ "__ failed connection attempts", ++ "__ connection resets received", ++ "__ connections established", ++ "__ segments received", ++ "__ segments send out", ++ "__ segments retransmited", ++ "__ bad segments received.", ++ "__ resets sent"] ++ ++TCP_EXT_METRICS = [ ++ # tcpsock.finishedtimewait.fast_timer, ++ "network.tcp.delayedacks", ++ "network.tcp.delayedacklocked", ++ # Quick ack mode was activated __ times, ++ "network.tcp.hphits", ++ # acknowledgments not containing data payload received, ++ "network.tcp.hpacks", ++ "network.tcp.sackrecovery", ++ "network.tcp.sackreorder", ++ "network.tcp.dsackundo", ++ # congestion windows recovered without slow start after partial ack, ++ "network.tcp.lostretransmit", ++ "network.tcp.sackfailures", ++ "network.tcp.fastretrans", ++ "network.tcp.timeouts", ++ "network.tcp.lossprobes", ++ "network.tcp.lossproberecovery", ++ # "TCPDSACKRecv", ++ "network.tcp.tcpbacklogcoalesce", ++ "network.tcp.dsackoldsent", ++ "network.tcp.dsackofosent", ++ "network.tcp.dsackrecv", ++ "network.tcp.dsackoforecv", ++ "network.tcp.abortondata", ++ "network.tcp.abortonclose", ++ "network.tcp.abortontimeout", ++ "network.tcp.dsackignorednoundo", ++ # "TCPSpuriousRTOs", ++ "network.tcp.sackshifted", ++ "network.tcp.sackmerged", ++ "network.tcp.sackshiftfallback", ++ "network.tcp.iprpfilter", ++ "network.tcp.rcvcoalesce", ++ "network.tcp.ofoqueue", ++ "network.tcp.ofomerge", ++ "network.tcp.challengeack", ++ "network.tcp.synchallenge", ++ "network.tcp.spuriousrtxhostqueues", ++ "network.tcp.autocorking", ++ # "TCPFromZeroWindowAdv: __", ++ # "TCPToZeroWindowAdv: __", ++ # "TCPWantZeroWindowAdv: __", ++ "network.tcp.synretrans", ++ "network.tcp.origdatasent", ++ "network.tcp.tcphystarttraindetect", ++ "network.tcp.tcphystarttraincwnd", ++ "network.tcp.tcphystartdelaydetect", ++ "network.tcp.tcphystartdelaycwnd", ++ "network.tcp.tcpackskippedseq", ++ "network.tcp.tcpkeepalive", ++ "network.tcp.tcpdelivered", ++ "network.tcp.tcpackcompressed"] ++ ++TCP_EXT_METRICS_DESC = [ ++ # "__ TCP sockets finished time wait in fast timer", ++ "__ delayed acks sent", ++ "__ delayed acks further delayed because of locked socket", ++ # "Quick ack mode was activated __ times" , ++ "__ packet headers predicted", ++ # "__ acknowledgments not containing data payload received", ++ "__ predicted acknowledgments", ++ "TCPSackRecovery: __", ++ "Detected reordering __ times using SACK", ++ "TCPDSACKUndo: __", ++ # "__ congestion windows recovered without slow start after partial ack", ++ "TCPLostRetransmitt: __", ++ "TCPSackFailures: __", ++ "__ fast retransmits", ++ "TCPTimeouts: __", ++ "TCPLossProbes: __", ++ "TCPLossProbeRecovery: __", ++ # "TCPSackRecoveryFail: __" ++ "TCPBacklogCoalesce: __", ++ "TCPDSACKOldSent: __", ++ "TCPDSACKOfoSent: __", ++ "TCPDSACKRecv: __", ++ "TCPDSACKOfoRecv: __", ++ "__ connections aborted due to data", ++ "__ connections reset due to early user close", ++ "__ connections aborted due to timeout", ++ "TCPDSACKIgnoredNoUndo: __", ++ # "TCPSpuriousRTOs: __", ++ "TCPSackShifted: __", ++ "TCPSackMerged: __", ++ "TCPSackShiftFallback: __", ++ "IPReversePathFilter: __", ++ "TCPRcvCoalesce: __", ++ "TCPOFOQueue: __", ++ "TCPOFOMerge: __", ++ "TCPChallengeAck: __", ++ "TCPSynChallenge: __", ++ "TCPSpuriousRtxHostQueues: __", ++ "TCPAutoCorking: __", ++ # "TCPFromZeroWindowAdv: __", ++ # "TCPToZeroWindowAdv: __", ++ # "TCPWantZeroWindowAdv: __", ++ "TCPSynRetrans: __", ++ "TCPOrigDataSent: __", ++ "TCPHystartTrainDetect: __", ++ "TCPHystartTrainCwnd: __", ++ "TCPHystartDelayDetect: __", ++ "TCPHystartDelayCwnd: __", ++ "TCPACKSkippedSeq: __", ++ "TCPKeepAlive: __", ++ "TCPDelivered: __", ++ "TCPAckCompressed: __"] ++ ++IP_METRICS = [ ++ "network.ip.forwarding", ++ "network.ip.inreceives", ++ "network.ip.inaddrerrors", ++ "network.ip.forwdatagrams", ++ "network.ip.indiscards", ++ "network.ip.indelivers", ++ "network.ip.outrequests", ++ "network.ip.outnoroutes"] ++ ++IP_METRICS_DESC = [ ++ "Forwarding: __", ++ "__ total packets received", ++ "__ with invalid addresses", ++ "__ forwarded", ++ "__ incoming packets discarded", ++ "__ incoming packets delivered", ++ "__ requests sent out", ++ "__ dropped because of missing route"] ++ ++IP_EXT_METRICS = [ ++ "network.ip.inmcastpkts", ++ "network.ip.inbcastpkts", ++ "network.ip.inoctets", ++ "network.ip.outoctets", ++ "network.ip.inmcastoctets", ++ "network.ip.inbcastoctets", ++ "network.ip.noectpkts"] ++ ++IP_EXT_METRICS_DESC = [ ++ "InMcastPkts: __", ++ "InBcastPkts: __", ++ "InOctets: __", ++ "OutOctets: __", ++ "InMcastOctets: __", ++ "InBcastOctets: __", ++ "InNoECTpkts: __"] ++ ++ICMP_METRICS = [ ++ "network.icmp.inmsgs", ++ "network.icmp.inerrors", ++ "network.icmp.indestunreachs", ++ # "echo requests", ++ "network.icmp.outmsgs", ++ "network.icmp.outerrors", ++ "network.icmp.outdestunreachs"] ++ # "echo replies"] ++ ++ICMP_METRICS_DESC = [ ++ "__ ICMP messages received", ++ "__ Input ICMP message failed", ++ "ICMP input histogram:\n\t\tdestination unreachable: __", ++ # "\techo requests", ++ "__ ICMP messages sent", ++ "__ ICMP messages failed", ++ "ICMP input histogram:\n\t\tOutput destination unreachable: __"] ++ # "\techo replies"] ++ ++ICMP_MSG_METRICS = [ ++ "network.icmpmsg.intype", ++ # "network.icmpmsg.intype8", ++ "network.icmpmsg.outtype"] ++ # "network.icmpmsg.outtype3"] ++ ++ICMP_MSG_METRICS_DESC = [ ++ "\tInType3: __", ++ # "\tInType8: __", ++ "\tOutType0: __"] ++ # "\tOutType3: __"] ++ ++UDP_METRICS = [ ++ "network.udp.indatagrams", ++ "network.udp.noports", ++ "network.udp.inerrors", ++ "network.udp.outdatagrams", ++ "network.udp.recvbuferrors", ++ "network.udp.sndbuferrors"] ++ # "network.udp.ignoredmulti"] ++ ++UDP_METRICS_DESC = [ ++ "__ packets received", ++ "__ packets to unknown port received", ++ "__ packet receive errors", ++ "__ packets sent", ++ "__ receive buffer errors", ++ "__ send buffer errors"] ++ #"IgnoredMulti: __"] ++ ++UDP_LITE_METRICS = [ ++ "network.udplite.indatagrams", ++ "network.udplite.noports", ++ "network.udplite.inerrors", ++ "network.udplite.outdatagrams", ++ "network.udplite.recvbuferrors", ++ "network.udplite.sndbuferrors", ++ "network.udplite.incsumerrors"] ++ ++UDP_LITE_METRICS_DESC = [ ++ "__ packets received", ++ "__ packets to unknown port received", ++ "__ packet receive errors", ++ "__ packets sent", ++ "__ receive buffer errors", ++ "__ send buffer errors", ++ "__ checksum errors"] ++ ++IFACE_METRICS = [ ++ "network.interface.mtu", ++ "network.interface.in.packets", ++ "network.interface.in.errors", ++ "network.interface.in.drops", ++ # "ovr __ (override)", ++ "network.interface.out.packets", ++ "network.interface.out.errors", ++ "network.interface.out.drops"] ++ # "ovr __ (override)", ++ # "network.interface.type"] ++ # "network.interface.running", ++ # "network.interface.up"] ++ ++METRICS = IP_METRICS + ICMP_METRICS + ICMP_MSG_METRICS + TCP_METRICS + UDP_METRICS + UDP_LITE_METRICS + TCP_EXT_METRICS + IP_EXT_METRICS ++METRICS_DESC = IP_METRICS_DESC + ICMP_METRICS_DESC + ICMP_MSG_METRICS_DESC + TCP_METRICS_DESC + UDP_METRICS_DESC + UDP_LITE_METRICS_DESC + TCP_EXT_METRICS_DESC + IP_EXT_METRICS_DESC ++ ++METRICS_DICT = OrderedDict() ++ ++METRICS_DICT["Ip_METRICS"] = [IP_METRICS, IP_METRICS_DESC] ++METRICS_DICT["Icmp_METRICS"] = [ICMP_METRICS, ICMP_METRICS_DESC] ++METRICS_DICT["IcmpMsg_METRICS"] = [ICMP_MSG_METRICS, ICMP_MSG_METRICS_DESC] ++METRICS_DICT["Tcp_METRICS"] = [TCP_METRICS, TCP_METRICS_DESC] ++METRICS_DICT["Udp_METRICS"] = [UDP_METRICS, UDP_METRICS_DESC] ++METRICS_DICT["UdpLite_METRICS"] = [UDP_LITE_METRICS, UDP_LITE_METRICS_DESC] ++METRICS_DICT["TcpExt_METRICS"] = [TCP_EXT_METRICS, TCP_EXT_METRICS_DESC] ++METRICS_DICT["IpExt_METRICS"] = [IP_EXT_METRICS, IP_EXT_METRICS_DESC] ++ ++MISSING_METRICS = [] ++ ++class NestatReport(pmcc.MetricGroupPrinter): ++ def print_metric(self, group, metrics,metrics_desc): ++ idx = 0 ++ ++ for metric in metrics: ++ if metric in MISSING_METRICS: ++ metric_val_str = metrics_desc[idx].replace("__", "NA") ++ print("\t%s" % (metric_val_str)) ++ ++ idx += 1 ++ continue ++ ++ try: ++ val = group[metric].netValues[0][2] ++ except IndexError: ++ metric_val_str = metrics_desc[idx].replace("__", "NA") ++ print("\t%s" % (metric_val_str)) ++ idx += 1 ++ continue ++ metric_val_str = metrics_desc[idx].replace("__", str(val)) ++ # metric_val_str = metric_val_str ++ print("\t%s" % (metric_val_str)) ++ ++ idx += 1 ++ print("\n") ++ ++ def report(self, manager): ++ group = manager["netstat"] ++ ++ opts.pmGetOptionSamples() ++ ++ t_s = group.contextCache.pmLocaltime(int(group.timestamp)) ++ time_string = time.strftime(NetstatOptions.timefmt, t_s.struct_time()) ++ print("%s\n" % time_string) ++ ++ if NetstatOptions.all_stats_flag is False and NetstatOptions.filter_protocol_flag is False and NetstatOptions.filter_iface_flag is False: ++ NetstatOptions.all_stats_flag = True ++ NetstatOptions.filter_iface_flag = True ++ ++ if NetstatOptions.all_stats_flag: ++ for metric_dict in METRICS_DICT.items(): ++ print("%s:" % metric_dict[0][:-8]) ++ self.print_metric(group, metric_dict[1][0], metric_dict[1][1]) ++ ++ if NetstatOptions.filter_protocol_flag: ++ protocol = NetstatOptions.filter_protocol ++ ++ for metric_dict in METRICS_DICT.items(): ++ if protocol.lower() in metric_dict[0].lower(): ++ print("%s:" % metric_dict[0][:-8]) ++ self.print_metric(group, metric_dict[1][0], metric_dict[1][1]) ++ ++ if NetstatOptions.filter_iface_flag: ++ ifstats = {} ++ print("Kernel Interface table") ++ for metric in IFACE_METRICS: ++ idx = 0 ++ try: ++ val = group[metric].netValues ++ except IndexError: ++ idx += 1 ++ continue ++ ++ for elem in val: ++ if elem[1] not in ifstats: ++ ifstats[elem[1]] = [] ++ ifstats[elem[1]].append(str(elem[2])) ++ ++ print("%10s %10s %10s %10s %10s %10s %10s %10s"%("Iface", "MTU", "RX-OK", "RX-ERR", "RX-DRP", "TX-OK", "TX-ERR", "TX-DRP")) ++ ++ ifstats_str = "" ++ for intf in sorted(ifstats): ++ if_row = "" ++ if_row += "%10s " % intf ++ ++ # idx = 0 ++ for idx in range(len(ifstats[intf])): ++ ele = ifstats[intf][idx] ++ ++ if_row += "%10s " % str(ele) ++ ++ ifstats_str += if_row + "\n" ++ ++ print(ifstats_str) ++ ++class NetstatOptions(pmapi.pmOptions): ++ context = None ++ timefmt = "%H:%M:%S" ++ samples = 0 ++ all_stats_flag = False ++ filter_protocol_flag = False ++ filter_protocol = None ++ filter_iface_flag = False ++ ++ def override(self, opt): ++ if opt == 'p': ++ return 1 ++ return 0 ++ ++ def extraOptions(self, opt, optarg, index): ++ ++ if opt == "statistics": ++ NetstatOptions.all_stats_flag = True ++ ++ elif opt == 'p': ++ NetstatOptions.filter_protocol_flag = True ++ try: ++ if optarg is not None: ++ if optarg in ["TCP", "IP", "UDP", "ICMP"]: ++ NetstatOptions.filter_protocol = str(optarg) ++ except ValueError: ++ print("Invalid command Id List: use comma separated pids without whitespaces") ++ sys.exit(1) ++ ++ elif opt == 'i': ++ NetstatOptions.filter_iface_flag = True ++ ++ def __init__(self): ++ pmapi.pmOptions.__init__(self, "a:i?:s:S:T:p:z:") ++ self.pmSetLongOptionStart() ++ self.pmSetLongOptionFinish() ++ self.pmSetLongOption("statistics", 0, "", "","shows output similar to netstat -s, which displays summary statistics for each protocol") ++ self.pmSetLongOption("", 0, "i", "","shows output similar to netstat -i -a -n, which displays a table of all network interfaces") ++ self.pmSetLongOption("", 1, "p", "[TCP|IP|UDP|ICMP]","filter stats specific to a protocol") ++ self.pmSetOptionCallback(self.extraOptions) ++ self.pmSetOverrideCallback(self.override) ++ self.pmSetLongOptionHelp() ++ ++if __name__ == '__main__': ++ try: ++ opts = NetstatOptions() ++ mngr = pmcc.MetricGroupManager.builder(opts,sys.argv) ++ NetstatOptions.context = mngr.type ++ missing = mngr.checkMissingMetrics(METRICS) ++ if missing is not None: ++ for missing_metric in missing: ++ METRICS.remove(missing_metric) ++ MISSING_METRICS.append(missing_metric) ++ ++ mngr["netstat"] = METRICS + IFACE_METRICS ++ mngr.printer = NestatReport() ++ sts = mngr.run() ++ sys.exit(sts) ++ ++ except pmapi.pmErr as error: ++ sys.stderr.write("%s %s\n"%(error.progname(),error.message())) ++ except pmapi.pmUsageErr as usage: ++ usage.message() ++ sys.exit(1) ++ except KeyboardInterrupt: ++ pass +-- +2.39.3 diff --git a/SOURCES/1010-pcp-zoneinfo-Initial-implemenation.patch b/SOURCES/1010-pcp-zoneinfo-Initial-implemenation.patch new file mode 100644 index 0000000..e38d214 --- /dev/null +++ b/SOURCES/1010-pcp-zoneinfo-Initial-implemenation.patch @@ -0,0 +1,1710 @@ +From 2103f7b8e6cda6b4d1074d9310e5a0135a2aac3b Mon Sep 17 00:00:00 2001 +From: Sagar Sagar +Date: Mon, 4 Sep 2023 19:28:55 +0000 +Subject: [PATCH] pcp-zoneinfo:Initial implemenation of pcp-zoneinfo tool + +This patch is for backward porting of upstream patches +present in the given upstream links to introduce the +pcp-zoneinfo tool into the pcp. + +It gives the output like the /proc/zoneinfo + +upstream commit-links:- + 658b630be179c366f3bed3d0285ce601f4be2eb6 + 14e882ad36fa7dda6362b8e6b020af35dbc897b0 + +Orabug: 35660927 +Signed-off-by: Sagar Sagar +--- + qa/1973 | 50 ++ + qa/1973.out | 931 +++++++++++++++++++++++++++++++ + qa/archives/GNUmakefile | 2 +- + qa/archives/mk.zoneinfo | 106 ++++ + qa/group | 1 + + src/pcp/GNUmakefile | 2 +- + src/pcp/zoneinfo/GNUmakefile | 44 ++ + src/pcp/zoneinfo/pcp-zoneinfo.1 | 153 +++++ + src/pcp/zoneinfo/pcp-zoneinfo.py | 314 +++++++++++ + 9 files changed, 1601 insertions(+), 2 deletions(-) + create mode 100755 qa/1973 + create mode 100644 qa/1973.out + create mode 100755 qa/archives/mk.zoneinfo + create mode 100755 src/pcp/zoneinfo/GNUmakefile + create mode 100755 src/pcp/zoneinfo/pcp-zoneinfo.1 + create mode 100755 src/pcp/zoneinfo/pcp-zoneinfo.py + +diff --git a/qa/1973 b/qa/1973 +new file mode 100755 +index 000000000..dc49e851c +--- /dev/null ++++ b/qa/1973 +@@ -0,0 +1,50 @@ ++#!/bin/sh ++# PCP QA Test No. 1973 ++# Exercise various pcp-zoneinfo(1) command options. ++# ++# Copyright (c) 2023 Oracle and/or its affiliates. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++ ++if [ $# -eq 0 ] ++then ++ seq=`basename $0` ++ echo "QA output created by $seq" ++else ++ # use $seq from caller, unless not set ++ [ -n "$seq" ] || seq=`basename $0` ++ echo "QA output created by `basename $0` $*" ++fi ++ ++# get standard environment, filters and checks ++. ./common.python ++ ++__version=`$python --version 2>&1 | sed -e 's/Python //'` ++case "$__version" ++in ++ 2.7.5) _notrun "Python $__version reports start seconds off-by one for some processes" ++ ;; ++esac ++ ++status=1 # failure is the default! ++$sudo rm -rf $tmp.* $seq.full ++trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15 ++ ++pcp_zoneinfo="$PCP_BINADM_DIR/pcp-zoneinfo" ++test -x $pcp_zoneinfo || _notrun "No pcp-zoneinfo(1) installed" ++pcp_zoneinfo="$python $pcp_zoneinfo" ++ ++# real QA test starts here ++echo && echo pcp-zoneinfo output : Display default output ++PCP_ARCHIVE="archives/pcp-zoneinfo" PCP_HOSTZONE=1 $pcp_zoneinfo ++ ++archive_first="-a archives/pcp-zoneinfo -z -O +1" ++ ++echo && echo pcp-zoneinfo output : Display output ++pcp $archive_first zoneinfo ++ ++echo && echo pcp-zoneinfo output : Display output when given specified number of samples ++pcp $archive_first zoneinfo -s 2 ++ ++status=0 ++exit +diff --git a/qa/1973.out b/qa/1973.out +new file mode 100644 +index 000000000..2fa260a74 +--- /dev/null ++++ b/qa/1973.out +@@ -0,0 +1,931 @@ ++QA output created by 1973 ++ ++pcp-zoneinfo output : Display default output ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/23/23 x86_64 (4 CPU) ++TimeStamp = 00:25:18 ++NODE 0, per-node status ++ nr_inactive_anon 35933 ++ nr_active_anon 533154 ++ nr_inactive_file 760769 ++ nr_active_file 513583 ++ nr_unevictable 3105 ++ nr_slab_reclaimable 140646 ++ nr_slab_unreclaimable 54046 ++ nr_isolated_anon 0 ++ nr_isolated_file 0 ++ nr_anon_pages 523670 ++ nr_mapped 173358 ++ nr_file_pages 1313502 ++ nr_dirty 35 ++ nr_writeback 0 ++ nr_writeback_temp 0 ++ nr_shmem 36501 ++ nr_shmem_hugepages 0 ++ nr_shmem_pmdmapped 0 ++ nr_file_hugepages 0 ++ nr_file_pmdmapped 0 ++ nr_anon_transparent_hugepages 582 ++ nr_unstable 0 ++ nr_vmscan_write 0 ++ nr_vmscan_immediate_reclaim 0 ++ nr_dirtied 594934 ++ nr_written 572571 ++ nr_kernel_misc_reclaimable 0 ++Node 0, zone Normal ++ pages free 2149304 ++ min 14245 ++ low 18566 ++ high 22887 ++ spanned 4417792 ++ present 4417792 ++ managed 4321635 ++ protection [0, 0, 0, 0, 0] ++ nr_free_pages 0 ++ nr_zone_inactive_anon 35933 ++ nr_zone_active_anon 533154 ++ nr_zone_inactive_file 760769 ++ nr_zone_active_file 513583 ++ nr_zone_unevictable 3105 ++ nr_zone_write_pending 35 ++ nr_mlock 3105 ++ nr_page_table_pages 15186 ++ nr_kernel_stack 12616 ++ nr_bounce 0 ++ nr_zspages 0 ++ nr_free_cma 0 ++ numa_hit 87458144 ++ numa_miss 0 ++ numa_foreign 0 ++ numa_interleave 28603 ++ numa_local 87458144 ++ numa_other 0 ++Node 0, zone DMA ++ pages free 3840 ++ min 12 ++ low 15 ++ high 18 ++ spanned 4095 ++ present 3998 ++ managed 3840 ++ protection [0, 3125, 20006, 20006, 20006] ++ nr_free_pages 0 ++ nr_zone_inactive_anon 0 ++ nr_zone_active_anon 0 ++ nr_zone_inactive_file 0 ++ nr_zone_active_file 0 ++ nr_zone_unevictable 0 ++ nr_zone_write_pending 0 ++ nr_mlock 0 ++ nr_page_table_pages 0 ++ nr_kernel_stack 0 ++ nr_bounce 0 ++ nr_zspages 0 ++ nr_free_cma 0 ++ numa_hit 0 ++ numa_miss 0 ++ numa_foreign 0 ++ numa_interleave 0 ++ numa_local 0 ++ numa_other 0 ++Node 0, zone DMA32 ++ pages free 814439 ++ min 2637 ++ low 3437 ++ high 4237 ++ spanned 1044480 ++ present 913392 ++ managed 815354 ++ protection [0, 0, 16881, 16881, 16881] ++ nr_free_pages 0 ++ nr_zone_inactive_anon 0 ++ nr_zone_active_anon 0 ++ nr_zone_inactive_file 0 ++ nr_zone_active_file 0 ++ nr_zone_unevictable 0 ++ nr_zone_write_pending 0 ++ nr_mlock 0 ++ nr_page_table_pages 0 ++ nr_kernel_stack 0 ++ nr_bounce 0 ++ nr_zspages 0 ++ nr_free_cma 0 ++ numa_hit 13 ++ numa_miss 0 ++ numa_foreign 0 ++ numa_interleave 0 ++ numa_local 13 ++ numa_other 0 ++Node 0, zone Device ++ pages free 0 ++ min 0 ++ low 0 ++ high 0 ++ spanned 0 ++ present 0 ++ managed 0 ++ protection [0, 0, 0, 0, 0] ++Node 0, zone Movable ++ pages free 0 ++ min 0 ++ low 0 ++ high 0 ++ spanned 0 ++ present 0 ++ managed 0 ++ protection [0, 0, 0, 0, 0] ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/23/23 x86_64 (4 CPU) ++TimeStamp = 00:25:21 ++NODE 0, per-node status ++ nr_inactive_anon 35933 ++ nr_active_anon 533154 ++ nr_inactive_file 760769 ++ nr_active_file 513583 ++ nr_unevictable 3105 ++ nr_slab_reclaimable 140646 ++ nr_slab_unreclaimable 54046 ++ nr_isolated_anon 0 ++ nr_isolated_file 0 ++ nr_anon_pages 523670 ++ nr_mapped 173358 ++ nr_file_pages 1313502 ++ nr_dirty 35 ++ nr_writeback 0 ++ nr_writeback_temp 0 ++ nr_shmem 36501 ++ nr_shmem_hugepages 0 ++ nr_shmem_pmdmapped 0 ++ nr_file_hugepages 0 ++ nr_file_pmdmapped 0 ++ nr_anon_transparent_hugepages 582 ++ nr_unstable 0 ++ nr_vmscan_write 0 ++ nr_vmscan_immediate_reclaim 0 ++ nr_dirtied 594934 ++ nr_written 572571 ++ nr_kernel_misc_reclaimable 0 ++Node 0, zone Normal ++ pages free 2149304 ++ min 14245 ++ low 18566 ++ high 22887 ++ spanned 4417792 ++ present 4417792 ++ managed 4321635 ++ protection [0, 0, 0, 0, 0] ++ nr_free_pages 0 ++ nr_zone_inactive_anon 35933 ++ nr_zone_active_anon 533154 ++ nr_zone_inactive_file 760769 ++ nr_zone_active_file 513583 ++ nr_zone_unevictable 3105 ++ nr_zone_write_pending 35 ++ nr_mlock 3105 ++ nr_page_table_pages 15186 ++ nr_kernel_stack 12616 ++ nr_bounce 0 ++ nr_zspages 0 ++ nr_free_cma 0 ++ numa_hit 87458144 ++ numa_miss 0 ++ numa_foreign 0 ++ numa_interleave 28603 ++ numa_local 87458144 ++ numa_other 0 ++Node 0, zone DMA ++ pages free 3840 ++ min 12 ++ low 15 ++ high 18 ++ spanned 4095 ++ present 3998 ++ managed 3840 ++ protection [0, 3125, 20006, 20006, 20006] ++ nr_free_pages 0 ++ nr_zone_inactive_anon 0 ++ nr_zone_active_anon 0 ++ nr_zone_inactive_file 0 ++ nr_zone_active_file 0 ++ nr_zone_unevictable 0 ++ nr_zone_write_pending 0 ++ nr_mlock 0 ++ nr_page_table_pages 0 ++ nr_kernel_stack 0 ++ nr_bounce 0 ++ nr_zspages 0 ++ nr_free_cma 0 ++ numa_hit 0 ++ numa_miss 0 ++ numa_foreign 0 ++ numa_interleave 0 ++ numa_local 0 ++ numa_other 0 ++Node 0, zone DMA32 ++ pages free 814439 ++ min 2637 ++ low 3437 ++ high 4237 ++ spanned 1044480 ++ present 913392 ++ managed 815354 ++ protection [0, 0, 16881, 16881, 16881] ++ nr_free_pages 0 ++ nr_zone_inactive_anon 0 ++ nr_zone_active_anon 0 ++ nr_zone_inactive_file 0 ++ nr_zone_active_file 0 ++ nr_zone_unevictable 0 ++ nr_zone_write_pending 0 ++ nr_mlock 0 ++ nr_page_table_pages 0 ++ nr_kernel_stack 0 ++ nr_bounce 0 ++ nr_zspages 0 ++ nr_free_cma 0 ++ numa_hit 13 ++ numa_miss 0 ++ numa_foreign 0 ++ numa_interleave 0 ++ numa_local 13 ++ numa_other 0 ++Node 0, zone Device ++ pages free 0 ++ min 0 ++ low 0 ++ high 0 ++ spanned 0 ++ present 0 ++ managed 0 ++ protection [0, 0, 0, 0, 0] ++Node 0, zone Movable ++ pages free 0 ++ min 0 ++ low 0 ++ high 0 ++ spanned 0 ++ present 0 ++ managed 0 ++ protection [0, 0, 0, 0, 0] ++ ++pcp-zoneinfo output : Display output ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/23/23 x86_64 (4 CPU) ++TimeStamp = 00:25:16 ++NODE 0, per-node status ++ nr_inactive_anon 35933 ++ nr_active_anon 533154 ++ nr_inactive_file 760769 ++ nr_active_file 513583 ++ nr_unevictable 3105 ++ nr_slab_reclaimable 140646 ++ nr_slab_unreclaimable 54046 ++ nr_isolated_anon 0 ++ nr_isolated_file 0 ++ nr_anon_pages 523670 ++ nr_mapped 173358 ++ nr_file_pages 1313502 ++ nr_dirty 35 ++ nr_writeback 0 ++ nr_writeback_temp 0 ++ nr_shmem 36501 ++ nr_shmem_hugepages 0 ++ nr_shmem_pmdmapped 0 ++ nr_file_hugepages 0 ++ nr_file_pmdmapped 0 ++ nr_anon_transparent_hugepages 582 ++ nr_unstable 0 ++ nr_vmscan_write 0 ++ nr_vmscan_immediate_reclaim 0 ++ nr_dirtied 594934 ++ nr_written 572571 ++ nr_kernel_misc_reclaimable 0 ++Node 0, zone DMA32 ++ pages free 814439 ++ min 2637 ++ low 3437 ++ high 4237 ++ spanned 1044480 ++ present 913392 ++ managed 815354 ++ protection [0, 0, 16881, 16881, 16881] ++ nr_free_pages 0 ++ nr_zone_inactive_anon 0 ++ nr_zone_active_anon 0 ++ nr_zone_inactive_file 0 ++ nr_zone_active_file 0 ++ nr_zone_unevictable 0 ++ nr_zone_write_pending 0 ++ nr_mlock 0 ++ nr_page_table_pages 0 ++ nr_kernel_stack 0 ++ nr_bounce 0 ++ nr_zspages 0 ++ nr_free_cma 0 ++ numa_hit 13 ++ numa_miss 0 ++ numa_foreign 0 ++ numa_interleave 0 ++ numa_local 13 ++ numa_other 0 ++Node 0, zone DMA ++ pages free 3840 ++ min 12 ++ low 15 ++ high 18 ++ spanned 4095 ++ present 3998 ++ managed 3840 ++ protection [0, 3125, 20006, 20006, 20006] ++ nr_free_pages 0 ++ nr_zone_inactive_anon 0 ++ nr_zone_active_anon 0 ++ nr_zone_inactive_file 0 ++ nr_zone_active_file 0 ++ nr_zone_unevictable 0 ++ nr_zone_write_pending 0 ++ nr_mlock 0 ++ nr_page_table_pages 0 ++ nr_kernel_stack 0 ++ nr_bounce 0 ++ nr_zspages 0 ++ nr_free_cma 0 ++ numa_hit 0 ++ numa_miss 0 ++ numa_foreign 0 ++ numa_interleave 0 ++ numa_local 0 ++ numa_other 0 ++Node 0, zone Normal ++ pages free 2149304 ++ min 14245 ++ low 18566 ++ high 22887 ++ spanned 4417792 ++ present 4417792 ++ managed 4321635 ++ protection [0, 0, 0, 0, 0] ++ nr_free_pages 0 ++ nr_zone_inactive_anon 35933 ++ nr_zone_active_anon 533154 ++ nr_zone_inactive_file 760769 ++ nr_zone_active_file 513583 ++ nr_zone_unevictable 3105 ++ nr_zone_write_pending 35 ++ nr_mlock 3105 ++ nr_page_table_pages 15186 ++ nr_kernel_stack 12616 ++ nr_bounce 0 ++ nr_zspages 0 ++ nr_free_cma 0 ++ numa_hit 87458144 ++ numa_miss 0 ++ numa_foreign 0 ++ numa_interleave 28603 ++ numa_local 87458144 ++ numa_other 0 ++Node 0, zone Movable ++ pages free 0 ++ min 0 ++ low 0 ++ high 0 ++ spanned 0 ++ present 0 ++ managed 0 ++ protection [0, 0, 0, 0, 0] ++Node 0, zone Device ++ pages free 0 ++ min 0 ++ low 0 ++ high 0 ++ spanned 0 ++ present 0 ++ managed 0 ++ protection [0, 0, 0, 0, 0] ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/23/23 x86_64 (4 CPU) ++TimeStamp = 00:25:19 ++NODE 0, per-node status ++ nr_inactive_anon 35933 ++ nr_active_anon 533154 ++ nr_inactive_file 760769 ++ nr_active_file 513583 ++ nr_unevictable 3105 ++ nr_slab_reclaimable 140646 ++ nr_slab_unreclaimable 54046 ++ nr_isolated_anon 0 ++ nr_isolated_file 0 ++ nr_anon_pages 523670 ++ nr_mapped 173358 ++ nr_file_pages 1313502 ++ nr_dirty 35 ++ nr_writeback 0 ++ nr_writeback_temp 0 ++ nr_shmem 36501 ++ nr_shmem_hugepages 0 ++ nr_shmem_pmdmapped 0 ++ nr_file_hugepages 0 ++ nr_file_pmdmapped 0 ++ nr_anon_transparent_hugepages 582 ++ nr_unstable 0 ++ nr_vmscan_write 0 ++ nr_vmscan_immediate_reclaim 0 ++ nr_dirtied 594934 ++ nr_written 572571 ++ nr_kernel_misc_reclaimable 0 ++Node 0, zone DMA32 ++ pages free 814439 ++ min 2637 ++ low 3437 ++ high 4237 ++ spanned 1044480 ++ present 913392 ++ managed 815354 ++ protection [0, 0, 16881, 16881, 16881] ++ nr_free_pages 0 ++ nr_zone_inactive_anon 0 ++ nr_zone_active_anon 0 ++ nr_zone_inactive_file 0 ++ nr_zone_active_file 0 ++ nr_zone_unevictable 0 ++ nr_zone_write_pending 0 ++ nr_mlock 0 ++ nr_page_table_pages 0 ++ nr_kernel_stack 0 ++ nr_bounce 0 ++ nr_zspages 0 ++ nr_free_cma 0 ++ numa_hit 13 ++ numa_miss 0 ++ numa_foreign 0 ++ numa_interleave 0 ++ numa_local 13 ++ numa_other 0 ++Node 0, zone DMA ++ pages free 3840 ++ min 12 ++ low 15 ++ high 18 ++ spanned 4095 ++ present 3998 ++ managed 3840 ++ protection [0, 3125, 20006, 20006, 20006] ++ nr_free_pages 0 ++ nr_zone_inactive_anon 0 ++ nr_zone_active_anon 0 ++ nr_zone_inactive_file 0 ++ nr_zone_active_file 0 ++ nr_zone_unevictable 0 ++ nr_zone_write_pending 0 ++ nr_mlock 0 ++ nr_page_table_pages 0 ++ nr_kernel_stack 0 ++ nr_bounce 0 ++ nr_zspages 0 ++ nr_free_cma 0 ++ numa_hit 0 ++ numa_miss 0 ++ numa_foreign 0 ++ numa_interleave 0 ++ numa_local 0 ++ numa_other 0 ++Node 0, zone Normal ++ pages free 2149304 ++ min 14245 ++ low 18566 ++ high 22887 ++ spanned 4417792 ++ present 4417792 ++ managed 4321635 ++ protection [0, 0, 0, 0, 0] ++ nr_free_pages 0 ++ nr_zone_inactive_anon 35933 ++ nr_zone_active_anon 533154 ++ nr_zone_inactive_file 760769 ++ nr_zone_active_file 513583 ++ nr_zone_unevictable 3105 ++ nr_zone_write_pending 35 ++ nr_mlock 3105 ++ nr_page_table_pages 15186 ++ nr_kernel_stack 12616 ++ nr_bounce 0 ++ nr_zspages 0 ++ nr_free_cma 0 ++ numa_hit 87458144 ++ numa_miss 0 ++ numa_foreign 0 ++ numa_interleave 28603 ++ numa_local 87458144 ++ numa_other 0 ++Node 0, zone Movable ++ pages free 0 ++ min 0 ++ low 0 ++ high 0 ++ spanned 0 ++ present 0 ++ managed 0 ++ protection [0, 0, 0, 0, 0] ++Node 0, zone Device ++ pages free 0 ++ min 0 ++ low 0 ++ high 0 ++ spanned 0 ++ present 0 ++ managed 0 ++ protection [0, 0, 0, 0, 0] ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/23/23 x86_64 (4 CPU) ++TimeStamp = 00:25:22 ++NODE 0, per-node status ++ nr_inactive_anon 35933 ++ nr_active_anon 533154 ++ nr_inactive_file 760769 ++ nr_active_file 513583 ++ nr_unevictable 3105 ++ nr_slab_reclaimable 140646 ++ nr_slab_unreclaimable 54046 ++ nr_isolated_anon 0 ++ nr_isolated_file 0 ++ nr_anon_pages 523670 ++ nr_mapped 173358 ++ nr_file_pages 1313502 ++ nr_dirty 35 ++ nr_writeback 0 ++ nr_writeback_temp 0 ++ nr_shmem 36501 ++ nr_shmem_hugepages 0 ++ nr_shmem_pmdmapped 0 ++ nr_file_hugepages 0 ++ nr_file_pmdmapped 0 ++ nr_anon_transparent_hugepages 582 ++ nr_unstable 0 ++ nr_vmscan_write 0 ++ nr_vmscan_immediate_reclaim 0 ++ nr_dirtied 594934 ++ nr_written 572571 ++ nr_kernel_misc_reclaimable 0 ++Node 0, zone DMA32 ++ pages free 814439 ++ min 2637 ++ low 3437 ++ high 4237 ++ spanned 1044480 ++ present 913392 ++ managed 815354 ++ protection [0, 0, 16881, 16881, 16881] ++ nr_free_pages 0 ++ nr_zone_inactive_anon 0 ++ nr_zone_active_anon 0 ++ nr_zone_inactive_file 0 ++ nr_zone_active_file 0 ++ nr_zone_unevictable 0 ++ nr_zone_write_pending 0 ++ nr_mlock 0 ++ nr_page_table_pages 0 ++ nr_kernel_stack 0 ++ nr_bounce 0 ++ nr_zspages 0 ++ nr_free_cma 0 ++ numa_hit 13 ++ numa_miss 0 ++ numa_foreign 0 ++ numa_interleave 0 ++ numa_local 13 ++ numa_other 0 ++Node 0, zone DMA ++ pages free 3840 ++ min 12 ++ low 15 ++ high 18 ++ spanned 4095 ++ present 3998 ++ managed 3840 ++ protection [0, 3125, 20006, 20006, 20006] ++ nr_free_pages 0 ++ nr_zone_inactive_anon 0 ++ nr_zone_active_anon 0 ++ nr_zone_inactive_file 0 ++ nr_zone_active_file 0 ++ nr_zone_unevictable 0 ++ nr_zone_write_pending 0 ++ nr_mlock 0 ++ nr_page_table_pages 0 ++ nr_kernel_stack 0 ++ nr_bounce 0 ++ nr_zspages 0 ++ nr_free_cma 0 ++ numa_hit 0 ++ numa_miss 0 ++ numa_foreign 0 ++ numa_interleave 0 ++ numa_local 0 ++ numa_other 0 ++Node 0, zone Normal ++ pages free 2149304 ++ min 14245 ++ low 18566 ++ high 22887 ++ spanned 4417792 ++ present 4417792 ++ managed 4321635 ++ protection [0, 0, 0, 0, 0] ++ nr_free_pages 0 ++ nr_zone_inactive_anon 35933 ++ nr_zone_active_anon 533154 ++ nr_zone_inactive_file 760769 ++ nr_zone_active_file 513583 ++ nr_zone_unevictable 3105 ++ nr_zone_write_pending 35 ++ nr_mlock 3105 ++ nr_page_table_pages 15186 ++ nr_kernel_stack 12616 ++ nr_bounce 0 ++ nr_zspages 0 ++ nr_free_cma 0 ++ numa_hit 87458144 ++ numa_miss 0 ++ numa_foreign 0 ++ numa_interleave 28603 ++ numa_local 87458144 ++ numa_other 0 ++Node 0, zone Movable ++ pages free 0 ++ min 0 ++ low 0 ++ high 0 ++ spanned 0 ++ present 0 ++ managed 0 ++ protection [0, 0, 0, 0, 0] ++Node 0, zone Device ++ pages free 0 ++ min 0 ++ low 0 ++ high 0 ++ spanned 0 ++ present 0 ++ managed 0 ++ protection [0, 0, 0, 0, 0] ++ ++pcp-zoneinfo output : Display output when given specified number of samples ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/23/23 x86_64 (4 CPU) ++TimeStamp = 00:25:16 ++NODE 0, per-node status ++ nr_inactive_anon 35933 ++ nr_active_anon 533154 ++ nr_inactive_file 760769 ++ nr_active_file 513583 ++ nr_unevictable 3105 ++ nr_slab_reclaimable 140646 ++ nr_slab_unreclaimable 54046 ++ nr_isolated_anon 0 ++ nr_isolated_file 0 ++ nr_anon_pages 523670 ++ nr_mapped 173358 ++ nr_file_pages 1313502 ++ nr_dirty 35 ++ nr_writeback 0 ++ nr_writeback_temp 0 ++ nr_shmem 36501 ++ nr_shmem_hugepages 0 ++ nr_shmem_pmdmapped 0 ++ nr_file_hugepages 0 ++ nr_file_pmdmapped 0 ++ nr_anon_transparent_hugepages 582 ++ nr_unstable 0 ++ nr_vmscan_write 0 ++ nr_vmscan_immediate_reclaim 0 ++ nr_dirtied 594934 ++ nr_written 572571 ++ nr_kernel_misc_reclaimable 0 ++Node 0, zone Normal ++ pages free 2149304 ++ min 14245 ++ low 18566 ++ high 22887 ++ spanned 4417792 ++ present 4417792 ++ managed 4321635 ++ protection [0, 0, 0, 0, 0] ++ nr_free_pages 0 ++ nr_zone_inactive_anon 35933 ++ nr_zone_active_anon 533154 ++ nr_zone_inactive_file 760769 ++ nr_zone_active_file 513583 ++ nr_zone_unevictable 3105 ++ nr_zone_write_pending 35 ++ nr_mlock 3105 ++ nr_page_table_pages 15186 ++ nr_kernel_stack 12616 ++ nr_bounce 0 ++ nr_zspages 0 ++ nr_free_cma 0 ++ numa_hit 87458144 ++ numa_miss 0 ++ numa_foreign 0 ++ numa_interleave 28603 ++ numa_local 87458144 ++ numa_other 0 ++Node 0, zone DMA32 ++ pages free 814439 ++ min 2637 ++ low 3437 ++ high 4237 ++ spanned 1044480 ++ present 913392 ++ managed 815354 ++ protection [0, 0, 16881, 16881, 16881] ++ nr_free_pages 0 ++ nr_zone_inactive_anon 0 ++ nr_zone_active_anon 0 ++ nr_zone_inactive_file 0 ++ nr_zone_active_file 0 ++ nr_zone_unevictable 0 ++ nr_zone_write_pending 0 ++ nr_mlock 0 ++ nr_page_table_pages 0 ++ nr_kernel_stack 0 ++ nr_bounce 0 ++ nr_zspages 0 ++ nr_free_cma 0 ++ numa_hit 13 ++ numa_miss 0 ++ numa_foreign 0 ++ numa_interleave 0 ++ numa_local 13 ++ numa_other 0 ++Node 0, zone DMA ++ pages free 3840 ++ min 12 ++ low 15 ++ high 18 ++ spanned 4095 ++ present 3998 ++ managed 3840 ++ protection [0, 3125, 20006, 20006, 20006] ++ nr_free_pages 0 ++ nr_zone_inactive_anon 0 ++ nr_zone_active_anon 0 ++ nr_zone_inactive_file 0 ++ nr_zone_active_file 0 ++ nr_zone_unevictable 0 ++ nr_zone_write_pending 0 ++ nr_mlock 0 ++ nr_page_table_pages 0 ++ nr_kernel_stack 0 ++ nr_bounce 0 ++ nr_zspages 0 ++ nr_free_cma 0 ++ numa_hit 0 ++ numa_miss 0 ++ numa_foreign 0 ++ numa_interleave 0 ++ numa_local 0 ++ numa_other 0 ++Node 0, zone Device ++ pages free 0 ++ min 0 ++ low 0 ++ high 0 ++ spanned 0 ++ present 0 ++ managed 0 ++ protection [0, 0, 0, 0, 0] ++Node 0, zone Movable ++ pages free 0 ++ min 0 ++ low 0 ++ high 0 ++ spanned 0 ++ present 0 ++ managed 0 ++ protection [0, 0, 0, 0, 0] ++Linux 5.4.17-2136.317.5.3.el8uek.x86_64 (localhost.localdomain) 08/23/23 x86_64 (4 CPU) ++TimeStamp = 00:25:19 ++NODE 0, per-node status ++ nr_inactive_anon 35933 ++ nr_active_anon 533154 ++ nr_inactive_file 760769 ++ nr_active_file 513583 ++ nr_unevictable 3105 ++ nr_slab_reclaimable 140646 ++ nr_slab_unreclaimable 54046 ++ nr_isolated_anon 0 ++ nr_isolated_file 0 ++ nr_anon_pages 523670 ++ nr_mapped 173358 ++ nr_file_pages 1313502 ++ nr_dirty 35 ++ nr_writeback 0 ++ nr_writeback_temp 0 ++ nr_shmem 36501 ++ nr_shmem_hugepages 0 ++ nr_shmem_pmdmapped 0 ++ nr_file_hugepages 0 ++ nr_file_pmdmapped 0 ++ nr_anon_transparent_hugepages 582 ++ nr_unstable 0 ++ nr_vmscan_write 0 ++ nr_vmscan_immediate_reclaim 0 ++ nr_dirtied 594934 ++ nr_written 572571 ++ nr_kernel_misc_reclaimable 0 ++Node 0, zone Normal ++ pages free 2149304 ++ min 14245 ++ low 18566 ++ high 22887 ++ spanned 4417792 ++ present 4417792 ++ managed 4321635 ++ protection [0, 0, 0, 0, 0] ++ nr_free_pages 0 ++ nr_zone_inactive_anon 35933 ++ nr_zone_active_anon 533154 ++ nr_zone_inactive_file 760769 ++ nr_zone_active_file 513583 ++ nr_zone_unevictable 3105 ++ nr_zone_write_pending 35 ++ nr_mlock 3105 ++ nr_page_table_pages 15186 ++ nr_kernel_stack 12616 ++ nr_bounce 0 ++ nr_zspages 0 ++ nr_free_cma 0 ++ numa_hit 87458144 ++ numa_miss 0 ++ numa_foreign 0 ++ numa_interleave 28603 ++ numa_local 87458144 ++ numa_other 0 ++Node 0, zone DMA32 ++ pages free 814439 ++ min 2637 ++ low 3437 ++ high 4237 ++ spanned 1044480 ++ present 913392 ++ managed 815354 ++ protection [0, 0, 16881, 16881, 16881] ++ nr_free_pages 0 ++ nr_zone_inactive_anon 0 ++ nr_zone_active_anon 0 ++ nr_zone_inactive_file 0 ++ nr_zone_active_file 0 ++ nr_zone_unevictable 0 ++ nr_zone_write_pending 0 ++ nr_mlock 0 ++ nr_page_table_pages 0 ++ nr_kernel_stack 0 ++ nr_bounce 0 ++ nr_zspages 0 ++ nr_free_cma 0 ++ numa_hit 13 ++ numa_miss 0 ++ numa_foreign 0 ++ numa_interleave 0 ++ numa_local 13 ++ numa_other 0 ++Node 0, zone DMA ++ pages free 3840 ++ min 12 ++ low 15 ++ high 18 ++ spanned 4095 ++ present 3998 ++ managed 3840 ++ protection [0, 3125, 20006, 20006, 20006] ++ nr_free_pages 0 ++ nr_zone_inactive_anon 0 ++ nr_zone_active_anon 0 ++ nr_zone_inactive_file 0 ++ nr_zone_active_file 0 ++ nr_zone_unevictable 0 ++ nr_zone_write_pending 0 ++ nr_mlock 0 ++ nr_page_table_pages 0 ++ nr_kernel_stack 0 ++ nr_bounce 0 ++ nr_zspages 0 ++ nr_free_cma 0 ++ numa_hit 0 ++ numa_miss 0 ++ numa_foreign 0 ++ numa_interleave 0 ++ numa_local 0 ++ numa_other 0 ++Node 0, zone Device ++ pages free 0 ++ min 0 ++ low 0 ++ high 0 ++ spanned 0 ++ present 0 ++ managed 0 ++ protection [0, 0, 0, 0, 0] ++Node 0, zone Movable ++ pages free 0 ++ min 0 ++ low 0 ++ high 0 ++ spanned 0 ++ present 0 ++ managed 0 ++ protection [0, 0, 0, 0, 0] +diff --git a/qa/archives/GNUmakefile b/qa/archives/GNUmakefile +index 5f46b07c1..d679c91c8 100644 +--- a/qa/archives/GNUmakefile ++++ b/qa/archives/GNUmakefile +@@ -66,7 +66,7 @@ SCRIPTS = mk.diff mk.gap mk.mysql mk.schizo mk.foo+ \ + mk.atop mk.hotatop mk.atop-boot mk.atop-nvidia mk.atop-threads \ + mk.log-derived mk.vmstat mk.rep mk.procsched mk.netstat \ + mk.ipcs mk.value-test mk.rank-pred mk.cputime mk.meminfo \ +- mk.sample-labels mk.pmproxy mk.mmv.help mk.slabinfo ++ mk.sample-labels mk.pmproxy mk.mmv.help mk.slabinfo mk.zoneinfo + + CONFIGS = config.verify config.shping YWhcCi.toium.config \ + kenj-pc-2.config reduce.config uwrap.config wrap.config \ +diff --git a/qa/archives/mk.zoneinfo b/qa/archives/mk.zoneinfo +new file mode 100755 +index 000000000..b307ee787 +--- /dev/null ++++ b/qa/archives/mk.zoneinfo +@@ -0,0 +1,106 @@ ++#!/bin/sh ++# ++# remake the pcp-buddyinfo archive ... ++# this archive is intended to be checked in and not remade, this script is ++# simply a record of how it was created ++# ++ ++. /etc/pcp.env ++ ++tmp=/var/tmp/$$ ++rm -f $tmp.* ++trap "rm -f $tmp.*; exit 0" 0 1 2 3 15 ++ ++cat <>$tmp.config ++log advisory on once{ ++ kernel.uname.sysname ++ kernel.uname.release ++ kernel.uname.nodename ++ kernel.uname.machine ++ hinv.ncpu ++} ++log advisory on 10 seconds { ++ mem.zoneinfo.free ++ mem.zoneinfo.min ++ mem.zoneinfo.low ++ mem.zoneinfo.high ++ mem.zoneinfo.scanned ++ mem.zoneinfo.spanned ++ mem.zoneinfo.present ++ mem.zoneinfo.managed ++ mem.zoneinfo.nr_free_pages ++ mem.zoneinfo.nr_alloc_batch ++ mem.zoneinfo.nr_inactive_anon ++ mem.zoneinfo.nr_active_anon ++ mem.zoneinfo.nr_inactive_file ++ mem.zoneinfo.nr_active_file ++ mem.zoneinfo.nr_unevictable ++ mem.zoneinfo.nr_mlock ++ mem.zoneinfo.nr_anon_pages ++ mem.zoneinfo.nr_mapped ++ mem.zoneinfo.nr_file_pages ++ mem.zoneinfo.nr_dirty ++ mem.zoneinfo.nr_writeback ++ mem.zoneinfo.nr_slab_reclaimable ++ mem.zoneinfo.nr_slab_unreclaimable ++ mem.zoneinfo.nr_page_table_pages ++ mem.zoneinfo.nr_kernel_stack ++ mem.zoneinfo.nr_unstable ++ mem.zoneinfo.nr_bounce ++ mem.zoneinfo.nr_vmscan_write ++ mem.zoneinfo.nr_vmscan_immediate_reclaim ++ mem.zoneinfo.nr_writeback_temp ++ mem.zoneinfo.nr_isolated_anon ++ mem.zoneinfo.nr_isolated_file ++ mem.zoneinfo.nr_shmem ++ mem.zoneinfo.nr_dirtied ++ mem.zoneinfo.nr_written ++ mem.zoneinfo.numa_hit ++ mem.zoneinfo.numa_miss ++ mem.zoneinfo.numa_foreign ++ mem.zoneinfo.numa_interleave ++ mem.zoneinfo.numa_local ++ mem.zoneinfo.numa_other ++ mem.zoneinfo.workingset_refault ++ mem.zoneinfo.workingset_activate ++ mem.zoneinfo.workingset_nodereclaim ++ mem.zoneinfo.nr_anon_transparent_hugepages ++ mem.zoneinfo.nr_free_cma ++ mem.zoneinfo.cma ++ mem.zoneinfo.nr_swapcached ++ mem.zoneinfo.nr_shmem_hugepages ++ mem.zoneinfo.nr_shmem_pmdmapped ++ mem.zoneinfo.nr_file_hugepages ++ mem.zoneinfo.nr_file_pmdmapped ++ mem.zoneinfo.nr_kernel_misc_reclaimable ++ mem.zoneinfo.nr_foll_pin_acquired ++ mem.zoneinfo.nr_foll_pin_released ++ mem.zoneinfo.workingset_refault_anon ++ mem.zoneinfo.workingset_refault_file ++ mem.zoneinfo.workingset_active_anon ++ mem.zoneinfo.workingset_active_file ++ mem.zoneinfo.workingset_restore_anon ++ mem.zoneinfo.workingset_restore_file ++ mem.zoneinfo.nr_zspages ++ mem.zoneinfo.nr_zone_inactive_file ++ mem.zoneinfo.nr_zone_active_file ++ mem.zoneinfo.nr_zone_inactive_anon ++ mem.zoneinfo.nr_zone_active_anon ++ mem.zoneinfo.nr_zone_unevictable ++ mem.zoneinfo.nr_zone_write_pending ++ mem.zoneinfo.protection ++} ++End-of-File ++ ++rm -f pcp-zoneinfo.0 pcp-zoneinfo.index pcp-zoneinfo.meta pcp-zoneinfo.* ++ ++if pmlogger -s3 -c $tmp.config pcp-zoneinfo; then ++ xz pcp-zoneinfo.0 ++ xz pcp-zoneinfo.index ++ xz pcp-zoneinfo.meta ++else ++ echo "Argh: pmlogger failed ..." ++ cat pmlogger.log ++fi ++ ++ +diff --git a/qa/group b/qa/group +index 16e5d54b5..b88fc344f 100644 +--- a/qa/group ++++ b/qa/group +@@ -1977,6 +1977,7 @@ x11 + 1956 pmda.linux pmcd local + 1957 libpcp local valgrind + 1978 atop local ++1973 pcp zoneinfo python local + 1984 pmlogconf pmda.redis local + 1985 pmfind local valgrind + 1986 pmfind local +diff --git a/src/pcp/GNUmakefile b/src/pcp/GNUmakefile +index fb754e9c5..f2bef9c36 100644 +--- a/src/pcp/GNUmakefile ++++ b/src/pcp/GNUmakefile +@@ -41,7 +41,7 @@ SUBDIRS = \ + verify \ + vmstat \ + ss \ +- ps ++ zoneinfo + + default :: default_pcp + +diff --git a/src/pcp/zoneinfo/GNUmakefile b/src/pcp/zoneinfo/GNUmakefile +new file mode 100755 +index 000000000..a8ddd2fdd +--- /dev/null ++++ b/src/pcp/zoneinfo/GNUmakefile +@@ -0,0 +1,44 @@ ++# ++# Copyright (c) 2023 Oracle and/or its affiliates. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++# This program is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation; either version 2 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++# for more details. ++# ++ ++TOPDIR = ../../.. ++include $(TOPDIR)/src/include/builddefs ++ ++TARGET = pcp-zoneinfo ++SCRIPT = $(TARGET).py ++MAN_SECTION = 1 ++MAN_PAGES = $(TARGET).$(MAN_SECTION) ++MAN_DEST = $(PCP_MAN_DIR)/man$(MAN_SECTION) ++ ++default: $(SCRIPT) $(MAN_PAGES) ++ ++include $(BUILDRULES) ++ ++install: default ++ifeq "$(HAVE_PYTHON)" "true" ++ $(INSTALL) -m 755 $(SCRIPT) $(PCP_BINADM_DIR)/$(TARGET) ++ @$(INSTALL_MAN) ++endif ++ ++default_pcp : default ++ ++install_pcp : install ++ ++check:: $(SCRIPT) ++ $(PYLINT) $^ ++ ++check :: $(MAN_PAGES) ++ $(MANLINT) $^ ++ +diff --git a/src/pcp/zoneinfo/pcp-zoneinfo.1 b/src/pcp/zoneinfo/pcp-zoneinfo.1 +new file mode 100755 +index 000000000..0510e70e0 +--- /dev/null ++++ b/src/pcp/zoneinfo/pcp-zoneinfo.1 +@@ -0,0 +1,153 @@ ++'\"! tbl | mmdoc ++'\"macro stdmacro ++.\" ++.\" Copyright (c) 2023 Oracle and/or its affiliates. ++.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++.\" ++.\" This program is free software; you can redistribute it and/or modify it ++.\" under the terms of the GNU General Public License as published by the ++.\" Free Software Foundation; either version 2 of the License, or (at your ++.\" option) any later version. ++.\" ++.\" This program is distributed in the hope that it will be useful, but ++.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++.\" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++.\" for more details. ++.\" ++.TH PCP-ZONEINFO 1 "PCP" "Performance Co-Pilot" ++.SH NAME ++\f3pcp-zoneinfo\f1 \- Report statistics for System Zoneinfo. ++.SH SYNOPSIS ++\f3pcp\f1 ++[\f2pcp\ options\f1] ++\f3zoneinfo\f1 ++[\f3\-s\f1 \f2samples\f1] ++[\f3\-a\f1 \f2archive\f1] ++[\f3\-S\f1 \f2start_time\f1] ++[\f3\-T\f1 \f2end_time\f1] ++.SH DESCRIPTION ++The ++.B pcp-zoneinfo ++command is used for viewing the different kinds of stats related to numa nodes. ++Using various options it helps a user to analyze useful information related to ++the zone availability for different numa nodes.This file display information about memory zones. ++This is useful for analyzing virtual memory behavior.By default ++.B pcp-zoneinfo ++reports live data for the local host. ++ ++The statistics shown are as follows: ++ ++.TS ++lfB lfB ++l lx. ++HEADER DESCRIPTION ++_ _ ++ ++.B Per node stats ++ ++nr_inactive_anon zone inactive anonymous pages for each zone for each NUMA node ++nr_active_anon number of active anonymous memory pages in each zone for each NUMA node ++nr_inactive_file number of inactive file memory pages in each zone for each NUMA node ++nr_active_file number of active file memory memory pages in each zone for each NUMA node ++nr_unevictable number of unevictable pages in each zone for each NUMA node ++nr_slab_reclaimable number of reclaimable slab pages in each zone for each NUMA node ++nr_slab_unreclaimable number of unreclaimable slab pages in each zone for each NUMA node ++nr_isolated_anon number of isolated anonymous memory pages in each zone for each NUMA node ++nr_isolated_file number of isolated file memory pages in each zone for each NUMA node ++nr_anon_pages number of anonymous mapped pagecache pages in each zone for each NUMA node ++nr_mapped number of mapped pagecache pages in each zone for each NUMA node ++nr_file_pages number of file pagecache pages in each zone for each NUMA node ++nr_dirty number of pages dirty state in each zone for each NUMA node ++nr_writeback number of pages writeback state in each zone for each NUMA node ++nr_writeback_temp number of temporary writeback pages in each zone for each NUMA node ++nr_shmem number of shared memory pages in each zone for each NUMA node ++nr_shmem_hugepages shared memory huge pages in each zone for each NUMA node ++nr_shmem_pmdmapped shared memory PMD mappings in each zone for each NUMA node ++nr_file_hugepages file-backed huge pages in each zone for each NUMA node ++nr_file_pmdmapped file-backed PMD mappings in each zone for each NUMA node ++nr_anon_transparent_hugepages number of anonymous transparent huge pages in each zone for each NUMA node ++nr_unstable number of pages unstable state in each zone for each NUMA node ++nr_vmscan_write Count of pages written from the LRU by the VM scanner in each zone ++ for each NUMA node.The VM is supposed to minimise the number of ++ pages which get written from the LRU (for IO scheduling efficiency, ++ and for high reclaim-success rates). ++nr_vmscan_immediate_reclaim prioritise for reclaim when writeback ends in each zone for each NUMA node ++nr_dirtied count of pages entering dirty state in each zone for each NUMA node ++nr_written count of pages written out in each zone for each NUMA node ++nr_kernel_misc_reclaimable miscellaneous reclaimable kernel pages in each zone for each NUMA node ++ ++.B Per zone stats ++ ++pages free free space in each zone for each NUMA node ++ min min space in each zone for each NUMA node ++ low low space in each zone for each NUMA node ++ high high space in each zone for each NUMA node ++ spanned spanned space in each zone for each NUMA node ++ present present space in each zone for each NUMA node ++ managed managed space in each zone for each NUMA node ++ protection protection space in each zone for each NUMA node ++nr_free_pages number of free pages in each zone for each NUMA node. ++nr_zone_inactive_anon zone inactive anonymous pages for each zone for each NUMA node ++nr_zone_active_anon zone active anonymous pages for each zone for each NUMA node ++nr_zone_inactive_file zone inactive file-backed pages for each zone for each NUMA node ++nr_zone_active_file zone active file-backed pages for each zone for each NUMA node ++nr_zone_unevictable zone unevictable pages for each zone for each NUMA node ++nr_zone_write_pending zone write-pending pages for each zone for each NUMA node ++nr_mlock number of pages under mlock in each zone for each NUMA node ++nr_page_table_pages number of page table pages in each zone for each NUMA node ++nr_kernel_stack number of pages of kernel stack in each zone for each NUMA node ++nr_bounce number of bounce buffer pages in each zone for each NUMA node ++nr_zspages count of zsmalloc memory allocator pages for each zone for each NUMA node ++nr_free_cma count of free Contiguous Memory Allocator pages in each zone for each NUMA node ++numa_hit Count of successful allocations from preferred NUMA zone in each zone ++ for each NUMA node. ++numa_miss Count of unsuccessful allocations from preferred NUMA zone in each zone ++ for each NUMA node. ++numa_foreign Count of foreign NUMA zone allocations in each zone for each NUMA node. ++numa_interleave count of interleaved NUMA allocations in each zone for each NUMA node ++numa_local Count of successful allocations from local NUMA zone in each zone for ++ each NUMA node. ++numa_other Count of unsuccessful allocations from local NUMA zone in each zone for ++ each NUMA node. ++.TE ++ ++.SH OPTIONS ++.TP ++\fB\-a\fP, \fB\-\-archive\fP ++Fetch /proc/zoneinfo for a specified archive file ++.TP ++\fB\-s\fP, \fB\-\-samples\fP ++Get the zoneinfo for specified number of samples count ++.TP ++\fB\-S\fP, \fB\-\-START TIME\fP ++Filter the samples from the archive from the given time ++.TP ++\fB\-T\fP, \fB\-\-END TIME\fP ++Filter the samples from the archive till the given time ++.TP ++\fB\-V\fR, \fB\-\-version\fR ++Display version number and exit. ++.TP ++\fB\-?\fR, \fB\-\-help\fR ++Display usage message and exit. ++.SH NOTES ++.B pcp-zoneinfo ++collects information from ++.BR /proc/zoneinfo ++and aims to be command line and output compatible with it. ++.SH PCP ENVIRONMENT ++Environment variables with the prefix \fBPCP_\fP are used to parameterize ++the file and directory names used by PCP. ++On each installation, the ++file \fI/etc/pcp.conf\fP contains the local values for these variables. ++The \fB$PCP_CONF\fP variable may be used to specify an alternative ++configuration file, as described in \fBpcp.conf\fP(5). ++.PP ++For environment variables affecting PCP tools, see \fBpmGetOptions\fP(3). ++.SH SEE ALSO ++.BR PCPIntro (1), ++.BR pcp (1), ++.BR pmParseInterval (3) ++and ++.BR environ (7). ++ +diff --git a/src/pcp/zoneinfo/pcp-zoneinfo.py b/src/pcp/zoneinfo/pcp-zoneinfo.py +new file mode 100755 +index 000000000..32fc5ee75 +--- /dev/null ++++ b/src/pcp/zoneinfo/pcp-zoneinfo.py +@@ -0,0 +1,314 @@ ++#!/usr/bin/env pmpython ++# ++# Copyright (c) 2023 Oracle and/or its affiliates. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++# This program is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation; either version 2 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++# for more details. ++# ++# pylint: disable=bad-whitespace,too-many-arguments,too-many-lines, bad-continuation ++# pylint: disable=redefined-outer-name,unnecessary-lambda ++# ++import signal ++import sys ++import time ++from pcp import pmapi, pmcc ++from cpmapi import PM_CONTEXT_ARCHIVE ++ ++SYS_MECTRICS = ["kernel.uname.sysname","kernel.uname.release", ++ "kernel.uname.nodename","kernel.uname.machine","hinv.ncpu"] ++ ++ZONESTAT_METRICS = [ "mem.zoneinfo.free","mem.zoneinfo.min","mem.zoneinfo.low","mem.zoneinfo.high", ++ "mem.zoneinfo.scanned","mem.zoneinfo.spanned","mem.zoneinfo.present","mem.zoneinfo.managed", ++ "mem.zoneinfo.nr_free_pages","mem.zoneinfo.nr_alloc_batch","mem.zoneinfo.nr_inactive_anon", ++ "mem.zoneinfo.nr_active_anon","mem.zoneinfo.nr_inactive_file","mem.zoneinfo.nr_active_file", ++ "mem.zoneinfo.nr_unevictable","mem.zoneinfo.nr_mlock","mem.zoneinfo.nr_anon_pages", ++ "mem.zoneinfo.nr_mapped","mem.zoneinfo.nr_file_pages","mem.zoneinfo.nr_dirty", ++ "mem.zoneinfo.nr_writeback","mem.zoneinfo.nr_slab_reclaimable","mem.zoneinfo.nr_slab_unreclaimable", ++ "mem.zoneinfo.nr_page_table_pages","mem.zoneinfo.nr_kernel_stack","mem.zoneinfo.nr_unstable", ++ "mem.zoneinfo.nr_bounce","mem.zoneinfo.nr_vmscan_write","mem.zoneinfo.nr_vmscan_immediate_reclaim", ++ "mem.zoneinfo.nr_writeback_temp","mem.zoneinfo.nr_isolated_anon","mem.zoneinfo.nr_isolated_file", ++ "mem.zoneinfo.nr_shmem","mem.zoneinfo.nr_dirtied","mem.zoneinfo.nr_written","mem.zoneinfo.numa_hit", ++ "mem.zoneinfo.numa_miss","mem.zoneinfo.numa_foreign","mem.zoneinfo.numa_interleave", ++ "mem.zoneinfo.numa_local","mem.zoneinfo.numa_other","mem.zoneinfo.workingset_refault", ++ "mem.zoneinfo.workingset_activate","mem.zoneinfo.workingset_nodereclaim", ++ "mem.zoneinfo.nr_anon_transparent_hugepages","mem.zoneinfo.nr_free_cma","mem.zoneinfo.cma", ++ "mem.zoneinfo.nr_swapcached","mem.zoneinfo.nr_shmem_hugepages","mem.zoneinfo.nr_shmem_pmdmapped", ++ "mem.zoneinfo.nr_file_hugepages","mem.zoneinfo.nr_file_pmdmapped", ++ "mem.zoneinfo.nr_kernel_misc_reclaimable","mem.zoneinfo.nr_foll_pin_acquired", ++ "mem.zoneinfo.nr_foll_pin_released","mem.zoneinfo.workingset_refault_anon", ++ "mem.zoneinfo.workingset_refault_file","mem.zoneinfo.workingset_active_anon", ++ "mem.zoneinfo.workingset_active_file","mem.zoneinfo.workingset_restore_anon", ++ "mem.zoneinfo.workingset_restore_file","mem.zoneinfo.nr_zspages", ++ "mem.zoneinfo.nr_zone_inactive_file","mem.zoneinfo.nr_zone_active_file", ++ "mem.zoneinfo.nr_zone_inactive_anon","mem.zoneinfo.nr_zone_active_anon", ++ "mem.zoneinfo.nr_zone_unevictable","mem.zoneinfo.nr_zone_write_pending", ++ "mem.zoneinfo.protection" ] ++ ++ALL_METRICS = ZONESTAT_METRICS + SYS_MECTRICS ++ ++ZONEINFO_PER_NODE = { ++ "nr_inactive_anon" : "mem.zoneinfo.nr_inactive_anon", ++ "nr_active_anon" : "mem.zoneinfo.nr_active_anon", ++ "nr_inactive_file" : "mem.zoneinfo.nr_inactive_file", ++ "nr_active_file" : "mem.zoneinfo.nr_active_file", ++ "nr_unevictable" : "mem.zoneinfo.nr_unevictable", ++ "nr_slab_reclaimable" : "mem.zoneinfo.nr_slab_reclaimable", ++ "nr_slab_unreclaimable" : "mem.zoneinfo.nr_slab_unreclaimable", ++ "nr_isolated_anon" : "mem.zoneinfo.nr_isolated_anon", ++ "nr_isolated_file" : "mem.zoneinfo.nr_isolated_file", ++ "nr_anon_pages" : "mem.zoneinfo.nr_anon_pages", ++ "nr_mapped" : "mem.zoneinfo.nr_mapped", ++ "nr_file_pages" : "mem.zoneinfo.nr_file_pages", ++ "nr_dirty" : "mem.zoneinfo.nr_dirty", ++ "nr_writeback" : "mem.zoneinfo.nr_writeback", ++ "nr_writeback_temp" : "mem.zoneinfo.nr_writeback_temp", ++ "nr_shmem" : "mem.zoneinfo.nr_shmem", ++ "nr_shmem_hugepages" : "mem.zoneinfo.nr_shmem_hugepages", ++ "nr_shmem_pmdmapped" : "mem.zoneinfo.nr_shmem_pmdmapped", ++ "nr_file_hugepages" : "mem.zoneinfo.nr_file_hugepages", ++ "nr_file_pmdmapped" : "mem.zoneinfo.nr_file_pmdmapped", ++ "nr_anon_transparent_hugepages" : "mem.zoneinfo.nr_anon_transparent_hugepages", ++ "nr_unstable" : "mem.zoneinfo.nr_unstable", ++ "nr_vmscan_write" : "mem.zoneinfo.nr_vmscan_write", ++ "nr_vmscan_immediate_reclaim" : "mem.zoneinfo.nr_vmscan_immediate_reclaim", ++ "nr_dirtied" : "mem.zoneinfo.nr_dirtied", ++ "nr_written" : "mem.zoneinfo.nr_written", ++ "nr_kernel_misc_reclaimable" : "mem.zoneinfo.nr_kernel_misc_reclaimable" ++} ++ ++ZONEINFO_PAGE_INFO = { ++ "pages free" : "mem.zoneinfo.free", ++ " min" : "mem.zoneinfo.min", ++ " low" : "mem.zoneinfo.low", ++ " high" : "mem.zoneinfo.high", ++ " spanned" : "mem.zoneinfo.spanned", ++ " present" : "mem.zoneinfo.present", ++ " managed" : "mem.zoneinfo.managed" ++} ++ ++ZONEINFO_NUMBER_ZONE = { ++ "nr_free_pages" : "mem.zoneinfo.nr_free_pages", ++ "nr_zone_inactive_anon" : "mem.zoneinfo.nr_zone_inactive_anon", ++ "nr_zone_active_anon" : "mem.zoneinfo.nr_zone_active_anon", ++ "nr_zone_inactive_file" : "mem.zoneinfo.nr_zone_inactive_file", ++ "nr_zone_active_file" : "mem.zoneinfo.nr_zone_active_file", ++ "nr_zone_unevictable" : "mem.zoneinfo.nr_zone_unevictable", ++ "nr_zone_write_pending" : "mem.zoneinfo.nr_zone_write_pending", ++ "nr_mlock" : "mem.zoneinfo.nr_mlock", ++ "nr_page_table_pages" : "mem.zoneinfo.nr_page_table_pages", ++ "nr_kernel_stack" : "mem.zoneinfo.nr_kernel_stack", ++ "nr_bounce" : "mem.zoneinfo.nr_bounce", ++ "nr_zspages" : "mem.zoneinfo.nr_zspages", ++ "nr_free_cma" : "mem.zoneinfo.nr_free_cma", ++ "numa_hit" : "mem.zoneinfo.numa_hit", ++ "numa_miss" : "mem.zoneinfo.numa_miss", ++ "numa_foreign" : "mem.zoneinfo.numa_foreign", ++ "numa_interleave" : "mem.zoneinfo.numa_interleave", ++ "numa_local" : "mem.zoneinfo.numa_local", ++ "numa_other" : "mem.zoneinfo.numa_other" ++} ++ ++class ReportingMetricRepository: ++ ++ def __init__(self,group): ++ self.group = group ++ self.current_cached_values = {} ++ ++ def __sorted(self,data): ++ return dict(sorted(data.items(), key=lambda item: item[0].lower())) ++ ++ def __fetch_current_value(self,metric): ++ val = dict(map(lambda x: (x[1], x[2]), self.group[metric].netValues)) ++ val = self.__sorted(val) ++ return dict(val) ++ ++ def current_value(self,metric): ++ if metric not in self.group: ++ return None ++ if self.current_cached_values.get(metric) is None: ++ first_value=self.__fetch_current_value(metric) ++ self.current_cached_values[metric]=first_value ++ return self.current_cached_values[metric] ++ ++class ZoneStatUtil: ++ def __init__(self,metrics_repository): ++ self.__metric_repository=metrics_repository ++ self.report=ReportingMetricRepository(self.__metric_repository) ++ ++ def names(self): ++ data = self.report.current_value('mem.zoneinfo.present') ++ return data.keys() ++ ++ def metric_value(self,metric,node): ++ data = self.report.current_value(metric) ++ data = data.get(node,"0") ++ if data != "0": ++ data = data/4 ++ return int(data) ++ ++ #creating the list of protection values for particular node ++ def protection(self,node): ++ data = self.report.current_value("mem.zoneinfo.protection") ++ values = [value // 4 for key, value in data.items() if key.startswith(node)] ++ return values ++ ++ def protection_names(self,node_name): ++ data = self.report.current_value("mem.zoneinfo.protection") ++ filtered_nodes = {key.split("::" + node_name)[0] + "::" + node_name for key in data.keys() if node_name in key} ++ if len(filtered_nodes) == 0: ++ filtered_nodes = None ++ return filtered_nodes ++ ++class ZoneinfoReport(pmcc.MetricGroupPrinter): ++ def __init__(self,samples,group,context): ++ self.samples = samples ++ self.group = group ++ self.context = context ++ ++ def __get_ncpu(self, group): ++ return group['hinv.ncpu'].netValues[0][2] ++ ++ def __print_machine_info(self, context): ++ timestamp = self.group.pmLocaltime(context.timestamp.tv_sec) ++ # Please check strftime(3) for different formatting options. ++ # Also check TZ and LC_TIME environment variables for more ++ # information on how to override the default formatting of ++ # the date display in the header ++ time_string = time.strftime("%x", timestamp.struct_time()) ++ header_string = '' ++ header_string += context['kernel.uname.sysname'].netValues[0][2] + ' ' ++ header_string += context['kernel.uname.release'].netValues[0][2] + ' ' ++ header_string += '(' + context['kernel.uname.nodename'].netValues[0][2] + ') ' ++ header_string += time_string + ' ' ++ header_string += context['kernel.uname.machine'].netValues[0][2] + ' ' ++ print("%s (%s CPU)" % (header_string, self.__get_ncpu(context))) ++ ++ #Function to format the node name as per the /proc/zoneinfo naming convention ++ def __format_node_name(self,input_str): ++ parts = input_str.split("::") ++ if len(parts) == 2 and parts[1].startswith("node"): ++ node_num = parts[1][4:] ++ zone_name = parts[0] ++ return "Node {}, zone {}".format(node_num, zone_name) ++ else: ++ return "Invalid input format" ++ ++ def __print_values(self,timestamp,header_indentation,value_indentation,manager): ++ total_nodes = manager.names() ++ node_names = set(key.split('::')[1] for key in total_nodes) ++ #sort the node names in decreasing order ++ node_names = sorted(node_names, key=lambda x: int(x[4:]) if x.startswith('node') else float('inf')) ++ try: ++ #lopping through all the available nodes ++ for node_name in node_names: ++ #get all the types available for the current node on which i'm ++ node_types=manager.protection_names(node_name) ++ if node_types is None: ++ return ++ nodes = set(node_types).intersection(total_nodes) ++ print("NODE {:>2},".format(node_name[4:]),"per-node status") ++ for key,value in ZONEINFO_PER_NODE.items(): ++ print ("\t",key,manager.metric_value(value,node_name)) ++ for node in nodes: ++ print(self.__format_node_name(node)) ++ for key,value in ZONEINFO_PAGE_INFO.items(): ++ print("\t",key,manager.metric_value(value,node)) ++ print(" "*14,"protection",manager.protection(node)) ++ for key,value in ZONEINFO_NUMBER_ZONE.items(): ++ print ("\t",key,manager.metric_value(value,node)) ++ #finding the remaining type of nodes data which i haven't printed so far ++ #these nodes will have only pages information for them so just printing them out ++ remaining_nodes = set(node_types) - nodes ++ if remaining_nodes: ++ for node in remaining_nodes: ++ print(self.__format_node_name(node)) ++ for key,value in ZONEINFO_PAGE_INFO.items(): ++ print("\t",key,manager.metric_value(value,node)) ++ print(" "*14,"protection",manager.protection(node)) ++ else: ++ continue ++ except IndexError: ++ print("Got some error while printing values for zoneinfo") ++ ++ ++ ++ ++ def print_report(self,group,timestamp,header_indentation,value_indentation,manager_zoneinfo): ++ def __print_zone_status(): ++ zonestatus = ZoneStatUtil(manager_zoneinfo) ++ if zonestatus.names(): ++ try: ++ self.__print_machine_info(group) ++ print("TimeStamp = ",timestamp) ++ self.__print_values(timestamp, header_indentation, value_indentation, zonestatus) ++ except IndexError: ++ print("Incorrect machine info due to some missing metrics") ++ return ++ else: ++ return ++ ++ if self.context != PM_CONTEXT_ARCHIVE and self.samples is None: ++ __print_zone_status() ++ sys.exit(0) ++ elif self.context == PM_CONTEXT_ARCHIVE and self.samples is None: ++ __print_zone_status() ++ elif self.samples >= 1: ++ __print_zone_status() ++ self.samples -= 1 ++ else: ++ return ++ ++ def report(self, manager): ++ group = manager["sysinfo"] ++ self.samples = opts.pmGetOptionSamples() ++ t_s = group.contextCache.pmLocaltime(int(group.timestamp)) ++ timestamp = time.strftime(ZoneinfoOptions.timefmt, t_s.struct_time()) ++ header_indentation = " " if len(timestamp) < 9 else (len(timestamp) - 7) * " " ++ value_indentation = ((len(header_indentation) + 9) - len(timestamp)) * " " ++ self.print_report(group,timestamp,header_indentation,value_indentation,manager['zoneinfo']) ++ ++class ZoneinfoOptions(pmapi.pmOptions): ++ timefmt = "%H:%M:%S" ++ def __init__(self): ++ pmapi.pmOptions.__init__(self, "a:s:Z:zV?") ++ self.pmSetLongOptionHeader("General options") ++ self.pmSetLongOptionHostZone() ++ self.pmSetLongOptionTimeZone() ++ self.pmSetLongOptionHelp() ++ self.pmSetLongOptionSamples() ++ self.pmSetLongOptionVersion() ++ self.samples = None ++ self.context = None ++ ++if __name__ == '__main__': ++ try: ++ opts = ZoneinfoOptions() ++ mngr = pmcc.MetricGroupManager.builder(opts,sys.argv) ++ opts.context = mngr.type ++ missing = mngr.checkMissingMetrics(ALL_METRICS) ++ if missing is not None: ++ sys.stderr.write("\nError:some metrics are unavailable ".join(missing) + '\n') ++ sys.exit(1) ++ mngr["zoneinfo"] = ZONESTAT_METRICS ++ mngr["sysinfo"] = SYS_MECTRICS ++ mngr["allinfo"] = ALL_METRICS ++ mngr.printer = ZoneinfoReport(opts.samples,mngr,opts.context) ++ sts = mngr.run() ++ sys.exit(sts) ++ except pmapi.pmErr as error: ++ sys.stderr.write('%s\n' % (error.message())) ++ except pmapi.pmUsageErr as usage: ++ usage.message() ++ sys.exit(1) ++ except IOError: ++ signal.signal(signal.SIGPIPE, signal.SIG_DFL) ++ except KeyboardInterrupt: ++ pass +-- +2.39.3 + diff --git a/SOURCES/1011-pcp-zoneinfo-ol7-replay-fix.patch b/SOURCES/1011-pcp-zoneinfo-ol7-replay-fix.patch new file mode 100644 index 0000000..e049d3f --- /dev/null +++ b/SOURCES/1011-pcp-zoneinfo-ol7-replay-fix.patch @@ -0,0 +1,455 @@ +From 4a2cf79cd483bdb55feab3a2053294495525652d Mon Sep 17 00:00:00 2001 +From: sagar sagar +Date: Thu, 12 Oct 2023 17:46:07 +0530 +Subject: [PATCH] Fixed pcp-zoneinfo to replay ol7 archive on ol8 machine For + more info https://github.com/performancecopilot/pcp/pull/1814 + +Orabug:35903733 + +Signed-off-by: sagar sagar +--- + src/pcp/zoneinfo/pcp-zoneinfo.py | 315 +++++++++++++++++++------------ + 1 file changed, 193 insertions(+), 122 deletions(-) + +diff --git a/src/pcp/zoneinfo/pcp-zoneinfo.py b/src/pcp/zoneinfo/pcp-zoneinfo.py +index 32fc5ee..e5eabbd 100755 +--- a/src/pcp/zoneinfo/pcp-zoneinfo.py ++++ b/src/pcp/zoneinfo/pcp-zoneinfo.py +@@ -21,38 +21,44 @@ import sys + import time + from pcp import pmapi, pmcc + from cpmapi import PM_CONTEXT_ARCHIVE ++from cpmapi import PM_CONTEXT_HOST + +-SYS_MECTRICS = ["kernel.uname.sysname","kernel.uname.release", +- "kernel.uname.nodename","kernel.uname.machine","hinv.ncpu"] +- +-ZONESTAT_METRICS = [ "mem.zoneinfo.free","mem.zoneinfo.min","mem.zoneinfo.low","mem.zoneinfo.high", +- "mem.zoneinfo.scanned","mem.zoneinfo.spanned","mem.zoneinfo.present","mem.zoneinfo.managed", +- "mem.zoneinfo.nr_free_pages","mem.zoneinfo.nr_alloc_batch","mem.zoneinfo.nr_inactive_anon", +- "mem.zoneinfo.nr_active_anon","mem.zoneinfo.nr_inactive_file","mem.zoneinfo.nr_active_file", +- "mem.zoneinfo.nr_unevictable","mem.zoneinfo.nr_mlock","mem.zoneinfo.nr_anon_pages", +- "mem.zoneinfo.nr_mapped","mem.zoneinfo.nr_file_pages","mem.zoneinfo.nr_dirty", +- "mem.zoneinfo.nr_writeback","mem.zoneinfo.nr_slab_reclaimable","mem.zoneinfo.nr_slab_unreclaimable", +- "mem.zoneinfo.nr_page_table_pages","mem.zoneinfo.nr_kernel_stack","mem.zoneinfo.nr_unstable", +- "mem.zoneinfo.nr_bounce","mem.zoneinfo.nr_vmscan_write","mem.zoneinfo.nr_vmscan_immediate_reclaim", +- "mem.zoneinfo.nr_writeback_temp","mem.zoneinfo.nr_isolated_anon","mem.zoneinfo.nr_isolated_file", +- "mem.zoneinfo.nr_shmem","mem.zoneinfo.nr_dirtied","mem.zoneinfo.nr_written","mem.zoneinfo.numa_hit", +- "mem.zoneinfo.numa_miss","mem.zoneinfo.numa_foreign","mem.zoneinfo.numa_interleave", +- "mem.zoneinfo.numa_local","mem.zoneinfo.numa_other","mem.zoneinfo.workingset_refault", +- "mem.zoneinfo.workingset_activate","mem.zoneinfo.workingset_nodereclaim", +- "mem.zoneinfo.nr_anon_transparent_hugepages","mem.zoneinfo.nr_free_cma","mem.zoneinfo.cma", +- "mem.zoneinfo.nr_swapcached","mem.zoneinfo.nr_shmem_hugepages","mem.zoneinfo.nr_shmem_pmdmapped", +- "mem.zoneinfo.nr_file_hugepages","mem.zoneinfo.nr_file_pmdmapped", +- "mem.zoneinfo.nr_kernel_misc_reclaimable","mem.zoneinfo.nr_foll_pin_acquired", +- "mem.zoneinfo.nr_foll_pin_released","mem.zoneinfo.workingset_refault_anon", +- "mem.zoneinfo.workingset_refault_file","mem.zoneinfo.workingset_active_anon", +- "mem.zoneinfo.workingset_active_file","mem.zoneinfo.workingset_restore_anon", +- "mem.zoneinfo.workingset_restore_file","mem.zoneinfo.nr_zspages", +- "mem.zoneinfo.nr_zone_inactive_file","mem.zoneinfo.nr_zone_active_file", +- "mem.zoneinfo.nr_zone_inactive_anon","mem.zoneinfo.nr_zone_active_anon", +- "mem.zoneinfo.nr_zone_unevictable","mem.zoneinfo.nr_zone_write_pending", +- "mem.zoneinfo.protection" ] +- +-ALL_METRICS = ZONESTAT_METRICS + SYS_MECTRICS ++# By default we are assuming we are running on the latest pcp version ++# Later will figure out the version and will change the newVersionFlag ++ ++newVersionFlag = True ++ ++SYS_METRICS = ["kernel.uname.sysname", "kernel.uname.release", ++ "kernel.uname.nodename", "kernel.uname.machine", "hinv.ncpu"] ++ ++ZONESTAT_METRICS = ["mem.zoneinfo.managed", "mem.zoneinfo.nr_mlock", "mem.zoneinfo.present", ++ "mem.zoneinfo.scanned", "mem.zoneinfo.nr_unstable", "mem.zoneinfo.nr_page_table_pages", ++ "mem.zoneinfo.nr_shmem", "mem.zoneinfo.nr_free_pages", "mem.zoneinfo.nr_active_file", ++ "mem.zoneinfo.nr_dirty", "mem.zoneinfo.nr_writeback", "mem.zoneinfo.free", ++ "mem.zoneinfo.nr_unevictable", "mem.zoneinfo.nr_alloc_batch", "mem.zoneinfo.low", ++ "mem.zoneinfo.nr_slab_reclaimable", "mem.zoneinfo.nr_kernel_stack", "mem.zoneinfo.numa_interleave", ++ "mem.zoneinfo.workingset_nodereclaim", "mem.zoneinfo.nr_isolated_anon", "mem.zoneinfo.nr_bounce", ++ "mem.zoneinfo.numa_other", "mem.zoneinfo.nr_file_pages", "mem.zoneinfo.numa_hit", ++ "mem.zoneinfo.nr_isolated_file", "mem.zoneinfo.nr_anon_transparent_hugepages", ++ "mem.zoneinfo.nr_inactive_file", "mem.zoneinfo.spanned", "mem.zoneinfo.nr_written", ++ "mem.zoneinfo.numa_foreign", "mem.zoneinfo.nr_vmscan_write", "mem.zoneinfo.nr_free_cma", ++ "mem.zoneinfo.nr_writeback_temp", "mem.zoneinfo.nr_slab_unreclaimable", ++ "mem.zoneinfo.nr_vmscan_immediate_reclaim", "mem.zoneinfo.nr_mapped", "mem.zoneinfo.nr_anon_pages", ++ "mem.zoneinfo.high", "mem.zoneinfo.protection", "mem.zoneinfo.numa_local", "mem.zoneinfo.numa_miss", ++ "mem.zoneinfo.nr_active_anon", "mem.zoneinfo.workingset_refault", "mem.zoneinfo.nr_dirtied", ++ "mem.zoneinfo.workingset_activate", "mem.zoneinfo.nr_inactive_anon", "mem.zoneinfo.min"] ++ ++ZONESTAT_NEW_METRICS = ["mem.zoneinfo.nr_foll_pin_acquired", "mem.zoneinfo.nr_foll_pin_released", ++ "mem.zoneinfo.nr_zspages", "mem.zoneinfo.workingset_restore_anon", ++ "mem.zoneinfo.workingset_refault_anon", "mem.zoneinfo.nr_zone_active_anon", ++ "mem.zoneinfo.nr_zone_inactive_file", "mem.zoneinfo.nr_swapcached", ++ "mem.zoneinfo.nr_file_pmdmapped", "mem.zoneinfo.workingset_active_file", ++ "mem.zoneinfo.workingset_refault_file", "mem.zoneinfo.cma", ++ "mem.zoneinfo.workingset_active_anon", "mem.zoneinfo.nr_zone_write_pending", ++ "mem.zoneinfo.nr_shmem_pmdmapped", "mem.zoneinfo.nr_shmem_hugepages", ++ "mem.zoneinfo.nr_kernel_misc_reclaimable", "mem.zoneinfo.nr_zone_active_file", ++ "mem.zoneinfo.nr_file_hugepages", "mem.zoneinfo.nr_zone_unevictable", ++ "mem.zoneinfo.nr_zone_inactive_anon", "mem.zoneinfo.workingset_restore_file"] + + ZONEINFO_PER_NODE = { + "nr_inactive_anon" : "mem.zoneinfo.nr_inactive_anon", +@@ -71,104 +77,109 @@ ZONEINFO_PER_NODE = { + "nr_writeback" : "mem.zoneinfo.nr_writeback", + "nr_writeback_temp" : "mem.zoneinfo.nr_writeback_temp", + "nr_shmem" : "mem.zoneinfo.nr_shmem", +- "nr_shmem_hugepages" : "mem.zoneinfo.nr_shmem_hugepages", +- "nr_shmem_pmdmapped" : "mem.zoneinfo.nr_shmem_pmdmapped", +- "nr_file_hugepages" : "mem.zoneinfo.nr_file_hugepages", +- "nr_file_pmdmapped" : "mem.zoneinfo.nr_file_pmdmapped", + "nr_anon_transparent_hugepages" : "mem.zoneinfo.nr_anon_transparent_hugepages", + "nr_unstable" : "mem.zoneinfo.nr_unstable", + "nr_vmscan_write" : "mem.zoneinfo.nr_vmscan_write", + "nr_vmscan_immediate_reclaim" : "mem.zoneinfo.nr_vmscan_immediate_reclaim", + "nr_dirtied" : "mem.zoneinfo.nr_dirtied", + "nr_written" : "mem.zoneinfo.nr_written", ++ "nr_shmem_hugepages" : "mem.zoneinfo.nr_shmem_hugepages", ++ "nr_shmem_pmdmapped" : "mem.zoneinfo.nr_shmem_pmdmapped", ++ "nr_file_hugepages" : "mem.zoneinfo.nr_file_hugepages", ++ "nr_file_pmdmapped" : "mem.zoneinfo.nr_file_pmdmapped", + "nr_kernel_misc_reclaimable" : "mem.zoneinfo.nr_kernel_misc_reclaimable" + } + +-ZONEINFO_PAGE_INFO = { +- "pages free" : "mem.zoneinfo.free", +- " min" : "mem.zoneinfo.min", +- " low" : "mem.zoneinfo.low", +- " high" : "mem.zoneinfo.high", +- " spanned" : "mem.zoneinfo.spanned", +- " present" : "mem.zoneinfo.present", +- " managed" : "mem.zoneinfo.managed" +-} ++ZONEINFO_PAGE_INFO = [ ++ ("pages free" , "mem.zoneinfo.free"), ++ (" min" , "mem.zoneinfo.min"), ++ (" low" , "mem.zoneinfo.low"), ++ (" high" , "mem.zoneinfo.high"), ++ (" spanned", "mem.zoneinfo.spanned"), ++ (" present", "mem.zoneinfo.present"), ++ (" managed", "mem.zoneinfo.managed") ++] + + ZONEINFO_NUMBER_ZONE = { + "nr_free_pages" : "mem.zoneinfo.nr_free_pages", +- "nr_zone_inactive_anon" : "mem.zoneinfo.nr_zone_inactive_anon", +- "nr_zone_active_anon" : "mem.zoneinfo.nr_zone_active_anon", +- "nr_zone_inactive_file" : "mem.zoneinfo.nr_zone_inactive_file", +- "nr_zone_active_file" : "mem.zoneinfo.nr_zone_active_file", +- "nr_zone_unevictable" : "mem.zoneinfo.nr_zone_unevictable", +- "nr_zone_write_pending" : "mem.zoneinfo.nr_zone_write_pending", + "nr_mlock" : "mem.zoneinfo.nr_mlock", + "nr_page_table_pages" : "mem.zoneinfo.nr_page_table_pages", + "nr_kernel_stack" : "mem.zoneinfo.nr_kernel_stack", + "nr_bounce" : "mem.zoneinfo.nr_bounce", +- "nr_zspages" : "mem.zoneinfo.nr_zspages", + "nr_free_cma" : "mem.zoneinfo.nr_free_cma", + "numa_hit" : "mem.zoneinfo.numa_hit", + "numa_miss" : "mem.zoneinfo.numa_miss", + "numa_foreign" : "mem.zoneinfo.numa_foreign", + "numa_interleave" : "mem.zoneinfo.numa_interleave", ++ "numa_other" : "mem.zoneinfo.numa_other", ++ "nr_zone_active_anon" : "mem.zoneinfo.nr_zone_active_anon", ++ "nr_zone_inactive_file" : "mem.zoneinfo.nr_zone_inactive_file", ++ "nr_zone_active_file" : "mem.zoneinfo.nr_zone_active_file", ++ "nr_zone_unevictable" : "mem.zoneinfo.nr_zone_unevictable", ++ "nr_zone_write_pending" : "mem.zoneinfo.nr_zone_write_pending", ++ "nr_zspages" : "mem.zoneinfo.nr_zspages", + "numa_local" : "mem.zoneinfo.numa_local", +- "numa_other" : "mem.zoneinfo.numa_other" ++ "nr_zone_inactive_anon" : "mem.zoneinfo.nr_zone_inactive_anon" + } + ++ + class ReportingMetricRepository: + +- def __init__(self,group): ++ def __init__(self, group): + self.group = group + self.current_cached_values = {} + +- def __sorted(self,data): ++ def __sorted(self, data): + return dict(sorted(data.items(), key=lambda item: item[0].lower())) + +- def __fetch_current_value(self,metric): ++ def __fetch_current_value(self, metric): + val = dict(map(lambda x: (x[1], x[2]), self.group[metric].netValues)) + val = self.__sorted(val) + return dict(val) + +- def current_value(self,metric): ++ def current_value(self, metric): + if metric not in self.group: + return None + if self.current_cached_values.get(metric) is None: +- first_value=self.__fetch_current_value(metric) +- self.current_cached_values[metric]=first_value ++ first_value = self.__fetch_current_value(metric) ++ self.current_cached_values[metric] = first_value + return self.current_cached_values[metric] + ++ + class ZoneStatUtil: +- def __init__(self,metrics_repository): +- self.__metric_repository=metrics_repository +- self.report=ReportingMetricRepository(self.__metric_repository) ++ def __init__(self, metrics_repository): ++ self.__metric_repository = metrics_repository ++ self.report = ReportingMetricRepository(self.__metric_repository) + + def names(self): + data = self.report.current_value('mem.zoneinfo.present') +- return data.keys() ++ return sorted(data.keys()) + +- def metric_value(self,metric,node): +- data = self.report.current_value(metric) +- data = data.get(node,"0") +- if data != "0": +- data = data/4 +- return int(data) ++ def metric_value(self, metric, node): ++ if metric in ALL_METRICS: ++ data = self.report.current_value(metric) ++ data = data.get(node, "0") ++ if data != "0": ++ data = data/4 ++ return int(data) ++ return None + +- #creating the list of protection values for particular node +- def protection(self,node): ++ # creating the list of protection values for particular node ++ def protection(self, node): + data = self.report.current_value("mem.zoneinfo.protection") +- values = [value // 4 for key, value in data.items() if key.startswith(node)] +- return values ++ return [value // 4 for key, value in data.items() if key.startswith(node)] + +- def protection_names(self,node_name): ++ def protection_names(self, node_name): + data = self.report.current_value("mem.zoneinfo.protection") +- filtered_nodes = {key.split("::" + node_name)[0] + "::" + node_name for key in data.keys() if node_name in key} +- if len(filtered_nodes) == 0: +- filtered_nodes = None +- return filtered_nodes ++ return { ++ key.split("::" + node_name)[0] + "::" + node_name ++ for key in data.keys() ++ if node_name in key ++ } or None ++ + + class ZoneinfoReport(pmcc.MetricGroupPrinter): +- def __init__(self,samples,group,context): ++ def __init__(self, samples, group, context): + self.samples = samples + self.group = group + self.context = context +@@ -191,64 +202,84 @@ class ZoneinfoReport(pmcc.MetricGroupPrinter): + header_string += context['kernel.uname.machine'].netValues[0][2] + ' ' + print("%s (%s CPU)" % (header_string, self.__get_ncpu(context))) + +- #Function to format the node name as per the /proc/zoneinfo naming convention +- def __format_node_name(self,input_str): ++ # Function to format the node name as per the /proc/zoneinfo naming convention ++ def __format_node_name(self, input_str): + parts = input_str.split("::") +- if len(parts) == 2 and parts[1].startswith("node"): +- node_num = parts[1][4:] +- zone_name = parts[0] +- return "Node {}, zone {}".format(node_num, zone_name) +- else: ++ if len(parts) != 2 or not parts[1].startswith("node"): + return "Invalid input format" ++ node_num = parts[1][4:] ++ return "Node {}, zone {}".format(node_num, parts[0]) + +- def __print_values(self,timestamp,header_indentation,value_indentation,manager): ++ def __print_old_version_values(self, manager): ++ try: ++ total_nodes = manager.names() ++ total_nodes = sorted(total_nodes, key=lambda ++ x: ((x.split('::')[0] != 'DMA')*2, # Move 'DMA' entries to the front ++ x.split('::')[0])) ++ for node in total_nodes: ++ print(self.__format_node_name(str(node))) ++ print("\tper-node status") ++ # print(ZONEINFO_PER_NODE) ++ for key, value in ZONEINFO_PER_NODE.items(): ++ print("\t{} {}".format(key, manager.metric_value(value, node))) ++ for key, value in ZONEINFO_PAGE_INFO: ++ print("\t{} {}".format(key, manager.metric_value(value, node))) ++ print(" " * 14 + "protection " + str([int(i) for i in sorted(manager.protection(node))])) ++ for key, value in ZONEINFO_NUMBER_ZONE.items(): ++ print("\t{} {}".format(key, manager.metric_value(value, node))) ++ except IndexError: ++ print("Got some error while printing values for old version zoneinfo") ++ ++ def __print_values(self, manager): + total_nodes = manager.names() +- node_names = set(key.split('::')[1] for key in total_nodes) +- #sort the node names in decreasing order ++ node_names = {key.split('::')[1] for key in total_nodes} ++ # sort the node names in decreasing order + node_names = sorted(node_names, key=lambda x: int(x[4:]) if x.startswith('node') else float('inf')) + try: +- #lopping through all the available nodes ++ # lopping through all the available nodes + for node_name in node_names: +- #get all the types available for the current node on which i'm +- node_types=manager.protection_names(node_name) ++ # get all the types available for the current node on which i'm ++ node_types = manager.protection_names(node_name) + if node_types is None: + return + nodes = set(node_types).intersection(total_nodes) +- print("NODE {:>2},".format(node_name[4:]),"per-node status") +- for key,value in ZONEINFO_PER_NODE.items(): +- print ("\t",key,manager.metric_value(value,node_name)) ++ nodes = sorted(nodes, key=lambda x: ((x.split('::')[0] != 'DMA')*2, # Move 'DMA' entries to the front ++ x.split('::')[0])) ++ print("NODE {:>2}, per-node status".format(node_name[4:])) ++ for key, value in ZONEINFO_PER_NODE.items(): ++ print("\t{} {}".format(key, manager.metric_value(value, node_name))) + for node in nodes: + print(self.__format_node_name(node)) +- for key,value in ZONEINFO_PAGE_INFO.items(): +- print("\t",key,manager.metric_value(value,node)) +- print(" "*14,"protection",manager.protection(node)) +- for key,value in ZONEINFO_NUMBER_ZONE.items(): +- print ("\t",key,manager.metric_value(value,node)) +- #finding the remaining type of nodes data which i haven't printed so far +- #these nodes will have only pages information for them so just printing them out +- remaining_nodes = set(node_types) - nodes ++ for key, value in ZONEINFO_PAGE_INFO: ++ print("\t{} {}".format(key, manager.metric_value(value, node))) ++ print(" " * 14 + "protection " + str([int(i) for i in manager.protection(node)])) ++ for key, value in ZONEINFO_NUMBER_ZONE.items(): ++ print("\t{} {}".format(key, manager.metric_value(value, node))) ++ # finding the remaining type of nodes data which i haven't printed so far ++ # these nodes will have only pages information for them so just printing them out ++ remaining_nodes = set(node_types) - set(nodes) + if remaining_nodes: +- for node in remaining_nodes: ++ for node in sorted(remaining_nodes): + print(self.__format_node_name(node)) +- for key,value in ZONEINFO_PAGE_INFO.items(): +- print("\t",key,manager.metric_value(value,node)) +- print(" "*14,"protection",manager.protection(node)) ++ for key, value in ZONEINFO_PAGE_INFO: ++ print("\t", key, manager.metric_value(value, node)) ++ print(" " * 14 + "protection " + str([int(i) for i in manager.protection(node)])) + else: + continue + except IndexError: + print("Got some error while printing values for zoneinfo") + +- +- +- +- def print_report(self,group,timestamp,header_indentation,value_indentation,manager_zoneinfo): ++ def print_report(self, group, timestamp, manager_zoneinfo): + def __print_zone_status(): + zonestatus = ZoneStatUtil(manager_zoneinfo) + if zonestatus.names(): + try: + self.__print_machine_info(group) +- print("TimeStamp = ",timestamp) +- self.__print_values(timestamp, header_indentation, value_indentation, zonestatus) ++ print("TimeStamp = {}".format(timestamp)) ++ if newVersionFlag: ++ self.__print_values(zonestatus) ++ else: ++ self.__print_old_version_values(zonestatus) + except IndexError: + print("Incorrect machine info due to some missing metrics") + return +@@ -271,12 +302,12 @@ class ZoneinfoReport(pmcc.MetricGroupPrinter): + self.samples = opts.pmGetOptionSamples() + t_s = group.contextCache.pmLocaltime(int(group.timestamp)) + timestamp = time.strftime(ZoneinfoOptions.timefmt, t_s.struct_time()) +- header_indentation = " " if len(timestamp) < 9 else (len(timestamp) - 7) * " " +- value_indentation = ((len(header_indentation) + 9) - len(timestamp)) * " " +- self.print_report(group,timestamp,header_indentation,value_indentation,manager['zoneinfo']) ++ self.print_report(group, timestamp, manager['zoneinfo']) ++ + + class ZoneinfoOptions(pmapi.pmOptions): + timefmt = "%H:%M:%S" ++ + def __init__(self): + pmapi.pmOptions.__init__(self, "a:s:Z:zV?") + self.pmSetLongOptionHeader("General options") +@@ -288,19 +319,59 @@ class ZoneinfoOptions(pmapi.pmOptions): + self.samples = None + self.context = None + ++ ++def updateZoneinfoDataToBeFetched(): ++ ZoneinfoNumberZoneElementsToBeRemoved = { ++ "nr_zone_active_anon" : "mem.zoneinfo.nr_zone_active_anon", ++ "nr_zone_inactive_file" : "mem.zoneinfo.nr_zone_inactive_file", ++ "nr_zone_active_file" : "mem.zoneinfo.nr_zone_active_file", ++ "nr_zone_unevictable" : "mem.zoneinfo.nr_zone_unevictable", ++ "nr_zone_write_pending" : "mem.zoneinfo.nr_zone_write_pending", ++ "nr_zspages" : "mem.zoneinfo.nr_zspages", ++ "numa_local" : "mem.zoneinfo.numa_local", ++ "nr_zone_inactive_anon" : "mem.zoneinfo.nr_zone_inactive_anon" ++ } ++ ++ ZoneinfoPerNodeElementsToBeRemoved = { ++ "nr_shmem_hugepages" : "mem.zoneinfo.nr_shmem_hugepages", ++ "nr_shmem_pmdmapped" : "mem.zoneinfo.nr_shmem_pmdmapped", ++ "nr_file_hugepages" : "mem.zoneinfo.nr_file_hugepages", ++ "nr_file_pmdmapped" : "mem.zoneinfo.nr_file_pmdmapped", ++ "nr_kernel_misc_reclaimable" : "mem.zoneinfo.nr_kernel_misc_reclaimable" ++ } ++ ++ for key in ZoneinfoNumberZoneElementsToBeRemoved: ++ del ZONEINFO_NUMBER_ZONE[key] ++ ++ for key in ZoneinfoPerNodeElementsToBeRemoved: ++ del ZONEINFO_PER_NODE[key] ++ ++ ++ + if __name__ == '__main__': + try: + opts = ZoneinfoOptions() +- mngr = pmcc.MetricGroupManager.builder(opts,sys.argv) ++ mngr = pmcc.MetricGroupManager.builder(opts, sys.argv) + opts.context = mngr.type +- missing = mngr.checkMissingMetrics(ALL_METRICS) +- if missing is not None: +- sys.stderr.write("\nError:some metrics are unavailable ".join(missing) + '\n') +- sys.exit(1) ++ ZONESTAT_METRICS = ZONESTAT_METRICS + ZONESTAT_NEW_METRICS ++ ++ if opts.context == PM_CONTEXT_HOST: ++ context = pmapi.pmContext(opts.context) ++ elif opts.context == PM_CONTEXT_ARCHIVE: ++ context = pmapi.pmContext.fromOptions(opts,sys.argv) ++ try: ++ metric_ids =context.pmLookupName(ZONESTAT_METRICS) ++ descs= context.pmLookupDescs(metric_ids) ++ except pmapi.pmErr as error: ++ newVersionFlag = False ++ updateZoneinfoDataToBeFetched() ++ ZONESTAT_METRICS = [x for x in ZONESTAT_METRICS if x not in ZONESTAT_NEW_METRICS] ++ ++ ALL_METRICS = ZONESTAT_METRICS + SYS_METRICS + mngr["zoneinfo"] = ZONESTAT_METRICS +- mngr["sysinfo"] = SYS_MECTRICS ++ mngr["sysinfo"] = SYS_METRICS + mngr["allinfo"] = ALL_METRICS +- mngr.printer = ZoneinfoReport(opts.samples,mngr,opts.context) ++ mngr.printer = ZoneinfoReport(opts.samples, mngr, opts.context) + sts = mngr.run() + sys.exit(sts) + except pmapi.pmErr as error: +-- +2.39.3 + diff --git a/SOURCES/1012-pmlogcheck-Fixed-o-n-n-nested-hash-table-lookup.patch b/SOURCES/1012-pmlogcheck-Fixed-o-n-n-nested-hash-table-lookup.patch new file mode 100644 index 0000000..2f211bc --- /dev/null +++ b/SOURCES/1012-pmlogcheck-Fixed-o-n-n-nested-hash-table-lookup.patch @@ -0,0 +1,640 @@ +From 0f582f5914cd774cdeb1ce5425760941641ffbc7 Mon Sep 17 00:00:00 2001 +From: sagar sagar +Date: Fri, 25 Oct 2024 16:14:26 +0530 +Subject: [PATCH ol8 1012/1015] pmlogcheck: Fixed o(n*n) nested hash table + lookup + +upstream ref:- 441b804dee08a7c506ccb4848fe5833d62e79335 +Orabug:36995894 +Signed-off-by: sagar sagar +--- + src/pmlogcheck/GNUmakefile | 7 +- + src/pmlogcheck/logdecompress | 258 +++++++++++++++++++++++++++++++++++ + src/pmlogcheck/pass3.c | 121 ++++++++-------- + src/pmlogcheck/pmlogcheck.c | 60 +++++++- + 4 files changed, 369 insertions(+), 77 deletions(-) + create mode 100755 src/pmlogcheck/logdecompress + +diff --git a/src/pmlogcheck/GNUmakefile b/src/pmlogcheck/GNUmakefile +index 8308b40..c7a0d01 100644 +--- a/src/pmlogcheck/GNUmakefile ++++ b/src/pmlogcheck/GNUmakefile +@@ -18,14 +18,16 @@ include $(TOPDIR)/src/include/builddefs + CFILES = pmlogcheck.c pass0.c pass1.c pass2.c pass3.c + HFILES = logcheck.h + CMDTARGET = pmlogcheck$(EXECSUFFIX) ++HELPER = logdecompress + LLDLIBS = $(PCPLIB) $(LIB_FOR_MATH) + +-default: $(CMDTARGET) ++default: $(CMDTARGET) $(HELPER) + + include $(BUILDRULES) + + install: $(CMDTARGET) + $(INSTALL) -m 755 $(CMDTARGET) $(PCP_BIN_DIR)/$(CMDTARGET) ++ $(INSTALL) -m 755 $(HELPER) $(PCP_SHARE_DIR)/bin/$(HELPER) + + default_pcp: default + +@@ -34,6 +36,3 @@ install_pcp: install + $(OBJECTS): logcheck.h + + $(OBJECTS): $(TOPDIR)/src/include/pcp/libpcp.h +- +-check:: $(CFILES) $(HFILES) +- $(CLINT) $^ +diff --git a/src/pmlogcheck/logdecompress b/src/pmlogcheck/logdecompress +new file mode 100755 +index 0000000..f78757d +--- /dev/null ++++ b/src/pmlogcheck/logdecompress +@@ -0,0 +1,258 @@ ++#!/bin/sh ++# ++# Decompress files of a PCP archive. ++# ++# Usage: logdecompress [-vn] [-d dir] archive ++# ++# Copyright (c) 2024 Ken McDonell, Inc. All Rights Reserved. ++# ++# This program is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation; either version 2 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++# for more details. ++# ++# You should have received a copy of the GNU General Public License along ++# with this program; if not, write to the Free Software Foundation, Inc., ++# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++# ++ ++. $PCP_DIR/etc/pcp.env ++ ++prog=`basename $0` ++usage="Usage: $prog [-nv] [-d dir] archive" ++ ++tmp=/var/tmp/logdecompress.$$ ++status=1 ++trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15 ++ ++_decompress() ++{ ++ if $showme ++ then ++ echo >&2 "+ $*" ++ elif ! $* ++ then ++ echo >&2 "$* file failed" ++ exit ++ fi ++} ++ ++showme=false ++verbose=false ++dir='' ++while getopts 'd:nv\?' c ++do ++ case "$c" ++ in ++ d) ++ if [ -z "$OPTARG" ] ++ then ++ echo >&2 "$prog: -c requires a dir argument" ++ exit ++ fi ++ if [ ! -d "$OPTARG" ] ++ then ++ echo >&2 "$prog: $OPTARG is not an existing directory" ++ exit ++ fi ++ dir="$OPTARG" ++ ;; ++ n) ++ showme=true ++ ;; ++ v) ++ verbose=true ++ ;; ++ \?) ++ echo >&2 "$usage" ++ status=0 ++ exit ++ ;; ++ esac ++done ++ ++if [ $OPTIND != $# ] ++then ++ echo >&2 "$usage" ++ exit ++fi ++shift `expr $OPTIND - 1` ++ ++archbase="`pmlogbasename $1`" ++$verbose && echo >&2 "archbase=$archbase" ++ ++# for all the files that seem to be part of this archive, ++# count the files and the number that are compressed ++# ++nfile=0 ++ncompress=0 ++for file in ${archbase}* ++do ++ [ ! -f "$file" ] && continue ++ if [ "$archbase" = `pmlogbasename "$file"` ] ++ then ++ nfile=`expr $nfile + 1` ++ case $file ++ in ++ *.xz|*.lzma|*.bz2|*.bz|*.gz|*.Z|*.z) ++ ncompress=`expr $ncompress + 1` ++ if [ -z "$dir" ] ++ then ++ outfile=`echo "$file" | sed -e 's/\.[^.]*$//'` ++ else ++ outfile="$dir"/`basename "$file" | sed -e 's/\.[^.]*$//'` ++ fi ++ if [ -f "$outfile" ] ++ then ++ echo >&2 "$prog: $outfile exists and will not be clobbered" ++ exit ++ fi ++ ;; ++ esac ++ fi ++done ++ ++if [ "$nfile" -eq 0 ] ++then ++ echo >&2 "No PCP archive files match \"$1\"" ++ exit ++fi ++ ++if [ "$ncompress" -eq 0 ] ++then ++ $verbose && echo >&2 "No compresssed PCP archive files match \"$1\"" ++ echo "$archbase" ++ status=0 ++ exit ++fi ++$verbose && echo >&2 "$ncompress of $nfile files in the archive are compressed" ++ ++for file in ${archbase}* ++do ++ [ ! -f "$file" ] && continue ++ if [ "$archbase" = `pmlogbasename "$file"` ] ++ then ++ case $file ++ in ++ *.xz) ++ if [ -z "$dir" ] ++ then ++ outfile=`basename "$file" .xz` ++ _decompress xz --decompress "$file" ++ else ++ outfile="$dir"/`basename "$file" .xz` ++ _decompress xz --decompress --stdout "$file" >"$outfile" ++ fi ++ $verbose && echo >&2 "$outfile: decompressed" ++ ;; ++ ++ *.lzma) ++ if [ -z "$dir" ] ++ then ++ outfile=`basename "$file" .lzma` ++ _decompress xz --decompress --format=lzma "$file" ++ else ++ outfile="$dir"/`basename "$file" .lzma` ++ _decompress xz --decompress --format=lzma --stdout "$file" >"$outfile" ++ fi ++ $verbose && echo >&2 "$outfile: decompressed" ++ ;; ++ ++ *.bz2) ++ if [ -z "$dir" ] ++ then ++ outfile=`basename "$file" .bz2` ++ _decompress bzip2 -d "$file" ++ else ++ outfile="$dir"/`basename "$file" .bz2` ++ _decompress bzip2 -dc "$file" >"$outfile" ++ fi ++ $verbose && echo >&2 "$outfile: decompressed" ++ ;; ++ ++ *.bz) ++ if [ -z "$dir" ] ++ then ++ outfile=`basename "$file" .bz` ++ _decompress bzip2 -d "$file" ++ else ++ outfile="$dir"/`basename "$file" .bz` ++ _decompress bzip2 -dc "$file" >"$outfile" ++ fi ++ $verbose && echo >&2 "$outfile: decompressed" ++ ;; ++ ++ *.gz) ++ if [ -z "$dir" ] ++ then ++ outfile=`basename "$file" .gz` ++ _decompress gzip -d "$file" ++ else ++ outfile="$dir"/`basename "$file" .gz` ++ _decompress gzip -dc "$file" >"$outfile" ++ fi ++ $verbose && echo >&2 "$outfile: decompressed" ++ ;; ++ ++ *.z) ++ if [ -z "$dir" ] ++ then ++ outfile=`basename "$file" .z` ++ _decompress gzip -d "$file" ++ else ++ outfile="$dir"/`basename "$file" .z` ++ _decompress gzip -dc "$file" >"$outfile" ++ fi ++ $verbose && echo >&2 "$outfile: decompressed" ++ ;; ++ ++ *.Z) ++ echo >&2 TODO: $file ++ ;; ++ ++ *) # not compressed ... do nothing unless -d, and then ++ # try ln(1), failing that cp(1) ++ # ++ if [ -n "$dir" ] ++ then ++ outfile="$dir/`basename $file`" ++ if $showme ++ then ++ echo >&2 "+ ln $file $outfile" ++ echo >&2 "+ if that fails ... cp $file $outfile" ++ else ++ if ! ln "$file" "$outfile" >$tmp.err 2>&1 ++ then ++ $verbose && cat >&2 $tmp.err ++ if ! cp "$file" "$outfile" >>$tmp.err 2>&1 ++ then ++ cat >&2 $tmp.err ++ echo >&2 "Failed to link or copy $file" ++ exit ++ else ++ $verbose && echo >&2 "$outfile: copied" ++ fi ++ else ++ $verbose && echo >&2 "$outfile: linked" ++ fi ++ fi ++ fi ++ ;; ++ esac ++ fi ++done ++ ++if [ -z "$dir" ] ++then ++ echo "$archbase" ++else ++ echo "$dir/$archbase" ++fi ++ ++status=0 ++exit +diff --git a/src/pmlogcheck/pass3.c b/src/pmlogcheck/pass3.c +index 6f17419..f6b80d3 100644 +--- a/src/pmlogcheck/pass3.c ++++ b/src/pmlogcheck/pass3.c +@@ -28,8 +28,7 @@ typedef struct { + pmDesc desc; + int valfmt; + double scale; +- instData **instlist; +- unsigned int listsize; ++ __pmHashCtl insthash; + } checkData; + + static __pmHashCtl hashlist; /* hash statistics about each metric */ +@@ -101,14 +100,13 @@ print_stamp(FILE *f, struct timeval *stamp) + } + + static double +-unwrap(double current, struct timeval *curtime, checkData *checkdata, int index) ++unwrap(double current, struct timeval *curtime, checkData *checkdata, instData *idp) + { + double outval = current; + int wrapflag = 0; + char *str = NULL; + +- if ((current - checkdata->instlist[index]->lastval) < 0.0 && +- checkdata->instlist[index]->lasttime.tv_sec > 0) { ++ if ((current - idp->lastval) < 0.0 && idp->lasttime.tv_sec > 0) { + switch (checkdata->desc.type) { + case PM_TYPE_32: + case PM_TYPE_U32: +@@ -130,16 +128,18 @@ unwrap(double current, struct timeval *curtime, checkData *checkdata, int index) + print_stamp(stderr, curtime); + fprintf(stderr, "]: "); + print_metric(stderr, checkdata->desc.pmid); +- if (pmNameInDomArchive(checkdata->desc.indom, checkdata->instlist[index]->inst, &str) < 0) ++ if (pmNameInDomArchive(checkdata->desc.indom, idp->inst, &str) < 0) + fprintf(stderr, ": %s wrap", typeStr(checkdata->desc.type)); + else { + fprintf(stderr, "[%s]: %s wrap", str, typeStr(checkdata->desc.type)); + free(str); + } +- fprintf(stderr, "\n\tvalue %.0f at ", checkdata->instlist[index]->lastval); +- print_stamp(stderr, &checkdata->instlist[index]->lasttime); ++ fprintf(stderr, "\n\tvalue %.0f at ", idp->lastval); ++ print_stamp(stderr, &idp->lasttime); + fprintf(stderr, "\n\tvalue %.0f at ", current); + print_stamp(stderr, curtime); ++ if (vflag) ++ fprintf(stderr, "\n\tdifference %.0f", current - idp->lastval); + fputc('\n', stderr); + } + +@@ -150,12 +150,13 @@ static void + newHashInst(pmValue *vp, + checkData *checkdata, /* updated by this function */ + int valfmt, +- struct timeval *timestamp, /* timestamp for this sample */ +- int pos) /* position of this inst in instlist */ ++ struct timeval *timestamp /* timestamp for this sample */ ++ ) + { + int sts; + size_t size; + pmAtomValue av; ++ instData *idp; + + if ((sts = pmExtractValue(valfmt, vp, checkdata->desc.type, &av, PM_TYPE_DOUBLE)) < 0) { + fprintf(stderr, "%s.%d:[", l_archname, l_ctxp->c_archctl->ac_vol); +@@ -166,18 +167,19 @@ newHashInst(pmValue *vp, + fprintf(stderr, "%s: possibly corrupt archive?\n", pmGetProgname()); + exit(EXIT_FAILURE); + } +- size = (pos+1)*sizeof(instData*); +- checkdata->instlist = (instData**) realloc(checkdata->instlist, size); +- if (!checkdata->instlist) +- pmNoMem("newHashInst.instlist", size, PM_FATAL_ERR); +- size = sizeof(instData); +- checkdata->instlist[pos] = (instData*) malloc(size); +- if (!checkdata->instlist[pos]) +- pmNoMem("newHashInst.instlist[pos]", size, PM_FATAL_ERR); +- checkdata->instlist[pos]->inst = vp->inst; +- checkdata->instlist[pos]->lastval = av.d; +- checkdata->instlist[pos]->lasttime = *timestamp; +- checkdata->listsize++; ++ size = sizeof(instData); ++ if ((idp = (instData *)malloc(sizeof(instData))) == NULL) { ++ pmNoMem("newHashInst: instData", size, PM_FATAL_ERR); ++ } ++ idp->inst = vp->inst; ++ idp->lastval = av.d; ++ idp->lasttime = *timestamp; ++ if ((sts = __pmHashAdd(vp->inst, (void *)idp, &checkdata->insthash)) < 0) { ++ fprintf(stderr, "newHashInst: __pmHashAdd(%d, ...) for pmID %s failed: %s\n", ++ vp->inst, pmIDStr(checkdata->desc.pmid), pmErrStr(sts)); ++ exit(EXIT_FAILURE); ++ } ++ + if (pmDebugOptions.appl1) { + char *name; + +@@ -207,6 +209,7 @@ newHashItem(pmValueSet *vsp, + struct timeval *timestamp) /* timestamp for this sample */ + { + int j; ++ int sts; + + checkdata->desc = *desc; + checkdata->scale = 0.0; +@@ -225,17 +228,21 @@ newHashItem(pmValueSet *vsp, + checkdata->desc.units.dimTime--; + } + +- checkdata->listsize = 0; +- checkdata->instlist = NULL; +- for (j = 0; j < vsp->numval; j++) { +- newHashInst(&vsp->vlist[j], checkdata, vsp->valfmt, timestamp, j); ++ memset(&checkdata->insthash, 0, sizeof(checkdata->insthash)); ++ if ((sts = __pmHashPreAlloc(vsp->numval, &checkdata->insthash)) < 0) { ++ fprintf(stderr, "newHashItem: __pmHashPreAlloc(%d, ...) for pmID %s failed: %s\n", ++ vsp->numval, pmIDStr(checkdata->desc.pmid), pmErrStr(sts)); ++ exit(EXIT_FAILURE); ++ } ++ for (j = 0; j < vsp->numval; j++) { ++ newHashInst(&vsp->vlist[j], checkdata, vsp->valfmt, timestamp); + } + } + + static void + docheck(pmResult *result) + { +- int i, j, k; ++ int i, j; + int sts; + pmDesc desc; + pmAtomValue av; +@@ -312,13 +319,6 @@ docheck(pmResult *result) + fprintf(stderr, "] "); + print_metric(stderr, vsp->pmid); + fprintf(stderr, ": __pmHashAdd good failed (internal pmlogcheck error)\n"); +- /* free memory allocated above on insert failure */ +- for (j = 0; j < vsp->numval; j++) { +- if (checkdata->instlist[j] != NULL) +- free(checkdata->instlist[j]); +- } +- if (checkdata->instlist != NULL) +- free(checkdata->instlist); + continue; + } + } +@@ -343,35 +343,19 @@ docheck(pmResult *result) + } + } + for (j = 0; j < vsp->numval; j++) { /* iterate thro result values */ ++ __pmHashNode *hnp; ++ instData *idp = NULL; ++ + vp = &vsp->vlist[j]; +- k = j; /* index into stored inst list, result may differ */ +- if ((vsp->numval > 1) || (checkdata->desc.indom != PM_INDOM_NULL)) { +- /* must store values using correct inst - probably in correct order already */ +- if ((k < checkdata->listsize) && (checkdata->instlist[k]->inst != vp->inst)) { +- for (k = 0; k < checkdata->listsize; k++) { +- if (vp->inst == checkdata->instlist[k]->inst) { +- break; /* k now correct */ +- } +- } +- if (k == checkdata->listsize) { /* no matching inst was found */ +- newHashInst(vp, checkdata, vsp->valfmt, &result->timestamp, k); +- continue; +- } +- } +- else if (k >= checkdata->listsize) { +- k = checkdata->listsize; +- newHashInst(vp, checkdata, vsp->valfmt, &result->timestamp, k); +- continue; +- } +- } +- if (k >= checkdata->listsize) { /* only error values observed so far */ +- k = checkdata->listsize; +- newHashInst(vp, checkdata, vsp->valfmt, &result->timestamp, k); ++ hnp = __pmHashSearch(vp->inst, &checkdata->insthash); ++ if (hnp == NULL) { ++ /* first time for this inst and this metric */ ++ newHashInst(vp, checkdata, vsp->valfmt, &result->timestamp); + continue; + } +- ++ idp = (instData *)hnp->data; + timediff = result->timestamp; +- tsub(&timediff, &(checkdata->instlist[k]->lasttime)); ++ tsub(&timediff, &idp->lasttime); + if (timediff.tv_sec < 0 || timediff.tv_usec < 0) { + /* clip negative values at zero */ + timediff.tv_sec = 0; +@@ -397,10 +381,10 @@ docheck(pmResult *result) + fprintf(stderr, ": current counter value is %.0f\n", av.d); + } + if (nowrap == 0) +- unwrap(av.d, &(result->timestamp), checkdata, k); ++ unwrap(av.d, &(result->timestamp), checkdata, idp); + } +- checkdata->instlist[k]->lastval = av.d; +- checkdata->instlist[k]->lasttime = result->timestamp; ++ idp->lastval = av.d; ++ idp->lasttime = result->timestamp; + } + } + } +@@ -513,14 +497,17 @@ pass3(__pmContext *ctxp, char *archname, pmOptions *opts) + * at next fetch (mimic interp.c from libpcp) + */ + __pmHashNode *hptr; +- checkData *checkdata; +- int k; ++ /* walk hash list of metrics */ + for (hptr = __pmHashWalk(&hashlist, PM_HASH_WALK_START); + hptr != NULL; + hptr = __pmHashWalk(&hashlist, PM_HASH_WALK_NEXT)) { +- checkdata = (checkData *)hptr->data; +- for (k = 0; k < checkdata->listsize; k++) { +- checkdata->instlist[k]->lasttime.tv_sec = 0; ++ checkData *checkdata; ++ __pmHashNode *hnp; ++ checkdata = (checkData *)hptr->data; ++ for (hnp = __pmHashWalk(&checkdata->insthash, PM_HASH_WALK_START); ++ hnp != NULL; ++ hnp = __pmHashWalk(&checkdata->insthash, PM_HASH_WALK_NEXT)) { ++ ((instData *)(hnp->data))->lasttime.tv_sec = 0; + } + } + +diff --git a/src/pmlogcheck/pmlogcheck.c b/src/pmlogcheck/pmlogcheck.c +index 9927a79..0f73011 100644 +--- a/src/pmlogcheck/pmlogcheck.c ++++ b/src/pmlogcheck/pmlogcheck.c +@@ -170,6 +170,10 @@ main(int argc, char *argv[]) + char *archpathname; /* from the command line */ + char *archdirname; /* after dirname() */ + char archname[MAXPATHLEN]; /* full pathname to base of archive name */ ++ struct timespec then_real; ++ struct timespec now_real; ++ struct timespec then_cpu; ++ struct timespec now_cpu; + + while ((c = pmGetOptions(argc, argv, &opts)) != EOF) { + switch (c) { +@@ -251,9 +255,21 @@ main(int argc, char *argv[]) + else { + pmsprintf(path, sizeof(path), "%s%c%s", archdirname, sep, namelist[i]->d_name); + } ++ if (pmDebugOptions.appl3) { ++ clock_gettime(CLOCK_MONOTONIC_RAW, &then_real); ++ clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &then_cpu); ++ } + if (pass0(path) == STS_FATAL) + /* unrepairable or unrepaired error */ + sts = STS_FATAL; ++ if (pmDebugOptions.appl3) { ++ clock_gettime(CLOCK_MONOTONIC_RAW, &now_real); ++ clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &now_cpu); ++ fprintf(stderr, "pass0(%s) elapsed %.3fs cpu %.6fs\n", ++ namelist[i]->d_name, ++ pmtimespecSub(&now_real, &then_real), ++ pmtimespecSub(&now_cpu, &then_cpu)); ++ } + } + if (meta_state == STATE_MISSING) { + fprintf(stderr, "%s%c%s.meta: missing metadata file\n", archdirname, sep, archbasename); +@@ -307,19 +323,51 @@ main(int argc, char *argv[]) + strncpy(archname, archbasename, sizeof(archname) - 1); + else + pmsprintf(archname, sizeof(archname), "%s%c%s", archdirname, sep, archbasename); +- ++ if (pmDebugOptions.appl3) { ++ clock_gettime(CLOCK_MONOTONIC_RAW, &then_real); ++ clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &then_cpu); ++ } + sts = pass1(ctxp, archname); +- ++ if (pmDebugOptions.appl3) { ++ clock_gettime(CLOCK_MONOTONIC_RAW, &now_real); ++ clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &now_cpu); ++ fprintf(stderr, "pass1(%s) elapsed %.3fs cpu %.6fs\n", ++ archbasename, ++ pmtimespecSub(&now_real, &then_real), ++ pmtimespecSub(&now_cpu, &then_cpu)); ++ } + if (index_state == STATE_BAD) { + /* prevent subsequent use of bad temporal index */ + ctxp->c_archctl->ac_log->numti = 0; + } +- ++ if (pmDebugOptions.appl3) { ++ clock_gettime(CLOCK_MONOTONIC_RAW, &then_real); ++ clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &then_cpu); ++ } + sts = pass2(ctxp, archname); +- +- if (!mflag) ++ if (pmDebugOptions.appl3) { ++ clock_gettime(CLOCK_MONOTONIC_RAW, &now_real); ++ clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &now_cpu); ++ fprintf(stderr, "pass2(%s) elapsed %.3fs cpu %.6fs\n", ++ archbasename, ++ pmtimespecSub(&now_real, &then_real), ++ pmtimespecSub(&now_cpu, &then_cpu)); ++ } ++ if (!mflag){ ++ if (pmDebugOptions.appl3) { ++ clock_gettime(CLOCK_MONOTONIC_RAW, &then_real); ++ clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &then_cpu); ++ } + sts = pass3(ctxp, archname, &opts); +- ++ if (pmDebugOptions.appl3) { ++ clock_gettime(CLOCK_MONOTONIC_RAW, &now_real); ++ clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &now_cpu); ++ fprintf(stderr, "pass3(%s) elapsed %.3fs cpu %.6fs\n", ++ archbasename, ++ pmtimespecSub(&now_real, &then_real), ++ pmtimespecSub(&now_cpu, &then_cpu)); ++ } ++ } + if (vflag) { + if (result_count > 0) + fprintf(stderr, "Processed %d pmResult records\n", result_count); +-- +2.43.5 + diff --git a/SOURCES/1013-pcp-ps-added-args-option-to-view-full-process-argume.patch b/SOURCES/1013-pcp-ps-added-args-option-to-view-full-process-argume.patch new file mode 100644 index 0000000..068a3c9 --- /dev/null +++ b/SOURCES/1013-pcp-ps-added-args-option-to-view-full-process-argume.patch @@ -0,0 +1,419 @@ +From e773134d1cd8ee998ddaac3dd9b9f5039eef4897 Mon Sep 17 00:00:00 2001 +From: sagar sagar +Date: Fri, 25 Oct 2024 16:15:56 +0530 +Subject: [PATCH ol8 1013/1015] pcp-ps: added args option to view full process + argument + +updated the man page for the changes as well +upstream ref:- https://github.com/performancecopilot/pcp/pull/2094 + +Orabug: 37062125 +Orabug: 37063335 +Orabug: 37062126 +Orabug: 37064841 +Signed-off-by: sagar sagar +--- + src/pcp/ps/pcp-ps.1 | 30 +++++-- + src/pcp/ps/pcp-ps.py | 188 ++++++++++++++++++------------------------- + 2 files changed, 99 insertions(+), 119 deletions(-) + +diff --git a/src/pcp/ps/pcp-ps.1 b/src/pcp/ps/pcp-ps.1 +index 7ca98db..8c44e67 100755 +--- a/src/pcp/ps/pcp-ps.1 ++++ b/src/pcp/ps/pcp-ps.1 +@@ -69,14 +69,14 @@ Display all the process. + .br + .TS + l l. +-PID Process idenfier. +-TTY The termianl assoicated with the prcoess. ++PID Process identifier. ++TTY The terminal associated with the process. + TIME T{ + .ad l + .hy 0 + The cumulated CPU time in [DD-]hh:mm:ss format (time=TIME). + T} +-CMD The command name of the task. ++CMD The task name along with its complete arguments. + .TE + .TP + .B \-c [\fIcommand name\fR] +@@ -106,7 +106,7 @@ It is a single argument in the form of a blank-separated or comma-separated list + The argument to -o are following: + + .TS +-lfB lfB lfB ++lfB lfB lfB + lfB l lx. + COL HEADER DESCRIPTION + _ _ _ +@@ -118,8 +118,14 @@ physical memory on the machine expressed as a percentage + T} + start START time the command started + time TIME accumulated cpu time, user + system +-cls CLS scheduling class of the process +-cmd CMD see \fBargs\fR. (alias args, command). ++cls CLS scheduling class of the process. ++cmd CMD see \fBTask name\fR. (alias args, command). ++args COMMAND T{ ++.ad l ++.hy 0 ++To display the full program name with its arguments (use at last ++position in -o list to view full command) ++T} + pid PID The process ID + ppid PPID Parent process ID + pri PRI Priority of the process +@@ -129,7 +135,7 @@ rss RSS T{ + .hy 0 + the non-swapped physical memory that a task has used + T} +-rtprio RTPRIO realtime priority ++rtprio RTPRIO real-time priority + pname Pname Process name + tty TT controlling tty (terminal) + uid UID see \fBeuid\fR +@@ -151,7 +157,7 @@ For example: + .B pcp-ps \-o pid,\:user,\:args + + .TS +-lfB lfB lfB ++lfB lfB lfB + lfB l lx. + CODE HEADER DESCRIPTION + _ _ _ +@@ -286,3 +292,11 @@ For environment variables affecting PCP tools, see \fBpmGetOptions\fP(3). + .BR strftime (3) + and + .BR environ (7). ++ ++.\" control lines for scripts/man-spell ++.\" +ok+ SCHED_DEADLINE SCHED_BATCH SCHED_OTHER SCHED_FIFO SCHED_IDLE ++.\" +ok+ SCHED_ISO SCHED_RR cputime ++.\" +ok+ RTPRIO rtprio WCHAN PPIDs EUSER wchan Pname pname uname ++.\" +ok+ vsize euser PPID EUID ppid args euid IDL DLN CLS CMD COL PRI RSS ++.\" +ok+ VSZ cls cmd col pri vsz DD FF RR TT hh ss ++.\" +ok+ realtime {not real-time, from (cputime/realtime ratio)} +diff --git a/src/pcp/ps/pcp-ps.py b/src/pcp/ps/pcp-ps.py +index dbd5565..94a428f 100755 +--- a/src/pcp/ps/pcp-ps.py ++++ b/src/pcp/ps/pcp-ps.py +@@ -162,8 +162,9 @@ class ProcessFilter: + + + class ProcessStatusUtil: +- def __init__(self, instance, delta_time, metrics_repository): ++ def __init__(self, instance, manager, delta_time, metrics_repository): + self.instance = instance ++ self.manager = manager + self.__delta_time = delta_time + self.__metric_repository = metrics_repository + +@@ -207,8 +208,11 @@ class ProcessStatusUtil: + data = '-' + return data + +- def process_name_with_args(self): +- data = self.__metric_repository.current_value('proc.psinfo.psargs', self.instance)[:30] ++ def process_name_with_args(self,flag = False): ++ if flag is True: ++ data = self.__metric_repository.current_value('proc.psinfo.psargs', self.instance) ++ else: ++ data = self.__metric_repository.current_value('proc.psinfo.psargs', self.instance)[:30] + if len(data) < 30: + whitespace = 30 - len(data) + res = data.ljust(whitespace + len(data), ' ') +@@ -216,6 +220,8 @@ class ProcessStatusUtil: + else: + return data + ++ def process_name_with_args_last(self): ++ return self.process_name_with_args(True) + def vsize(self): + return self.__metric_repository.current_value('proc.psinfo.vsize', self.instance) + +@@ -294,10 +300,10 @@ class ProcessStatusUtil: + + def start(self): + s_time = self.__metric_repository.current_value('proc.psinfo.start_time', self.instance) +- group = manager['psstat'] ++ group = self.manager['psstat'] + kernel_boottime = group['kernel.all.boottime'].netValues[0][2] +- ts = group.contextCache.pmLocaltime(int(0.5 + kernel_boottime + (s_time / 1000))) +- if group.timestamp.tv_sec - int(0.5 + kernel_boottime + s_time / 1000) >= 24*60*60: ++ ts = group.contextCache.pmLocaltime(int(kernel_boottime + (s_time / 1000))) ++ if group.timestamp.tv_sec - (kernel_boottime + s_time / 1000) >= 24*60*60: + # started one day or more ago, use MmmDD HH:MM + return time.strftime("%b%d %H:%M", ts.struct_time()) + else: +@@ -346,14 +352,16 @@ PIDINFO_PAIR = {"%cpu": ('%CPU', ProcessStatusUtil.system_percent), + "start": ("START\t", ProcessStatusUtil.start), + "time": ("TIME\t", ProcessStatusUtil.total_time), + "cls": ("CLS", ProcessStatusUtil.policy), +- "cmd": ("Command\t\t\t", ProcessStatusUtil.process_name_with_args), ++ "cmd": ("Command\t\t\t", ProcessStatusUtil.process_name), ++ "args": ("Command\t\t\t", ProcessStatusUtil.process_name_with_args), ++ "args_last": ("Command\t\t\t", ProcessStatusUtil.process_name_with_args_last), + "pid": ("PID\t", ProcessStatusUtil.pid), + "ppid": ("PPID\t", ProcessStatusUtil.ppid), + "pri": ("PRI", ProcessStatusUtil.priority), + "state": ("S", ProcessStatusUtil.s_name), + "rss": ("RSS", ProcessStatusUtil.rss), + "rtprio": ("RTPRIO", ProcessStatusUtil.priority), +- "tty": ("TT", ProcessStatusUtil.tty_name), ++ "tty": ("TTY\t", ProcessStatusUtil.tty_name), + "pname": ("Pname\t\t", ProcessStatusUtil.process_name), + "vsize": ("VSZ", ProcessStatusUtil.vsize), + "uname": ("USER\t", ProcessStatusUtil.user_name), +@@ -362,11 +370,13 @@ PIDINFO_PAIR = {"%cpu": ('%CPU', ProcessStatusUtil.system_percent), + + + class ProcessStatus: +- def __init__(self, metric_repository): ++ def __init__(self, manager, metric_repository): ++ self.__manager = manager + self.__metric_repository = metric_repository + + def get_processes(self, delta_time): +- return map((lambda pid: (ProcessStatusUtil(pid, delta_time, self.__metric_repository))), self.__pids()) ++ return map(lambda pid: ++ (ProcessStatusUtil(pid, self.__manager, delta_time, self.__metric_repository)), self.__pids()) + + def __pids(self): + pid_dict = self.__metric_repository.current_values('proc.psinfo.pid') +@@ -381,6 +391,9 @@ class DynamicProcessReporter: + self.printer = printer + self.processStatOptions = processStatOptions + ++ def _is_last_and_args(self, key): ++ return (key == "args") and \ ++ self.processStatOptions.colum_list.index(key) == len(self.processStatOptions.colum_list) - 1 + def print_report(self, timestamp, header_indentation, value_indentation): + + # when the print count is exhausted exit the program gracefully +@@ -437,7 +450,9 @@ class DynamicProcessReporter: + for process in processes: + data_to_print = timestamp + '\t' + for key in self.processStatOptions.colum_list: +- if key in PIDINFO_PAIR: ++ if self._is_last_and_args(key): ++ data_to_print += str(PIDINFO_PAIR["args_last"][1](process)) + '\t\t' ++ elif key in PIDINFO_PAIR: + data_to_print += str(PIDINFO_PAIR[key][1](process)) + '\t\t' + print(data_to_print) + +@@ -464,7 +479,7 @@ class ProcessStatusReporter: + self.printer("Timestamp" + header_indentation + "PID\t\t\tTTY\tTIME\t\tCMD") + processes = self.process_filter.filter_processes(self.process_report.get_processes(self.delta_time)) + for process in processes: +- command = process.process_name() ++ command = process.process_name_with_args(True) + ttyname = process.tty_name() + self.printer("%s%s%s\t\t%s\t%s\t%s" % (timestamp, value_indentation, process.pid(), ttyname, + process.total_time(), command)) +@@ -527,134 +542,85 @@ class ProcessStatusReporter: + process.total_time(), command)) + + +-class ProcessstatReport(pmcc.MetricGroupPrinter): ++class ProcessStatReport(pmcc.MetricGroupPrinter): + Machine_info_count = 0 ++ group = None ++ def __init__(self, group=None): ++ self.group = group + +- def timeStampDelta(self, group): +- s = group.timestamp.tv_sec - group.prevTimestamp.tv_sec +- u = group.timestamp.tv_usec - group.prevTimestamp.tv_usec ++ def timeStampDelta(self): ++ s = self.group.timestamp.tv_sec - self.group.prevTimestamp.tv_sec ++ u = self.group.timestamp.tv_usec - self.group.prevTimestamp.tv_usec + return s + u / 1000000.0 + +- def print_machine_info(self, group, context): +- timestamp = context.pmLocaltime(group.timestamp.tv_sec) ++ def print_machine_info(self,context): ++ timestamp = context.pmLocaltime(self.group.timestamp.tv_sec) + # Please check strftime(3) for different formatting options. + # Also check TZ and LC_TIME environment variables for more + # information on how to override the default formatting of + # the date display in the header + time_string = time.strftime("%x", timestamp.struct_time()) + header_string = '' +- header_string += group['kernel.uname.sysname'].netValues[0][2] + ' ' +- header_string += group['kernel.uname.release'].netValues[0][2] + ' ' +- header_string += '(' + group['kernel.uname.nodename'].netValues[0][2] + ') ' ++ header_string += self.group['kernel.uname.sysname'].netValues[0][2] + ' ' ++ header_string += self.group['kernel.uname.release'].netValues[0][2] + ' ' ++ header_string += '(' + self.group['kernel.uname.nodename'].netValues[0][2] + ') ' + header_string += time_string + ' ' +- header_string += group['kernel.uname.machine'].netValues[0][2] + ' ' +- print("%s (%s CPU)" % (header_string, self.get_ncpu(group))) ++ header_string += self.group['kernel.uname.machine'].netValues[0][2] + ' ' ++ print("%s (%s CPU)" % (header_string, self.__get_ncpu(self.group))) + +- def get_ncpu(self, group): ++ def __get_ncpu(self, group): + return group['hinv.ncpu'].netValues[0][2] + ++ def __print_report(self, manager,timestamp, header_indentation, value_indentation,interval_in_seconds): ++ metric_repository = ReportingMetricRepository(self.group) ++ process_report = ProcessStatus(manager, metric_repository) ++ process_filter = ProcessFilter(ProcessStatOptions) ++ stdout = StdoutPrinter() ++ printdecorator = NoneHandlingPrinterDecorator(stdout) ++ report = ProcessStatusReporter(process_report, process_filter, interval_in_seconds, ++ printdecorator.Print, ProcessStatOptions) ++ report.print_report(timestamp, header_indentation, value_indentation) ++ def __print_dynamic_report(self, manager,timestamp, header_indentation, value_indentation,interval_in_seconds): ++ metric_repository = ReportingMetricRepository(self.group) ++ process_report = ProcessStatus(manager, metric_repository) ++ process_filter = ProcessFilter(ProcessStatOptions) ++ stdout = StdoutPrinter() ++ printdecorator = NoneHandlingPrinterDecorator(stdout) ++ report = DynamicProcessReporter(process_report, process_filter, interval_in_seconds, ++ printdecorator.Print, ProcessStatOptions) ++ report.print_report(timestamp, header_indentation, value_indentation) ++ def __get_timestamp(self): ++ ts = self.group.contextCache.pmLocaltime(int(self.group.timestamp)) ++ timestamp = time.strftime(ProcessStatOptions.timefmt, ts.struct_time()) ++ return timestamp ++ + def report(self, manager): + try: +- group = manager['psstat'] +- if group['proc.psinfo.utime'].netPrevValues is None: ++ if self.group['proc.psinfo.utime'].netPrevValues is None: + # need two fetches to report rate converted counter metrics + return +- +- if not group['hinv.ncpu'].netValues or not group['kernel.uname.sysname'].netValues: ++ if not self.group['hinv.ncpu'].netValues or not self.group['kernel.uname.sysname'].netValues: + return +- + try: + if not self.Machine_info_count: +- self.print_machine_info(group, manager) ++ self.print_machine_info(manager) + self.Machine_info_count = 1 + except IndexError: +- # missing some metrics + return +- +- ts = group.contextCache.pmLocaltime(int(group.timestamp)) +- timestamp = time.strftime(ProcessStatOptions.timefmt, ts.struct_time()) +- interval_in_seconds = self.timeStampDelta(group) ++ timestamp = self.__get_timestamp() ++ interval_in_seconds = self.timeStampDelta() + header_indentation = " " if len(timestamp) < 9 else (len(timestamp) - 7) * " " + value_indentation = ((len(header_indentation) + 9) - len(timestamp)) * " " + +- metric_repository = ReportingMetricRepository(group) +- + # Doing this for one single print instance in case there is no count specified + if ProcessStatOptions.print_count is None: + ProcessStatOptions.print_count = 1 +- +- # ================================================================ +- if ProcessStatOptions.show_all_process: +- process_report = ProcessStatus(metric_repository) +- process_filter = ProcessFilter(ProcessStatOptions) +- stdout = StdoutPrinter() +- printdecorator = NoneHandlingPrinterDecorator(stdout) +- report = ProcessStatusReporter(process_report, process_filter, interval_in_seconds, +- printdecorator.Print, ProcessStatOptions) +- report.print_report(timestamp, header_indentation, value_indentation) +- +- if ProcessStatOptions.empty_arg_flag: +- process_report = ProcessStatus(metric_repository) +- process_filter = ProcessFilter(ProcessStatOptions) +- stdout = StdoutPrinter() +- printdecorator = NoneHandlingPrinterDecorator(stdout) +- report = ProcessStatusReporter(process_report, process_filter, interval_in_seconds, +- printdecorator.Print, ProcessStatOptions) +- report.print_report(timestamp, header_indentation, value_indentation) +- +- if ProcessStatOptions.pid_filter_flag: +- process_report = ProcessStatus(metric_repository) +- process_filter = ProcessFilter(ProcessStatOptions) +- stdout = StdoutPrinter() +- printdecorator = NoneHandlingPrinterDecorator(stdout) +- report = ProcessStatusReporter(process_report, process_filter, interval_in_seconds, +- printdecorator.Print, ProcessStatOptions) +- report.print_report(timestamp, header_indentation, value_indentation) +- if ProcessStatOptions.ppid_filter_flag: +- process_report = ProcessStatus(metric_repository) +- process_filter = ProcessFilter(ProcessStatOptions) +- stdout = StdoutPrinter() +- printdecorator = NoneHandlingPrinterDecorator(stdout) +- report = ProcessStatusReporter(process_report, process_filter, interval_in_seconds, +- printdecorator.Print, ProcessStatOptions) +- report.print_report(timestamp, header_indentation, value_indentation) +- +- if ProcessStatOptions.command_filter_flag: +- process_report = ProcessStatus(metric_repository) +- process_filter = ProcessFilter(ProcessStatOptions) +- stdout = StdoutPrinter() +- printdecorator = NoneHandlingPrinterDecorator(stdout) +- report = ProcessStatusReporter(process_report, process_filter, interval_in_seconds, +- printdecorator.Print, ProcessStatOptions) +- report.print_report(timestamp, header_indentation, value_indentation) +- +- if ProcessStatOptions.user_oriented_format: +- process_report = ProcessStatus(metric_repository) +- process_filter = ProcessFilter(ProcessStatOptions) +- stdout = StdoutPrinter() +- printdecorator = NoneHandlingPrinterDecorator(stdout) +- report = ProcessStatusReporter(process_report, process_filter, interval_in_seconds, +- printdecorator.Print, ProcessStatOptions) +- report.print_report(timestamp, header_indentation, value_indentation) +- +- if ProcessStatOptions.username_filter_flag: +- process_report = ProcessStatus(metric_repository) +- process_filter = ProcessFilter(ProcessStatOptions) +- stdout = StdoutPrinter() +- printdecorator = NoneHandlingPrinterDecorator(stdout) +- report = ProcessStatusReporter(process_report, process_filter, interval_in_seconds, +- printdecorator.Print, ProcessStatOptions) +- report.print_report(timestamp, header_indentation, value_indentation) +- + # ================================================================ + if ProcessStatOptions.selective_colum_flag: +- process_report = ProcessStatus(metric_repository) +- process_filter = ProcessFilter(ProcessStatOptions) +- stdout = StdoutPrinter() +- printdecorator = NoneHandlingPrinterDecorator(stdout) +- report = DynamicProcessReporter(process_report, process_filter, interval_in_seconds, +- printdecorator.Print, ProcessStatOptions) +- report.print_report(timestamp, header_indentation, value_indentation) ++ self.__print_dynamic_report(manager,timestamp, header_indentation, ++ value_indentation, interval_in_seconds) ++ else: ++ self.__print_report(manager,timestamp, header_indentation, value_indentation, interval_in_seconds) + finally: + sys.stdout.flush() + +@@ -779,8 +745,8 @@ class ProcessStatOptions(pmapi.pmOptions): + else: + raise ValueError + except ValueError: +- print("Invalid ppid Id List: Either colum name is not correct " +- "or use comma separated colum names without whitespaces") ++ print("Invalid ppid Id List: Either column name is not correct " ++ "or use comma separated column names without whitespaces") + sys.exit(1) + elif opts == 'U': + ProcessStatOptions.username_filter_flag = True +@@ -812,7 +778,7 @@ if __name__ == "__main__": + sys.stderr.write('Error: not all required metrics are available\nMissing %s\n' % missing) + sys.exit(1) + manager['psstat'] = PSSTAT_METRICS +- manager.printer = ProcessstatReport() ++ manager.printer = ProcessStatReport(manager['psstat']) + sts = manager.run() + sys.exit(sts) + except pmapi.pmErr as pmerror: +-- +2.43.5 + diff --git a/SOURCES/1014-pcp-buddyinfo-Added-timestamp-and-no-interpolation.patch b/SOURCES/1014-pcp-buddyinfo-Added-timestamp-and-no-interpolation.patch new file mode 100644 index 0000000..6a0d0f2 --- /dev/null +++ b/SOURCES/1014-pcp-buddyinfo-Added-timestamp-and-no-interpolation.patch @@ -0,0 +1,340 @@ +From a2f0e1e303ce482bd5305f2062027fd2ed17e704 Mon Sep 17 00:00:00 2001 +From: sagar sagar +Date: Fri, 25 Oct 2024 16:17:22 +0530 +Subject: [PATCH ol8 1014/1015] pcp-buddyinfo: Added timestamp and no + interpolation option + +upstream ref:- https://github.com/performancecopilot/pcp/pull/2078 +Orabug:36985368 +Signed-off-by: sagar sagar +--- + src/pcp/buddyinfo/pcp-buddyinfo.1 | 118 ++++++++++++++++++++--------- + src/pcp/buddyinfo/pcp-buddyinfo.py | 92 +++++++++++++++------- + 2 files changed, 144 insertions(+), 66 deletions(-) + +diff --git a/src/pcp/buddyinfo/pcp-buddyinfo.1 b/src/pcp/buddyinfo/pcp-buddyinfo.1 +index 26c06ba..7bffccd 100644 +--- a/src/pcp/buddyinfo/pcp-buddyinfo.1 ++++ b/src/pcp/buddyinfo/pcp-buddyinfo.1 +@@ -15,22 +15,33 @@ + .\" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + .\" for more details. + .\" +- + .TH PCP-BUDDYINFO 1 "PCP" "Performance Co-Pilot" +- + .SH NAME +-\fBpcp-buddyinfo\fP \- Report statistics for buddy algorithm shown in cat /proc/buddyinfo +- ++\f3pcp-buddyinfo\f3 \- report Linux kernel buddy algorithm statistics + .SH SYNOPSIS +-\fBpcp\fP [\fBpcp options\fP] \fBbuddyinfo\fP [\fB-s\fP \fBsamples\fP] [\fB-a\fP \fBarchive\fP] [\fB-Z\fP \fB--timezone\fP] [\fB-z\fP \fB--hostzone\fP] [\fB-V\fP \fBVersion\fP] +- ++\f3pcp\f1 ++[\f2pcp\ options\f1] ++\f3buddyinfo\f1 ++[\f3\-uVz?\f1] ++[\f3\-s\f1 \f2samples\f1] ++[\f3\-a\f1 \f2archive\f1] ++[\f3\-Z\f1 \f2timezone\f1] + .SH DESCRIPTION +-The \fBpcp-buddyinfo\fP command is used for viewing different stats related to buddyinfo. It helps users analyze useful information related to the buddy algorithm. The information includes the total number of zones that are currently active, order pages etc. By default, \fBpcp-buddyinfo\fP reports live data for the local host. +- ++The ++.B pcp-buddyinfo ++command is used for viewing different stats related to buddyinfo. ++It helps users analyze the dynamic behaviour of the buddy algorithm ++used in the Linux kernel virtual memory subsystem. ++The information includes the total number of zones that are currently ++active, counts of different order pages, and so on. ++By default, ++.B pcp-buddyinfo ++reports live data for the local host. ++.PP + The statistics shown are as follows: + + .TS +-lfB lfB ++lfB lfB + l lx. + HEADER DESCRIPTION + _ _ +@@ -51,44 +62,77 @@ Order10 available pages of order 10 + + + Each column represents the number of pages of a certain order (a certain size) that are available at any given time. For example, for zone DMA (direct memory access), there are 90 of 2^(0*PAGE_SIZE) chunks of memory. Similarly, there are 6 of 2^(1*PAGE_SIZE) chunks, and 2 of 2^(2*PAGE_SIZE) chunks of memory available. +- ++.PP + The DMA row references the first 16 MB on a system, the HighMem row references all memory greater than 4 GB on a system, and the Normal row references all memory in between. +- + .SH OPTIONS + .TP +-\fB-a\fP, \fB\-\-archive\fP +-Fetch /proc/buddyinfo for a specified archive file +- ++\fB\-a\fR \fIfile\fR, \fB\-\-archive\fR=\fIfile\fR ++Fetch buddyinfo metrics from the specified PCP archive. + .TP +-\fB-s\fP, \fB\-\-samples\fP +-Get the buddyinfo for the specified number of samples count +- ++\fB\-s\fR \fIcount\fR, \fB\-\-samples\fR=\fIcount\fR ++Limit reporting to \fIcount\fR samples of buddyinfo statistics. + .TP +-\fB-z\fP, \fB\-\-hostzone\fP +-Set the reporting timezone to the local time of metrics source +- ++\fB\-u\fR, \fB\-\-no-interpol\fR ++disable the default interpolation mode when replaying an archive. ++With the ++.B \-u ++option, interpolated reporting is disabled and each sample is ++reported according to native sampling intervals in the archive. ++In this mode the ++.B \-t ++option is ignored. ++Additionally, non-interpolated replay makes sense only when ++replaying an archive (using the ++.B \-a ++option described above), so the ++.B \-a ++option is mandatory when ++.B \-u ++is specified. + .TP +-\fB-Z\fP, \fB\-\-timezone\fP +-Set the reporting timezone +- ++\fB\-z\fR, \fB\-\-hostzone\fR ++Use the local timezone of the host that is the source of the ++performance metrics, as identified by either the ++.B \-h ++or the ++.B \-a ++options. ++The default is to use the timezone of the local host. + .TP +-\fB-V\fP, \fB\-\-version\fP +-Display the version number and exit. +- ++\fB\-Z\fR \fItimezone\fR, \fB\-\-timezone\fR=\fItimezone\fR ++Use ++.I timezone ++for the date and time. ++.I Timezone ++is in the format of the environment variable ++.B TZ ++as described in ++.BR environ (7). + .TP +-\fB-?\fP, \fB\-\-help\fP +-Display the usage message and exit. +- ++\fB\-V\fR, \fB\-\-version\fR ++Display version number and exit. ++.TP ++\fB\-?\fR, \fB\-\-help\fR ++Display usage message and exit. + .SH NOTES +-\fBpcp-buddyinfo\fP collects information from \fI/proc/buddyinfo\fP and aims to be command-line and output compatible with it. +- ++.B pcp-buddyinfo ++reports information extracted from the \fI/proc/buddyinfo\fP Linux ++kernel procfs file. ++.PP ++If the default interpolation mode is disabled, it is possible that ++some metrics (recorded at different intervals) will be reported as ++having missing values for some samples even if they were recorded. + .SH PCP ENVIRONMENT + Environment variables with the prefix \fBPCP_\fP are used to parameterize the file and directory names used by PCP. On each installation, the file \fI/etc/pcp.conf\fP contains the local values for these variables. The \fB$PCP_CONF\fP variable may be used to specify an alternative configuration file, as described in \fBpcp.conf\fP(5). +- ++.PP + For environment variables affecting PCP tools, see \fBpmGetOptions\fP(3). +- + .SH SEE ALSO +-.BR PCPIntro(1), +-.BR pcp(1), +-.BR pmParseInterval(3), +-.BR environ(7). ++.BR PCPIntro (1), ++.BR pcp (1), ++.BR pmGetOptions (3), ++.BR pcp.conf (5) ++and ++.BR environ (7). ++ ++.\" control lines for scripts/man-spell ++.\" +ok+ PAGE_SIZE buddyinfo {from pcp-buddyinfo} HighMem +diff --git a/src/pcp/buddyinfo/pcp-buddyinfo.py b/src/pcp/buddyinfo/pcp-buddyinfo.py +index 012fe7c..3a7e9c9 100644 +--- a/src/pcp/buddyinfo/pcp-buddyinfo.py ++++ b/src/pcp/buddyinfo/pcp-buddyinfo.py +@@ -20,13 +20,13 @@ import signal + import sys + import time + from pcp import pmapi, pmcc +-from cpmapi import PM_CONTEXT_ARCHIVE ++from cpmapi import PM_CONTEXT_ARCHIVE, PM_MODE_FORW + +-SYS_MECTRICS= ["kernel.uname.sysname","kernel.uname.release", ++SYS_METRICS= ["kernel.uname.sysname","kernel.uname.release", + "kernel.uname.nodename","kernel.uname.machine","hinv.ncpu"] + BUDDYSTAT_METRICS = ["mem.buddyinfo.pages","mem.buddyinfo.total"] + +-ALL_METRICS = BUDDYSTAT_METRICS + SYS_MECTRICS ++ALL_METRICS = BUDDYSTAT_METRICS + SYS_METRICS + + def adjust_length(name,size): + return name.ljust(size) +@@ -65,28 +65,38 @@ class BuddyStatUtil: + return data.keys() + + class BuddyinfoReport(pmcc.MetricGroupPrinter): +- def __init__(self,samples,group,context): +- self.samples = samples ++ def __init__(self,opts,group): ++ self.opts=opts + self.group=group +- self.context=context ++ self.context=opts.context ++ self.samples=opts.samples ++ self.header = "unknown" + + def __get_ncpu(self, group): + return group['hinv.ncpu'].netValues[0][2] + + def __print_machine_info(self, context): +- timestamp = self.group.pmLocaltime(context.timestamp.tv_sec) +- # Please check strftime(3) for different formatting options. +- # Also check TZ and LC_TIME environment variables for more +- # information on how to override the default formatting of +- # the date display in the header +- time_string = time.strftime("%x", timestamp.struct_time()) +- header_string = '' +- header_string += context['kernel.uname.sysname'].netValues[0][2] + ' ' +- header_string += context['kernel.uname.release'].netValues[0][2] + ' ' +- header_string += '(' + context['kernel.uname.nodename'].netValues[0][2] + ') ' +- header_string += time_string + ' ' +- header_string += context['kernel.uname.machine'].netValues[0][2] + ' ' +- print("%s (%s CPU)" % (header_string, self.__get_ncpu(context))) ++ if self.header == "unknown": ++ try: ++ timestamp = self.group.pmLocaltime(context.timestamp.tv_sec) ++ # Please check strftime(3) for different formatting options. ++ # Also check TZ and LC_TIME environment variables for more ++ # information on how to override the default formatting of ++ # the date display in the header ++ time_string = time.strftime("%x", timestamp.struct_time()) ++ header_string = '' ++ header_string += context['kernel.uname.sysname'].netValues[0][2] + ' ' ++ header_string += context['kernel.uname.release'].netValues[0][2] + ' ' ++ header_string += '(' + context['kernel.uname.nodename'].netValues[0][2] + ') ' ++ header_string += time_string + ' ' ++ header_string += context['kernel.uname.machine'].netValues[0][2] + ' ' ++ self.header = header_string ++ except IndexError: ++ pass ++ try: ++ print("%s (%s CPU)" % (self.header, self.__get_ncpu(context))) ++ except IndexError: ++ pass + + def __print_header(self,header_indentation,value_indentation): + value_indentation+=" "*2 +@@ -117,7 +127,7 @@ class BuddyinfoReport(pmcc.MetricGroupPrinter): + value="" + for order in sorted(order_set,key=__extract_numeric_part): + nodename = adjust_length(Normal,9) if len(Normal) < 9 else Normal +- key = f"{Normal}::{order}::{node}" ++ key = "%s::%s::%s" % (Normal, order, node) + data = str(pages.get(key,0)) + value += adjust_length(data,8) if len(data) < 8 else data + value += value_indentation +@@ -125,10 +135,10 @@ class BuddyinfoReport(pmcc.MetricGroupPrinter): + print("%s %s %s %s %s %s %s "%(timestamp,header_indentation,nodename,header_indentation,node, + header_indentation,value)) + +- def print_report(self,group,timestamp,header_indentation,value_indentation,manager_buddyinfo): ++ def print_report(self,group,timestamp,header_indentation,value_indentation): + + def __print_buddy_status(): +- buddystatus = BuddyStatUtil(manager_buddyinfo) ++ buddystatus = BuddyStatUtil(group) + if buddystatus.names(): + try: + self.__print_machine_info(group) +@@ -150,19 +160,28 @@ class BuddyinfoReport(pmcc.MetricGroupPrinter): + self.samples-=1 + + def report(self, manager): +- group = manager["sysinfo"] +- self.samples=opts.pmGetOptionSamples() ++ group = manager["allinfo"] ++ self.samples=self.opts.pmGetOptionSamples() + t_s = group.contextCache.pmLocaltime(int(group.timestamp)) + timestamp = time.strftime(BuddyinfoOptions.timefmt, t_s.struct_time()) + header_indentation = " " if len(timestamp) < 9 else (len(timestamp) - 7) * " " + value_indentation = ((len(header_indentation) + 2) - len(timestamp)) * " " +- self.print_report(group,timestamp,header_indentation,value_indentation,manager['buddyinfo']) ++ self.print_report(group,timestamp,header_indentation,value_indentation) + + class BuddyinfoOptions(pmapi.pmOptions): + timefmt = "%H:%M:%S" ++ uflag = False ++ ++ def extraOptions(self,opt,optarg,index): ++ if opt == 'u': ++ BuddyinfoOptions.uflag = True ++ + def __init__(self): +- pmapi.pmOptions.__init__(self, "a:s:Z:zV?") ++ pmapi.pmOptions.__init__(self, "a:s:Z:uzV?") + self.pmSetLongOptionHeader("General options") ++ self.pmSetOptionCallback(self.extraOptions) ++ self.pmSetLongOptionArchive() ++ self.pmSetLongOption("no-interpol", 0, "u", "", "disable interpolation mode with archives") + self.pmSetLongOptionHostZone() + self.pmSetLongOptionTimeZone() + self.pmSetLongOptionHelp() +@@ -170,20 +189,35 @@ class BuddyinfoOptions(pmapi.pmOptions): + self.pmSetLongOptionVersion() + self.samples=None + self.context=None ++ def checkOptions(self, manager): ++ if BuddyinfoOptions.uflag: ++ if manager._options.pmGetOptionInterval(): # pylint: disable=protected-access ++ print("Error: -t incompatible with -u") ++ return False ++ if manager.type != PM_CONTEXT_ARCHIVE: ++ print("Error: -u can only be specified with -a archive") ++ return False ++ return True + + if __name__ == '__main__': + try: + opts = BuddyinfoOptions() + mngr = pmcc.MetricGroupManager.builder(opts,sys.argv) + opts.context=mngr.type ++ ++ if not opts.checkOptions(mngr): ++ raise pmapi.pmUsageErr ++ if BuddyinfoOptions.uflag: ++ # -u turns off interpolation ++ mngr.pmSetMode(PM_MODE_FORW, mngr._options.pmGetOptionOrigin(), 0) # pylint: disable=protected-access ++ + missing = mngr.checkMissingMetrics(ALL_METRICS) + if missing is not None: +- sys.stderr.write("Error:some metrics are unavailable",missing) ++ sys.stderr.write('Error: not all required metrics are available\nMissing: %s\n' % (missing)) + sys.exit(1) + mngr["buddyinfo"] = BUDDYSTAT_METRICS +- mngr["sysinfo"] = SYS_MECTRICS + mngr["allinfo"]=ALL_METRICS +- mngr.printer = BuddyinfoReport(opts.samples,mngr,opts.context) ++ mngr.printer = BuddyinfoReport(opts,mngr) + sts = mngr.run() + sys.exit(sts) + except pmapi.pmErr as error: +-- +2.43.5 + diff --git a/SOURCES/1015-pcp-meminfo-Added-timestamp-in-pcp-meinfo.patch b/SOURCES/1015-pcp-meminfo-Added-timestamp-in-pcp-meinfo.patch new file mode 100644 index 0000000..e737ecb --- /dev/null +++ b/SOURCES/1015-pcp-meminfo-Added-timestamp-in-pcp-meinfo.patch @@ -0,0 +1,152 @@ +From ad598761e495c69733973497182917ad24b69916 Mon Sep 17 00:00:00 2001 +From: sagar sagar +Date: Fri, 25 Oct 2024 16:18:35 +0530 +Subject: [PATCH ol8 1015/1015] pcp-meminfo: Added timestamp in pcp meinfo + +fixed broken pipe issue as well +upstream ref:- 18bea5fe3f8b6f0fded54f4020ed9ad9986012ea +Orabug: 36985368 +Signed-off-by: sagar sagar +--- + src/pcp/meminfo/pcp-meminfo.py | 73 ++++++++++++++++++++++++++-------- + 1 file changed, 57 insertions(+), 16 deletions(-) + +diff --git a/src/pcp/meminfo/pcp-meminfo.py b/src/pcp/meminfo/pcp-meminfo.py +index 57ac05e..103aa52 100755 +--- a/src/pcp/meminfo/pcp-meminfo.py ++++ b/src/pcp/meminfo/pcp-meminfo.py +@@ -19,7 +19,9 @@ + + import sys + import time ++import signal + from pcp import pmapi, pmcc ++from cpmapi import PM_CONTEXT_ARCHIVE + + METRICS = ["mem.physmem", + "mem.util.free", +@@ -117,11 +119,37 @@ METRICS_DESC = ["MemTotal", + "DirectMap2M", + "DirectMap1G"] + +-class MeminfoReport(pmcc.MetricGroupPrinter): +- samples = 0 ++SYS_METRICS = ["kernel.uname.sysname", ++ "kernel.uname.release", ++ "kernel.uname.nodename", ++ "kernel.uname.machine", ++ "hinv.ncpu"] ++ ++ALL_METRICS = METRICS + SYS_METRICS + +- def __init__(self, samples): +- self.samples = samples ++class MeminfoReport(pmcc.MetricGroupPrinter): ++ def __init__(self, opts): ++ self.opts = opts ++ self.Machine_info_count = 0 ++ ++ def __get_ncpu(self, group): ++ return group['hinv.ncpu'].netValues[0][2] ++ ++ def __print_machine_info(self, group, context): ++ timestamp = context.pmLocaltime(group.timestamp.tv_sec) ++ # Please check strftime(3) for different formatting options. ++ # Also check TZ and LC_TIME environment variables for more ++ # information on how to override the default formatting of ++ # the date display in the header ++ time_string = time.strftime("%x", timestamp.struct_time()) ++ header_string = '' ++ header_string += group['kernel.uname.sysname'].netValues[0][2] + ' ' ++ header_string += group['kernel.uname.release'].netValues[0][2] + ' ' ++ header_string += '(' + group['kernel.uname.nodename'].netValues[0][2] + ') ' ++ header_string += time_string + ' ' ++ header_string += group['kernel.uname.machine'].netValues[0][2] + ' ' ++ ++ print("%s (%s CPU)" % (header_string, self.__get_ncpu(group))) + + def getMetricName(self, idx): + metric_name = "" +@@ -134,13 +162,22 @@ class MeminfoReport(pmcc.MetricGroupPrinter): + return metric_name, units + + def report(self, manager): ++ group = manager["sysinfo"] ++ try: ++ if not self.Machine_info_count: ++ self.__print_machine_info(group, manager) ++ self.Machine_info_count = 1 ++ except IndexError: ++ # missing some metrics ++ return ++ + group = manager["meminfo"] + +- opts.pmGetOptionSamples() ++ self.opts.pmGetOptionSamples() + + t_s = group.contextCache.pmLocaltime(int(group.timestamp)) + time_string = time.strftime(MeminfoOptions.timefmt, t_s.struct_time()) +- print(time_string) ++ print("Timestamp".ljust(18) + ": " + time_string) + + idx = 0 + for metric in METRICS: +@@ -148,21 +185,23 @@ class MeminfoReport(pmcc.MetricGroupPrinter): + val = group[metric].netValues[0][2] + except IndexError: + metric_name, units = self.getMetricName(idx) +- print(F"{metric_name:17} : NA") ++ print("%-17s : NA"%(metric_name)) + + idx += 1 + continue + + metric_name, units = self.getMetricName(idx) +- print(F"{metric_name:17} : {val} {units}") ++ print("%-17s : %s %s"%(metric_name, val, units)) + + idx += 1 +- print() ++ print("") ++ ++ if MeminfoOptions.context is not PM_CONTEXT_ARCHIVE and self.opts.pmGetOptionSamples() is None: ++ sys.exit(0) + + class MeminfoOptions(pmapi.pmOptions): + context = None +- timefmt = "%H:%M:%S" +- samples = 0 ++ timefmt = "%m/%d/%Y %H:%M:%S" + + def __init__(self): + pmapi.pmOptions.__init__(self, "a:s:S:T:z:A:t:") +@@ -176,18 +215,20 @@ if __name__ == '__main__': + mngr = pmcc.MetricGroupManager.builder(opts,sys.argv) + MeminfoOptions.context = mngr.type + +- missing = mngr.checkMissingMetrics(METRICS) ++ missing = mngr.checkMissingMetrics(ALL_METRICS) + if missing is not None: +- sys.stderr.write(F"Error:Metric is {missing} missing\n") ++ sys.stderr.write('Error: not all required metrics are available\nMissing: %s\n' % (missing)) + sys.exit(1) + + mngr["meminfo"] = METRICS +- mngr.printer = MeminfoReport(opts.samples) ++ mngr["sysinfo"] = SYS_METRICS ++ mngr.printer = MeminfoReport(opts) + sts = mngr.run() + sys.exit(sts) +- ++ except IOError: ++ signal.signal(signal.SIGPIPE,signal.SIG_DFL) + except pmapi.pmErr as error: +- sys.stderr.write(F"{error.progname()} {error.message()}") ++ sys.stderr.write("%s %s\n"%(error.progname(), error.message())) + except pmapi.pmUsageErr as usage: + usage.message() + sys.exit(1) +-- +2.43.5 + diff --git a/SOURCES/1016-pmstat-avoid-corner-case-infinite-loop.patch b/SOURCES/1016-pmstat-avoid-corner-case-infinite-loop.patch new file mode 100644 index 0000000..4d96421 --- /dev/null +++ b/SOURCES/1016-pmstat-avoid-corner-case-infinite-loop.patch @@ -0,0 +1,46 @@ +From be84a0cc9d880e2e9cd91e9e983b22ffec6bd126 Mon Sep 17 00:00:00 2001 +From: sagar sagar +Date: Mon, 3 Mar 2025 13:31:31 +0530 +Subject: [PATCH OL8 1016/1016] pmstat: avoid corner-case infinite loop When -a + is in play, if the archive contains only one pmResult for the metrics of + interest to pmstat, pmstat goes into an infinite loop. + +Simple fix in pmstat.c. + +upstream ref:- 8ed9735e93f2f0e4dbe038e36939f40e5e87b5ae +Orabug: 37638447 +Signed-off-by: sagar sagar +--- + src/pmstat/pmstat.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/src/pmstat/pmstat.c b/src/pmstat/pmstat.c +index 57ec954..0901df9 100644 +--- a/src/pmstat/pmstat.c ++++ b/src/pmstat/pmstat.c +@@ -67,6 +67,7 @@ struct statsrc { + + pmLongOptions longopts[] = { + PMAPI_GENERAL_OPTIONS, ++ PMOPT_DEBUG, + PMAPI_OPTIONS_HEADER("Alternate sources"), + PMOPT_HOSTSFILE, + PMOPT_LOCALPMDA, +@@ -577,10 +578,12 @@ main(int argc, char *argv[]) + } else if ((opts.context == PM_CONTEXT_ARCHIVE) && + (sts == PM_ERR_EOL) && (!s->fetched)) { + /* +- * We are yet to see something from this archive - so +- * don't discard it just yet. ++ * We are yet to see something from this archive and ++ * we're at the end of the archive. + */ + puts(" No data in the archive"); ++ printf(" pmFetchGroup: %s\n", pmErrStr(sts)); ++ exit(0); + } else { + int valid = 0; + +-- +2.43.5 + diff --git a/SOURCES/1017-Merge-branch-mohith-kumar-thummaluru-rocestat-pmda.patch b/SOURCES/1017-Merge-branch-mohith-kumar-thummaluru-rocestat-pmda.patch new file mode 100644 index 0000000..49bfd54 --- /dev/null +++ b/SOURCES/1017-Merge-branch-mohith-kumar-thummaluru-rocestat-pmda.patch @@ -0,0 +1,1677 @@ +From 8cbbf501f9d804d2f2a431c7264c1a61506ae845 Mon Sep 17 00:00:00 2001 +From: Nathan Scott +Date: Fri, 18 Apr 2025 11:30:35 +1000 +Subject: [PATCH] Merge branch 'mohith-kumar-thummaluru-rocestat-pmda' + +Orabug: 38109218 + +(cherry picked from commit 316878cba09758c2640ed718fb7f398b557b6eb2) +Signed-off-by: Mohith Kumar Thummaluru + +Conflicts: + - Conflicts are majorly due to missing PMDAs like uwsgi and resctrl + build/rpm/pcp.spec.in + build/rpm/redhat.spec + qa/GNUmakefile + qa/group + src/pmdas/GNUmakefile +--- + build/rpm/pcp.spec.in | 23 +- + build/rpm/redhat.spec | 31 +- + qa/1993 | 87 ++++ + qa/1993.out | 21 + + qa/GNUmakefile | 2 +- + qa/GNUmakefile.install | 2 +- + qa/group | 2 + + qa/rocestat/GNUmakefile | 22 + + qa/rocestat/GNUmakefile.install | 20 + + qa/rocestat/README | 29 ++ + qa/rocestat/metrics.list | 49 +++ + qa/rocestat/rocestat.json | 218 ++++++++++ + qa/rocestat/rocestat_test.python | 123 ++++++ + src/pmdas/GNUmakefile | 2 +- + src/pmdas/rocestat/GNUmakefile | 40 ++ + src/pmdas/rocestat/Install | 40 ++ + src/pmdas/rocestat/Remove | 38 ++ + src/pmdas/rocestat/domain.h | 2 + + src/pmdas/rocestat/pmdarocestat.1 | 94 +++++ + src/pmdas/rocestat/pmdarocestat.python | 536 +++++++++++++++++++++++++ + src/pmdas/rocestat/pmns | 1 + + src/pmns/stdpmid.pcp | 2 +- + 22 files changed, 1378 insertions(+), 6 deletions(-) + create mode 100755 qa/1993 + create mode 100644 qa/1993.out + create mode 100644 qa/rocestat/GNUmakefile + create mode 100644 qa/rocestat/GNUmakefile.install + create mode 100644 qa/rocestat/README + create mode 100644 qa/rocestat/metrics.list + create mode 100644 qa/rocestat/rocestat.json + create mode 100755 qa/rocestat/rocestat_test.python + create mode 100644 src/pmdas/rocestat/GNUmakefile + create mode 100644 src/pmdas/rocestat/Install + create mode 100644 src/pmdas/rocestat/Remove + create mode 100644 src/pmdas/rocestat/domain.h + create mode 100644 src/pmdas/rocestat/pmdarocestat.1 + create mode 100644 src/pmdas/rocestat/pmdarocestat.python + create mode 100644 src/pmdas/rocestat/pmns + +diff --git a/build/rpm/pcp.spec.in b/build/rpm/pcp.spec.in +index 95459942c2..25affce40f 100755 +--- a/build/rpm/pcp.spec.in ++++ b/build/rpm/pcp.spec.in +@@ -1694,6 +1694,20 @@ This package contains the PCP Performance Metrics Domain Agent (PMDA) for + collecting metrics from simple network checks. + # end pcp-pmda-netcheck + ++# ++# pcp-pmda-rocestat ++# ++%package pmda-rocestat ++License: GPL-2.0-or-later ++Summary: Performance Co-Pilot (PCP) metrics for nVidia RoCE devices ++URL: https://pcp.io ++Requires: pcp = @package_version@ pcp-libs = @package_version@ ++Requires: python3-pcp ++%description pmda-rocestat ++This package contains the PCP Performance Metrics Domain Agent (PMDA) for ++collecting statistics for nVidia RDMA over Converged Ethernet (RoCE) devices. ++# end pcp-pmda-rocestat ++ + # + # pcp-pmda-openvswitch + # +@@ -2335,6 +2349,7 @@ basic_manifest | keep '(etc/pcp|pmdas)/postfix(/|$)' >pcp-pmda-postfix-files + basic_manifest | keep '(etc/pcp|pmdas)/postgresql(/|$)' >pcp-pmda-postgresql-files + basic_manifest | keep '(etc/pcp|pmdas)/rabbitmq(/|$)' >pcp-pmda-rabbitmq-files + basic_manifest | keep '(etc/pcp|pmdas)/redis(/|$)' >pcp-pmda-redis-files ++basic_manifest | keep '(etc/pcp|pmdas)/rocestat(/|$)' >pcp-pmda-rocestat-files + basic_manifest | keep '(etc/pcp|pmdas)/roomtemp(/|$)' >pcp-pmda-roomtemp-files + basic_manifest | keep '(etc/pcp|pmdas)/rsyslog(/|$)' >pcp-pmda-rsyslog-files + basic_manifest | keep '(etc/pcp|pmdas)/samba(/|$)' >pcp-pmda-samba-files +@@ -2370,7 +2385,7 @@ for pmda_package in \ + nutcracker nvidia \ + openmetrics openvswitch oracle \ + pdns perfevent podman postfix postgresql \ +- rabbitmq redis roomtemp rsyslog \ ++ rabbitmq redis rocestat roomtemp rsyslog \ + samba sendmail shping slurm smart snmp \ + sockets statsd summary systemd \ + unbound \ +@@ -2780,6 +2795,10 @@ pmieconf -c enable dmthin + + %preun pmda-rabbitmq + %{pmda_remove "$1" "rabbitmq"} ++ ++%preun pmda-rocestat ++%{pmda_remove "$1" "rocestat"} ++ + %endif + + %preun pmda-apache +@@ -3089,6 +3108,8 @@ fi + + %files pmda-rabbitmq -f pcp-pmda-rabbitmq-files.rpm + ++%files pmda-rocestat -f pcp-pmda-rocestat-files.rpm ++ + %files export-pcp2graphite -f pcp-export-pcp2graphite-files.rpm + + %files export-pcp2json -f pcp-export-pcp2json-files.rpm +diff --git a/build/rpm/redhat.spec b/build/rpm/redhat.spec +index 5f54a5232a..effd938ff3 100644 +--- a/build/rpm/redhat.spec ++++ b/build/rpm/redhat.spec +@@ -1795,6 +1795,29 @@ This package contains the PCP Performance Metrics Domain Agent (PMDA) for + collecting metrics from simple network checks. + # end pcp-pmda-netcheck + ++<<<<<<< HEAD ++======= ++# ++# pcp-pmda-rocestat ++# ++%package pmda-rocestat ++License: GPL-2.0-or-later ++Summary: Performance Co-Pilot (PCP) metrics for nVidia RoCE devices ++URL: https://pcp.io ++Requires: pcp = %{version}-%{release} pcp-libs = %{version}-%{release} ++%if !%{disable_python3} ++Requires: python3-pcp ++%else ++Requires: %{__python2}-pcp ++%endif ++%description pmda-rocestat ++This package contains the PCP Performance Metrics Domain Agent (PMDA) for ++collecting statistics for nVidia RDMA over Converged Ethernet (RoCE) devices. ++# end pcp-pmda-rocestat ++%endif ++ ++%if !%{disable_mongodb} ++>>>>>>> 316878cba0 (Merge branch 'mohith-kumar-thummaluru-rocestat-pmda') + # + # pcp-pmda-mongodb + # +@@ -2508,6 +2531,7 @@ basic_manifest | keep '(etc/pcp|pmdas)/postfix(/|$)' >pcp-pmda-postfix-files + basic_manifest | keep '(etc/pcp|pmdas)/postgresql(/|$)' >pcp-pmda-postgresql-files + basic_manifest | keep '(etc/pcp|pmdas)/rabbitmq(/|$)' >pcp-pmda-rabbitmq-files + basic_manifest | keep '(etc/pcp|pmdas)/redis(/|$)' >pcp-pmda-redis-files ++basic_manifest | keep '(etc/pcp|pmdas)/rocestat(/|$)' >pcp-pmda-rocestat-files + basic_manifest | keep '(etc/pcp|pmdas)/roomtemp(/|$)' >pcp-pmda-roomtemp-files + basic_manifest | keep '(etc/pcp|pmdas)/rpm(/|$)' >pcp-pmda-rpm-files + basic_manifest | keep '(etc/pcp|pmdas)/rsyslog(/|$)' >pcp-pmda-rsyslog-files +@@ -2544,7 +2568,7 @@ for pmda_package in \ + nutcracker nvidia \ + openmetrics openvswitch oracle \ + pdns perfevent podman postfix postgresql \ +- rabbitmq redis roomtemp rpm rsyslog \ ++ rabbitmq redis rocestat roomtemp rpm rsyslog \ + samba sendmail shping slurm smart snmp \ + sockets statsd summary systemd \ + unbound \ +@@ -2887,6 +2911,9 @@ exit 0 + %preun pmda-netcheck + %{pmda_remove "$1" "netcheck"} + ++%preun pmda-rocestat ++%{pmda_remove "$1" "rocestat"} ++ + %endif + + %preun pmda-apache +@@ -3223,6 +3250,8 @@ PCP_LOG_DIR=%{_logsdir} + + %files pmda-rabbitmq -f pcp-pmda-rabbitmq-files.rpm + ++%files pmda-rocestat -f pcp-pmda-rocestat-files.rpm ++ + %files export-pcp2graphite -f pcp-export-pcp2graphite-files.rpm + + %files export-pcp2json -f pcp-export-pcp2json-files.rpm +diff --git a/qa/1993 b/qa/1993 +new file mode 100755 +index 0000000000..5d0af70a1d +--- /dev/null ++++ b/qa/1993 +@@ -0,0 +1,87 @@ ++#!/bin/sh ++# PCP QA Test No. 1993 ++# Testing PCP Rocestat PMDA - install, remove and values. ++# ++# Copyright (c) 2025 Oracle and/or its affiliates. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++# This program is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation; either version 2 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++# for more details. ++# ++ ++seq=`basename $0` ++echo "QA output created by $seq" ++ ++. ./common.python ++ ++pmda_path="$PCP_PMDAS_DIR/rocestat" ++pmda_script="$pmda_path/pmdarocestat.python" ++test_script="rocestat/rocestat_test.python" ++ ++[ -d $pmda_path ] || _notrun "ROCESTAT PMDA is not installed" ++ ++$python -c "from pcp import pmda" >/dev/null 2>&1 ++[ $? -eq 0 ] || _notrun "python pcp pmda module not installed" ++ ++if [ ! -d /sys/class/infiniband ]; then ++ # Check if Infiniband kernel module is loaded ++ lsmod | grep -q '^ib_core' || _notrun "IB kernel modules are not loaded" ++ _notrun "No RoCE devices detected" ++fi ++ ++status=1 # failure is the default! ++trap "_cleanup_pmda rocestat; exit \$status" 0 1 2 3 15 ++ ++pmdarocestat_filter() ++{ ++ sed \ ++ -e "s/Ran [0-9]* tests in [0-9]*\.[0-9][0-9]*s/Ran X tests in YYYs/" \ ++ -e "s/FAILED (failures=[0-9]*)/FAILED (failures=X)/" \ ++ -e "/^$/d" ++} ++ ++pmdarocestat_remove() ++{ ++ cd $pmda_path ++ echo ++ echo "=== Removing ROCESTAT agent ===" ++ $sudo ./Remove >$tmp.out 2>&1 ++} ++ ++pmdarocestat_install() ++{ ++ cd $pmda_path ++ $sudo ./Remove >/dev/null 2>&1 ++ ++ echo ++ echo "=== Installing ROCESTAT agent ===" ++ $sudo ./Install $tmp.out 2>&1 ++ cd $here ++} ++ ++run_rocestat_test() ++{ ++ echo ++ echo "=== Running ROCESTAT test script ===" ++ $sudo $python $test_script 2>&1 | LC_COLLATE=POSIX sort | pmdarocestat_filter ++} ++ ++# Real QA test starts here ++_prepare_pmda rocestat ++ ++pmdarocestat_install ++ ++run_rocestat_test ++ ++pmdarocestat_remove ++ ++# Success, all done ++status=0 ++exit +diff --git a/qa/1993.out b/qa/1993.out +new file mode 100644 +index 0000000000..70753bdb62 +--- /dev/null ++++ b/qa/1993.out +@@ -0,0 +1,21 @@ ++QA output created by 1993 ++ ++=== Installing ROCESTAT agent === ++ ++=== Running ROCESTAT test script === ++---------------------------------------------------------------------- ++Fetching Rocestat PMDA metrics ++OK ++Ran X tests in YYYs ++test_hw_link_metrics (__main__.RocestatTests) ... ok ++test_hw_mcast_metrics (__main__.RocestatTests) ... ok ++test_hw_metrics (__main__.RocestatTests) ... ok ++test_hw_rcv_metrics (__main__.RocestatTests) ... ok ++test_hw_req_metrics (__main__.RocestatTests) ... ok ++test_hw_resp_metrics (__main__.RocestatTests) ... ok ++test_hw_rnr_metrics (__main__.RocestatTests) ... ok ++test_hw_ucast_metrics (__main__.RocestatTests) ... ok ++test_hw_xmit_metrics (__main__.RocestatTests) ... ok ++test_nic_metrics (__main__.RocestatTests) ... ok ++ ++=== Removing ROCESTAT agent === +diff --git a/qa/GNUmakefile b/qa/GNUmakefile +index e53cf61f91..32ca54bfed 100644 +--- a/qa/GNUmakefile ++++ b/qa/GNUmakefile +@@ -17,7 +17,7 @@ TESTS = $(shell sed -n -e '/^[0-9][0-9]*:retired/d' -e '/^[0-9][0-9]*:reserved/d + SUBDIRS = src pmdas cisco gluster pconf sadist collectl nfsclient named \ + archives badarchives views qt linux unbound cifs gpfs lustre ganglia \ + java mmv postfix perl json slurm tmparch sheet smart admin hacluster \ +- sockets denki ++ sockets denki rocestat + + ifeq "$(PMDA_PERFEVENT)" "true" + SUBDIRS += perfevent +diff --git a/qa/GNUmakefile.install b/qa/GNUmakefile.install +index cf7c816562..f7b6b9d174 100644 +--- a/qa/GNUmakefile.install ++++ b/qa/GNUmakefile.install +@@ -21,7 +21,7 @@ ifeq "$(PMDA_PERFEVENT)" "true" + SUBDIRS += perfevent + endif + ifeq "$(HAVE_PYTHON)" "true" +-SUBDIRS += secure mic haproxy lio openmetrics ++SUBDIRS += secure mic haproxy lio openmetrics rocestat + endif + + # Before installing the pcpqa policy module we need a PCP build with +diff --git a/qa/group b/qa/group +index ffb8beebd1..8a3efbc024 100644 +--- a/qa/group ++++ b/qa/group +@@ -251,6 +251,7 @@ pmda.postfix + pmda.postgresql + pmda.proc + pmda.redis ++pmda.rocestat + pmda.root + pmda.rpm # note this group has been retired + pmda.rsyslog +@@ -1989,8 +1990,9 @@ x11 + 1989 pcp slabinfo python local + 1990 pcp buddyinfo python local + 1991 pcp netstat python local ++1993 pmda.rocestat local python + 2101 pmda.sockets local security + 2104 libpcp local security + 2100 pmproxy local security + 2105 libpcp pmcd local security pmcd.pdu + 4751 libpcp threads valgrind local pcp helgrind +diff --git a/qa/rocestat/GNUmakefile b/qa/rocestat/GNUmakefile +new file mode 100644 +index 0000000000..9c20dc00bc +--- /dev/null ++++ b/qa/rocestat/GNUmakefile +@@ -0,0 +1,22 @@ ++#!gmake ++ ++TOPDIR = ../.. ++include $(TOPDIR)/src/include/builddefs ++ ++TESTDIR = $(PCP_VAR_DIR)/testsuite/rocestat ++MYFILES = rocestat.json ++PYMODULES = rocestat_test.python ++LDIRT = rocestat_test.py rocestat_test.pyc rocestat_test.pyo ++ ++default default_pcp setup: rocestat_test.py ++ ++install install_pcp: ++ $(INSTALL) -m 755 -d $(TESTDIR) ++ $(INSTALL) -m 644 -f $(MYFILES) $(TESTDIR)/$(MYFILES) ++ $(INSTALL) -m 755 -f $(PYMODULES) $(TESTDIR)/$(PYMODULES) ++ $(INSTALL) -m 644 -f GNUmakefile.install $(TESTDIR)/GNUmakefile ++ ++include $(BUILDRULES) ++ ++%.py : %.python ++ $(LN_S) $< $@ +diff --git a/qa/rocestat/GNUmakefile.install b/qa/rocestat/GNUmakefile.install +new file mode 100644 +index 0000000000..495ef4b1bc +--- /dev/null ++++ b/qa/rocestat/GNUmakefile.install +@@ -0,0 +1,20 @@ ++#!gmake ++ ++ifdef PCP_CONF ++include $(PCP_CONF) ++else ++include $(PCP_DIR)/etc/pcp.conf ++endif ++PATH = $(shell . $(PCP_DIR)/etc/pcp.env; echo $$PATH) ++include $(PCP_INC_DIR)/builddefs ++ ++TESTDIR = $(PCP_VAR_DIR)/testsuite/rocestat ++ ++default default_pcp setup: rocestat_test.py ++ ++install install_pcp: ++ ++include $(BUILDRULES) ++ ++%.py : %.python ++ $(LN_S) $< $@ +diff --git a/qa/rocestat/README b/qa/rocestat/README +new file mode 100644 +index 0000000000..5888671b90 +--- /dev/null ++++ b/qa/rocestat/README +@@ -0,0 +1,29 @@ ++Pre-Requisites ++-------------- ++In order to perform the tests, we'll make some assumptions: ++ ++- The `pcp` Python module is installed and accessible. ++- The `rocestat` PMDA has been installed successfully. ++- The system has RoCE devices available and the required kernel modules (`ib_core`) are loaded. ++- You are able to run the test as the root user (required for PMDA installation and removal). ++ ++What the Test Does ++------------------ ++The test validates the functionality of the `rocestat` PMDA by performing the following steps: ++ ++1. Installs the `rocestat` PMDA. ++2. Fetches metrics defined in `metrics.list` and validates their values against the expected values in `rocestat.json`. ++3. Runs unit tests for each metric cluster (e.g., `hw`, `hw_xmit`, `hw_rcv`) to ensure the PMDA is reporting correct values. ++4. Removes the `rocestat` PMDA after the tests are complete. ++ ++If any of the above checks fail, an exception will be raised, and the test will terminate. ++ ++How to Test ++----------- ++1. Make sure the pre-requisites are in place. ++2. Run the rocestat_test.python script ++ ++Issues ++------ ++- None known at this time ++ +diff --git a/qa/rocestat/metrics.list b/qa/rocestat/metrics.list +new file mode 100644 +index 0000000000..68619da7c4 +--- /dev/null ++++ b/qa/rocestat/metrics.list +@@ -0,0 +1,49 @@ ++rocestat.lane.rx_pause ++rocestat.lane.rx_bytes ++rocestat.lane.tx_bytes ++rocestat.hw.link.link_error_recovery ++rocestat.hw.link.link_downed ++rocestat.hw.link.local_link_integrity_errors ++rocestat.hw.rnr.rnr_nak_retry_err ++rocestat.hw.resp.resp_local_length_error ++rocestat.hw.resp.resp_cqe_error ++rocestat.hw.resp.resp_cqe_flush_error ++rocestat.hw.resp.resp_remote_access_errors ++rocestat.hw.req.req_remote_invalid_request ++rocestat.hw.req.req_cqe_error ++rocestat.hw.req.req_cqe_flush_error ++rocestat.hw.req.duplicate_request ++rocestat.hw.req.rx_read_requests ++rocestat.hw.req.rx_atomic_requests ++rocestat.hw.req.req_remote_access_errors ++rocestat.hw.req.rx_write_requests ++rocestat.hw.mcast.multicast_rcv_packets ++rocestat.hw.mcast.multicast_xmit_packets ++rocestat.hw.ucast.unicast_rcv_packets ++rocestat.hw.ucast.unicast_xmit_packets ++rocestat.hw.rcv.port_rcv_errors ++rocestat.hw.rcv.port_rcv_remote_physical_errors ++rocestat.hw.rcv.port_rcv_packets ++rocestat.hw.rcv.port_rcv_data ++rocestat.hw.rcv.port_rcv_constraint_errors ++rocestat.hw.rcv.port_rcv_switch_relay_errors ++rocestat.hw.xmit.port_xmit_data ++rocestat.hw.xmit.port_xmit_constraint_errors ++rocestat.hw.xmit.port_xmit_wait ++rocestat.hw.xmit.port_xmit_packets ++rocestat.hw.xmit.port_xmit_discards ++rocestat.hw.roce_slow_restart_trans ++rocestat.hw.roce_slow_restart_cnps ++rocestat.hw.roce_slow_restart ++rocestat.hw.roce_adp_retrans_to ++rocestat.hw.clear_counters ++rocestat.hw.local_ack_timeout_err ++rocestat.hw.lifespan ++rocestat.hw.implied_nak_seq_err ++rocestat.hw.packet_seq_err ++rocestat.hw.roce_adp_retrans ++rocestat.hw.out_of_buffer ++rocestat.hw.out_of_sequence ++rocestat.hw.VL15_dropped ++rocestat.hw.excessive_buffer_overrun_errors ++rocestat.hw.symbol_error +\ No newline at end of file +diff --git a/qa/rocestat/rocestat.json b/qa/rocestat/rocestat.json +new file mode 100644 +index 0000000000..e5c6da7a5b +--- /dev/null ++++ b/qa/rocestat/rocestat.json +@@ -0,0 +1,218 @@ ++{ ++ "lane": { ++ "rx_pause": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ }, ++ "rx_bytes": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ }, ++ "tx_bytes": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ } ++ }, ++ "hw_link": { ++ "link_error_recovery": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ }, ++ "link_downed": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ }, ++ "local_link_integrity_errors": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ } ++ }, ++ "hw_rnr": { ++ "rnr_nak_retry_err": { ++ "mlx5_0_1": 3, ++ "mlx5_1_1": 1 ++ } ++ }, ++ "hw_resp": { ++ "resp_local_length_error": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ }, ++ "resp_cqe_error": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ }, ++ "resp_cqe_flush_error": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ }, ++ "resp_remote_access_errors": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ } ++ }, ++ "hw_req": { ++ "req_remote_invalid_request": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ }, ++ "req_cqe_error": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ }, ++ "req_cqe_flush_error": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ }, ++ "duplicate_request": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ }, ++ "rx_read_requests": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ }, ++ "rx_atomic_requests": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ }, ++ "req_remote_access_errors": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ }, ++ "rx_write_requests": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ } ++ }, ++ "hw_mcast": { ++ "multicast_rcv_packets": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ }, ++ "multicast_xmit_packets": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ } ++ }, ++ "hw_ucast": { ++ "unicast_rcv_packets": { ++ "mlx5_0_1": 2454, ++ "mlx5_1_1": 2469 ++ }, ++ "unicast_xmit_packets": { ++ "mlx5_0_1": 2496, ++ "mlx5_1_1": 2478 ++ } ++ }, ++ "hw_rcv": { ++ "port_rcv_errors": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ }, ++ "port_rcv_remote_physical_errors": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ }, ++ "port_rcv_packets": { ++ "mlx5_0_1": 2454, ++ "mlx5_1_1": 2469 ++ }, ++ "port_rcv_data": { ++ "mlx5_0_1": 57781, ++ "mlx5_1_1": 53893 ++ }, ++ "port_rcv_constraint_errors": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ }, ++ "port_rcv_switch_relay_errors": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ } ++ }, ++ "hw_xmit": { ++ "port_xmit_data": { ++ "mlx5_0_1": 67939, ++ "mlx5_1_1": 56182 ++ }, ++ "port_xmit_constraint_errors": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ }, ++ "port_xmit_wait": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ }, ++ "port_xmit_packets": { ++ "mlx5_0_1": 2496, ++ "mlx5_1_1": 2478 ++ }, ++ "port_xmit_discards": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ } ++ }, ++ "hw": { ++ "roce_slow_restart_trans": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ }, ++ "roce_slow_restart_cnps": { ++ "mlx5_0_1": 3, ++ "mlx5_1_1": 1 ++ }, ++ "roce_slow_restart": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ }, ++ "roce_adp_retrans_to": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ }, ++ "clear_counters": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ }, ++ "local_ack_timeout_err": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ }, ++ "lifespan": { ++ "mlx5_0_1": 10, ++ "mlx5_1_1": 10 ++ }, ++ "implied_nak_seq_err": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ }, ++ "packet_seq_err": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ }, ++ "roce_adp_retrans": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ }, ++ "out_of_buffer": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ }, ++ "out_of_sequence": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ }, ++ "VL15_dropped": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ }, ++ "excessive_buffer_overrun_errors": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ }, ++ "symbol_error": { ++ "mlx5_0_1": 0, ++ "mlx5_1_1": 0 ++ } ++ } ++} +\ No newline at end of file +diff --git a/qa/rocestat/rocestat_test.python b/qa/rocestat/rocestat_test.python +new file mode 100755 +index 0000000000..5645761efc +--- /dev/null ++++ b/qa/rocestat/rocestat_test.python +@@ -0,0 +1,123 @@ ++#!/usr/bin/env pmpython ++ ++import os ++import json ++from pcp import pmapi ++import cpmapi as c_api ++import unittest ++import ctypes ++ ++ ++def load_metrics_from_file(filepath): ++ """Load metrics from a file and organize them by cluster.""" ++ clusters = {} ++ with open(filepath, 'r') as f: ++ for line in f: ++ line = line.strip() ++ if not line or line.startswith('#'): ++ continue ++ cluster, metric = line.split('.', 1) ++ clusters.setdefault(cluster, []).append(metric) ++ return clusters ++ ++ ++def fetch_metric_data(ctx, cluster, metric): ++ """Fetch metric data for a given cluster and metric.""" ++ # print(f"Fetching data for metric: {cluster}.{metric}") ++ pmid = ctx.pmLookupName([f"{cluster}.{metric}"])[0] ++ desc = ctx.pmLookupDescs([pmid])[0] ++ ++ pmid_array = (ctypes.c_uint * 1)(pmid) ++ results = ctx.pmFetch(pmid_array) ++ ++ # Handle instance domains ++ if desc.contents.indom == c_api.PM_INDOM_NULL: ++ print(f"No instances for metric: {cluster}.{metric}") ++ return {} # No instances for this metric ++ ++ instances = ctx.pmGetInDom(desc)[1] ++ metric_data = {} ++ for i, instance in enumerate(instances): ++ atom = ctx.pmExtractValue( ++ results.contents.get_valfmt(0), ++ results.contents.get_vlist(0, i), ++ desc.contents.type, ++ c_api.PM_TYPE_U64 ++ ) ++ metric_data[instance] = atom.ul ++ # print(f"Metric: {cluster}.{metric}, Instance: {instance}, Value: {atom.ul}") ++ ++ return metric_data ++ ++ ++class RocestatTests(unittest.TestCase): ++ """Unit tests for Rocestat PMDA metrics.""" ++ ++ @classmethod ++ def setUpClass(cls): ++ """Set up the test environment and fetch all metrics.""" ++ print("\nFetching Rocestat PMDA metrics\n") ++ cls.ctx = pmapi.pmContext() ++ cls.cluster_data = {} ++ ++ for cluster, metrics in metric_clusters.items(): ++ cls.cluster_data[cluster] = { ++ metric: fetch_metric_data(cls.ctx, cluster, metric) ++ for metric in metrics ++ } ++ ++ def _test_cluster_metrics(self, cluster): ++ """Test all metrics in a given cluster.""" ++ metrics = self.cluster_data.get(cluster, {}) ++ ++ for metric, instances in metrics.items(): ++ self.assertTrue(instances, f"No instances found for metric: {metric} in cluster: {cluster}") ++ for instance, value in instances.items(): ++ with self.subTest(cluster=cluster, metric=metric, instance=instance): ++ expected_value = expected_values.get(cluster, {}).get(metric, {}).get(instance) ++ self.assertIsNotNone(expected_value, f"Expected value for {metric} (instance {instance}) in {cluster} is missing") ++ self.assertEqual(value, expected_value, f"{metric} (instance {instance}) in {cluster} does not match expected value") ++ ++ def test_hw_metrics(self): ++ self._test_cluster_metrics("hw") ++ ++ def test_hw_xmit_metrics(self): ++ self._test_cluster_metrics("hw_xmit") ++ ++ def test_hw_rcv_metrics(self): ++ self._test_cluster_metrics("hw_rcv") ++ ++ def test_hw_ucast_metrics(self): ++ self._test_cluster_metrics("hw_ucast") ++ ++ def test_hw_mcast_metrics(self): ++ self._test_cluster_metrics("hw_mcast") ++ ++ def test_hw_req_metrics(self): ++ self._test_cluster_metrics("hw_req") ++ ++ def test_hw_resp_metrics(self): ++ self._test_cluster_metrics("hw_resp") ++ ++ def test_hw_rnr_metrics(self): ++ self._test_cluster_metrics("hw_rnr") ++ ++ def test_hw_link_metrics(self): ++ self._test_cluster_metrics("hw_link") ++ ++ def test_nic_metrics(self): ++ self._test_cluster_metrics("nic") ++ ++ ++if __name__ == '__main__': ++ # Load metrics and expected values ++ script_dir = os.path.dirname(__file__) ++ metrics_file = os.path.join(script_dir, "metrics.list") ++ expected_values_file = os.path.join(script_dir, "rocestat.json") ++ ++ metric_clusters = load_metrics_from_file(metrics_file) ++ with open(expected_values_file, 'r') as f: ++ expected_values = json.load(f) ++ ++ # Run tests ++ unittest.TextTestRunner(verbosity=2).run(unittest.TestLoader().loadTestsFromTestCase(RocestatTests)) +diff --git a/src/pmdas/GNUmakefile b/src/pmdas/GNUmakefile +index a1236a2fe8..b49a60c9b6 100644 +--- a/src/pmdas/GNUmakefile ++++ b/src/pmdas/GNUmakefile +@@ -38,7 +38,7 @@ PLPMDAS = bonding netfilter zimbra postgresql \ + PYPMDAS = bcc gluster zswap unbound mic haproxy \ + json libvirt lio openmetrics elasticsearch \ + bpftrace mssql netcheck rabbitmq openvswitch \ +- mongodb ++ mongodb rocestat + + SUBDIRS = $(CPMDAS) $(PLPMDAS) $(PYPMDAS) + LDIRT = pmcd.conf +diff --git a/src/pmdas/rocestat/GNUmakefile b/src/pmdas/rocestat/GNUmakefile +new file mode 100644 +index 0000000000..fd036e0531 +--- /dev/null ++++ b/src/pmdas/rocestat/GNUmakefile +@@ -0,0 +1,40 @@ ++TOPDIR = ../../.. ++include $(TOPDIR)/src/include/builddefs ++ ++IAM = rocestat ++PYSCRIPT = pmda$(IAM).python ++LDIRT = domain.h root pmns $(IAM).log ++DOMAIN = GLUSTER ++ ++PMDAADMDIR = $(PCP_PMDASADM_DIR)/$(IAM) ++PMDATMPDIR = $(PCP_PMDAS_DIR)/$(IAM) ++ ++MAN_SECTION = 1 ++MAN_PAGES = pmda$(IAM).$(MAN_SECTION) ++MAN_DEST = $(PCP_MAN_DIR)/man$(MAN_SECTION) ++ ++default_pcp default: build-me ++ ++include $(BUILDRULES) ++ ++ifeq "$(HAVE_PYTHON)" "true" ++build-me: check_domain ++install_pcp install: default ++ $(INSTALL) -m 755 -d $(PMDAADMDIR) ++ $(INSTALL) -m 755 -d $(PMDATMPDIR) ++ $(INSTALL) -m 755 -t $(PMDATMPDIR) Install Remove $(PYSCRIPT) $(PMDAADMDIR) ++ @$(INSTALL_MAN) ++else ++build-me: ++install_pcp install: ++ @$(INSTALL_MAN) ++endif ++ ++check_domain: ../../pmns/stdpmid ++ $(DOMAIN_PYTHONRULE) ++ ++check:: $(PYSCRIPT) ++ $(PYLINT) $^ ++ ++check:: $(MAN_PAGES) ++ $(MANLINT) $^ +diff --git a/src/pmdas/rocestat/Install b/src/pmdas/rocestat/Install +new file mode 100644 +index 0000000000..cb66717036 +--- /dev/null ++++ b/src/pmdas/rocestat/Install +@@ -0,0 +1,40 @@ ++#!/bin/sh ++# __author__ = "Mohith Kumar Thummaluru" ++# __email__ = "mohith.k.kumar.thummaluru@oracle.com" ++# ++# Copyright (c) 2025 Oracle and/or its affiliates. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++# This program is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation; either version 2 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++# for more details. ++# ++# Install the Rocestat PMDA ++# ++ ++. $PCP_DIR/etc/pcp.env ++. $PCP_SHARE_DIR/lib/pmdaproc.sh ++ ++iam=rocestat ++python_opt=true ++daemon_opt=false ++ ++if [[ ! -d /sys/class/infiniband ]]; then ++ if ! lsmod | grep -q '^ib_core'; then ++ echo "IB kernel modules are not loaded" >&2 ++ else ++ echo "No IB devices detected" >&2 ++ fi ++ status=1 ++ exit ++fi ++ ++pmdaSetup ++pmdaInstall ++exit +diff --git a/src/pmdas/rocestat/Remove b/src/pmdas/rocestat/Remove +new file mode 100644 +index 0000000000..00f773b5d7 +--- /dev/null ++++ b/src/pmdas/rocestat/Remove +@@ -0,0 +1,38 @@ ++#!/bin/sh ++# __author__ = "Mohith Kumar Thummaluru" ++# __email__ = "mohith.k.kumar.thummaluru@oracle.com" ++# ++# Copyright (c) 2025 Oracle and/or its affiliates. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++# This program is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation; either version 2 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++# for more details. ++# ++# Remove the rocestat PMDA ++# ++ ++# source the PCP configuration environment variables ++. $PCP_DIR/etc/pcp.env ++ ++# Get the common procedures and variable assignments ++# ++. $PCP_SHARE_DIR/lib/pmdaproc.sh ++ ++# The name of the PMDA ++# ++iam=rocestat ++ ++# Do it ++# ++pmdaSetup ++pmdaRemove ++ ++ ++exit +diff --git a/src/pmdas/rocestat/domain.h b/src/pmdas/rocestat/domain.h +new file mode 100644 +index 0000000000..a2bcb16fda +--- /dev/null ++++ b/src/pmdas/rocestat/domain.h +@@ -0,0 +1,2 @@ ++#define ROCESTAT 254 ++ +diff --git a/src/pmdas/rocestat/pmdarocestat.1 b/src/pmdas/rocestat/pmdarocestat.1 +new file mode 100644 +index 0000000000..28a55f19c6 +--- /dev/null ++++ b/src/pmdas/rocestat/pmdarocestat.1 +@@ -0,0 +1,94 @@ ++'\"macro stdmacro ++.\" ++.\" Copyright (c) 2025 Oracle and/or its affiliates. ++.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++.\" ++.\" This program is free software; you can redistribute it and/or modify it ++.\" under the terms of the GNU General Public License as published by the ++.\" Free Software Foundation; either version 2 of the License, or (at your ++.\" option) any later version. ++.\" ++.\" This program is distributed in the hope that it will be useful, but ++.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++.\" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++.\" for more details. ++.\" ++.\" ++.TH PMDAROCESTAT 1 "PCP" "Performance Co-Pilot" "General Commands Manual" ++.SH NAME ++.B pmdarocestat ++\- Performance Metrics Domain Agent (PMDA) for RoCE devices ++ ++.SH DESCRIPTION ++The ++.B Rocestat PMDA ++(Performance Metrics Domain Agent) is a Performance Co-Pilot (PCP) module that collects ++and exports performance statistics for RDMA over Converged Ethernet (RoCE) devices. It provides insights into ++network performance, error conditions, and congestion events, aiding in the diagnosis and monitoring of RoCE-based ++communication. ++ ++This PMDA reports software-aggregated InfiniBand port statistics, including received/transmitted bytes and ++packets, link errors, and congestion-related drops, helping to identify potential bottlenecks and failures. ++Additionally, it includes hardware-level counters, which track low-level transmission metrics, duplicate requests, ++NAKs, and physical/constraint errors, offering a deeper view into the underlying transport reliability and efficiency. ++ ++Furthermore, Rocestat PMDA collects priority-based lane metrics from ethtool -S , filtering ++statistics related to priority lanes in RoCE traffic. These metrics provide visibility into traffic distribution ++across lanes, helping diagnose congestion hotspots and optimize workload balancing across different lanes ++ ++By integrating Rocestat PMDA into a PCP monitoring environment, users can efficiently analyze RoCE ++network behavior, detect performance anomalies, and optimize high-speed RDMA workloads in data center and HPC ++environments. ++ ++.SH INSTALLATION ++To install the Rocestat PMDA, follow these steps: ++.RS ++.nf ++# cd $PCP_PMDAS_DIR/rocestat ++# ./Install ++.fi ++.RE ++ ++To verify that the PMDA is running: ++.RS ++.nf ++$ pminfo -t rocestat ++.fi ++.RE ++ ++.SH USAGE ++To query Rocestat metrics, use the following command: ++.RS ++.nf ++$ pminfo rocestat ++.fi ++.RE ++To retrieve specific metric values: ++.RS ++.nf ++$ pmval rocestat.hw.rcv.port_rcv_packets ++.fi ++.RE ++ ++.SH FILES ++.TP ++.I $PCP_PMDAS_DIR/rocestat/Install ++Installation script for Rocestat PMDA. ++.TP ++.I $PCP_PMDAS_DIR/rocestat/Remove ++Uninstallation script. ++.TP ++.I $PCP_LOG_DIR/pmcd/rocestat.log ++Log file for Rocestat PMDA events and errors. ++ ++.SH PCP ENVIRONMENT ++Environment variables with the prefix PCP_ are used to parameterize the file and ++directory names used by PCP. On each installation, the file /etc/pcp.conf contains ++the local values for these variables. The $PCP_CONF variable may be used to specify ++an alternative configuration file, as described in pcp.conf(5). ++ ++.SH SEE ALSO ++.BR PCPIntro (1), ++.BR pmcd (1) ++.BR PMDA (3), ++.BR pminfo (1), +diff --git a/src/pmdas/rocestat/pmdarocestat.python b/src/pmdas/rocestat/pmdarocestat.python +new file mode 100644 +index 0000000000..9b852d398f +--- /dev/null ++++ b/src/pmdas/rocestat/pmdarocestat.python +@@ -0,0 +1,536 @@ ++# __author__ = "Mohith Kumar Thummaluru" ++# __email__ = "mohith.k.kumar.thummaluru@oracle.com" ++# ++# Copyright (c) 2025 Oracle and/or its affiliates. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++# This program is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation; either version 2 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++# for more details. ++# ++# pylint: disable=no-self-use, consider-using-f-string, too-many-instance-attributes ++# pylint: disable=c-extension-no-member, consider-iterating-dictionary ++# pylint: disable=too-many-locals, too-many-arguments, too-many-lines, unused-argument, line-too-long ++# pylint: disable=too-many-return-statements, too-many-branches, too-many-statements, bare-except ++""" ++Python implementation of the "rocestat" Performance Metrics Domain Agent. ++""" ++import subprocess ++import os ++import re ++import cpmapi as c_api ++from pcp.pmda import PMDA, pmdaMetric, pmdaIndom ++from pcp.pmapi import pmUnits ++from ctypes import c_int, c_ulonglong, POINTER, cast, Structure ++ ++lane_mapping = { ++ 0: 'Default(TCP) - 0', ++ 1: 'Normal Large - 1', ++ 2: 'VIP Small - 2', ++ 3: 'VIP Large - 3', ++ 4: 'Normal Small - 4', ++ 5: 'VIP Small - 5', ++ 6: 'Unused - 6', ++ 7: 'CNP - 7', ++} ++ ++RoceStatHW = [ ++ ("symbol_error", c_ulonglong), ++ ("excessive_buffer_overrun_errors", c_ulonglong), ++ ("VL15_dropped", c_ulonglong), ++ ("out_of_sequence", c_ulonglong), ++ ("out_of_buffer", c_ulonglong), ++ ("roce_adp_retrans", c_ulonglong), ++ ("packet_seq_err", c_ulonglong), ++ ("implied_nak_seq_err", c_ulonglong), ++ ("lifespan", c_ulonglong), ++ ("local_ack_timeout_err", c_ulonglong), ++ ("clear_counters", c_ulonglong), ++ ("roce_adp_retrans_to", c_ulonglong), ++ ("roce_slow_restart", c_ulonglong), ++ ("roce_slow_restart_cnps", c_ulonglong), ++ ("roce_slow_restart_trans", c_ulonglong) ++ ] ++ ++RoceStatXmit = [ ++ ("port_xmit_discards", c_ulonglong), ++ ("port_xmit_packets", c_ulonglong), ++ ("port_xmit_wait", c_ulonglong), ++ ("port_xmit_constraint_errors", c_ulonglong), ++ ("port_xmit_data", c_ulonglong) ++ ] ++ ++RoceStatRcv = [ ++ ("port_rcv_switch_relay_errors", c_ulonglong), ++ ("port_rcv_constraint_errors", c_ulonglong), ++ ("port_rcv_data", c_ulonglong), ++ ("port_rcv_packets", c_ulonglong), ++ ("port_rcv_remote_physical_errors", c_ulonglong), ++ ("port_rcv_errors", c_ulonglong) ++ ] ++ ++RoceStatUcast = [ ++ ("unicast_xmit_packets", c_ulonglong), ++ ("unicast_rcv_packets", c_ulonglong) ++ ] ++ ++RoceStatMcast = [ ++ ("multicast_xmit_packets", c_ulonglong), ++ ("multicast_rcv_packets", c_ulonglong) ++ ] ++ ++RoceStatReq = [ ++ ("rx_write_requests", c_ulonglong), ++ ("req_remote_access_errors", c_ulonglong), ++ ("rx_atomic_requests", c_ulonglong), ++ ("rx_read_requests", c_ulonglong), ++ ("duplicate_request", c_ulonglong), ++ ("req_cqe_flush_error", c_ulonglong), ++ ("req_cqe_error", c_ulonglong), ++ ("req_remote_invalid_request", c_ulonglong) ++ ] ++ ++RoceStatResp = [ ++ ("resp_remote_access_errors", c_ulonglong), ++ ("resp_cqe_flush_error", c_ulonglong), ++ ("resp_cqe_error", c_ulonglong), ++ ("resp_local_length_error", c_ulonglong) ++ ] ++ ++RoceStatRnr = [ ++ ("rnr_nak_retry_err", c_ulonglong) ++ ] ++ ++RoceStatLink = [ ++ ("local_link_integrity_errors", c_ulonglong), ++ ("link_downed", c_ulonglong), ++ ("link_error_recovery", c_ulonglong), ++ ] ++ ++class RoceDev(Structure): ++ ''' Statistic values per-mlnx-device (mlnx device indom cache lookup) ''' ++ _fields_ = RoceStatHW + RoceStatXmit + RoceStatRcv ++ _fields_ += RoceStatUcast + RoceStatMcast ++ _fields_ += RoceStatReq + RoceStatResp ++ _fields_ += RoceStatRnr + RoceStatLink ++ ++class NicStats(Structure): ++ _fields_ = [ ++ ("tx_bytes", c_ulonglong), ++ ("rx_bytes", c_ulonglong), ++ ("rx_pause", c_ulonglong), ++ ] ++ ++class NICSTATS: ++ def __init__(self): ++ self.up_interfaces = [] ++ self.ethtool_stats = {} ++ ++ def get_up_interfaces(self): ++ """Get the names of all interfaces that are in the Up state.""" ++ result = subprocess.Popen(['/usr/bin/ibdev2netdev'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) ++ output, _ = result.communicate() ++ ++ if result.returncode != 0: ++ return [] ++ ++ # Regular expression to find interfaces and their status ++ pattern = re.compile(r'(\S+) \(Up\)') ++ self.up_interfaces = pattern.findall(output) ++ return self.up_interfaces ++ ++ def get_ethtool_stats(self, interface): ++ """Get the ethtool -S output for the specified interface and filter stats containing 'prio'.""" ++ result = subprocess.Popen(['ethtool', '-S', interface], stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) ++ output, _ = result.communicate() ++ ++ if result.returncode != 0: ++ return {} ++ ++ # Filter the stats to include only those with 'prio' in their names ++ prio_stats = {} ++ for line in output.splitlines(): ++ if 'prio' in line: ++ if 'bytes' in line or 'pause' in line: ++ key, value = line.strip().split(':', 1) ++ value = int(value) ++ if value > 0: ++ prio_stats[key] = value ++ ++ return prio_stats ++ ++ def process_prio_stats(self, prio_stats): ++ """Process the prio stats to group them by lanes.""" ++ all_lanes = [f"lane{i}" for i in range(0,8)] ++ ++ lanes = {lane:{} for lane in all_lanes} ++ ++ for key, value in prio_stats.items(): ++ # Extract the lane number from the key ++ match = re.match(r'(rx|tx)_prio(\d+)_(pause|bytes)', key) ++ if match: ++ direction, lane, key = match.groups() ++ ++ lane = "lane" + str(lane) ++ if (direction =='rx' and key.endswith("pause")) or key.endswith("bytes"): ++ lanes[lane][f'{direction}_{key}'] = value ++ ++ for lane, sub_dict in lanes.items(): ++ metrics = ['rx_bytes', 'tx_bytes', 'rx_pause'] ++ for metric in metrics: ++ if metric not in sub_dict.keys(): ++ lanes[lane][metric] = 0 ++ return lanes ++ ++ def collect_stats(self): ++ """Collect ethtool stats for all Up interfaces.""" ++ self.get_up_interfaces() ++ for interface in self.up_interfaces: ++ stats = self.get_ethtool_stats(interface) ++ lanes_stats = self.process_prio_stats(stats) ++ self.ethtool_stats[interface] = lanes_stats ++ return self.convert_dict(self.ethtool_stats) ++ ++ def convert_dict(self, input_dict): ++ output_dict = {} ++ for key1, sub_dict in input_dict.items(): ++ if isinstance(sub_dict, dict): ++ for key2, value in sub_dict.items(): ++ new_key = f"{key1}_{key2}" ++ output_dict[new_key] = value ++ return output_dict ++ ++class MLNXCOUNTERS(): ++ hw_counter_hash = {} ++ hw_counter_path = [] ++ hw_counter = [] ++ first_hw_qry = True ++ ++ def get_hw_counter_names(self, base_path='/sys/class/infiniband'): ++ counter_paths = [] ++ ++ # Check if base path exists ++ if not os.path.exists(base_path): ++ return counter_paths ++ # raise FileNotFoundError(f"Base path {base_path} does not exist.") ++ ++ # Traverse each device directory in the base path ++ for device in os.listdir(base_path): ++ device_path = os.path.join(base_path, device) ++ ports_path = os.path.join(device_path, 'ports') ++ ++ # Check if ports directory exists ++ if os.path.exists(ports_path): ++ # Traverse each port directory in the device's ports directory ++ for port in os.listdir(ports_path): ++ port_path = os.path.join(ports_path, port) ++ ++ # Check and collect counter file paths ++ counters_path = os.path.join(port_path, 'counters') ++ if os.path.exists(counters_path): ++ for counter_file in os.listdir(counters_path): ++ counter_paths.append(os.path.join(counters_path, counter_file)) ++ ++ # Check and collect hw_counters file paths ++ hw_counters_path = os.path.join(port_path, 'hw_counters') ++ if os.path.exists(hw_counters_path): ++ for hw_counter_file in os.listdir(hw_counters_path): ++ counter_paths.append(os.path.join(hw_counters_path, hw_counter_file)) ++ ++ return counter_paths ++ ++ def find_device_status(self, device): ++ infiniband_base = "/sys/class/infiniband" ++ ports_dir = os.path.join(infiniband_base, device, "ports") ++ ++ if not os.path.isdir(ports_dir): ++ return False ++ ++ try: ++ ports = os.listdir(ports_dir) ++ except FileNotFoundError: ++ return False ++ ++ for port in ports: ++ port_dir = os.path.join(infiniband_base, device, "ports", str(port)) ++ ++ if os.path.isfile(os.path.join(port_dir, "phys_state")): ++ with open(os.path.join(port_dir, "phys_state"), 'r') as f: ++ phys_state = f.read().strip() ++ if "LinkUp" in phys_state: ++ return True ++ ++ return False ++ ++ def get_active_devices(self): ++ ++ active_devices = [] ++ visit = set() ++ ++ for path in self.hw_counter: ++ token = path.split('/') ++ if len(token) > 8: ++ mlx = token[4] ++ if mlx not in visit: ++ status = self.find_device_status(mlx) ++ if status is True: ++ active_devices.append(mlx) ++ self.hw_counter_path.append(path.strip()) ++ visit.add(mlx) ++ return active_devices ++ ++ # initialize the hardware counters ++ # self.hw_counter_hash['mlnx5_0'][1]['np_cnp_sent'] = ++ # where mlnx5_0 is device, 1 is port, np_cnp_sent is the counter ++ def init_hw_counter(self, active_devices): ++ port_keys = {} ++ port_keys['1'] = 0 ++ port_keys['2'] = 0 ++ for i in self.hw_counter: ++ token = i.split('/') ++ if len(token) > 8: ++ mlx = token[4] ++ port = token[6] ++ if mlx not in active_devices: ++ continue ++ self.hw_counter_path.append(i.strip()) ++ counter = token[8].strip() ++ if mlx not in self.hw_counter_hash: ++ self.hw_counter_hash[mlx] = {} ++ if port not in self.hw_counter_hash[mlx]: ++ self.hw_counter_hash[mlx][port] = {} ++ self.hw_counter_hash[mlx][port][counter] = 0 ++ port_keys[port] += 1 ++ ++ # get_hw_counters probes the counter periodically and updates the counter stats ++ def get_hw_counters(self, counter_path, hw_counter_vals): ++ for path in counter_path: ++ with open(path, 'r') as fread: ++ ret = fread.read().strip() ++ ++ token = path.split('/') ++ mlx, port, counter = token[4], token[6], token[8] ++ hw_counter_vals[mlx][port][counter] = int(ret) ++ ++ return hw_counter_vals ++ ++ def convert_dict(self, input_dict): ++ output_dict = {} ++ for key1, sub_dict in input_dict.items(): ++ if isinstance(sub_dict, dict): ++ for key2, value in sub_dict.items(): ++ new_key = f"{key1}_{key2}" ++ output_dict[new_key] = value ++ return output_dict ++ ++ def fetch_mlnx_counters(self): ++ self.hw_counter = self.get_hw_counter_names() ++ active_device = self.get_active_devices() ++ ++ self.init_hw_counter(active_device) ++ ++ self.hw_counter_hash = self.get_hw_counters(self.hw_counter_path, self.hw_counter_hash) ++ return self.convert_dict(self.hw_counter_hash) ++ ++ ++class ROCESTATPMDA(PMDA): ++ """ ++ A ROCESTAT Performance Metrics Domain Agent. ++ """ ++ ++ # Cluster definitions ++ CLUSTER_HW = 1 ++ CLUSTER_HW_XMIT = 2 ++ CLUSTER_HW_RCV = 3 ++ CLUSTER_HW_UCAST = 4 ++ CLUSTER_HW_MCAST = 5 ++ CLUSTER_HW_REQ = 6 ++ CLUSTER_HW_RESP = 7 ++ CLUSTER_HW_RNR = 8 ++ CLUSTER_HW_LINK = 9 ++ ++ CLUSTER_NIC = 10 ++ ++ mlnx_counters = {} ++ nic_stats = {} ++ ++ def register_metrics(self, name): ++ """ ++ Register Metrics ++ """ ++ pm_type_32 = c_api.PM_TYPE_U32 ++ pm_type_64 = c_api.PM_TYPE_U64 ++ ++ inst_sem = c_api.PM_SEM_INSTANT ++ ++ pm_units = pmUnits(0,0,0,0,0,0) ++ byte_units = pmUnits(1,0,0,c_api.PM_SPACE_BYTE,0,0) ++ count_units = pmUnits(0,0,1,0,0,0) ++ ++ # Registering MLNX HW Counters ++ self.mlnx_indom = self.indom(0) ++ self.add_indom(pmdaIndom(self.mlnx_indom, self.mlnx_counters)) ++ ++ hw_metrics = [(f"{name}.hw.{dev_attr[0]}", self.CLUSTER_HW, dev_attr[1]) for dev_attr in RoceStatHW] ++ hw_metrics += [(f"{name}.hw.xmit.{dev_attr[0]}", self.CLUSTER_HW_XMIT, dev_attr[1]) for dev_attr in RoceStatXmit] ++ hw_metrics += [(f"{name}.hw.rcv.{dev_attr[0]}", self.CLUSTER_HW_RCV, dev_attr[1]) for dev_attr in RoceStatRcv] ++ hw_metrics += [(f"{name}.hw.ucast.{dev_attr[0]}", self.CLUSTER_HW_UCAST, dev_attr[1]) for dev_attr in RoceStatUcast] ++ hw_metrics += [(f"{name}.hw.mcast.{dev_attr[0]}", self.CLUSTER_HW_MCAST, dev_attr[1]) for dev_attr in RoceStatMcast] ++ hw_metrics += [(f"{name}.hw.req.{dev_attr[0]}", self.CLUSTER_HW_REQ, dev_attr[1]) for dev_attr in RoceStatReq] ++ hw_metrics += [(f"{name}.hw.resp.{dev_attr[0]}", self.CLUSTER_HW_RESP, dev_attr[1]) for dev_attr in RoceStatResp] ++ hw_metrics += [(f"{name}.hw.rnr.{dev_attr[0]}", self.CLUSTER_HW_RNR, dev_attr[1]) for dev_attr in RoceStatRnr] ++ hw_metrics += [(f"{name}.hw.link.{dev_attr[0]}", self.CLUSTER_HW_LINK, dev_attr[1]) for dev_attr in RoceStatLink] ++ ++ for idx, (metric_name, metric_cluster, metric_type) in enumerate(hw_metrics, 0): ++ if metric_type == c_int: ++ metric_type = pm_type_32 ++ elif metric_type == c_ulonglong: ++ metric_type = pm_type_64 ++ ++ if "data" in metric_name: ++ pm_units = byte_units ++ else: ++ pm_units = count_units ++ ++ self.add_metric(metric_name, ++ pmdaMetric(self.pmid(metric_cluster, idx), ++ metric_type, ++ self.mlnx_indom, inst_sem, pm_units)) ++ ++ # Register Per Lane NIC stats ++ self.nic_indom = self.indom(1) ++ self.add_indom(pmdaIndom(self.nic_indom, self.nic_stats)) ++ ++ nic_metric = [f"{name}.lane.{dev_attr[0]}" for dev_attr in NicStats._fields_] ++ ++ for idx, metric_name in enumerate(nic_metric, 0): ++ if "bytes" in metric_name: ++ pm_units = byte_units ++ else: ++ pm_units = count_units ++ ++ self.add_metric(metric_name, ++ pmdaMetric(self.pmid(self.CLUSTER_NIC, idx), ++ pm_type_64, ++ self.nic_indom, inst_sem, pm_units)) ++ ++ def rocestat_fetch_mlnx_counters(self, item, inst): ++ ++ voidp = self.inst_lookup(self.mlnx_indom, inst) ++ ++ if voidp is None: ++ return [c_api.PM_ERR_INST, 0] ++ ++ cache = cast(voidp, POINTER(RoceDev)) ++ item_lookup = [dev_attr[0] for dev_attr in RoceDev._fields_] ++ dev = cache.contents ++ ++ if 0 <= item < len(RoceDev._fields_): ++ return [getattr(dev, item_lookup[item]), 1] ++ else: ++ return [c_api.PM_ERR_INST, 0] ++ ++ def rocestat_fetch_nic_stats(self, item, inst): ++ ++ voidp = self.inst_lookup(self.nic_indom, inst) ++ ++ if voidp is None: ++ return [c_api.PM_ERR_INST, 0] ++ ++ cache = cast(voidp, POINTER(NicStats)) ++ item_lookup = [dev_attr[0] for dev_attr in NicStats._fields_] ++ nic = cache.contents ++ ++ if 0 <= item < len(NicStats._fields_): ++ return [getattr(nic, item_lookup[item]), 1] ++ else: ++ return [c_api.PM_ERR_INST, 0] ++ ++ def refresh_mlnx_counters(self): ++ ''' Refresh the values and instances for mlnx devices''' ++ try: ++ roce_stat = MLNXCOUNTERS() ++ hw_cnts = roce_stat.fetch_mlnx_counters() ++ except: ++ self.log("failed to fetch mlnx counters") ++ ++ for device, dict_counters in hw_cnts.items(): ++ dev = RoceDev() ++ for k,v in dict_counters.items(): ++ setattr(dev, k, v) ++ ++ self.mlnx_counters[device] = dev ++ ++ def refresh_nic_stats(self): ++ try: ++ collector = NICSTATS() ++ nic_stats = collector.collect_stats() ++ except: ++ self.log("failed to fetch nic stats") ++ ++ for nic_lane, dict_stats in nic_stats.items(): ++ nic = NicStats() ++ for k,v in dict_stats.items(): ++ setattr(nic, k, v) ++ ++ self.nic_stats[nic_lane] = nic ++ ++ def refresh(self): ++ try: ++ self.refresh_mlnx_counters() ++ try: ++ self.refresh_nic_stats() ++ except: ++ self.log("Nic stats refresh failed") ++ except: ++ self.log("mlnx counters refresh failed") ++ ++ def roce_stat_fetch(self): ++ ''' Called once per "fetch" PDU ''' ++ self.refresh() ++ self.replace_indom(self.mlnx_indom, self.mlnx_counters) ++ self.replace_indom(self.nic_indom, self.nic_stats) ++ ++ def roce_fetch_callback(self, cluster, item, inst): ++ """ ++ Main fetch callback ++ """ ++ ++ if self.CLUSTER_HW <= cluster <= self.CLUSTER_HW_LINK: ++ return self.rocestat_fetch_mlnx_counters(item, inst) ++ ++ if cluster == self.CLUSTER_NIC: ++ return self.rocestat_fetch_nic_stats(item, inst) ++ ++ return [c_api.PM_ERR_PMID, 0] ++ ++ def __init__(self, name, domain, user, logfile): ++ ++ super().__init__(name, domain, logfile) ++ if user is not None: ++ self.set_user(user) ++ ++ self.connect_pmcd() ++ ++ self.pmda_name = name ++ ++ self.register_metrics(name) ++ self.set_fetch(self.roce_stat_fetch) ++ self.set_fetch_callback(self.roce_fetch_callback) ++ ++ @classmethod ++ def in_pmda_setup(cls): ++ """Check if PMDA is in setup state""" ++ return os.environ.get('PCP_PYTHON_DOMAIN') or os.environ.get('PCP_PYTHON_PMNS') ++ ++if __name__ == "__main__": ++ pmda = ROCESTATPMDA(name='rocestat', domain=254, user="root", logfile='rocestat.log') ++ ++ # Now enter the main loop ++ pmda.run() +diff --git a/src/pmdas/rocestat/pmns b/src/pmdas/rocestat/pmns +new file mode 100644 +index 0000000000..6eb997b7e1 +--- /dev/null ++++ b/src/pmdas/rocestat/pmns +@@ -0,0 +1 @@ ++rocestat 254:*:* +diff --git a/src/pmns/stdpmid.pcp b/src/pmns/stdpmid.pcp +index b8a8dcc3f7..15f9301cbc 100644 +--- a/src/pmns/stdpmid.pcp ++++ b/src/pmns/stdpmid.pcp +@@ -151,7 +151,7 @@ TRIVIAL 250 + FORQA 251 + ### FREE SLOT 252 ### + SIMPLE 253 +-### FREE SLOT 254 ### ++ROCESTAT 254 + MEMORY_PYTHON 255 + ### MORE FREE SLOTS 256..510 ### + # +-- +2.43.5 diff --git a/SOURCES/1018-Merge-branch-pcp-rocestat-of-https-github.com-mohith.patch b/SOURCES/1018-Merge-branch-pcp-rocestat-of-https-github.com-mohith.patch new file mode 100644 index 0000000..5f5d7db --- /dev/null +++ b/SOURCES/1018-Merge-branch-pcp-rocestat-of-https-github.com-mohith.patch @@ -0,0 +1,1106 @@ +From 00ea83f5d2d208958fc13e66647a1a7861815066 Mon Sep 17 00:00:00 2001 +From: Nathan Scott +Date: Tue, 24 Jun 2025 07:41:45 +1000 +Subject: [PATCH] Merge branch 'pcp-rocestat' of + https://github.com/mohith-kumar-thummaluru/pcp into + mohith-kumar-thummaluru-pcp-rocestat + +Orabug: 38109360 +(cherry picked from commit 858814e52563652591d3b7bd6db900f7465e3549) +Signed-off-by: Mohith Kumar Thummaluru + +Conflicts: + - Minor conflicts due to missing archive files from other commits + qa/archives/GNUmakefile +--- + qa/1994 | 48 ++++ + qa/1994.out | 415 +++++++++++++++++++++++++++++++ + qa/archives/GNUmakefile | 5 +- + qa/archives/mk.rocestat | 79 ++++++ + qa/group | 2 + + src/pcp/GNUmakefile | 1 + + src/pcp/rocestat/GNUmakefile | 44 ++++ + src/pcp/rocestat/pcp-rocestat.1 | 78 ++++++ + src/pcp/rocestat/pcp-rocestat.py | 315 +++++++++++++++++++++++ + 9 files changed, 985 insertions(+), 2 deletions(-) + create mode 100755 qa/1994 + create mode 100644 qa/1994.out + create mode 100755 qa/archives/mk.rocestat + create mode 100755 src/pcp/rocestat/GNUmakefile + create mode 100755 src/pcp/rocestat/pcp-rocestat.1 + create mode 100755 src/pcp/rocestat/pcp-rocestat.py + +diff --git a/qa/1994 b/qa/1994 +new file mode 100755 +index 0000000000..51bf85d5fa +--- /dev/null ++++ b/qa/1994 +@@ -0,0 +1,48 @@ ++ ++#!/bin/sh ++# PCP QA Test No. 1994 ++# Exercise various pcp-rocestat(1) command options. ++# ++# Copyright (c) 2025 Oracle and/or its affiliates. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++# This program is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation; either version 2 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++# for more details. ++# ++ ++seq=`basename $0` ++echo "QA output created by $seq" ++ ++. ./common.python ++ ++status=1 # failure is the default! ++trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15 ++ ++pcp_rocestat="$PCP_BINADM_DIR/pcp-rocestat" ++test -x $pcp_rocestat || _notrun "No pcp-rocestat(1) installed" ++pcp_rocestat="$python $pcp_rocestat" ++ ++# real QA test starts here ++echo && echo pcp-rocestat output : Display default output ++PCP_ARCHIVE="archives/pcp-rocestat" PCP_HOSTZONE=1 PCP_ORIGIN=1 $pcp_rocestat -s 2 ++ ++archive_first="-a archives/pcp-rocestat -z -O +1" ++ ++echo && echo pcp-rocestat output : Display all network statistics for nVidia RoCE devices. ++pcp $archive_first rocestat -s 2 ++ ++echo && echo pcp-rocestat output : Display hardware counter statistics for nVidia RoCE devices. ++pcp $archive_first rocestat --hw_stats -s 2 ++ ++echo && echo pcp-rocestat output : Display per lane statistics for nVidia RoCE devices. ++pcp $archive_first rocestat --lane_stats -s 2 ++ ++status=0 ++exit +diff --git a/qa/1994.out b/qa/1994.out +new file mode 100644 +index 0000000000..449e066325 +--- /dev/null ++++ b/qa/1994.out +@@ -0,0 +1,415 @@ ++QA output created by 1994 ++ ++pcp-rocestat output : Display default output ++zzz <06/19/25 23:21:52> ++ Counter mlx5_0_1 mlx5_0_2 ++ link_error_recovery 0(0) 0(0) ++ link_downed 0(0) 0(0) ++ local_link_integrity_errors 0(0) 0(0) ++ rnr_nak_retry_err 0(0) 0(0) ++ resp_local_length_error 0(0) 0(0) ++ resp_cqe_error 0(0) 0(0) ++ resp_cqe_flush_error 0(0) 0(0) ++ resp_remote_access_errors 0(0) 0(0) ++ req_remote_invalid_request 0(0) 0(0) ++ req_cqe_error 0(0) 0(0) ++ req_cqe_flush_error 0(0) 0(0) ++ duplicate_request 0(0) 0(0) ++ rx_read_requests 0(0) 0(0) ++ rx_atomic_requests 0(0) 0(0) ++ req_remote_access_errors 0(0) 0(0) ++ rx_write_requests 0(0) 0(0) ++ multicast_rcv_packets 0(0) 0(0) ++ multicast_xmit_packets 0(0) 0(0) ++ unicast_rcv_packets 12406304(0) 6484416(0) ++ unicast_xmit_packets 11679454(0) 6478121(0) ++ port_rcv_errors 0(0) 0(0) ++ port_rcv_remote_physical_errors 0(0) 0(0) ++ port_rcv_packets 12406304(0) 6484618(0) ++ port_rcv_data 267669766(0) 271326623(0) ++ port_rcv_constraint_errors 0(0) 0(0) ++ port_rcv_switch_relay_errors 0(0) 0(0) ++ port_xmit_data 247591758(0) 270392723(0) ++ port_xmit_constraint_errors 0(0) 0(0) ++ port_xmit_wait 0(0) 0(0) ++ port_xmit_packets 11679454(0) 6478253(0) ++ port_xmit_discards 0(0) 0(0) ++ roce_slow_restart_trans 0(0) 0(0) ++ roce_slow_restart_cnps 0(0) 0(0) ++ roce_slow_restart 0(0) 0(0) ++ roce_adp_retrans_to 0(0) 0(0) ++ clear_counters 0(0) 0(0) ++ local_ack_timeout_err 0(0) 0(0) ++ lifespan 10(0) 10(0) ++ implied_nak_seq_err 0(0) 0(0) ++ packet_seq_err 0(0) 0(0) ++ roce_adp_retrans 0(0) 0(0) ++ out_of_buffer 2412(0) 340(0) ++ out_of_sequence 0(0) 0(0) ++ VL15_dropped 0(0) 0(0) ++ excessive_buffer_overrun_errors 0(0) 0(0) ++ symbol_error 0(0) 0(0) ++ ++ Netdev Queue tx_bytes rx_bytes tx/s(Gbps) rx/s(Gbps) pause pause_delta ++ re0 Default(TCP) - 0 0 0 0 0 0 0 ++ re0 Normal Large - 1 0 0 0 0 0 0 ++ re0 VIP Small - 2 0 0 0 0 0 0 ++ re0 VIP Large - 3 0 0 0 0 0 0 ++ re0 Normal Small - 4 0 0 0 0 0 0 ++ re0 VIP Small - 5 0 0 0 0 0 0 ++ re0 Unused - 6 0 0 0 0 0 0 ++ re0 CNP - 7 0 0 0 0 0 0 ++ re1 Default(TCP) - 0 0 0 0 0 0 0 ++ re1 Normal Large - 1 0 0 0 0 0 0 ++ re1 VIP Small - 2 0 0 0 0 0 0 ++ re1 VIP Large - 3 0 0 0 0 0 0 ++ re1 Normal Small - 4 0 0 0 0 0 0 ++ re1 VIP Small - 5 0 0 0 0 0 0 ++ re1 Unused - 6 0 0 0 0 0 0 ++ re1 CNP - 7 0 0 0 0 0 0 ++ ++zzz <06/19/25 23:21:53> ++ Counter mlx5_0_1 mlx5_0_2 ++ link_error_recovery 0(0) 0(0) ++ link_downed 0(0) 0(0) ++ local_link_integrity_errors 0(0) 0(0) ++ rnr_nak_retry_err 0(0) 0(0) ++ resp_local_length_error 0(0) 0(0) ++ resp_cqe_error 0(0) 0(0) ++ resp_cqe_flush_error 0(0) 0(0) ++ resp_remote_access_errors 0(0) 0(0) ++ req_remote_invalid_request 0(0) 0(0) ++ req_cqe_error 0(0) 0(0) ++ req_cqe_flush_error 0(0) 0(0) ++ duplicate_request 0(0) 0(0) ++ rx_read_requests 0(0) 0(0) ++ rx_atomic_requests 0(0) 0(0) ++ req_remote_access_errors 0(0) 0(0) ++ rx_write_requests 0(0) 0(0) ++ multicast_rcv_packets 0(0) 0(0) ++ multicast_xmit_packets 0(0) 0(0) ++ unicast_rcv_packets 12406304(0) 6484416(0) ++ unicast_xmit_packets 11679454(0) 6478121(0) ++ port_rcv_errors 0(0) 0(0) ++ port_rcv_remote_physical_errors 0(0) 0(0) ++ port_rcv_packets 12406304(0) 6484618(0) ++ port_rcv_data 267669766(0) 271326623(0) ++ port_rcv_constraint_errors 0(0) 0(0) ++ port_rcv_switch_relay_errors 0(0) 0(0) ++ port_xmit_data 247591758(0) 270392723(0) ++ port_xmit_constraint_errors 0(0) 0(0) ++ port_xmit_wait 0(0) 0(0) ++ port_xmit_packets 11679454(0) 6478253(0) ++ port_xmit_discards 0(0) 0(0) ++ roce_slow_restart_trans 0(0) 0(0) ++ roce_slow_restart_cnps 0(0) 0(0) ++ roce_slow_restart 0(0) 0(0) ++ roce_adp_retrans_to 0(0) 0(0) ++ clear_counters 0(0) 0(0) ++ local_ack_timeout_err 0(0) 0(0) ++ lifespan 10(0) 10(0) ++ implied_nak_seq_err 0(0) 0(0) ++ packet_seq_err 0(0) 0(0) ++ roce_adp_retrans 0(0) 0(0) ++ out_of_buffer 2412(0) 340(0) ++ out_of_sequence 0(0) 0(0) ++ VL15_dropped 0(0) 0(0) ++ excessive_buffer_overrun_errors 0(0) 0(0) ++ symbol_error 0(0) 0(0) ++ ++ Netdev Queue tx_bytes rx_bytes tx/s(Gbps) rx/s(Gbps) pause pause_delta ++ re0 Default(TCP) - 0 0 0 0 0 0 0 ++ re0 Normal Large - 1 0 0 0 0 0 0 ++ re0 VIP Small - 2 0 0 0 0 0 0 ++ re0 VIP Large - 3 0 0 0 0 0 0 ++ re0 Normal Small - 4 0 0 0 0 0 0 ++ re0 VIP Small - 5 0 0 0 0 0 0 ++ re0 Unused - 6 0 0 0 0 0 0 ++ re0 CNP - 7 0 0 0 0 0 0 ++ re1 Default(TCP) - 0 0 0 0 0 0 0 ++ re1 Normal Large - 1 0 0 0 0 0 0 ++ re1 VIP Small - 2 0 0 0 0 0 0 ++ re1 VIP Large - 3 0 0 0 0 0 0 ++ re1 Normal Small - 4 0 0 0 0 0 0 ++ re1 VIP Small - 5 0 0 0 0 0 0 ++ re1 Unused - 6 0 0 0 0 0 0 ++ re1 CNP - 7 0 0 0 0 0 0 ++ ++ ++pcp-rocestat output : Display all network statistics for nVidia RoCE devices. ++zzz <06/19/25 23:21:52> ++ Counter mlx5_0_1 mlx5_0_2 ++ link_error_recovery 0(0) 0(0) ++ link_downed 0(0) 0(0) ++ local_link_integrity_errors 0(0) 0(0) ++ rnr_nak_retry_err 0(0) 0(0) ++ resp_local_length_error 0(0) 0(0) ++ resp_cqe_error 0(0) 0(0) ++ resp_cqe_flush_error 0(0) 0(0) ++ resp_remote_access_errors 0(0) 0(0) ++ req_remote_invalid_request 0(0) 0(0) ++ req_cqe_error 0(0) 0(0) ++ req_cqe_flush_error 0(0) 0(0) ++ duplicate_request 0(0) 0(0) ++ rx_read_requests 0(0) 0(0) ++ rx_atomic_requests 0(0) 0(0) ++ req_remote_access_errors 0(0) 0(0) ++ rx_write_requests 0(0) 0(0) ++ multicast_rcv_packets 0(0) 0(0) ++ multicast_xmit_packets 0(0) 0(0) ++ unicast_rcv_packets 12406304(0) 6484416(0) ++ unicast_xmit_packets 11679454(0) 6478121(0) ++ port_rcv_errors 0(0) 0(0) ++ port_rcv_remote_physical_errors 0(0) 0(0) ++ port_rcv_packets 12406304(0) 6484618(0) ++ port_rcv_data 267669766(0) 271326623(0) ++ port_rcv_constraint_errors 0(0) 0(0) ++ port_rcv_switch_relay_errors 0(0) 0(0) ++ port_xmit_data 247591758(0) 270392723(0) ++ port_xmit_constraint_errors 0(0) 0(0) ++ port_xmit_wait 0(0) 0(0) ++ port_xmit_packets 11679454(0) 6478253(0) ++ port_xmit_discards 0(0) 0(0) ++ roce_slow_restart_trans 0(0) 0(0) ++ roce_slow_restart_cnps 0(0) 0(0) ++ roce_slow_restart 0(0) 0(0) ++ roce_adp_retrans_to 0(0) 0(0) ++ clear_counters 0(0) 0(0) ++ local_ack_timeout_err 0(0) 0(0) ++ lifespan 10(0) 10(0) ++ implied_nak_seq_err 0(0) 0(0) ++ packet_seq_err 0(0) 0(0) ++ roce_adp_retrans 0(0) 0(0) ++ out_of_buffer 2412(0) 340(0) ++ out_of_sequence 0(0) 0(0) ++ VL15_dropped 0(0) 0(0) ++ excessive_buffer_overrun_errors 0(0) 0(0) ++ symbol_error 0(0) 0(0) ++ ++ Netdev Queue tx_bytes rx_bytes tx/s(Gbps) rx/s(Gbps) pause pause_delta ++ re0 Default(TCP) - 0 0 0 0 0 0 0 ++ re0 Normal Large - 1 0 0 0 0 0 0 ++ re0 VIP Small - 2 0 0 0 0 0 0 ++ re0 VIP Large - 3 0 0 0 0 0 0 ++ re0 Normal Small - 4 0 0 0 0 0 0 ++ re0 VIP Small - 5 0 0 0 0 0 0 ++ re0 Unused - 6 0 0 0 0 0 0 ++ re0 CNP - 7 0 0 0 0 0 0 ++ re1 Default(TCP) - 0 0 0 0 0 0 0 ++ re1 Normal Large - 1 0 0 0 0 0 0 ++ re1 VIP Small - 2 0 0 0 0 0 0 ++ re1 VIP Large - 3 0 0 0 0 0 0 ++ re1 Normal Small - 4 0 0 0 0 0 0 ++ re1 VIP Small - 5 0 0 0 0 0 0 ++ re1 Unused - 6 0 0 0 0 0 0 ++ re1 CNP - 7 0 0 0 0 0 0 ++ ++zzz <06/19/25 23:21:53> ++ Counter mlx5_0_1 mlx5_0_2 ++ link_error_recovery 0(0) 0(0) ++ link_downed 0(0) 0(0) ++ local_link_integrity_errors 0(0) 0(0) ++ rnr_nak_retry_err 0(0) 0(0) ++ resp_local_length_error 0(0) 0(0) ++ resp_cqe_error 0(0) 0(0) ++ resp_cqe_flush_error 0(0) 0(0) ++ resp_remote_access_errors 0(0) 0(0) ++ req_remote_invalid_request 0(0) 0(0) ++ req_cqe_error 0(0) 0(0) ++ req_cqe_flush_error 0(0) 0(0) ++ duplicate_request 0(0) 0(0) ++ rx_read_requests 0(0) 0(0) ++ rx_atomic_requests 0(0) 0(0) ++ req_remote_access_errors 0(0) 0(0) ++ rx_write_requests 0(0) 0(0) ++ multicast_rcv_packets 0(0) 0(0) ++ multicast_xmit_packets 0(0) 0(0) ++ unicast_rcv_packets 12406304(0) 6484416(0) ++ unicast_xmit_packets 11679454(0) 6478121(0) ++ port_rcv_errors 0(0) 0(0) ++ port_rcv_remote_physical_errors 0(0) 0(0) ++ port_rcv_packets 12406304(0) 6484618(0) ++ port_rcv_data 267669766(0) 271326623(0) ++ port_rcv_constraint_errors 0(0) 0(0) ++ port_rcv_switch_relay_errors 0(0) 0(0) ++ port_xmit_data 247591758(0) 270392723(0) ++ port_xmit_constraint_errors 0(0) 0(0) ++ port_xmit_wait 0(0) 0(0) ++ port_xmit_packets 11679454(0) 6478253(0) ++ port_xmit_discards 0(0) 0(0) ++ roce_slow_restart_trans 0(0) 0(0) ++ roce_slow_restart_cnps 0(0) 0(0) ++ roce_slow_restart 0(0) 0(0) ++ roce_adp_retrans_to 0(0) 0(0) ++ clear_counters 0(0) 0(0) ++ local_ack_timeout_err 0(0) 0(0) ++ lifespan 10(0) 10(0) ++ implied_nak_seq_err 0(0) 0(0) ++ packet_seq_err 0(0) 0(0) ++ roce_adp_retrans 0(0) 0(0) ++ out_of_buffer 2412(0) 340(0) ++ out_of_sequence 0(0) 0(0) ++ VL15_dropped 0(0) 0(0) ++ excessive_buffer_overrun_errors 0(0) 0(0) ++ symbol_error 0(0) 0(0) ++ ++ Netdev Queue tx_bytes rx_bytes tx/s(Gbps) rx/s(Gbps) pause pause_delta ++ re0 Default(TCP) - 0 0 0 0 0 0 0 ++ re0 Normal Large - 1 0 0 0 0 0 0 ++ re0 VIP Small - 2 0 0 0 0 0 0 ++ re0 VIP Large - 3 0 0 0 0 0 0 ++ re0 Normal Small - 4 0 0 0 0 0 0 ++ re0 VIP Small - 5 0 0 0 0 0 0 ++ re0 Unused - 6 0 0 0 0 0 0 ++ re0 CNP - 7 0 0 0 0 0 0 ++ re1 Default(TCP) - 0 0 0 0 0 0 0 ++ re1 Normal Large - 1 0 0 0 0 0 0 ++ re1 VIP Small - 2 0 0 0 0 0 0 ++ re1 VIP Large - 3 0 0 0 0 0 0 ++ re1 Normal Small - 4 0 0 0 0 0 0 ++ re1 VIP Small - 5 0 0 0 0 0 0 ++ re1 Unused - 6 0 0 0 0 0 0 ++ re1 CNP - 7 0 0 0 0 0 0 ++ ++ ++pcp-rocestat output : Display hardware counter statistics for nVidia RoCE devices. ++zzz <06/19/25 23:21:52> ++ Counter mlx5_0_1 mlx5_0_2 ++ link_error_recovery 0(0) 0(0) ++ link_downed 0(0) 0(0) ++ local_link_integrity_errors 0(0) 0(0) ++ rnr_nak_retry_err 0(0) 0(0) ++ resp_local_length_error 0(0) 0(0) ++ resp_cqe_error 0(0) 0(0) ++ resp_cqe_flush_error 0(0) 0(0) ++ resp_remote_access_errors 0(0) 0(0) ++ req_remote_invalid_request 0(0) 0(0) ++ req_cqe_error 0(0) 0(0) ++ req_cqe_flush_error 0(0) 0(0) ++ duplicate_request 0(0) 0(0) ++ rx_read_requests 0(0) 0(0) ++ rx_atomic_requests 0(0) 0(0) ++ req_remote_access_errors 0(0) 0(0) ++ rx_write_requests 0(0) 0(0) ++ multicast_rcv_packets 0(0) 0(0) ++ multicast_xmit_packets 0(0) 0(0) ++ unicast_rcv_packets 12406304(0) 6484416(0) ++ unicast_xmit_packets 11679454(0) 6478121(0) ++ port_rcv_errors 0(0) 0(0) ++ port_rcv_remote_physical_errors 0(0) 0(0) ++ port_rcv_packets 12406304(0) 6484618(0) ++ port_rcv_data 267669766(0) 271326623(0) ++ port_rcv_constraint_errors 0(0) 0(0) ++ port_rcv_switch_relay_errors 0(0) 0(0) ++ port_xmit_data 247591758(0) 270392723(0) ++ port_xmit_constraint_errors 0(0) 0(0) ++ port_xmit_wait 0(0) 0(0) ++ port_xmit_packets 11679454(0) 6478253(0) ++ port_xmit_discards 0(0) 0(0) ++ roce_slow_restart_trans 0(0) 0(0) ++ roce_slow_restart_cnps 0(0) 0(0) ++ roce_slow_restart 0(0) 0(0) ++ roce_adp_retrans_to 0(0) 0(0) ++ clear_counters 0(0) 0(0) ++ local_ack_timeout_err 0(0) 0(0) ++ lifespan 10(0) 10(0) ++ implied_nak_seq_err 0(0) 0(0) ++ packet_seq_err 0(0) 0(0) ++ roce_adp_retrans 0(0) 0(0) ++ out_of_buffer 2412(0) 340(0) ++ out_of_sequence 0(0) 0(0) ++ VL15_dropped 0(0) 0(0) ++ excessive_buffer_overrun_errors 0(0) 0(0) ++ symbol_error 0(0) 0(0) ++ ++ ++zzz <06/19/25 23:21:53> ++ Counter mlx5_0_1 mlx5_0_2 ++ link_error_recovery 0(0) 0(0) ++ link_downed 0(0) 0(0) ++ local_link_integrity_errors 0(0) 0(0) ++ rnr_nak_retry_err 0(0) 0(0) ++ resp_local_length_error 0(0) 0(0) ++ resp_cqe_error 0(0) 0(0) ++ resp_cqe_flush_error 0(0) 0(0) ++ resp_remote_access_errors 0(0) 0(0) ++ req_remote_invalid_request 0(0) 0(0) ++ req_cqe_error 0(0) 0(0) ++ req_cqe_flush_error 0(0) 0(0) ++ duplicate_request 0(0) 0(0) ++ rx_read_requests 0(0) 0(0) ++ rx_atomic_requests 0(0) 0(0) ++ req_remote_access_errors 0(0) 0(0) ++ rx_write_requests 0(0) 0(0) ++ multicast_rcv_packets 0(0) 0(0) ++ multicast_xmit_packets 0(0) 0(0) ++ unicast_rcv_packets 12406304(0) 6484416(0) ++ unicast_xmit_packets 11679454(0) 6478121(0) ++ port_rcv_errors 0(0) 0(0) ++ port_rcv_remote_physical_errors 0(0) 0(0) ++ port_rcv_packets 12406304(0) 6484618(0) ++ port_rcv_data 267669766(0) 271326623(0) ++ port_rcv_constraint_errors 0(0) 0(0) ++ port_rcv_switch_relay_errors 0(0) 0(0) ++ port_xmit_data 247591758(0) 270392723(0) ++ port_xmit_constraint_errors 0(0) 0(0) ++ port_xmit_wait 0(0) 0(0) ++ port_xmit_packets 11679454(0) 6478253(0) ++ port_xmit_discards 0(0) 0(0) ++ roce_slow_restart_trans 0(0) 0(0) ++ roce_slow_restart_cnps 0(0) 0(0) ++ roce_slow_restart 0(0) 0(0) ++ roce_adp_retrans_to 0(0) 0(0) ++ clear_counters 0(0) 0(0) ++ local_ack_timeout_err 0(0) 0(0) ++ lifespan 10(0) 10(0) ++ implied_nak_seq_err 0(0) 0(0) ++ packet_seq_err 0(0) 0(0) ++ roce_adp_retrans 0(0) 0(0) ++ out_of_buffer 2412(0) 340(0) ++ out_of_sequence 0(0) 0(0) ++ VL15_dropped 0(0) 0(0) ++ excessive_buffer_overrun_errors 0(0) 0(0) ++ symbol_error 0(0) 0(0) ++ ++ ++ ++pcp-rocestat output : Display per lane statistics for nVidia RoCE devices. ++zzz <06/19/25 23:21:52> ++ Netdev Queue tx_bytes rx_bytes tx/s(Gbps) rx/s(Gbps) pause pause_delta ++ re0 Default(TCP) - 0 0 0 0 0 0 0 ++ re0 Normal Large - 1 0 0 0 0 0 0 ++ re0 VIP Small - 2 0 0 0 0 0 0 ++ re0 VIP Large - 3 0 0 0 0 0 0 ++ re0 Normal Small - 4 0 0 0 0 0 0 ++ re0 VIP Small - 5 0 0 0 0 0 0 ++ re0 Unused - 6 0 0 0 0 0 0 ++ re0 CNP - 7 0 0 0 0 0 0 ++ re1 Default(TCP) - 0 0 0 0 0 0 0 ++ re1 Normal Large - 1 0 0 0 0 0 0 ++ re1 VIP Small - 2 0 0 0 0 0 0 ++ re1 VIP Large - 3 0 0 0 0 0 0 ++ re1 Normal Small - 4 0 0 0 0 0 0 ++ re1 VIP Small - 5 0 0 0 0 0 0 ++ re1 Unused - 6 0 0 0 0 0 0 ++ re1 CNP - 7 0 0 0 0 0 0 ++ ++zzz <06/19/25 23:21:53> ++ Netdev Queue tx_bytes rx_bytes tx/s(Gbps) rx/s(Gbps) pause pause_delta ++ re0 Default(TCP) - 0 0 0 0 0 0 0 ++ re0 Normal Large - 1 0 0 0 0 0 0 ++ re0 VIP Small - 2 0 0 0 0 0 0 ++ re0 VIP Large - 3 0 0 0 0 0 0 ++ re0 Normal Small - 4 0 0 0 0 0 0 ++ re0 VIP Small - 5 0 0 0 0 0 0 ++ re0 Unused - 6 0 0 0 0 0 0 ++ re0 CNP - 7 0 0 0 0 0 0 ++ re1 Default(TCP) - 0 0 0 0 0 0 0 ++ re1 Normal Large - 1 0 0 0 0 0 0 ++ re1 VIP Small - 2 0 0 0 0 0 0 ++ re1 VIP Large - 3 0 0 0 0 0 0 ++ re1 Normal Small - 4 0 0 0 0 0 0 ++ re1 VIP Small - 5 0 0 0 0 0 0 ++ re1 Unused - 6 0 0 0 0 0 0 ++ re1 CNP - 7 0 0 0 0 0 0 ++ +diff --git a/qa/archives/GNUmakefile b/qa/archives/GNUmakefile +index d679c91c8a..b44ea4bf31 100644 +--- a/qa/archives/GNUmakefile ++++ b/qa/archives/GNUmakefile +@@ -56,7 +56,7 @@ DEFLATE = small.0.xz small.meta small.index \ + 20190628.04.03.0.xz 20190628.04.03.1.xz 20190628.04.03.meta.xz \ + 20190628.04.03.index 20201109.0.xz 20201109.index 20201109.meta.xz \ + 20190628.06.31.0.xz 20190628.06.31.meta.xz 20190628.06.31.index \ +- pcp-ss.0.xz pcp-ss.meta.xz pcp-ss.index ++ pcp-ss.0.xz pcp-ss.meta.xz pcp-ss.index + + SCRIPTS = mk.diff mk.gap mk.mysql mk.schizo mk.foo+ \ + mk.dynmetric mk.instant mk.dyninsts \ +@@ -66,7 +66,8 @@ SCRIPTS = mk.diff mk.gap mk.mysql mk.schizo mk.foo+ \ + mk.atop mk.hotatop mk.atop-boot mk.atop-nvidia mk.atop-threads \ + mk.log-derived mk.vmstat mk.rep mk.procsched mk.netstat \ + mk.ipcs mk.value-test mk.rank-pred mk.cputime mk.meminfo \ +- mk.sample-labels mk.pmproxy mk.mmv.help mk.slabinfo mk.zoneinfo ++ mk.sample-labels mk.pmproxy mk.mmv.help mk.slabinfo mk.zoneinfo \ ++ mk.rocestat + + CONFIGS = config.verify config.shping YWhcCi.toium.config \ + kenj-pc-2.config reduce.config uwrap.config wrap.config \ +diff --git a/qa/archives/mk.rocestat b/qa/archives/mk.rocestat +new file mode 100755 +index 0000000000..b074c7706f +--- /dev/null ++++ b/qa/archives/mk.rocestat +@@ -0,0 +1,79 @@ ++#!/bin/sh ++# ++# remake the pcp-netstat archive ... ++# this archive is intended to be checked in and not remade, this script is ++# simply a record of how it was created ++# ++ ++. /etc/pcp.env ++ ++tmp=/var/tmp/$$ ++rm -f $tmp.* ++trap "rm -f $tmp.*; exit 0" 0 1 2 3 15 ++ ++cat <>$tmp.config ++ ++log mandatory on 5 sec { ++ rocestat.hw.link.link_error_recovery ++ rocestat.hw.link.link_downed ++ rocestat.hw.link.local_link_integrity_errors ++ rocestat.hw.rnr.rnr_nak_retry_err ++ rocestat.hw.resp.resp_local_length_error ++ rocestat.hw.resp.resp_cqe_error ++ rocestat.hw.resp.resp_cqe_flush_error ++ rocestat.hw.resp.resp_remote_access_errors ++ rocestat.hw.req.req_remote_invalid_request ++ rocestat.hw.req.req_cqe_error ++ rocestat.hw.req.req_cqe_flush_error ++ rocestat.hw.req.duplicate_request ++ rocestat.hw.req.rx_read_requests ++ rocestat.hw.req.rx_atomic_requests ++ rocestat.hw.req.req_remote_access_errors ++ rocestat.hw.req.rx_write_requests ++ rocestat.hw.mcast.multicast_rcv_packets ++ rocestat.hw.mcast.multicast_xmit_packets ++ rocestat.hw.ucast.unicast_rcv_packets ++ rocestat.hw.ucast.unicast_xmit_packets ++ rocestat.hw.rcv.port_rcv_errors ++ rocestat.hw.rcv.port_rcv_remote_physical_errors ++ rocestat.hw.rcv.port_rcv_packets ++ rocestat.hw.rcv.port_rcv_data ++ rocestat.hw.rcv.port_rcv_constraint_errors ++ rocestat.hw.rcv.port_rcv_switch_relay_errors ++ rocestat.hw.xmit.port_xmit_data ++ rocestat.hw.xmit.port_xmit_constraint_errors ++ rocestat.hw.xmit.port_xmit_wait ++ rocestat.hw.xmit.port_xmit_packets ++ rocestat.hw.xmit.port_xmit_discards ++ rocestat.hw.roce_slow_restart_trans ++ rocestat.hw.roce_slow_restart_cnps ++ rocestat.hw.roce_slow_restart ++ rocestat.hw.roce_adp_retrans_to ++ rocestat.hw.clear_counters ++ rocestat.hw.local_ack_timeout_err ++ rocestat.hw.lifespan ++ rocestat.hw.implied_nak_seq_err ++ rocestat.hw.packet_seq_err ++ rocestat.hw.roce_adp_retrans ++ rocestat.hw.out_of_buffer ++ rocestat.hw.out_of_sequence ++ rocestat.hw.VL15_dropped ++ rocestat.hw.excessive_buffer_overrun_errors ++ rocestat.hw.symbol_error ++ rocestat.lane.tx_bytes ++ rocestat.lane.rx_bytes ++ rocestat.lane.rx_pause ++} ++End-of-File ++ ++rm -f pcp-rocestat.0.xz pcp-rocestat.meta.xz pcp-rocestat.index.xz ++ ++if pmlogger -s 10 -c $tmp.config pcp-rocestat ++then ++ xz pcp-rocestat.0 ++ xz pcp-rocestat.meta ++ xz pcp-rocestat.index ++else ++ echo "Argh: pmlogger failed ..." ++ cat pmlogger.log ++fi +diff --git a/qa/group b/qa/group +index 8a3efbc024..17d1d969d8 100644 +--- a/qa/group ++++ b/qa/group +@@ -372,6 +372,7 @@ meminfo + mpstat + netstat + ps ++rocestat + slabinfo + + # full test search +@@ -1991,8 +1992,9 @@ x11 + 1990 pcp buddyinfo python local + 1991 pcp netstat python local + 1993 pmda.rocestat local python ++1994 pcp rocestat python local + 2101 pmda.sockets local security + 2104 libpcp local security + 2100 pmproxy local security + 2105 libpcp pmcd local security pmcd.pdu + 4751 libpcp threads valgrind local pcp helgrind +diff --git a/src/pcp/GNUmakefile b/src/pcp/GNUmakefile +index f2bef9c36c..03f7bc9d77 100644 +--- a/src/pcp/GNUmakefile ++++ b/src/pcp/GNUmakefile +@@ -32,6 +32,7 @@ SUBDIRS = \ + pidstat \ + ps \ + python \ ++ rocestat \ + shping \ + slabinfo \ + ss \ +diff --git a/src/pcp/rocestat/GNUmakefile b/src/pcp/rocestat/GNUmakefile +new file mode 100755 +index 0000000000..0ead2d8eb7 +--- /dev/null ++++ b/src/pcp/rocestat/GNUmakefile +@@ -0,0 +1,44 @@ ++# ++# Copyright (c) 2025 Oracle and/or its affiliates. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++# This program is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation; either version 2 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++# for more details. ++# ++ ++TOPDIR = ../../.. ++include $(TOPDIR)/src/include/builddefs ++ ++TARGET = pcp-rocestat ++SCRIPT = $(TARGET).py ++MAN_SECTION = 1 ++MAN_PAGES = $(TARGET).$(MAN_SECTION) ++MAN_DEST = $(PCP_MAN_DIR)/man$(MAN_SECTION) ++ ++default: $(SCRIPT) $(MAN_PAGES) ++ ++include $(BUILDRULES) ++ ++install: default ++ifeq "$(HAVE_PYTHON)" "true" ++ $(INSTALL) -m 755 $(SCRIPT) $(PCP_BINADM_DIR)/$(TARGET) ++ @$(INSTALL_MAN) ++endif ++ ++default_pcp : default ++ ++install_pcp : install ++ ++check:: $(SCRIPT) ++ $(PYLINT) $^ ++ ++check :: $(MAN_PAGES) ++ $(MANLINT) $^ ++ +diff --git a/src/pcp/rocestat/pcp-rocestat.1 b/src/pcp/rocestat/pcp-rocestat.1 +new file mode 100755 +index 0000000000..a4b8ede416 +--- /dev/null ++++ b/src/pcp/rocestat/pcp-rocestat.1 +@@ -0,0 +1,78 @@ ++'\"! tbl | mmdoc ++'\"macro stdmacro ++.\" ++.\" Copyright (c) 2025 Oracle and/or its affiliates. ++.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++.\" ++.\" This program is free software; you can redistribute it and/or modify it ++.\" under the terms of the GNU General Public License as published by the ++.\" Free Software Foundation; either version 2 of the License, or (at your ++.\" option) any later version. ++.\" ++.\" This program is distributed in the hope that it will be useful, but ++.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++.\" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++.\" for more details. ++.\" ++.TH PCP-ROCESTAT 1 "PCP" "Performance Co-Pilot" ++.SH NAME ++\f3pcp-rocestat\f1 \- Reports statistics for nVidia RoCE devices. ++.SH SYNOPSIS ++\f3pcp\f1 ++[\f2pcp\ options\f1] ++\f3rocestat\f1 ++\f2[--hw_stats|--lane_stats]\f2 ++[\f3\-s\f1 \f2samples\f1] ++[\f3\-a\f1 \f2archive\f1] ++[\f3\-S\f1 \f2start_time\f1] ++[\f3\-T\f1 \f2end_time\f1] ++ ++.SH DESCRIPTION ++The ++.B pcp-rocestat ++tool for viewing nVidia RoCE device counters and monitoring real-time throughput on local interfaces. ++This tool utilizes ethtool counters for each device and reports throughput per priority queue. ++By default ++.B pcp-rocestat ++reports live data for the local host. It has the capabilities to analyze the data on the archives as well. ++.SH OPTIONS ++.TP ++\fB\-\-hw_stats\fP ++Display hardware counters ++.TP ++\fB\-\-lane_stats\fP ++Display lane stats ++.TP ++\fB\-a\fP, \fB\-\-archive\fP ++Specify the archive to examine ++.TP ++\fB\-s\fP, \fB\-\-samples\fP ++Specify number of samples ++.TP ++\fB\-S\fP, \fB\-\-START TIME\fP ++Filter the samples from the archive from the given time ++.TP ++\fB\-T\fP, \fB\-\-END TIME\fP ++Filter the samples from the archive till the given time ++.TP ++\fB\-V\fR, \fB\-\-version\fR ++Display version number and exit. ++.TP ++\fB\-?\fR, \fB\-\-help\fR ++Display usage message and exit. ++.SH PCP ENVIRONMENT ++Environment variables with the prefix \fBPCP_\fP are used to parameterize ++the file and directory names used by PCP. ++On each installation, the ++file \fI/etc/pcp.conf\fP contains the local values for these variables. ++The \fB$PCP_CONF\fP variable may be used to specify an alternative ++configuration file, as described in \fBpcp.conf\fP(5). ++.PP ++For environment variables affecting PCP tools, see \fBpmGetOptions\fP(3). ++.SH SEE ALSO ++.BR PCPIntro (1), ++.BR pcp (1), ++.BR pmParseInterval (3) ++and ++.BR environ (7). ++ +diff --git a/src/pcp/rocestat/pcp-rocestat.py b/src/pcp/rocestat/pcp-rocestat.py +new file mode 100755 +index 0000000000..79bf98a7f3 +--- /dev/null ++++ b/src/pcp/rocestat/pcp-rocestat.py +@@ -0,0 +1,315 @@ ++#!/usr/bin/pmpython ++# ++# Copyright (c) 2025 Oracle and/or its affiliates. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++# This program is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation; either version 2 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++# for more details. ++# ++# pylint: disable=bad-whitespace,too-many-arguments,too-many-lines, bad-continuation, line-too-long ++# pylint: disable=redefined-outer-name,unnecessary-lambda, wildcard-import, unused-wildcard-import ++# ++from datetime import datetime ++from pcp import pmapi ++from pcp import pmcc ++import sys ++import time ++ ++ROCESTAT_HW_METRICS = [ ++ 'rocestat.hw.link.link_error_recovery', ++ 'rocestat.hw.link.link_downed', ++ 'rocestat.hw.link.local_link_integrity_errors', ++ 'rocestat.hw.rnr.rnr_nak_retry_err', ++ 'rocestat.hw.resp.resp_local_length_error', ++ 'rocestat.hw.resp.resp_cqe_error', ++ 'rocestat.hw.resp.resp_cqe_flush_error', ++ 'rocestat.hw.resp.resp_remote_access_errors', ++ 'rocestat.hw.req.req_remote_invalid_request', ++ 'rocestat.hw.req.req_cqe_error', ++ 'rocestat.hw.req.req_cqe_flush_error', ++ 'rocestat.hw.req.duplicate_request', ++ 'rocestat.hw.req.rx_read_requests', ++ 'rocestat.hw.req.rx_atomic_requests', ++ 'rocestat.hw.req.req_remote_access_errors', ++ 'rocestat.hw.req.rx_write_requests', ++ 'rocestat.hw.mcast.multicast_rcv_packets', ++ 'rocestat.hw.mcast.multicast_xmit_packets', ++ 'rocestat.hw.ucast.unicast_rcv_packets', ++ 'rocestat.hw.ucast.unicast_xmit_packets', ++ 'rocestat.hw.rcv.port_rcv_errors', ++ 'rocestat.hw.rcv.port_rcv_remote_physical_errors', ++ 'rocestat.hw.rcv.port_rcv_packets', ++ 'rocestat.hw.rcv.port_rcv_data', ++ 'rocestat.hw.rcv.port_rcv_constraint_errors', ++ 'rocestat.hw.rcv.port_rcv_switch_relay_errors', ++ 'rocestat.hw.xmit.port_xmit_data', ++ 'rocestat.hw.xmit.port_xmit_constraint_errors', ++ 'rocestat.hw.xmit.port_xmit_wait', ++ 'rocestat.hw.xmit.port_xmit_packets', ++ 'rocestat.hw.xmit.port_xmit_discards', ++ 'rocestat.hw.roce_slow_restart_trans', ++ 'rocestat.hw.roce_slow_restart_cnps', ++ 'rocestat.hw.roce_slow_restart', ++ 'rocestat.hw.roce_adp_retrans_to', ++ 'rocestat.hw.clear_counters', ++ 'rocestat.hw.local_ack_timeout_err', ++ 'rocestat.hw.lifespan', ++ 'rocestat.hw.implied_nak_seq_err', ++ 'rocestat.hw.packet_seq_err', ++ 'rocestat.hw.roce_adp_retrans', ++ 'rocestat.hw.out_of_buffer', ++ 'rocestat.hw.out_of_sequence', ++ 'rocestat.hw.VL15_dropped', ++ 'rocestat.hw.excessive_buffer_overrun_errors', ++ 'rocestat.hw.symbol_error', ++] ++ ++ROCESTAT_HW_METRICS_DESC = [ ++ 'link_error_recovery', ++ 'link_downed', ++ 'local_link_integrity_errors', ++ 'rnr_nak_retry_err', ++ 'resp_local_length_error', ++ 'resp_cqe_error', ++ 'resp_cqe_flush_error', ++ 'resp_remote_access_errors', ++ 'req_remote_invalid_request', ++ 'req_cqe_error', ++ 'req_cqe_flush_error', ++ 'duplicate_request', ++ 'rx_read_requests', ++ 'rx_atomic_requests', ++ 'req_remote_access_errors', ++ 'rx_write_requests', ++ 'multicast_rcv_packets', ++ 'multicast_xmit_packets', ++ 'unicast_rcv_packets', ++ 'unicast_xmit_packets', ++ 'port_rcv_errors', ++ 'port_rcv_remote_physical_errors', ++ 'port_rcv_packets', ++ 'port_rcv_data', ++ 'port_rcv_constraint_errors', ++ 'port_rcv_switch_relay_errors', ++ 'port_xmit_data', ++ 'port_xmit_constraint_errors', ++ 'port_xmit_wait', ++ 'port_xmit_packets', ++ 'port_xmit_discards', ++ 'roce_slow_restart_trans', ++ 'roce_slow_restart_cnps', ++ 'roce_slow_restart', ++ 'roce_adp_retrans_to', ++ 'clear_counters', ++ 'local_ack_timeout_err', ++ 'lifespan', ++ 'implied_nak_seq_err', ++ 'packet_seq_err', ++ 'roce_adp_retrans', ++ 'out_of_buffer', ++ 'out_of_sequence', ++ 'VL15_dropped', ++ 'excessive_buffer_overrun_errors', ++ 'symbol_error', ++] ++ ++ROCESTAT_PER_LANE_METRICS = ['rocestat.lane.tx_bytes', 'rocestat.lane.rx_bytes', 'rocestat.lane.rx_pause'] ++ ++ ++class RoceStatOptions(pmapi.pmOptions): ++ context = None ++ timefmt = "%H:%M:%S" ++ samples = 0 ++ hw_stats_flag = False ++ lane_stats_flag = False ++ ++ def extra_options(self, opt, optarg, index): ++ if opt == "hw_stats": ++ RoceStatOptions.hw_stats_flag = True ++ ++ elif opt == "lane_stats": ++ RoceStatOptions.lane_stats_flag = True ++ ++ def __init__(self): ++ pmapi.pmOptions.__init__(self, "a:s:S:T:t:") ++ self.pmSetLongOption("hw_stats", 0, "", "", "Display hw counters") ++ self.pmSetLongOption("lane_stats", 0, "", "", "Display lane stats") ++ self.pmSetLongOptionStart() ++ self.pmSetLongOptionFinish() ++ self.pmSetLongOption("samples", 1, "s", "COUNT", ++ "Number of samples to collect") ++ self.pmSetLongOptionArchive() ++ self.pmSetLongOptionHelp() ++ ++ self.pmSetOptionCallback(self.extra_options) ++ ++ ++class ROCeStatReport: ++ prev_counter_data = None ++ def __init__(self, samples): ++ self.samples = samples ++ ++ def report(self, manager): ++ group = manager["rocestat"] ++ ++ opts.pmGetOptionSamples() ++ ++ timestamp = manager.pmLocaltime(group.timestamp.tv_sec) ++ time_string = time.strftime("%x", timestamp.struct_time()) + " " ++ t_s = group.contextCache.pmLocaltime(int(group.timestamp)) ++ time_string += time.strftime(RoceStatOptions.timefmt, t_s.struct_time()) ++ print("zzz <%s>" % (time_string)) ++ hw_stats_flag = RoceStatOptions.hw_stats_flag ++ lane_stats_flag = RoceStatOptions.lane_stats_flag ++ ++ # HW Counters ++ if hw_stats_flag or (hw_stats_flag == lane_stats_flag): ++ header = ["Counter"] ++ for val in group[ROCESTAT_HW_METRICS[0]].netValues: ++ if not val[1].endswith("_delta"): ++ header.append(val[1]) ++ card_idxs = {} ++ for i in range(1, len(header)): ++ card_idxs[header[i]] = i ++ prev_counter_data = self.prev_counter_data ++ curr_counter_data = {} ++ curr_counter_data["ts"] = datetime.now() ++ for card in card_idxs: ++ curr_counter_data[card] = {} ++ ++ for metric_name in ROCESTAT_HW_METRICS_DESC: ++ metric_idx = ROCESTAT_HW_METRICS_DESC.index(metric_name) ++ metric = ROCESTAT_HW_METRICS[metric_idx] ++ for val in group[metric].netValues: ++ card_name, value = val[1], val[2] ++ curr_counter_data[card_name][metric_name] = value ++ ++ counters = [] ++ for counter in ROCESTAT_HW_METRICS_DESC: ++ row = [counter] + ["" for _ in range(len(card_idxs.keys()))] ++ for card, card_data in curr_counter_data.items(): ++ if card == "ts": ++ continue ++ card_idx = card_idxs[card] ++ count = card_data[counter] ++ if prev_counter_data is not None and card in prev_counter_data: ++ count_delta = count - prev_counter_data[card][counter] ++ time_diff = (curr_counter_data["ts"] - prev_counter_data["ts"]).total_seconds() ++ count_delta /= time_diff ++ if "data" in counter: ++ count_delta = self.convert_to_gbps(count_delta) ++ count_delta = round(count_delta, 2) ++ if int(count_delta) == count_delta: ++ count_delta = int(count_delta) ++ else: ++ count_delta = 0 ++ row[card_idx] = f"{count}({count_delta})" ++ counters.append(row) ++ self.prev_counter_data = curr_counter_data ++ ++ space = 5 + max(len(counter) ++ for counter in ROCESTAT_HW_METRICS_DESC) ++ print_format = f"%{space}s " + \ ++ " ".join(["%25s" for _ in range(len(header)-1)]) ++ if len(header) > 1: ++ print(print_format % tuple(header)) ++ for counter in counters: ++ print(print_format % tuple(counter)) ++ print() ++ ++ # Per lane stats ++ if lane_stats_flag or (lane_stats_flag == hw_stats_flag): ++ lane_stats = {} ++ for metric in ROCESTAT_PER_LANE_METRICS: ++ idx = 0 ++ try: ++ val = group[metric].netValues ++ except IndexError: ++ idx += 1 ++ continue ++ ++ for elem in val: ++ lane = elem[1] ++ value = elem[2] ++ ++ if lane not in lane_stats: ++ lane_stats[lane] = { ++ m: 0 for m in ROCESTAT_PER_LANE_METRICS} ++ lane_stats[lane][metric] = value ++ ++ if lane_stats: ++ print("%10s %20s %12s %12s %12s %12s %12s %12s" % ( ++ "Netdev", "Queue", "tx_bytes", "rx_bytes", "tx/s(Gbps)", "rx/s(Gbps)", "pause", "pause_delta")) ++ for lane, metrics in lane_stats.items(): ++ netdev, queue = self.split_lane(lane) ++ tx_bw_gbps = self.convert_to_gbps( ++ metrics.get('rocestat.lane.tx_bytes_bw', 0)) ++ rx_bw_gbps = self.convert_to_gbps( ++ metrics.get('rocestat.lane.rx_bytes_bw', 0)) ++ print("%10s %20s %12s %12s %12s %12s %12s %12s" % ( ++ netdev, queue, ++ metrics.get('tx_bytes', 0), ++ metrics.get('rx_bytes', 0), ++ tx_bw_gbps, ++ rx_bw_gbps, ++ metrics.get('rx_pause', 0), ++ metrics.get('rx_pause_delta', 0) ++ )) ++ print() ++ ++ def split_lane(self, lane): ++ parts = lane.split('_') ++ if len(parts) == 2: ++ netdev = parts[0] ++ queue_id = parts[1].replace("lane", "") ++ ++ queue_name = { ++ "0": "Default(TCP) - 0", ++ "1": "Normal Large - 1", ++ "2": "VIP Small - 2", ++ "3": "VIP Large - 3", ++ "4": "Normal Small - 4", ++ "5": "VIP Small - 5", ++ "6": "Unused - 6", ++ "7": "CNP - 7" ++ }.get(queue_id, f"Queue - {queue_id}") ++ ++ return netdev, queue_name ++ return lane, "Unknown Queue" ++ ++ def convert_to_gbps(self, value): ++ if value == 0: ++ return 0 ++ return value / 1000000000 ++ ++ ++if __name__ == '__main__': ++ try: ++ opts = RoceStatOptions() ++ mngr = pmcc.MetricGroupManager.builder(opts, sys.argv) ++ RoceStatOptions.context = mngr.type ++ missing = mngr.checkMissingMetrics( ++ ROCESTAT_HW_METRICS + ROCESTAT_PER_LANE_METRICS) ++ if missing is not None: ++ sys.stderr.write( ++ 'Error: not all required metrics are available\nMissing %s\n' % missing) ++ sys.exit(1) ++ mngr["rocestat"] = ROCESTAT_HW_METRICS + ROCESTAT_PER_LANE_METRICS ++ mngr.printer = ROCeStatReport(opts.samples) ++ sts = mngr.run() ++ sys.exit(sts) ++ ++ except pmapi.pmErr as error: ++ sys.stderr.write("%s %s\n" % (error.progname(), error.message())) ++ except pmapi.pmUsageErr as usage: ++ usage.message() ++ sys.exit(1) ++ except KeyboardInterrupt: ++ pass +-- +2.43.5 diff --git a/SOURCES/1019-pcp-meminfo-additional-metrics-added-for-mem.util-to.patch b/SOURCES/1019-pcp-meminfo-additional-metrics-added-for-mem.util-to.patch new file mode 100644 index 0000000..ae1ff54 --- /dev/null +++ b/SOURCES/1019-pcp-meminfo-additional-metrics-added-for-mem.util-to.patch @@ -0,0 +1,56 @@ +From e1c81c356a176fa244b3b32a2b98362d75fd2842 Mon Sep 17 00:00:00 2001 +From: Sourav Sharma +Date: Thu, 9 Oct 2025 20:30:48 +0530 +Subject: [PATCH] pcp-meminfo: additional metrics added for mem.util to show + newly added kernel metrics by following commit + 1c559713ebc5c02759de59013066c3d29e4395e4 + +Signed-off-by: sagar sagar + +Cherry-pick-commit: https://github.com/performancecopilot/pcp/pull/2180/commits/43025e54a97cb8aa2a3cc955a9fb1d0cb3f39cf4 + +Orabug: 38526356 + +Signed-off-by: Sourav Sharma + +--- + src/pcp/meminfo/pcp-meminfo.py | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/pcp/meminfo/pcp-meminfo.py b/src/pcp/meminfo/pcp-meminfo.py +index 103aa52..bae8931 100755 +--- a/src/pcp/meminfo/pcp-meminfo.py ++++ b/src/pcp/meminfo/pcp-meminfo.py +@@ -57,10 +57,14 @@ METRICS = ["mem.physmem", + "mem.util.vmallocTotal", + "mem.util.vmallocUsed", + "mem.util.vmallocChunk", ++ "mem.util.percpu", + "mem.util.corrupthardware", + "mem.util.anonhugepages", + "mem.vmstat.nr_shmem_hugepages", + "mem.vmstat.nr_shmem_pmdmapped", ++ "mem.util.filehugepages", ++ "mem.util.filepmdmapped", ++ "mem.util.cmatotal", + "mem.zoneinfo.nr_free_cma", + "mem.util.hugepagesTotal", + "mem.util.hugepagesFree", +@@ -105,10 +109,14 @@ METRICS_DESC = ["MemTotal", + "VmallocTotal", + "VmallocUsed", + "VmallocChunk", ++ "Percpu", + "HardwareCorrupted", + "AnonHugePages", + "ShmemHugePages", + "ShmemPmdMapped", ++ "FileHugePages", ++ "FilePmdMapped", ++ "CmaTotal", + "CmaFree", + "HugePages_Total_NO_kb", + "HugePages_Free_NO_kb", +-- +2.43.7 + diff --git a/SOURCES/1020-additional-mem.util-metrics-recent-kernel.patch b/SOURCES/1020-additional-mem.util-metrics-recent-kernel.patch new file mode 100644 index 0000000..710637b --- /dev/null +++ b/SOURCES/1020-additional-mem.util-metrics-recent-kernel.patch @@ -0,0 +1,302 @@ +From b80dfd69c7872a7d1c90d2e9617bdf312c47f587 Mon Sep 17 00:00:00 2001 +From: Sourav Sharma +Date: Fri, 10 Oct 2025 17:26:37 +0530 +Subject: [PATCH] pmdalinux: additional mem.util metrics from recent Linux kernel versions +Ten additional Linux kernel /proc/meminfo memory metrics relating to new +aspects of hugepages, the contiguous and percpu memory allocators, zswap, +shadow call stacks and unaccepted memory. + +Cherry-pick-commit: https://github.com/performancecopilot/pcp/commit/1c559713ebc5c02759de59013066c3d29e4395e4 + +Signed-off-by: Sourav Sharma +--- + src/pmdas/linux/help | 23 ++++++- + src/pmdas/linux/pmda.c | 114 ++++++++++++++++++++++++++++++++- + src/pmdas/linux/proc_meminfo.c | 11 ++++ + src/pmdas/linux/proc_meminfo.h | 12 ++++ + src/pmdas/linux/root_linux | 11 ++++ + 5 files changed, 168 insertions(+), 3 deletions(-) + +diff --git a/src/pmdas/linux/help b/src/pmdas/linux/help +index 640a21a..3700809 100644 +--- a/src/pmdas/linux/help ++++ b/src/pmdas/linux/help +@@ -937,8 +937,29 @@ you will get real memory on demand, and just as much as you use. + @ mem.util.hugepagesFreeBytes amount of memory in free hugepages + @ mem.util.hugepagesRsvdBytes amount of memory in reserved hugepages + @ mem.util.hugepagesSurpBytes amount of memory in surplus hugepages +- + User memory (Kbytes) in pages not backed by files, e.g. from malloc() ++@ mem.util.shmemhugepages amount of shared memory allocated with hugepages ++@ mem.util.shmempmdmapped shared memory mapped into userspace with hugepages ++@ mem.util.filehugepages page cache (file) pages allocated with hugepages ++@ mem.util.filepmdmapped page cache mapped into userspace with hugepages ++@ mem.util.cmatotal total contiguous memory allocator memory ++@ mem.util.cmafree free contiguous memory allocator memory ++@ mem.util.unaccepted amount of unaccepted memory ++When this mechanism is in use, a virtual machine can be launched with ++its memory in an unaccepted state. Such a system will not be able to ++make use of the memory provided until that memory has been explicitly ++accepted. On these systems, the bootloader will typically pre-accept ++enough memory to allow the guest kernel to boot then that kernel must ++take responsibility for accepting the rest before using it. ++@ mem.util.zswap total size of the zswap memory pool ++@ mem.util.zswapped current memory used from the zswap memory pool ++@ mem.util.shadowcallstack memory used for shadown call stacks ++Shadow stacks are a modern security feature allowing for detection of ++corruption of the call stack, allowing the kernel to react to such an ++attach in an appropriate fashion. Shadow stacks are often maintained ++by the processor hardware and require additional stack memory. ++@ mem.util.percpu amount of per CPU allocator memory ++ + @ mem.numa.util.total per-node total memory + @ mem.numa.util.free per-node free memory + @ mem.numa.util.used per-node used memory +diff --git a/src/pmdas/linux/pmda.c b/src/pmdas/linux/pmda.c +index 428a222..23d8033 100644 +--- a/src/pmdas/linux/pmda.c ++++ b/src/pmdas/linux/pmda.c +@@ -1094,7 +1094,7 @@ static pmdaMetric metrictab[] = { + { PMDA_PMID(CLUSTER_MEMINFO,55), PM_TYPE_U64, PM_INDOM_NULL, PM_SEM_INSTANT, + PMDA_PMUNITS(1,0,0,PM_SPACE_KBYTE,0,0) }, }, + +-/* mem.util.mmap_copy */ ++/* mem.util.anonhugepages */ + { NULL, + { PMDA_PMID(CLUSTER_MEMINFO,56), PM_TYPE_U64, PM_INDOM_NULL, PM_SEM_INSTANT, + PMDA_PMUNITS(1,0,0,PM_SPACE_KBYTE,0,0) }, }, +@@ -1134,6 +1134,61 @@ static pmdaMetric metrictab[] = { + { PMDA_PMID(CLUSTER_MEMINFO,63), PM_TYPE_U64, PM_INDOM_NULL, PM_SEM_INSTANT, + PMDA_PMUNITS(1,0,0,PM_SPACE_BYTE,0,0) }, }, + ++/* mem.util.shmemhugepages */ ++ { NULL, ++ { PMDA_PMID(CLUSTER_MEMINFO,64), PM_TYPE_U64, PM_INDOM_NULL, PM_SEM_INSTANT, ++ PMDA_PMUNITS(1,0,0,PM_SPACE_KBYTE,0,0) }, }, ++ ++/* mem.util.shmempmdmapped */ ++ { NULL, ++ { PMDA_PMID(CLUSTER_MEMINFO,65), PM_TYPE_U64, PM_INDOM_NULL, PM_SEM_INSTANT, ++ PMDA_PMUNITS(1,0,0,PM_SPACE_KBYTE,0,0) }, }, ++ ++/* mem.util.filehugepages */ ++ { NULL, ++ { PMDA_PMID(CLUSTER_MEMINFO,66), PM_TYPE_U64, PM_INDOM_NULL, PM_SEM_INSTANT, ++ PMDA_PMUNITS(1,0,0,PM_SPACE_KBYTE,0,0) }, }, ++ ++/* mem.util.filepmdmapped */ ++ { NULL, ++ { PMDA_PMID(CLUSTER_MEMINFO,67), PM_TYPE_U64, PM_INDOM_NULL, PM_SEM_INSTANT, ++ PMDA_PMUNITS(1,0,0,PM_SPACE_KBYTE,0,0) }, }, ++ ++/* mem.util.cmatotal */ ++ { NULL, ++ { PMDA_PMID(CLUSTER_MEMINFO,68), PM_TYPE_U64, PM_INDOM_NULL, PM_SEM_INSTANT, ++ PMDA_PMUNITS(1,0,0,PM_SPACE_KBYTE,0,0) }, }, ++ ++/* mem.util.cmafree */ ++ { NULL, ++ { PMDA_PMID(CLUSTER_MEMINFO,69), PM_TYPE_U64, PM_INDOM_NULL, PM_SEM_INSTANT, ++ PMDA_PMUNITS(1,0,0,PM_SPACE_KBYTE,0,0) }, }, ++ ++/* mem.util.unaccepted */ ++ { NULL, ++ { PMDA_PMID(CLUSTER_MEMINFO,70), PM_TYPE_U64, PM_INDOM_NULL, PM_SEM_INSTANT, ++ PMDA_PMUNITS(1,0,0,PM_SPACE_KBYTE,0,0) }, }, ++ ++/* mem.util.zswap */ ++ { NULL, ++ { PMDA_PMID(CLUSTER_MEMINFO,71), PM_TYPE_U64, PM_INDOM_NULL, PM_SEM_INSTANT, ++ PMDA_PMUNITS(1,0,0,PM_SPACE_KBYTE,0,0) }, }, ++ ++/* mem.util.zswapped */ ++ { NULL, ++ { PMDA_PMID(CLUSTER_MEMINFO,72), PM_TYPE_U64, PM_INDOM_NULL, PM_SEM_INSTANT, ++ PMDA_PMUNITS(1,0,0,PM_SPACE_KBYTE,0,0) }, }, ++ ++/* mem.util.shadowcallstack */ ++ { NULL, ++ { PMDA_PMID(CLUSTER_MEMINFO,73), PM_TYPE_U64, PM_INDOM_NULL, PM_SEM_INSTANT, ++ PMDA_PMUNITS(1,0,0,PM_SPACE_KBYTE,0,0) }, }, ++ ++/* mem.util.percpu */ ++ { NULL, ++ { PMDA_PMID(CLUSTER_MEMINFO,74), PM_TYPE_U64, PM_INDOM_NULL, PM_SEM_INSTANT, ++ PMDA_PMUNITS(1,0,0,PM_SPACE_KBYTE,0,0) }, }, ++ + /* mem.numa.util.total */ + { NULL, + { PMDA_PMID(CLUSTER_NUMA_MEMINFO,0), PM_TYPE_U64, NODE_INDOM, PM_SEM_INSTANT, +@@ -8201,7 +8256,7 @@ linux_fetchCallBack(pmdaMetric *mdesc, unsigned int inst, pmAtomValue *atom) + return 0; /* no values available */ + atom->ull = proc_meminfo.HardwareCorrupted; + break; +- case 56: /* mem.util.anonhugepages (in pages) */ ++ case 56: /* mem.util.anonhugepages (in kbytes) */ + if (!MEMINFO_VALID_VALUE(proc_meminfo.AnonHugePages)) + return 0; /* no values available */ + atom->ull = proc_meminfo.AnonHugePages; +@@ -8245,6 +8300,61 @@ linux_fetchCallBack(pmdaMetric *mdesc, unsigned int inst, pmAtomValue *atom) + atom->ull = proc_meminfo.HugepagesSurp * + (proc_meminfo.Hugepagesize << 10); + break; ++ case 64: /* mem.util.shmemhugepages (in kbytes) */ ++ if (!MEMINFO_VALID_VALUE(proc_meminfo.ShmemHugePages)) ++ return 0; /* no values available */ ++ atom->ull = proc_meminfo.ShmemHugePages; ++ break; ++ case 65: /* mem.util.shmempmdmapped (in kbytes) */ ++ if (!MEMINFO_VALID_VALUE(proc_meminfo.ShmemPmdMapped)) ++ return 0; /* no values available */ ++ atom->ull = proc_meminfo.ShmemPmdMapped; ++ break; ++ case 66: /* mem.util.filehugepages (in kbytes) */ ++ if (!MEMINFO_VALID_VALUE(proc_meminfo.FileHugePages)) ++ return 0; /* no values available */ ++ atom->ull = proc_meminfo.FileHugePages; ++ break; ++ case 67: /* mem.util.filepmdmapped (in kbytes) */ ++ if (!MEMINFO_VALID_VALUE(proc_meminfo.FilePmdMapped)) ++ return 0; /* no values available */ ++ atom->ull = proc_meminfo.FilePmdMapped; ++ break; ++ case 68: /* mem.util.cmatotal (in kbytes) */ ++ if (!MEMINFO_VALID_VALUE(proc_meminfo.CmaTotal)) ++ return 0; /* no values available */ ++ atom->ull = proc_meminfo.CmaTotal; ++ break; ++ case 69: /* mem.util.cmafree (in kbytes) */ ++ if (!MEMINFO_VALID_VALUE(proc_meminfo.CmaFree)) ++ return 0; /* no values available */ ++ atom->ull = proc_meminfo.CmaFree; ++ break; ++ case 70: /* mem.util.unaccepted (in kbytes) */ ++ if (!MEMINFO_VALID_VALUE(proc_meminfo.Unaccepted)) ++ return 0; /* no values available */ ++ atom->ull = proc_meminfo.Unaccepted; ++ break; ++ case 71: /* mem.util.zswap (in kbytes) */ ++ if (!MEMINFO_VALID_VALUE(proc_meminfo.Zswap)) ++ return 0; /* no values available */ ++ atom->ull = proc_meminfo.Zswap; ++ break; ++ case 72: /* mem.util.zswapped (in kbytes) */ ++ if (!MEMINFO_VALID_VALUE(proc_meminfo.Zswapped)) ++ return 0; /* no values available */ ++ atom->ull = proc_meminfo.Zswapped; ++ break; ++ case 73: /* mem.util.shadowcallstack (in kbytes) */ ++ if (!MEMINFO_VALID_VALUE(proc_meminfo.ShadowCallStack)) ++ return 0; /* no values available */ ++ atom->ull = proc_meminfo.ShadowCallStack; ++ break; ++ case 74: /* mem.util.percpu (in kbytes) */ ++ if (!MEMINFO_VALID_VALUE(proc_meminfo.Percpu)) ++ return 0; /* no values available */ ++ atom->ull = proc_meminfo.Percpu; ++ break; + default: + return PM_ERR_PMID; + } +diff --git a/src/pmdas/linux/proc_meminfo.c b/src/pmdas/linux/proc_meminfo.c +index f7599e2..dff30bc 100644 +--- a/src/pmdas/linux/proc_meminfo.c ++++ b/src/pmdas/linux/proc_meminfo.c +@@ -47,6 +47,8 @@ static struct { + { "MmapCopy", &moff.MmapCopy }, + { "SwapTotal", &moff.SwapTotal }, + { "SwapFree", &moff.SwapFree }, ++ { "Zswap", &moff.Zswap }, ++ { "Zswapped", &moff.Zswapped }, + { "Dirty", &moff.Dirty }, + { "Writeback", &moff.Writeback }, + { "AnonPages", &moff.AnonPages }, +@@ -56,6 +58,7 @@ static struct { + { "SReclaimable", &moff.SlabReclaimable }, + { "SUnreclaim", &moff.SlabUnreclaimable }, + { "KernelStack", &moff.KernelStack }, ++ { "ShadowCallStack", &moff.ShadowCallStack }, + { "PageTables", &moff.PageTables }, + { "Quicklists", &moff.Quicklists }, + { "NFS_Unstable", &moff.NFS_Unstable }, +@@ -66,8 +69,16 @@ static struct { + { "VmallocTotal", &moff.VmallocTotal }, + { "VmallocUsed", &moff.VmallocUsed }, + { "VmallocChunk", &moff.VmallocChunk }, ++ { "Percpu", &moff.Percpu }, + { "HardwareCorrupted", &moff.HardwareCorrupted }, + { "AnonHugePages", &moff.AnonHugePages }, ++ { "ShmemHugePages", &moff.ShmemHugePages }, ++ { "ShmemPmdMapped", &moff.ShmemPmdMapped }, ++ { "FileHugePages", &moff.FileHugePages }, ++ { "FilePmdMapped", &moff.FilePmdMapped }, ++ { "CmaTotal", &moff.CmaTotal }, ++ { "CmaFree", &moff.CmaFree }, ++ { "Unaccepted", &moff.Unaccepted }, + /* vendor kernel patches, some outdated now */ + { "MemShared", &moff.MemShared }, + { "ReverseMaps", &moff.ReverseMaps }, +diff --git a/src/pmdas/linux/proc_meminfo.h b/src/pmdas/linux/proc_meminfo.h +index c353606..afcf837 100644 +--- a/src/pmdas/linux/proc_meminfo.h ++++ b/src/pmdas/linux/proc_meminfo.h +@@ -45,6 +45,8 @@ typedef struct { + int64_t SwapTotal; + int64_t SwapFree; + int64_t SwapUsed; /* computed */ ++ int64_t Zswap; ++ int64_t Zswapped; + int64_t Dirty; + int64_t Writeback; + int64_t Mapped; +@@ -53,6 +55,7 @@ typedef struct { + int64_t SlabReclaimable; + int64_t SlabUnreclaimable; + int64_t KernelStack; ++ int64_t ShadowCallStack; + int64_t CommitLimit; + int64_t Committed_AS; + int64_t PageTables; +@@ -65,8 +68,17 @@ typedef struct { + int64_t VmallocTotal; + int64_t VmallocUsed; + int64_t VmallocChunk; ++ int64_t Percpu; + int64_t HardwareCorrupted; + int64_t AnonHugePages; ++ int64_t ShmemHugePages; ++ int64_t ShmemPmdMapped; ++ int64_t FileHugePages; ++ int64_t FilePmdMapped; ++ int64_t CmaTotal; ++ int64_t CmaFree; ++ int64_t Unaccepted; ++ /* vendor patches (old) */ + int64_t HugepagesTotal; + int64_t HugepagesFree; + int64_t HugepagesRsvd; +diff --git a/src/pmdas/linux/root_linux b/src/pmdas/linux/root_linux +index 58ef225..18f70c7 100644 +--- a/src/pmdas/linux/root_linux ++++ b/src/pmdas/linux/root_linux +@@ -695,6 +695,17 @@ mem.util { + hugepagesFreeBytes 60:1:61 + hugepagesRsvdBytes 60:1:62 + hugepagesSurpBytes 60:1:63 ++ shmemhugepages 60:1:64 ++ shmempmdmapped 60:1:65 ++ filehugepages 60:1:66 ++ filepmdmapped 60:1:67 ++ cmatotal 60:1:68 ++ cmafree 60:1:69 ++ unaccepted 60:1:70 ++ zswap 60:1:71 ++ zswapped 60:1:72 ++ shadowcallstack 60:1:73 ++ percpu 60:1:74 + } + + mem.numa { +-- +2.43.7 + diff --git a/SOURCES/1021-meminfo-added-kreclaimable-and-hugtlb-metrics.patch b/SOURCES/1021-meminfo-added-kreclaimable-and-hugtlb-metrics.patch new file mode 100644 index 0000000..9729d2d --- /dev/null +++ b/SOURCES/1021-meminfo-added-kreclaimable-and-hugtlb-metrics.patch @@ -0,0 +1,171 @@ +From 02568f90a0cb92feb95d5b7f65810cbc99bfed4e Mon Sep 17 00:00:00 2001 +From: Sourav Sharma +Date: Fri, 10 Oct 2025 17:35:40 +0530 +Subject: [PATCH] meminfo: Added mem.util.kreclaimable and mem.util.hugetlb + metrics for meminfo + +updated pcp-meminfo tool as well two show these metrics +data + +Signed-off-by: sagar sagar + +Cherry-pick-commit: https://github.com/performancecopilot/pcp/pull/2180/commits/81393407ec8d31642f637ab25eb3f9c082dab821 + +Orabug: 38526356 + +Signed-off-by: Sourav Sharma +--- + src/pcp/meminfo/pcp-meminfo.py | 4 ++++ + src/pmdas/linux/help | 3 +++ + src/pmdas/linux/pmda.c | 22 +++++++++++++++++++++- + src/pmdas/linux/proc_meminfo.c | 2 ++ + src/pmdas/linux/proc_meminfo.h | 2 ++ + src/pmdas/linux/root_linux | 2 ++ + 6 files changed, 34 insertions(+), 1 deletion(-) + +diff --git a/src/pcp/meminfo/pcp-meminfo.py b/src/pcp/meminfo/pcp-meminfo.py +index bae8931..8492859 100755 +--- a/src/pcp/meminfo/pcp-meminfo.py ++++ b/src/pcp/meminfo/pcp-meminfo.py +@@ -44,6 +44,7 @@ METRICS = ["mem.physmem", + "mem.util.anonpages", + "mem.util.mapped", + "mem.util.shared", ++ "mem.util.kreclaimable", + "mem.util.slab", + "mem.util.slabReclaimable", + "mem.util.slabUnreclaimable", +@@ -71,6 +72,7 @@ METRICS = ["mem.physmem", + "mem.util.hugepagesRsvd", + "mem.util.hugepagesSurp", + "hinv.hugepagesize", ++ "mem.util.hugetlb", + "mem.util.directMap4k", + "mem.util.directMap2M", + "mem.util.directMap1G"] +@@ -96,6 +98,7 @@ METRICS_DESC = ["MemTotal", + "AnonPages", + "Mapped", + "Shmem", ++ "KReclaimable", + "Slab", + "SReclaimable", + "SUnreclaim", +@@ -123,6 +126,7 @@ METRICS_DESC = ["MemTotal", + "HugePages_Rsvd_NO_kb", + "HugePages_Surp_NO_kb", + "Hugepagesize", ++ "Hugetlb", + "DirectMap4k", + "DirectMap2M", + "DirectMap1G"] +diff --git a/src/pmdas/linux/help b/src/pmdas/linux/help +index 3700809..531b136 100644 +--- a/src/pmdas/linux/help ++++ b/src/pmdas/linux/help +@@ -959,6 +959,9 @@ corruption of the call stack, allowing the kernel to react to such an + attach in an appropriate fashion. Shadow stacks are often maintained + by the processor hardware and require additional stack memory. + @ mem.util.percpu amount of per CPU allocator memory ++@ mem.util.kreclaimable Kbytes in kernel reclaimable memory, from /proc/meminfo ++Kernel allocations that the kernel will attempt to reclaim under memory pressure. ++@ mem.util.hugetlb the total amount of memory (in kB), consumed by huge pages of all sizes. + + @ mem.numa.util.total per-node total memory + @ mem.numa.util.free per-node free memory +diff --git a/src/pmdas/linux/pmda.c b/src/pmdas/linux/pmda.c +index 23d8033..37a65f1 100644 +--- a/src/pmdas/linux/pmda.c ++++ b/src/pmdas/linux/pmda.c +@@ -1189,6 +1189,16 @@ static pmdaMetric metrictab[] = { + { PMDA_PMID(CLUSTER_MEMINFO,74), PM_TYPE_U64, PM_INDOM_NULL, PM_SEM_INSTANT, + PMDA_PMUNITS(1,0,0,PM_SPACE_KBYTE,0,0) }, }, + ++/* mem.util.kreclaimable */ ++ { NULL, ++ { PMDA_PMID(CLUSTER_MEMINFO,75), PM_TYPE_U64, PM_INDOM_NULL, PM_SEM_INSTANT, ++ PMDA_PMUNITS(1,0,0,PM_SPACE_KBYTE,0,0) }, }, ++ ++/* mem.util.hugetlb */ ++ { NULL, ++ { PMDA_PMID(CLUSTER_MEMINFO,76), PM_TYPE_U64, PM_INDOM_NULL, PM_SEM_INSTANT, ++ PMDA_PMUNITS(1,0,0,PM_SPACE_KBYTE,0,0) }, }, ++ + /* mem.numa.util.total */ + { NULL, + { PMDA_PMID(CLUSTER_NUMA_MEMINFO,0), PM_TYPE_U64, NODE_INDOM, PM_SEM_INSTANT, +@@ -8354,7 +8364,17 @@ linux_fetchCallBack(pmdaMetric *mdesc, unsigned int inst, pmAtomValue *atom) + if (!MEMINFO_VALID_VALUE(proc_meminfo.Percpu)) + return 0; /* no values available */ + atom->ull = proc_meminfo.Percpu; +- break; ++ break; ++ case 75: /* mem.util.kreclaimable (in kbytes) */ ++ if (!MEMINFO_VALID_VALUE(proc_meminfo.KReclaimable)) ++ return 0; /* no values available */ ++ atom->ull = proc_meminfo.KReclaimable; ++ break; ++ case 76: /* mem.util.hugetlb (in kbytes) */ ++ if (!MEMINFO_VALID_VALUE(proc_meminfo.Hugetlb)) ++ return 0; /* no values available */ ++ atom->ull = proc_meminfo.Hugetlb; ++ break; + default: + return PM_ERR_PMID; + } +diff --git a/src/pmdas/linux/proc_meminfo.c b/src/pmdas/linux/proc_meminfo.c +index dff30bc..4891610 100644 +--- a/src/pmdas/linux/proc_meminfo.c ++++ b/src/pmdas/linux/proc_meminfo.c +@@ -54,6 +54,7 @@ static struct { + { "AnonPages", &moff.AnonPages }, + { "Mapped", &moff.Mapped }, + { "Shmem", &moff.Shmem }, ++ { "KReclaimable", &moff.KReclaimable }, + { "Slab", &moff.Slab }, + { "SReclaimable", &moff.SlabReclaimable }, + { "SUnreclaim", &moff.SlabUnreclaimable }, +@@ -87,6 +88,7 @@ static struct { + { "HugePages_Rsvd", &moff.HugepagesRsvd }, + { "HugePages_Surp", &moff.HugepagesSurp }, + { "Hugepagesize", &moff.Hugepagesize }, ++ { "Hugetlb", &moff.Hugetlb }, + { "DirectMap4k", &moff.directMap4k }, + { "DirectMap2M", &moff.directMap2M }, + { "DirectMap1G", &moff.directMap1G }, +diff --git a/src/pmdas/linux/proc_meminfo.h b/src/pmdas/linux/proc_meminfo.h +index afcf837..56512d1 100644 +--- a/src/pmdas/linux/proc_meminfo.h ++++ b/src/pmdas/linux/proc_meminfo.h +@@ -51,6 +51,7 @@ typedef struct { + int64_t Writeback; + int64_t Mapped; + int64_t Shmem; ++ int64_t KReclaimable; + int64_t Slab; + int64_t SlabReclaimable; + int64_t SlabUnreclaimable; +@@ -84,6 +85,7 @@ typedef struct { + int64_t HugepagesRsvd; + int64_t HugepagesSurp; + int64_t Hugepagesize; ++ int64_t Hugetlb; + int64_t directMap4k; + int64_t directMap2M; + int64_t directMap1G; +diff --git a/src/pmdas/linux/root_linux b/src/pmdas/linux/root_linux +index 18f70c7..0a3a92a 100644 +--- a/src/pmdas/linux/root_linux ++++ b/src/pmdas/linux/root_linux +@@ -706,6 +706,8 @@ mem.util { + zswapped 60:1:72 + shadowcallstack 60:1:73 + percpu 60:1:74 ++ kreclaimable 60:1:75 ++ hugetlb 60:1:76 + } + + mem.numa { +-- +2.43.7 + diff --git a/SOURCES/1022-fix-mpstat-showing-inconsistent-values.patch b/SOURCES/1022-fix-mpstat-showing-inconsistent-values.patch new file mode 100644 index 0000000..fc58030 --- /dev/null +++ b/SOURCES/1022-fix-mpstat-showing-inconsistent-values.patch @@ -0,0 +1,267 @@ +From a02f695771e7534a90391fe243badb47b7b2371d Mon Sep 17 00:00:00 2001 +From: sagar sagar +Date: Thu, 28 Aug 2025 19:37:54 +0530 +Subject: [PATCH] pcp-mpstat: refactor to use vuser/vnice metrics and unify CPU + utilization calculation + +Switch all references in MPSTAT_METRICS from cpu.user/cpu.nice to the newer cpu.vuser/cpu.vnice metrics +for both kernel.all and kernel.percpu to be inline with mpstat tool. +Refactor all per-metric calculation methods in CoreCpuUtil to delegate to a new _compute_metric helper, +eliminating redundant code. +Optimize CPU count retrieval by caching the result of hinv.ncpu in the CoreCpuUtil class. +Remove unused or redundant calls to cpu_online, clarifying the core class interface. +Simplify and centralize the per-metric computation logic by using self._all_or_percpu() for proper metric +path construction and handling instance (per-core vs global) logic in a single location. + +Signed-off-by: sagar sagar + +Orabug: 38526338 + +Cherry-pick-commit: https://github.com/performancecopilot/pcp/commit/a02f695771e7534a90391fe243badb47b7b2371d + +Signed-off-by: Sourav Sharma + +--- + src/pcp/mpstat/pcp-mpstat.py | 184 ++++++++--------------------------- + 1 file changed, 42 insertions(+), 142 deletions(-) + +diff --git a/src/pcp/mpstat/pcp-mpstat.py b/src/pcp/mpstat/pcp-mpstat.py +index 89f308ac39..fed1b91ae1 100755 +--- a/src/pcp/mpstat/pcp-mpstat.py ++++ b/src/pcp/mpstat/pcp-mpstat.py +@@ -22,14 +22,14 @@ + import time + MPSTAT_METRICS = ['kernel.uname.nodename', 'kernel.uname.release', 'kernel.uname.sysname', + 'kernel.uname.machine', 'hinv.map.cpu_num', 'hinv.ncpu', 'hinv.cpu.online', +- 'kernel.all.cpu.user', +- 'kernel.all.cpu.nice', 'kernel.all.cpu.sys', 'kernel.all.cpu.wait.total', +- 'kernel.all.cpu.irq.hard', 'kernel.all.cpu.irq.soft', 'kernel.all.cpu.steal', +- 'kernel.all.cpu.guest', 'kernel.all.cpu.guest_nice', 'kernel.all.cpu.idle', +- 'kernel.percpu.cpu.user', 'kernel.percpu.cpu.nice', 'kernel.percpu.cpu.sys', +- 'kernel.percpu.cpu.wait.total', 'kernel.percpu.cpu.irq.hard', 'kernel.percpu.cpu.irq.soft', +- 'kernel.percpu.cpu.steal', 'kernel.percpu.cpu.guest','kernel.percpu.cpu.guest_nice', +- 'kernel.percpu.cpu.idle', 'kernel.all.intr', 'kernel.percpu.intr'] ++ 'kernel.all.cpu.vuser', 'kernel.all.cpu.vnice', 'kernel.all.cpu.sys', ++ 'kernel.all.cpu.wait.total', 'kernel.all.cpu.irq.hard', 'kernel.all.cpu.irq.soft', ++ 'kernel.all.cpu.steal', 'kernel.all.cpu.guest', 'kernel.all.cpu.guest_nice', ++ 'kernel.all.cpu.idle','kernel.percpu.cpu.vuser','kernel.percpu.cpu.vnice', ++ 'kernel.percpu.cpu.sys','kernel.percpu.cpu.wait.total', 'kernel.percpu.cpu.irq.hard', ++ 'kernel.percpu.cpu.irq.soft','kernel.percpu.cpu.steal', 'kernel.percpu.cpu.guest', ++ 'kernel.percpu.cpu.guest_nice','kernel.percpu.cpu.idle', 'kernel.all.intr', 'kernel.percpu.intr'] ++ + interrupts_list = [] + soft_interrupts_list = [] + +@@ -126,170 +126,70 @@ def __fetch_previous_values(self,metric,instance): + + class CoreCpuUtil: + def __init__(self, instance, delta_time, metric_repository): +- self.delta_time = delta_time + self.instance = instance ++ self.delta_time = delta_time + self.metric_repository = metric_repository ++ self._total_cpus = None # Cache for performance + + def total_cpus(self): +- return self.metric_repository.current_value('hinv.ncpu', None) ++ if self._total_cpus is None: ++ self._total_cpus = self.metric_repository.current_value('hinv.ncpu', None) ++ return self._total_cpus ++ + def cpu_number(self): + return self.instance + +- def cpu_online(self): +- return self.metric_repository.current_value('hinv.cpu.online', self.instance) +- + def user_time(self): +- metric = 'kernel.' + self.__all_or_percpu() + '.cpu.user' +- p_time = self.metric_repository.previous_value(metric, self.instance) +- c_time = self.metric_repository.current_value(metric, self.instance) +- if p_time is not None and c_time is not None: +- value = (100*(c_time - p_time))/(1000*self.delta_time) +- if self.instance is None and self.total_cpus() is not None: +- return float("%.2f"%(value/self.total_cpus())) +- else: +- if self.total_cpus() is None: +- return None +- return float("%.2f"%(value)) +- +- else: +- return None ++ return self._compute_metric('cpu.vuser') + + def nice_time(self): +- metric = 'kernel.' + self.__all_or_percpu() + '.cpu.nice' +- p_time = self.metric_repository.previous_value(metric, self.instance) +- c_time = self.metric_repository.current_value(metric, self.instance) +- if p_time is not None and c_time is not None: +- value = (100*(c_time - p_time))/(1000*self.delta_time) +- if self.instance is None and self.total_cpus() is not None: +- return float("%.2f"%(value/self.total_cpus())) +- else: +- if self.total_cpus() is None: +- return None +- return float("%.2f"%(value)) +- else: +- return None ++ return self._compute_metric('cpu.vnice') + + def sys_time(self): +- metric = 'kernel.' + self.__all_or_percpu() + '.cpu.sys' +- p_time = self.metric_repository.previous_value(metric, self.instance) +- c_time = self.metric_repository.current_value(metric, self.instance) +- if p_time is not None and c_time is not None: +- value = (100*(c_time - p_time))/(1000*self.delta_time) +- if self.instance is None and self.total_cpus() is not None: +- return float("%.2f"%(value/self.total_cpus())) +- else: +- if self.total_cpus() is None: +- return None +- return float("%.2f"%(value)) +- else: +- return None ++ return self._compute_metric('cpu.sys') + + def iowait_time(self): +- metric = 'kernel.' + self.__all_or_percpu() + '.cpu.wait.total' +- p_time = self.metric_repository.previous_value(metric, self.instance) +- c_time = self.metric_repository.current_value(metric, self.instance) +- if p_time is not None and c_time is not None: +- value = (100*(c_time - p_time))/(1000*self.delta_time) +- if self.instance is None and self.total_cpus() is not None: +- return float("%.2f"%(value/self.total_cpus())) +- else: +- if self.total_cpus() is None: +- return None +- return float("%.2f"%(value)) +- else: +- return None ++ return self._compute_metric('cpu.wait.total') + + def irq_hard(self): +- metric = 'kernel.' + self.__all_or_percpu() + '.cpu.irq.hard' +- p_time = self.metric_repository.previous_value(metric, self.instance) +- c_time = self.metric_repository.current_value(metric, self.instance) +- if p_time is not None and c_time is not None: +- value = (100*(c_time - p_time))/(1000*self.delta_time) +- if self.instance is None and self.total_cpus() is not None: +- return float("%.2f"%(value/self.total_cpus())) +- else: +- if self.total_cpus() is None: +- return None +- return float("%.2f"%(value)) +- else: +- return None ++ return self._compute_metric('cpu.irq.hard') + + def irq_soft(self): +- metric = 'kernel.' + self.__all_or_percpu() + '.cpu.irq.soft' +- p_time = self.metric_repository.previous_value(metric, self.instance) +- c_time = self.metric_repository.current_value(metric, self.instance) +- if p_time is not None and c_time is not None: +- value = (100*(c_time - p_time))/(1000*self.delta_time) +- if self.instance is None and self.total_cpus() is not None: +- return float("%.2f"%(value/self.total_cpus())) +- else: +- if self.total_cpus() is None: +- return None +- return float("%.2f"%(value)) +- else: +- return None ++ return self._compute_metric('cpu.irq.soft') + + def steal(self): +- metric = 'kernel.' + self.__all_or_percpu() + '.cpu.steal' +- p_time = self.metric_repository.previous_value(metric, self.instance) +- c_time = self.metric_repository.current_value(metric, self.instance) +- if p_time is not None and c_time is not None: +- value = (100*(c_time - p_time))/(1000*self.delta_time) +- if self.instance is None and self.total_cpus() is not None: +- return float("%.2f"%(value/self.total_cpus())) +- else: +- if self.total_cpus() is None: +- return None +- return float("%.2f"%(value)) +- else: +- return None ++ return self._compute_metric('cpu.steal') + + def guest_time(self): +- metric = 'kernel.' + self.__all_or_percpu() + '.cpu.guest' +- p_time = self.metric_repository.previous_value(metric, self.instance) +- c_time = self.metric_repository.current_value(metric, self.instance) +- if p_time is not None and c_time is not None: +- value = (100*(c_time - p_time))/(1000*self.delta_time) +- if self.instance is None and self.total_cpus() is not None: +- return float("%.2f"%(value/self.total_cpus())) +- else: +- if self.total_cpus() is None: +- return None +- return float("%.2f"%(value)) +- else: +- return None ++ return self._compute_metric('cpu.guest') + + def guest_nice(self): +- metric = 'kernel.' + self.__all_or_percpu() + '.cpu.guest_nice' +- p_time = self.metric_repository.previous_value(metric, self.instance) +- c_time = self.metric_repository.current_value(metric, self.instance) +- if p_time is not None and c_time is not None: +- value = (100*(c_time - p_time))/(1000*self.delta_time) +- if self.instance is None and self.total_cpus() is not None: +- return float("%.2f"%(value/self.total_cpus())) +- else: +- if self.total_cpus() is None: +- return None +- return float("%.2f"%(value)) +- else: +- return None ++ return self._compute_metric('cpu.guest_nice') + + def idle_time(self): +- metric = 'kernel.' + self.__all_or_percpu() + '.cpu.idle' ++ return self._compute_metric('cpu.idle') ++ ++ def _compute_metric(self, metric_suffix): ++ metric = f'kernel.{self._all_or_percpu()}.{metric_suffix}' + p_time = self.metric_repository.previous_value(metric, self.instance) + c_time = self.metric_repository.current_value(metric, self.instance) +- if p_time is not None and c_time is not None: +- value = (100*(c_time - p_time))/(1000*self.delta_time) +- if self.instance is None and self.total_cpus() is not None: +- return float("%.2f"%(value/self.total_cpus())) +- else: +- if self.total_cpus() is None: ++ ++ if p_time is None or c_time is None or self.delta_time == 0: ++ return None ++ ++ try: ++ value = (100 * (c_time - p_time)) / (1000 * self.delta_time) ++ if self.instance is None: ++ total = self.total_cpus() ++ if total: ++ value /= total ++ else: + return None +- return float("%.2f"%(value)) +- else: ++ return min (round(value, 2),100) ++ except (ZeroDivisionError, TypeError): + return None + +- def __all_or_percpu(self): ++ def _all_or_percpu(self): + return 'all' if self.instance is None else 'percpu' + + class CpuUtil: +@@ -652,7 +552,7 @@ def get_summary_metrics(self,group): + def report(self,manager): + try: + group = manager['mpstat'] +- if group['kernel.all.cpu.user'].netPrevValues is None: ++ if group['kernel.all.cpu.vuser'].netPrevValues is None: + # need two fetches to report rate converted counter metrics + self.get_summary_metrics(group) + return diff --git a/SOURCES/1023-fix-broken-pipe-error-iostat.patch b/SOURCES/1023-fix-broken-pipe-error-iostat.patch new file mode 100644 index 0000000..63e8833 --- /dev/null +++ b/SOURCES/1023-fix-broken-pipe-error-iostat.patch @@ -0,0 +1,29 @@ +From 64cfffa8777d349d58aac07684abe0d834695e22 Mon Sep 17 00:00:00 2001 +From: sagar sagar +Date: Fri, 2 May 2025 14:54:08 +0530 +Subject: [PATCH] pcp-iostat:fixed broken pipe issue in pcp-iostat utility. + +Signed-off-by: sagar sagar + +Orabug: 37655753 + +Cherry-pick-commit: https://github.com/performancecopilot/pcp/pull/2200/commits/64cfffa8777d349d58aac07684abe0d834695e22 + +Signed-off-by: Sourav Sharma + +--- + src/pcp/iostat/pcp-iostat.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/pcp/iostat/pcp-iostat.py b/src/pcp/iostat/pcp-iostat.py +index 909f2ac70d..ae503ed83f 100755 +--- a/src/pcp/iostat/pcp-iostat.py ++++ b/src/pcp/iostat/pcp-iostat.py +@@ -461,5 +461,7 @@ def __init__(self): + except pmapi.pmUsageErr as usage: + usage.message() + sys.exit(1) ++ except IOError: ++ signal.signal(signal.SIGPIPE, signal.SIG_DFL) + except KeyboardInterrupt: + pass diff --git a/SOURCES/1024-add-missing-numastat-metrics.patch b/SOURCES/1024-add-missing-numastat-metrics.patch new file mode 100644 index 0000000..23841c1 --- /dev/null +++ b/SOURCES/1024-add-missing-numastat-metrics.patch @@ -0,0 +1,220 @@ +From 8e6a5ac18c06f813bad74494134ad5ac2202684e Mon Sep 17 00:00:00 2001 +From: Sagar Sagar +Date: Mon, 22 Sep 2025 15:39:18 +0000 +Subject: [PATCH] Added new metrics for numastat per node + +newly added metrics are follows:- +mem.numa.util.swapCached +mem.numa.util.kreclaimable +mem.numa.util.anonhugepages +mem.numa.util.shmemhugepages +mem.numa.util.shmempmdmapped +mem.numa.util.filehugepages +mem.numa.util.filepmdmapped + +Fixed issue with mem.numa.util.mapped metric where it was not giving correct values. + +Signed-off-by: Sagar Sagar +Co-authored-by: Sourav Sharma + +Orabug: 38435551 + +Cherry-pick-commit: https://github.com/orasagar/pcp/commit/8e6a5ac18c06f813bad74494134ad5ac2202684e + +Signed-off-by: Sourav Sharma + +--- + src/pmdas/linux/help | 7 ++++ + src/pmdas/linux/numa_meminfo.c | 50 +++++++++++++++++------------ + src/pmdas/linux/pmda.c | 58 +++++++++++++++++++++++++++++++++- + src/pmdas/linux/root_linux | 7 ++++ + 4 files changed, 100 insertions(+), 22 deletions(-) + +diff --git a/src/pmdas/linux/help b/src/pmdas/linux/help +index c608d10ba5..482e099d66 100644 +--- a/src/pmdas/linux/help ++++ b/src/pmdas/linux/help +@@ -1030,6 +1030,13 @@ pressure. + @ mem.numa.util.hugepagesTotal per-node total count of hugepages + @ mem.numa.util.hugepagesFree per-node count of free hugepages + @ mem.numa.util.hugepagesSurp per-node count of surplus hugepages ++@ mem.numa.util.swapCached per-node amount of memory in swap cache ++@ mem.numa.util.kreclaimable per-node kernel reclaimable memory ++@ mem.numa.util.anonhugepages per-node amount of memory in anonymous huge pages ++@ mem.numa.util.shmemhugepages per-node amount of shared memory allocated with huge ++@ mem.numa.util.shmempmdmapped per-node shared memory mapped into userspace with hugepages ++@ mem.numa.util.filehugepages per-node page cache (file) pages allocated with hugepages ++@ mem.numa.util.filepmdmapped per-node page cache mapped into userspace with hugepages + @ mem.numa.alloc.hit per-node count of times a task wanted alloc on local node and succeeded + @ mem.numa.alloc.miss per-node count of times a task wanted alloc on local node but got another node + @ mem.numa.alloc.foreign count of times a task on another node alloced on that node, but got this node +diff --git a/src/pmdas/linux/numa_meminfo.c b/src/pmdas/linux/numa_meminfo.c +index 9024962b2e..461bed0965 100644 +--- a/src/pmdas/linux/numa_meminfo.c ++++ b/src/pmdas/linux/numa_meminfo.c +@@ -24,42 +24,50 @@ + + /* sysfs file for numa meminfo */ + static struct linux_table numa_meminfo_table[] = { +- { field: "MemTotal:", maxval: 0x0 }, +- { field: "MemFree:", maxval: 0x0 }, +- { field: "MemUsed:", maxval: 0x0 }, +- { field: "Active:", maxval: 0x0 }, +- { field: "Inactive:", maxval: 0x0 }, ++ { field: "MemTotal:", maxval: 0x0 }, ++ { field: "MemFree:", maxval: 0x0 }, ++ { field: "MemUsed:", maxval: 0x0 }, ++ { field: "SwapCached:", maxval: 0x0 }, ++ { field: "Active:", maxval: 0x0 }, ++ { field: "Inactive:", maxval: 0x0 }, + { field: "Active(anon):", maxval: 0x0 }, + { field: "Inactive(anon):", maxval: 0x0 }, + { field: "Active(file):", maxval: 0x0 }, + { field: "Inactive(file):", maxval: 0x0 }, +- { field: "HighTotal:", maxval: 0x0 }, +- { field: "HighFree:", maxval: 0x0 }, +- { field: "LowTotal:", maxval: 0x0 }, +- { field: "LowFree:", maxval: 0x0 }, ++ { field: "HighTotal:", maxval: 0x0 }, ++ { field: "HighFree:", maxval: 0x0 }, ++ { field: "LowTotal:", maxval: 0x0 }, ++ { field: "LowFree:", maxval: 0x0 }, + { field: "Unevictable:", maxval: 0x0 }, +- { field: "Mlocked:", maxval: 0x0 }, +- { field: "Dirty:", maxval: 0x0 }, +- { field: "Writeback:", maxval: 0x0 }, +- { field: "FilePages:", maxval: 0x0 }, +- { field: "Mapped:", maxval: 0x0 }, +- { field: "AnonPages:", maxval: 0x0 }, +- { field: "Shmem:", maxval: 0x0 }, ++ { field: "Mlocked:", maxval: 0x0 }, ++ { field: "Dirty:", maxval: 0x0 }, ++ { field: "Writeback:", maxval: 0x0 }, ++ { field: "FilePages:", maxval: 0x0 }, ++ { field: "AnonPages:", maxval: 0x0 }, ++ { field: "Shmem:", maxval: 0x0 }, + { field: "KernelStack:", maxval: 0x0 }, +- { field: "PageTables:", maxval: 0x0 }, ++ { field: "PageTables:", maxval: 0x0 }, ++ { field: "SecPageTables:", maxval: 0x0 }, + { field: "NFS_Unstable:", maxval: 0x0 }, +- { field: "Bounce:", maxval: 0x0 }, ++ { field: "Bounce:", maxval: 0x0 }, + { field: "WritebackTmp:", maxval: 0x0 }, +- { field: "Slab:", maxval: 0x0 }, ++ { field: "KReclaimable:", maxval: 0x0 }, ++ { field: "Slab:", maxval: 0x0 }, + { field: "SReclaimable:", maxval: 0x0 }, +- { field: "SUnreclaim:", maxval: 0x0 }, ++ { field: "SUnreclaim:", maxval: 0x0 }, ++ { field: "AnonHugePages:", maxval: 0x0 }, ++ { field: "ShmemHugePages:", maxval: 0x0 }, ++ { field: "ShmemPmdMapped:", maxval: 0x0 }, ++ { field: "FileHugePages:", maxval: 0x0 }, ++ { field: "FilePmdMapped:", maxval: 0x0 }, ++ { field: "Mapped:", maxval: 0x0 }, + { field: "HugePages_Total:", maxval: 0x0 }, + { field: "HugePages_Free:", maxval: 0x0 }, + { field: "HugePages_Surp:", maxval: 0x0 }, + { field: NULL } + }; + +-/* sysfs file for numastat */ ++/* sysfs file for numastat */ + static struct linux_table numa_memstat_table[] = { + { field: "numa_hit", maxval: ULONGLONG_MAX }, + { field: "numa_miss", maxval: ULONGLONG_MAX }, +diff --git a/src/pmdas/linux/pmda.c b/src/pmdas/linux/pmda.c +index 1026caf860..b30496b4b8 100644 +--- a/src/pmdas/linux/pmda.c ++++ b/src/pmdas/linux/pmda.c +@@ -1416,6 +1416,42 @@ static pmdaMetric metrictab[] = { + { PMDA_PMID(CLUSTER_NUMA_MEMINFO,41), PM_TYPE_U64, NODE_INDOM, PM_SEM_INSTANT, + PMDA_PMUNITS(1,0,0,PM_SPACE_BYTE,0,0) }, }, + ++/* mem.numa.util.swapCached */ ++ { NULL, ++ { PMDA_PMID(CLUSTER_NUMA_MEMINFO,42), PM_TYPE_U64, NODE_INDOM, PM_SEM_INSTANT, ++ PMDA_PMUNITS(1,0,0,PM_SPACE_KBYTE,0,0) }, }, ++ ++/* mem.numa.util.kreclaimable */ ++ { NULL, ++ { PMDA_PMID(CLUSTER_NUMA_MEMINFO,43), PM_TYPE_U64, NODE_INDOM, PM_SEM_INSTANT, ++ PMDA_PMUNITS(1,0,0,PM_SPACE_KBYTE,0,0) }, }, ++ ++/* mem.numa.util.anonhugepages */ ++ { NULL, ++ { PMDA_PMID(CLUSTER_NUMA_MEMINFO,44), PM_TYPE_U64, NODE_INDOM, PM_SEM_INSTANT, ++ PMDA_PMUNITS(1,0,0,PM_SPACE_KBYTE,0,0) }, }, ++ ++/* mem.numa.util.shmemhugepages */ ++ { NULL, ++ { PMDA_PMID(CLUSTER_NUMA_MEMINFO,45), PM_TYPE_U64, NODE_INDOM, PM_SEM_INSTANT, ++ PMDA_PMUNITS(1,0,0,PM_SPACE_KBYTE,0,0) }, }, ++ ++/* mem.numa.util.shemempmdmapped */ ++ { NULL, ++ { PMDA_PMID(CLUSTER_NUMA_MEMINFO,46), PM_TYPE_U64, NODE_INDOM, PM_SEM_INSTANT, ++ PMDA_PMUNITS(1,0,0,PM_SPACE_KBYTE,0,0) }, }, ++ ++/* mem.numa.util.filehugepages */ ++ { NULL, ++ { PMDA_PMID(CLUSTER_NUMA_MEMINFO,47), PM_TYPE_U64, NODE_INDOM, PM_SEM_INSTANT, ++ PMDA_PMUNITS(1,0,0,PM_SPACE_KBYTE,0,0) }, }, ++ ++/* mem.numa.util.filepmdmapped */ ++ { NULL, ++ { PMDA_PMID(CLUSTER_NUMA_MEMINFO,48), PM_TYPE_U64, NODE_INDOM, PM_SEM_INSTANT, ++ PMDA_PMUNITS(1,0,0,PM_SPACE_KBYTE,0,0) }, }, ++ ++ + /* swap.length */ + { NULL, + { PMDA_PMID(CLUSTER_MEMINFO,6), PM_TYPE_U64, PM_INDOM_NULL, PM_SEM_INSTANT, +@@ -9952,7 +9988,27 @@ linux_fetchCallBack(pmdaMetric *mdesc, unsigned int inst, pmAtomValue *atom) + sts = linux_table_lookup("HugePages_Surp:", np->meminfo, &atom->ull); + atom->ull *= (proc_meminfo.Hugepagesize << 10); + break; +- ++ case 42: /* mem.numa.util.swapCached */ ++ sts = linux_table_lookup("SwapCached:", np->meminfo, &atom->ull); ++ break; ++ case 43: /* mem.numa.util.kreclaimable */ ++ sts = linux_table_lookup("KReclaimable:", np->meminfo, &atom->ull); ++ break; ++ case 44: /* mem.numa.util.anonhugepages */ ++ sts = linux_table_lookup("AnonHugePages:", np->meminfo, &atom->ull); ++ break; ++ case 45: /* mem.numa.util.shmemhugepages */ ++ sts = linux_table_lookup("ShmemHugePages:", np->meminfo, &atom->ull); ++ break; ++ case 46: /* mem.numa.util.shmempmdmapped */ ++ sts = linux_table_lookup("ShmemPmdMapped:", np->meminfo, &atom->ull); ++ break; ++ case 47: /* mem.numa.util.filehugepages */ ++ sts = linux_table_lookup("FileHugePages:", np->meminfo, &atom->ull); ++ break; ++ case 48: /* mem.numa.util.filepmdmapped */ ++ sts = linux_table_lookup("FilePmdMapped:", np->meminfo, &atom->ull); ++ break; + default: + return PM_ERR_PMID; + } +diff --git a/src/pmdas/linux/root_linux b/src/pmdas/linux/root_linux +index 1add9a43cf..054b77b67d 100644 +--- a/src/pmdas/linux/root_linux ++++ b/src/pmdas/linux/root_linux +@@ -793,6 +793,13 @@ mem.numa.util { + hugepagesTotalBytes 60:36:39 + hugepagesFreeBytes 60:36:40 + hugepagesSurpBytes 60:36:41 ++ swapCached 60:36:42 ++ kreclaimable 60:36:43 ++ anonhugepages 60:36:44 ++ shmemhugepages 60:36:45 ++ shmempmdmapped 60:36:46 ++ filehugepages 60:36:47 ++ filepmdmapped 60:36:48 + } + + mem.numa.alloc { diff --git a/SOURCES/1025-add-numastat-support-for-mn-options.patch b/SOURCES/1025-add-numastat-support-for-mn-options.patch new file mode 100644 index 0000000..2146abf --- /dev/null +++ b/SOURCES/1025-add-numastat-support-for-mn-options.patch @@ -0,0 +1,495 @@ +From b09b0435b4fafd56a5930de2adeeea4c7f45ea57 Mon Sep 17 00:00:00 2001 +From: Sourav Sharma +Date: Wed, 8 Oct 2025 13:17:18 +0530 +Subject: [PATCH] Modifies pcp numastat tool with pmcc metric group printer Add + support for -m and -n options in pcp numastat tool like numastat Provides + meminfo data per node + +Orabug: 38380185 + +Cherry-pick-commit: https://github.com/performancecopilot/pcp/commit/e4d513fd503cd3f0e7a2ccab0e0f069acf872427 + +Signed-off-by: Sourav Sharma + +--- + src/pcp/numastat/pcp-numastat.1 | 8 +- + src/pcp/numastat/pcp-numastat.py | 414 +++++++++++++++------ + 2 files changed, 422 insertions(+), 1 deletions(-) + +diff --git a/src/pcp/numastat/pcp-numastat.1 b/src/pcp/numastat/pcp-numastat.1 +index d9165ea86e..65910a4877 100644 +--- a/src/pcp/numastat/pcp-numastat.1 ++++ b/src/pcp/numastat/pcp-numastat.1 +@@ -18,7 +18,7 @@ + \f3pcp-numastat\f1 \- report on NUMA memory allocation + .SH SYNOPSIS + \f3pcp\f1 [\f2pcp\ options\f1] \f3numastat\f1 +-[\f3\-Vw?\f1] ++[\fB-V\fR] [\fB-w\fR \fIwidth\fR] [\fB-m\fR][-n\fR] [\fB-?\fR] + .SH DESCRIPTION + .B pcp-numastat + displays NUMA allocation statistics from the kernel memory +@@ -69,6 +69,12 @@ Display the current version of the command. + Limit display to + .IR width . + .TP ++\fB-m\fR, \fB--meminfo\fR ++Display meminfo-like system-wide memory usage. ++.TP ++\fB-n\fR, \fB--numastat\fR ++Display the numastat statistics info. ++.TP + \fB\-?\fR, \fB\-\-help\fR + Display usage message and exit. + .SH NOTES +diff --git a/src/pcp/numastat/pcp-numastat.py b/src/pcp/numastat/pcp-numastat.py +index 46c2fcb97d..2a044c9bbd 100755 +--- a/src/pcp/numastat/pcp-numastat.py ++++ b/src/pcp/numastat/pcp-numastat.py +@@ -17,150 +17,328 @@ + """ Display NUMA memory allocation statistucs """ + + import os ++import signal + import sys ++import time ++ + from pcp import pmapi +-from cpmapi import PM_TYPE_U64, PM_CONTEXT_ARCHIVE ++from pcp import pmcc ++from cpmapi import PM_CONTEXT_ARCHIVE + + if sys.version >= '3': + long = int # python2 to python3 portability (no long() in python3) + xrange = range # more back-compat (xrange() is range() in python3) + +-class NUMAStat(object): +- """ Gives a short summary of per-node NUMA memory information. ++NUMA_METRICS = [ ++ "mem.numa.alloc.hit", ++ "mem.numa.alloc.miss", ++ "mem.numa.alloc.foreign", ++ "mem.numa.alloc.interleave_hit", ++ "mem.numa.alloc.local_node", ++ "mem.numa.alloc.other_node", ++] + +- Knows about some of the default PCP arguments - can function +- using remote hosts or historical data, using the timezone of +- the metric source, at an offset within an archive, and so on. +- """ ++MEM_METRICS = [ ++ "mem.numa.util.total", ++ "mem.numa.util.free", ++ "mem.numa.util.used", ++ "mem.numa.util.active", ++ "mem.numa.util.inactive", ++ "mem.numa.util.active_anon", ++ "mem.numa.util.inactive_anon", ++ "mem.numa.util.active_file", ++ "mem.numa.util.inactive_file", ++ "mem.numa.util.unevictable", ++ "mem.numa.util.mlocked", ++ "mem.numa.util.dirty", ++ "mem.numa.util.writeback", ++ "mem.numa.util.filePages", ++ "mem.numa.util.mapped", ++ "mem.numa.util.anonpages", ++ "mem.numa.util.shmem", ++ "mem.numa.util.kernelStack", ++ "mem.numa.util.pageTables", ++ "mem.numa.util.NFS_Unstable", ++ "mem.numa.util.bounce", ++ "mem.numa.util.writebackTmp", ++ "mem.numa.util.filehugepages", ++ "mem.numa.util.filepmdmapped", ++ "mem.numa.util.slab", ++ "mem.numa.util.slabReclaimable", ++ "mem.numa.util.slabUnreclaimable", ++ "mem.numa.util.anonhugepages", ++ "mem.numa.util.shmemhugepages", ++ "mem.numa.util.shmempmdmapped", ++ "mem.numa.util.hugepagesTotal", ++ "mem.numa.util.hugepagesFree", ++ "mem.numa.util.hugepagesSurp", ++ "mem.numa.util.swapCached", ++ "mem.numa.util.kreclaimable", ++] + +- def __init__(self): +- """ Construct object - prepare for command line handling """ +- self.opts = self.options() +- self.context = None +- self.width = 0 ++SYS_METRICS = [ ++ 'kernel.uname.nodename', ++ 'kernel.uname.release', ++ 'kernel.uname.sysname', ++ 'kernel.uname.machine', ++ 'hinv.ncpu', ++] ++ ++ALL_METRICS = NUMA_METRICS + MEM_METRICS + +- def resize(self): ++def prefix(metric): ++ last_part = metric.split('.')[-1] ++ result = last_part[0].upper() + last_part[1:] ++ return result ++ ++class MetricRepository: ++ def __init__(self, group): ++ self.group = group ++ self.current_cached_values = {} ++ self.previous_cached_values = {} ++ ++ def _fetch_current_values(self, metric, instance): ++ if instance is not None: ++ return dict( ++ map(lambda x: (x[0].inst, x[2]), self.group[metric].netValues) ++ ) ++ else: ++ if self.group[metric].netValues == []: ++ return None ++ else: ++ return self.group[metric].netValues[0][2] ++ def current_values(self, metric_name): ++ if self.group.get(metric_name, None) is None: ++ return None ++ if self.current_cached_values.get(metric_name, None) is None: ++ self.current_cached_values[ ++ metric_name ++ ] = self._fetch_current_values(metric_name, True) ++ return self.current_cached_values.get(metric_name, None) ++ ++class NUMAStat: ++ ++ def __init__(self, group): ++ self.group = group ++ self.repo = MetricRepository(group) ++ ++ def resize(self, width): + """ Find a suitable display width limit """ +- if self.width == 0: ++ if width == 0: + if not sys.stdout.isatty(): +- self.width = 1000000000 # mimic numastat(1) here ++ width = 1000000000 # mimic numastat(1) here + else: +- # popen() is SAFE, command is a literal string ++ # popen() is SAFE, command is a literal string + (_, width) = os.popen('stty size', 'r').read().split() +- self.width = int(width) +- self.width = int(os.getenv('NUMASTAT_WIDTH', str(self.width))) +- self.width = max(self.width, 32) ++ width = int(width) ++ width = int(os.getenv('NUMASTAT_WIDTH', str(width))) ++ return max(width, 32) + +- def option(self, opt, optarg, index): +- """ Perform setup for an individual command line option """ +- if opt == 'w': +- self.width = int(optarg) ++ def __format_table(self, width, nodes, data): ++ null_output = False ++ if not nodes: ++ null_output = True ++ nodes = [(0, 'Node ')] + +- def options(self): +- """ Setup default command line argument option handling """ +- opts = pmapi.pmOptions() +- opts.pmSetOptionCallback(self.option) +- opts.pmSetShortOptions("w:V?") +- opts.pmSetLongOptionHeader("Options") +- opts.pmSetLongOption("width", 1, 'w', "N", "limit the display width") +- opts.pmSetLongOptionVersion() +- opts.pmSetLongOptionHelp() +- return opts +- +- def extract(self, descs, insts, result): +- """ Extract the set of metric values from a given pmResult """ +- values = [[]] +- for metrics in xrange(len(descs)): +- values.append([]) +- for nodes in xrange(len(insts)): +- if result.contents.get_numval(metrics) > 0: +- atom = self.context.pmExtractValue( +- result.contents.get_valfmt(metrics), +- result.contents.get_vlist(metrics, nodes), +- descs[metrics].contents.type, PM_TYPE_U64) +- values[metrics].append(long(atom.ull)) +- else: +- values[metrics].append(long(0)) +- return values +- +- def execute(self): +- """ Using a PMAPI context (could be either host or archive), +- fetch and report per-node values related to NUMA memory. +- """ +- metrics = ('mem.numa.alloc.hit', 'mem.numa.alloc.miss', +- 'mem.numa.alloc.foreign', 'mem.numa.alloc.interleave_hit', +- 'mem.numa.alloc.local_node', 'mem.numa.alloc.other_node') +- +- pmids = self.context.pmLookupName(metrics) +- descs = self.context.pmLookupDescs(pmids) +- if self.context.type == PM_CONTEXT_ARCHIVE: +- (insts, nodes) = self.context.pmGetInDomArchive(descs[0]) ++ if "numastat" in data: ++ metrics = NUMA_METRICS ++ title = "NUMA memory allocation statistics (pages)" + else: +- (insts, nodes) = self.context.pmGetInDom(descs[0]) +- result = self.context.pmFetch(pmids) +- values = self.extract(descs, insts, result) +- self.context.pmFreeResult(result) +- self.report(metrics, nodes, values) +- +- def report(self, metrics, nodes, values): +- """ Given per-node metric names and values, dump 'em like numastat(1) +- Nodes is a list of strings, values is a list of lists of values. +- """ +- columns = len(nodes) * 16 +- if columns == 0: +- print("No NUMA nodes found, exiting") +- sys.exit(1) +- self.resize() +- maxnodes = int((self.width - 16) / 16) ++ metrics = MEM_METRICS ++ title = "Per-node system memory usage (KB)" ++ ++ total_w = max(42, int(width)) ++ print(title[:total_w]) ++ ++ width = self.resize(width) ++ maxnodes = int((width - 16) / 16) + if maxnodes > len(nodes): # just an initial header suffices +- header = '%-16s' % '' +- for node in nodes: +- header += '%16s' % node ++ header = '%30s' % '' ++ for _, node in nodes: ++ header += '%-12s' % node + print(header) +- for index in xrange(len(metrics)): +- title = self.prefix(metrics[index]) +- self.metric(title, nodes, values[index], maxnodes) +- +- def metric(self, prefix, nodes, values, maxnodes): +- """ Given one metric and its per-node values, produce one or more +- lines of output with the values, each line node-name prefixed +- and with a new node header for each. +- """ +- done = 0 +- while done < len(nodes): +- header = '%-16s' % '' +- window = '%-16s' % prefix +- for index in xrange(maxnodes): +- current = done + index +- if current >= len(nodes): +- break +- header += '%16s' % (nodes[current]) +- window += '%16d' % (values[current]) +- if done > maxnodes or maxnodes <= len(nodes): +- print('%s\n%s' % (header, window)) +- else: +- print('%s' % window) +- done += maxnodes + +- def prefix(self, metric): +- """ Transform the PCP metric names into the reported sub-headings """ +- title = metric[15:] +- if '_' not in title: +- title = 'numa_' + title +- return title ++ for m in metrics: ++ if not null_output: ++ vals = self.repo.current_values(m) ++ done = 0 # reset for each metric ++ ++ # Loop through nodes in chunks of 'maxnodes' ++ while done < len(nodes): ++ header = '%-30s' % '' ++ window = '%-20s : ' % prefix(m) ++ ++ # Slice the range we'll print in this batch ++ chunk = nodes[done:done + maxnodes] ++ ++ for i, ( _, name) in enumerate(chunk): ++ header += '%-12s' % name ++ if not null_output: ++ window += '%12s' % vals[done + i] ++ else: ++ window += '%12s' % "NA" ++ ++ # Print header once per row group (not every metric) ++ if done > maxnodes or maxnodes <= len(nodes): ++ print('%s\n%s' % (header, window)) ++ else: ++ print('%s' % window) ++ done += maxnodes ++ print() ++ ++ def print_mem(self, width, nodes, data): ++ self.__format_table(width, nodes, data) ++ ++ def print_numa(self, width, nodes, data): ++ self.__format_table(width, nodes, data) ++ ++class NumaStatOption(pmapi.pmOptions): ++ context = None ++ timefmt = "%m/%d/%Y %H:%M:%S" ++ width = 0 ++ mem_out = False ++ numa_out = False ++ ++ def override(self,opt): ++ """ Override standard PCP options to match numastat(1) """ ++ if opt == 'n': ++ return True ++ return False ++ ++ def __init__(self): ++ pmapi.pmOptions.__init__(self) ++ self.pmSetShortOptions("w:mV?:n") ++ self.pmSetOptionCallback(self.extraOptions) ++ self.pmSetOverrideCallback(self.override) ++ self.pmSetLongOptionHeader("Numastat options") ++ self.pmSetLongOption("width", 1, 'w', "n", "limit the display width") ++ # Map long options to our non-conflicting short letters ++ self.pmSetLongOption("meminfo", 0, 'm', "", "show meminfo-like system-wide memory usage") ++ self.pmSetLongOption("numastat", 0, 'n', "", "show the numastat statistics info") ++ self.pmSetLongOptionVersion() ++ self.pmSetLongOptionHelp() ++ ++ def extraOptions(self, opt, optarg, index): ++ if opt == 'w': ++ self.width = int(optarg) ++ elif opt == "m": ++ self.mem_out = True ++ elif opt == "n": ++ self.numa_out = True ++ elif opt == "V": ++ pass ++ else: ++ raise pmapi.pmUsageErr() ++ return True ++ ++ def checkoptions(self): ++ if (not self.mem_out) and (not self.numa_out) and (self.width == 0): ++ self.numa_out = True ++ if self.width < 0: ++ return False ++ return True + +- def connect(self): +- """ Establish a PMAPI context to archive, host or local, via args """ +- self.context = pmapi.pmContext.fromOptions(self.opts, sys.argv) ++class NumaStatReport(pmcc.MetricGroupPrinter): ++ machine_info_count = 0 ++ ++ def __init__(self, options): ++ self.options = options ++ self.timestamp = None ++ ++ def __get_timestamp(self, group): ++ ts = group.contextCache.pmLocaltime(int(group.timestamp)) ++ self.timestamp = time.strftime(NumaStatOption.timefmt, ts.struct_time()) ++ return self.timestamp ++ ++ def __get_ncpu(self, group): ++ return group['hinv.ncpu'].netValues[0][2] ++ ++ def print_machine_info(self,group, context): ++ timestamp = context.pmLocaltime(group.timestamp.tv_sec) ++ # Please check strftime(3) for different formatting options. ++ # Also check TZ and LC_TIME environment variables for more ++ # information on how to override the default formatting of ++ # the date display in the header ++ time_string = time.strftime("%x", timestamp.struct_time()) ++ header_string = '' ++ header_string += group['kernel.uname.sysname'].netValues[0][2] + ' ' ++ header_string += group['kernel.uname.release'].netValues[0][2] + ' ' ++ header_string += '(' + group['kernel.uname.nodename'].netValues[0][2] + ') ' ++ header_string += time_string + ' ' ++ header_string += group['kernel.uname.machine'].netValues[0][2] + ' ' ++ print("%s (%s CPU)" % (header_string, self.__get_ncpu(group))) ++ ++ def __discover_nodes(self, group, name): ++ # Build list of online nodes (instance id, instance name) ++ nodes = [] ++ try: ++ for ent in group[name].netValues: ++ inst_id = ent[0].inst ++ inst_name = ent[1] # usually "node0", "node1", ... ++ online = int(ent[2]) != 0 ++ if online: ++ nodes.append((inst_id, inst_name)) ++ except Exception: ++ pass ++ # Sort by instance id (node number) ++ nodes.sort(key=lambda t: t[0]) ++ return nodes ++ ++ def report(self, manager): ++ # Print in a stable order ++ group = manager["sys_info"] ++ try: ++ if not self.machine_info_count: ++ self.print_machine_info(group, manager) ++ self.machine_info_count = 1 ++ except IndexError: ++ return ++ ++ output_numa = ( ++ self.options.numa_out ++ or (not self.options.mem_out and not self.options.numa_out) ++ ) ++ output_mem = self.options.mem_out ++ group = manager["numastat"] ++ nodes = self.__discover_nodes(group, "mem.numa.util.total") ++ timestamp = self.__get_timestamp(group) ++ print("%-20s : %s"%("Timestamp", timestamp)) ++ if output_mem: ++ NUMAStat(group).print_mem(self.options.width, nodes, "meminfo") ++ if output_numa: ++ NUMAStat(group).print_numa(self.options.width, nodes, "numastat") ++ ++ if ( ++ NumaStatOption.context is not PM_CONTEXT_ARCHIVE ++ and self.options.pmGetOptionSamples() is None ++ ): ++ sys.exit(0) + + if __name__ == '__main__': + try: +- NUMASTAT = NUMAStat() +- NUMASTAT.connect() +- NUMASTAT.execute() ++ opts = NumaStatOption() ++ mngr = pmcc.MetricGroupManager.builder(opts, sys.argv) ++ if not opts.checkoptions(): ++ print("Invalid options from command line") ++ raise pmapi.pmUsageErr() ++ NumaStatOption.context = mngr.type ++ ++ missing = mngr.checkMissingMetrics(ALL_METRICS) ++ if missing is not None: ++ sys.stderr.write('Error: not all required metrics are available\nMissing: %s\n' % (missing)) ++ sys.exit(1) ++ ++ mngr["numastat"] = ALL_METRICS ++ mngr["sys_info"] = SYS_METRICS ++ mngr.printer = NumaStatReport(opts) ++ sts = mngr.run() ++ sys.exit(sts) ++ except IOError: ++ signal.signal(signal.SIGPIPE, signal.SIG_DFL) + except pmapi.pmErr as error: +- print("%s: %s" % (error.progname(), error.message())) ++ sys.stderr.write("%s %s\n" % (error.progname(), error.message())) + except pmapi.pmUsageErr as usage: + usage.message() ++ sys.exit(1) + except KeyboardInterrupt: + pass diff --git a/SOURCES/1026-Fixes-higepagesize-metric-value-from-bytes-to-KB.patch b/SOURCES/1026-Fixes-higepagesize-metric-value-from-bytes-to-KB.patch new file mode 100644 index 0000000..00205d4 --- /dev/null +++ b/SOURCES/1026-Fixes-higepagesize-metric-value-from-bytes-to-KB.patch @@ -0,0 +1,45 @@ +From d2e92db5d6ee2a07e52ff72da471976aafaeb7ec Mon Sep 17 00:00:00 2001 +From: Sourav Sharma +Date: Fri, 10 Oct 2025 16:39:51 +0530 +Subject: [PATCH] Fixes higepagesize metric value from bytes to KB as per + /proc/meminfo + +[sagar@vbox ~]$ pcp meminfo | grep Hugepagesize ; cat /proc/meminfo | grep Hugepagesize +Hugepagesize : 2097152 kB +Hugepagesize: 2048 kB + +Cherry-pick-commit: https://github.com/performancecopilot/pcp/pull/2371/commits/84bf35c442cedab82bdd5d71da6cca21cbf628db + +Orabug: 38531609 + +Signed-off-by: Sourav Sharma +--- + src/pcp/meminfo/pcp-meminfo.py | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/pcp/meminfo/pcp-meminfo.py b/src/pcp/meminfo/pcp-meminfo.py +index 8492859..f956910 100755 +--- a/src/pcp/meminfo/pcp-meminfo.py ++++ b/src/pcp/meminfo/pcp-meminfo.py +@@ -168,6 +168,9 @@ class MeminfoReport(pmcc.MetricGroupPrinter): + units = "" + if METRICS_DESC[idx][-6:] == "_NO_kb": + metric_name = METRICS_DESC[idx][:-6] ++ elif METRICS_DESC[idx] == "Hugepagesize": ++ metric_name = METRICS_DESC[idx] ++ units = "B" + else: + metric_name = METRICS_DESC[idx] + units = "kB" +@@ -203,6 +206,9 @@ class MeminfoReport(pmcc.MetricGroupPrinter): + continue + + metric_name, units = self.getMetricName(idx) ++ if units == "B": ++ val = int(val / 1024) ++ units = "kB" + print("%-17s : %s %s"%(metric_name, val, units)) + + idx += 1 +-- +2.43.7 diff --git a/SOURCES/1027-xz-default-compression-changed-to-level-3.patch b/SOURCES/1027-xz-default-compression-changed-to-level-3.patch new file mode 100644 index 0000000..7075c0d --- /dev/null +++ b/SOURCES/1027-xz-default-compression-changed-to-level-3.patch @@ -0,0 +1,32 @@ +From 82d8675ebfc244f73314f6a19e171443019a6fbb Mon Sep 17 00:00:00 2001 +From: sagar sagar +Date: Fri, 31 Oct 2025 14:02:13 +0530 +Subject: [OL8 1027/1027] xz default compression changed to level 3 + +to reduce the size of the compressed pcp archives +Orabug: 38592558 +Signed-off-by: sagar sagar +--- + src/pmlogger/pmlogger_daily.sh | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/pmlogger/pmlogger_daily.sh b/src/pmlogger/pmlogger_daily.sh +index db66b1d..27b1550 100755 +--- a/src/pmlogger/pmlogger_daily.sh ++++ b/src/pmlogger/pmlogger_daily.sh +@@ -187,10 +187,10 @@ COMPRESS="" + COMPRESS_CMDLINE="" + if which xz >/dev/null 2>&1 + then +- if xz -0 --block-size=10MiB /dev/null 2>&1 ++ if xz -3 --block-size=10MiB /dev/null 2>&1 + then + # want minimal overheads, -0 is the same as --fast +- COMPRESS_DEFAULT="xz -0 --block-size=10MiB" ++ COMPRESS_DEFAULT="xz -3 --block-size=10MiB" + else + COMPRESS_DEFAULT=xz + fi +-- +2.43.7 + diff --git a/SOURCES/1028-orabug38724884-fix-nfsclient-per-op-parsing.patch b/SOURCES/1028-orabug38724884-fix-nfsclient-per-op-parsing.patch new file mode 100644 index 0000000..b698a7e --- /dev/null +++ b/SOURCES/1028-orabug38724884-fix-nfsclient-per-op-parsing.patch @@ -0,0 +1,38 @@ +From c80dc758eb0eb27fafa0b594d6c2aa1f4c3803fa Mon Sep 17 00:00:00 2001 +From: Sourav Sharma +Date: Wed, 3 Dec 2025 20:40:52 +0530 +Subject: [PATCH] pmdanfsclient: fix regex to correctly parse NFS op stats + +The regex used to match NFS operation statistics in /proc/self/mountstats was + missing a capture group, causing parsing failures when an additional field + was present in newer kernel formats. Updated the regex to include the extra + numeric field so that all opstats lines are parsed correctly. + +Signed-off-by: Sourav Sharma + +Cherry-pick-commit: https://github.com/performancecopilot/pcp/commit/85671f8874d7d4b4e57eb45bfe295de92b95415c + +Orabug: 38724884 + +Signed-off-by: Sourav Sharma + +--- + src/pmdas/nfsclient/pmdanfsclient.python | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/pmdas/nfsclient/pmdanfsclient.python b/src/pmdas/nfsclient/pmdanfsclient.python +index 786d958..f08b93a 100644 +--- a/src/pmdas/nfsclient/pmdanfsclient.python ++++ b/src/pmdas/nfsclient/pmdanfsclient.python +@@ -636,7 +636,7 @@ class NFSCLIENTPMDA(PMDA): + line = STATS.readline() + if line == '': + break +- m = re.match(r'\s*([A-Z_]*): (\d*) (\d*) (\d*) (\d*) (\d*) (\d*) (\d*) (\d*)$', line) ++ m = re.match(r'\s*([A-Z_]*): (\d*) (\d*) (\d*) (\d*) (\d*) (\d*) (\d*) (\d*) (\d*)$', line) + if not m: + break + opname = m.group(1).lower() +-- +2.43.7 + diff --git a/SOURCES/1029-orabug38817091-Introduce-PCP-implementation-of-nfsiostat.patch b/SOURCES/1029-orabug38817091-Introduce-PCP-implementation-of-nfsiostat.patch new file mode 100644 index 0000000..3980aa5 --- /dev/null +++ b/SOURCES/1029-orabug38817091-Introduce-PCP-implementation-of-nfsiostat.patch @@ -0,0 +1,575 @@ +From ca8fbd2a827e3e7caa72331e003f93523c9f5241 Mon Sep 17 00:00:00 2001 +From: Sourav Sharma +Date: Tue, 6 Jan 2026 05:53:08 +0000 +Subject: [PATCH] pcp-nfsiostat: Introduce PCP implementation of nfsiostat + parser + +Cherry-pick-commit: https://github.com/performancecopilot/pcp/commit/c0a0c53b57774dfac0b727e62472fb1ae6065540 + +Orabug: 38817091 + +Signed-off-by: Sourav Sharma +--- + src/pcp/GNUmakefile | 1 + + src/pcp/nfsiostat/GNUmakefile | 43 ++++ + src/pcp/nfsiostat/pcp-nfsiostat.1 | 132 +++++++++++ + src/pcp/nfsiostat/pcp-nfsiostat.py | 346 +++++++++++++++++++++++++++++ + 4 files changed, 522 insertions(+) + create mode 100644 src/pcp/nfsiostat/GNUmakefile + create mode 100644 src/pcp/nfsiostat/pcp-nfsiostat.1 + create mode 100644 src/pcp/nfsiostat/pcp-nfsiostat.py + +diff --git a/src/pcp/GNUmakefile b/src/pcp/GNUmakefile +index da29269..2b74fc0 100644 +--- a/src/pcp/GNUmakefile ++++ b/src/pcp/GNUmakefile +@@ -30,6 +30,7 @@ SUBDIRS = \ + mpstat \ + netstat \ + numastat \ ++ nfsiostat \ + pidstat \ + ps \ + python \ +diff --git a/src/pcp/nfsiostat/GNUmakefile b/src/pcp/nfsiostat/GNUmakefile +new file mode 100644 +index 0000000..d8c5356 +--- /dev/null ++++ b/src/pcp/nfsiostat/GNUmakefile +@@ -0,0 +1,43 @@ ++# ++# Copyright (c) 2023 Oracle and/or its affiliates. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++# This program is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation; either version 2 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++# for more details. ++# ++ ++TOPDIR = ../../.. ++include $(TOPDIR)/src/include/builddefs ++ ++TARGET = pcp-nfsiostat ++SCRIPT = $(TARGET).py ++MAN_SECTION = 1 ++MAN_PAGES = $(TARGET).$(MAN_SECTION) ++MAN_DEST = $(PCP_MAN_DIR)/man$(MAN_SECTION) ++ ++default: $(SCRIPT) $(MAN_PAGES) ++ ++include $(BUILDRULES) ++ ++install: default ++ifeq "$(HAVE_PYTHON)" "true" ++ $(INSTALL) -m 755 $(SCRIPT) $(PCP_BINADM_DIR)/$(TARGET) ++ @$(INSTALL_MAN) ++endif ++ ++default_pcp : default ++ ++install_pcp : install ++ ++check:: $(SCRIPT) ++ $(PYLINT) $^ ++ ++check :: $(MAN_PAGES) ++ $(MANLINT) $^ +diff --git a/src/pcp/nfsiostat/pcp-nfsiostat.1 b/src/pcp/nfsiostat/pcp-nfsiostat.1 +new file mode 100644 +index 0000000..b297285 +--- /dev/null ++++ b/src/pcp/nfsiostat/pcp-nfsiostat.1 +@@ -0,0 +1,132 @@ ++'\"! tbl | mmdoc ++'\"macro stdmacro ++.\" ++.\" Man page for pcp-nfsiostat ++.\" Copyright (c) 2023 Oracle and/or its affiliates. ++.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++.\" ++.\" This program is free software; you can redistribute it and/or modify it ++.\" under the terms of the GNU General Public License as published by the ++.\" Free Software Foundation; either version 2 of the License, or (at your ++.\" option) any later version. ++.\" ++.\" This program is distributed in the hope that it will be useful, but ++.\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++.\" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++.\" for more details. ++.\" ++ ++.TH PCP-NFSIOSTAT 1 "PCP" "Performance Co-Pilot" ++ ++.SH NAME ++\f3pcp-nfsiostat\f1 \- Emulate iostat for NFS mount points using /proc/self/mountstats ++ ++.SH SYNOPSIS ++\fBpcp\fP [\fBpcp options\fP] \fBnfsiostat\fP [\fB-s\fP \fBsamples\fP] [\fB-a\fP \fBarchive\fP] [\fB-Z\fP \fB--timezone\fP] [\fB-z\fP \fB--hostzone\fP] [\fB-V\fP \fBVersion\fP] ++ ++.SH DESCRIPTION ++The\fB pcp-nfsiostat \fPcommand reports client-side\fB Network File System (NFS) \fPI/O statistics for each mounted NFS filesystem. For every NFS mountpoint, the output consists of a summary section followed by detailed read and write statistics blocks. These statistics include operation rates, data throughput, latency, retransmissions, queueing delays, and error counts. By default,\fB pcp-nfsiostat \fPmonitors NFS mountpoints on the local host and reports live metrics collected via the \fB PCP NFS PMDA\fP. When an archive is specified, historical metrics are reported instead. ++ ++.SH OUTPUT FORMAT ++Statistics are reported per mounted NFS filesystem using the following layout: ++ ++.nf ++server:/export mounted on /mount/point: ++ ++ ops/s rpc bklog ++ 0.017 0.000 ++ ++read: ops/s kB/s kB/op retrans avg RTT (ms) avg exe (ms) avg queue (ms) errors ++ ... ++ ++write: ops/s kB/s kB/op retrans avg RTT (ms) avg exe (ms) avg queue (ms) errors ++ ... ++.fi ++ ++.SH FIELD DESCRIPTIONS ++.TP ++.B ops/s ++Number of NFS operations performed per second. ++ ++.TP ++.B rpc bklog ++Average number of RPC requests waiting to be transmitted. ++ ++.TP ++.B kB/s ++Kilobytes transferred per second. ++ ++.TP ++.B kB/op ++Average number of kilobytes transferred per operation. ++ ++.TP ++.B retrans ++Number of RPC retransmissions and the retransmission percentage. ++ ++.TP ++.B avg RTT (ms) ++Average round-trip time in milliseconds for RPC requests. ++ ++.TP ++.B avg exe (ms) ++Average execution time in milliseconds spent servicing requests on the server. ++ ++.TP ++.B avg queue (ms) ++Average time in milliseconds spent waiting in the RPC transmission queue. ++ ++.TP ++.B errors ++Number of failed operations and failure percentage. ++ ++.SH OPTIONS ++.TP ++.BR \-a ", " \-\-archive " " I archive ++Fetch NFS I/O statistics from the specified PCP archive. ++ ++.TP ++.BR \-s ", " \-\-samples " " I samples ++Number of samples to collect before exiting. ++ ++.TP ++.BR \-z ", " \-\-hostzone ++Set the reporting timezone to the local timezone of the metrics source. ++ ++.TP ++.BR \-Z ", " \-\-timezone " " I tz ++Set the reporting timezone. ++ ++.TP ++.BR \-V ", " \-\-version ++Display version information and exit. ++ ++.TP ++.BR \-? ", " \-\-help ++Display usage information and exit. ++ ++.SH NOTES ++.B pcp-nfsiostat ++reports client-side NFS statistics collected from the kernel and exposed ++via the PCP NFS PMDA. The output format and metrics are similar to those ++reported by the ++.BR nfsiostat (1) ++tool from the nfs-utils package. ++ ++.SH PCP ENVIRONMENT ++Environment variables with the prefix \fBPCP_\fP are used to parameterize ++the file and directory names used by PCP. ++On each installation, the ++file \fI/etc/pcp.conf\fP contains the local values for these variables. ++The \fB$PCP_CONF\fP variable may be used to specify an alternative ++configuration file, as described in ++.BR pcp.conf (5). ++ ++For environment variables affecting PCP tools, see ++.BR pmGetOptions (3). ++ ++.SH SEE ALSO ++.BR PCPIntro (1), ++.BR pcp (1), ++.BR nfsiostat (1), ++.BR environ (7). +diff --git a/src/pcp/nfsiostat/pcp-nfsiostat.py b/src/pcp/nfsiostat/pcp-nfsiostat.py +new file mode 100644 +index 0000000..0b0376d +--- /dev/null ++++ b/src/pcp/nfsiostat/pcp-nfsiostat.py +@@ -0,0 +1,346 @@ ++#!/usr/bin/pmpython ++# ++# Copyright (c) 2023 Oracle and/or its affiliates. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++# This program is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation; either version 2 of the License, or (at your ++# option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ++# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++# for more details. ++# ++# pylint: disable=bad-whitespace,too-many-lines,bad-continuation ++# pylint: disable=too-many-arguments,too-many-positional-arguments ++# pylint: disable=redefined-outer-name,unnecessary-lambda ++# ++ ++import signal ++import sys ++import time ++from pcp import pmapi, pmcc ++from cpmapi import PM_CONTEXT_ARCHIVE ++ ++SYS_METRICS= ["kernel.uname.sysname","kernel.uname.release", ++ "kernel.uname.nodename","kernel.uname.machine","hinv.ncpu"] ++NFSIOSTAT_METRICS = ["nfsclient.mountpoint","nfsclient.export","nfsclient.age", ++ "nfsclient.xprt.sends","nfsclient.xprt.backlog_u","nfsclient.ops.read.ops", ++ "nfsclient.ops.read.errors","nfsclient.ops.read.execute","nfsclient.ops.read.rtt", ++ "nfsclient.ops.read.queue","nfsclient.ops.read.bytes_recv","nfsclient.ops.read.bytes_sent", ++ "nfsclient.ops.read.ntrans","nfsclient.ops.write.ops","nfsclient.ops.write.errors", ++ "nfsclient.ops.write.execute","nfsclient.ops.write.rtt","nfsclient.ops.write.queue", ++ "nfsclient.ops.write.bytes_recv","nfsclient.ops.write.bytes_sent","nfsclient.ops.write.ntrans"] ++ALL_METRICS = NFSIOSTAT_METRICS + SYS_METRICS ++ ++def adjust_length(name): ++ return name.ljust(25) ++class ReportingMetricRepository: ++ ++ def __init__(self,group): ++ self.group=group ++ self.current_cached_values = {} ++ ++ def __sorted(self,data): ++ return dict(sorted(data.items(), key=lambda item: item[0].lower())) ++ ++ def __fetch_current_value(self,metric): ++ val=dict(map(lambda x: (x[1], x[2]), self.group[metric].netValues)) ++ val=self.__sorted(val) ++ return dict(val) ++ ++ def current_value(self,metric): ++ if not metric in self.group: ++ return None ++ if self.current_cached_values.get(metric) is None: ++ first_value=self.__fetch_current_value(metric) ++ self.current_cached_values[metric]=first_value ++ return self.current_cached_values[metric] ++ ++class NfsioStatUtil: ++ def __init__(self,metrics_repository): ++ self.__metric_repository=metrics_repository ++ self.report=ReportingMetricRepository(self.__metric_repository) ++ ++ def mount_point(self): ++ return self.report.current_value('nfsclient.mountpoint') ++ ++ def mount_share(self): ++ return self.report.current_value('nfsclient.export') ++ ++ def mount_share_keys(self): ++ data = self.report.current_value('nfsclient.export') ++ return data.keys() ++ ++ def sample_time(self): ++ return self.report.current_value('nfsclient.age') ++ ++ def xprt_sends(self): ++ return self.report.current_value('nfsclient.xprt.sends') ++ ++ def xprt_backlog(self): ++ return self.report.current_value('nfsclient.xprt.backlog_u') ++ ++ def readops(self): ++ return self.report.current_value('nfsclient.ops.read.ops') ++ ++ def readerrors(self): ++ return self.report.current_value('nfsclient.ops.read.errors') ++ ++ def readexecute(self): ++ return self.report.current_value('nfsclient.ops.read.execute') ++ ++ def readrtt(self): ++ return self.report.current_value('nfsclient.ops.read.rtt') ++ ++ def readqueue(self): ++ return self.report.current_value('nfsclient.ops.read.queue') ++ ++ def readbytesrecv(self): ++ return self.report.current_value('nfsclient.ops.read.bytes_recv') ++ ++ def readbytessent(self): ++ return self.report.current_value('nfsclient.ops.read.bytes_sent') ++ ++ def readntrans(self): ++ return self.report.current_value('nfsclient.ops.read.ntrans') ++ ++ def writeops(self): ++ return self.report.current_value('nfsclient.ops.write.ops') ++ ++ def writeerrors(self): ++ return self.report.current_value('nfsclient.ops.write.errors') ++ ++ def writeexecute(self): ++ return self.report.current_value('nfsclient.ops.write.execute') ++ ++ def writertt(self): ++ return self.report.current_value('nfsclient.ops.write.rtt') ++ ++ def writequeue(self): ++ return self.report.current_value('nfsclient.ops.write.queue') ++ ++ def writebytesrecv(self): ++ return self.report.current_value('nfsclient.ops.write.bytes_recv') ++ ++ def writebytessent(self): ++ return self.report.current_value('nfsclient.ops.write.bytes_sent') ++ ++ def writentrans(self): ++ return self.report.current_value('nfsclient.ops.write.ntrans') ++ ++class NfsiostatReport(pmcc.MetricGroupPrinter): ++ def __init__(self,opts,group): ++ self.opts = opts ++ self.group = group ++ self.samples = opts.samples ++ self.context = opts.context ++ ++ def __get_ncpu(self, group): ++ return group['hinv.ncpu'].netValues[0][2] ++ ++ def __print_machine_info(self, context): ++ timestamp = self.group.pmLocaltime(context.timestamp.tv_sec) ++ # Please check strftime(3) for different formatting options. ++ # Also check TZ and LC_TIME environment variables for more ++ # information on how to override the default formatting of ++ # the date display in the header ++ time_string = time.strftime("%m/%d/%Y %H:%M:%S", timestamp.struct_time()) ++ header_string = '' ++ header_string += context['kernel.uname.sysname'].netValues[0][2] + ' ' ++ header_string += context['kernel.uname.release'].netValues[0][2] + ' ' ++ header_string += '(' + context['kernel.uname.nodename'].netValues[0][2] + ') ' ++ header_string += time_string + ' ' ++ header_string += context['kernel.uname.machine'].netValues[0][2] + ' ' ++ print("%s (%s CPU)" % (header_string, self.__get_ncpu(context))) ++ ++ def __print_values(self,timestamp, nfsstatus): ++ n_shares = nfsstatus.mount_share_keys() ++ mountshare = nfsstatus.mount_share() ++ mountpoint = nfsstatus.mount_point() ++ sampletime = nfsstatus.sample_time() ++ sends = nfsstatus.xprt_sends() ++ backlog = nfsstatus.xprt_backlog() ++ readops = nfsstatus.readops() ++ readerrors = nfsstatus.readerrors() ++ readexecute = nfsstatus.readexecute() ++ readrtt = nfsstatus.readrtt() ++ readqueue = nfsstatus.readqueue() ++ readbytesrecv = nfsstatus.readbytesrecv() ++ readbytessent = nfsstatus.readbytessent() ++ readntrans = nfsstatus.readntrans() ++ writeops = nfsstatus.writeops() ++ writeerrors = nfsstatus.writeerrors() ++ writeexecute = nfsstatus.writeexecute() ++ writertt = nfsstatus.writertt() ++ writequeue = nfsstatus.writequeue() ++ writebytesrecv = nfsstatus.writebytesrecv() ++ writebytessent = nfsstatus.writebytessent() ++ writentrans = nfsstatus.writentrans() ++ ++ print("%-18s:%s"%("Timestamp", timestamp)) ++ print() ++ ++ for name in n_shares: ++ # read ++ r_kilobytes = (readbytessent[name] + readbytesrecv[name]) / 1024 ++ if sampletime[name] > 0: ++ ops_per_sample = sends[name] / sampletime[name] ++ ops_per_sample_read = readops[name] / sampletime[name] ++ r_kilobytes_per_sample = r_kilobytes / sampletime[name] ++ else: ++ ops_per_sample = 0.0 ++ ops_per_sample_read = 0.0 ++ r_kilobytes_per_sample = 0.0 ++ ++ r_retrans = readntrans[name] - readops[name] ++ if readops[name] > 0: ++ r_kilobytes_per_op = r_kilobytes / readops[name] ++ r_retrans_percent = (r_retrans * 100) / readops[name] ++ r_rtt_per_op = readrtt[name] / readops[name] ++ r_exe_per_op = readexecute[name] / readops[name] ++ r_queued_for_per_op = readqueue[name] / readops[name] ++ r_errs_percent = (readerrors[name] * 100) / readops[name] ++ else: ++ r_kilobytes_per_op = 0.0 ++ r_retrans_percent = 0.0 ++ r_rtt_per_op = 0.0 ++ r_exe_per_op = 0.0 ++ r_queued_for_per_op = 0.0 ++ r_errs_percent = 0.0 ++ ++ # write ++ w_kilobytes = (writebytessent[name] + writebytesrecv[name]) / 1024 ++ if sampletime[name] > 0: ++ ops_per_sample_write = writeops[name] / sampletime[name] ++ w_kilobytes_per_sample = w_kilobytes / sampletime[name] ++ else: ++ ops_per_sample_write = 0.0 ++ w_kilobytes_per_sample = 0.0 ++ ++ w_retrans = writentrans[name] - writeops[name] ++ if writeops[name] > 0: ++ w_kilobytes_per_op = w_kilobytes / writeops[name] ++ w_retrans_percent = (w_retrans * 100) / writeops[name] ++ w_rtt_per_op = writertt[name] / writeops[name] ++ w_exe_per_op = writeexecute[name] / writeops[name] ++ w_queued_for_per_op = writequeue[name] / writeops[name] ++ w_errs_percent = (writeerrors[name] * 100) / writeops[name] ++ else: ++ w_kilobytes_per_op = 0.0 ++ w_retrans_percent = 0.0 ++ w_rtt_per_op = 0.0 ++ w_exe_per_op = 0.0 ++ w_queued_for_per_op = 0.0 ++ w_errs_percent = 0.0 ++ ++ print(f"{mountshare[name]} mounted on {mountpoint[name]}:") ++ ++ print(f"{'':14}ops/s{'':7}rpc bklog") ++ print(f"{ops_per_sample:19.3f}{backlog[name]:16.3f}") ++ print() ++ print( ++ "read: " ++ "ops/s kB/s kB/op retrans " ++ "avg RTT (ms) avg exe (ms) avg queue (ms) errors" ++ ) ++ print( ++ f"{'':19}" ++ f"{ops_per_sample_read:5.3f}" ++ f"{r_kilobytes_per_sample:12.3f}" ++ f"{r_kilobytes_per_op:13.3f} " ++ f"{int(r_retrans):2d} ({r_retrans_percent:2.1f}%)" ++ f"{r_rtt_per_op:15.3f}" ++ f"{r_exe_per_op:15.3f}" ++ f"{r_queued_for_per_op:17.3f} " ++ f"{int(readerrors[name]):4d} ({r_errs_percent:2.1f}%)" ++ ) ++ ++ print( ++ "write: " ++ "ops/s kB/s kB/op retrans " ++ "avg RTT (ms) avg exe (ms) avg queue (ms) errors" ++ ) ++ ++ print( ++ f"{'':19}" ++ f"{ops_per_sample_write:5.3f}" ++ f"{w_kilobytes_per_sample:12.3f}" ++ f"{w_kilobytes_per_op:13.3f} " ++ f"{int(w_retrans):2d} ({w_retrans_percent:2.1f}%)" ++ f"{w_rtt_per_op:15.3f}" ++ f"{w_exe_per_op:15.3f}" ++ f"{w_queued_for_per_op:17.3f} " ++ f"{int(writeerrors[name]):4d} ({w_errs_percent:2.1f}%)" ++ ) ++ print() ++ ++ def print_report(self,group,timestamp, manager_nfsiostat): ++ def __print_nfs_status(): ++ nfsstatus = NfsioStatUtil(manager_nfsiostat) ++ if nfsstatus.mount_share(): ++ try: ++ self.__print_machine_info(group) ++ self.__print_values(timestamp, nfsstatus) ++ except IndexError: ++ print("Incorrect machine info due to some missing metrics") ++ return ++ else: ++ pass ++ ++ if self.context != PM_CONTEXT_ARCHIVE and self.samples is None: ++ __print_nfs_status() ++ sys.exit(0) ++ elif self.context == PM_CONTEXT_ARCHIVE and self.samples is None: ++ __print_nfs_status() ++ elif self.samples >=1: ++ __print_nfs_status() ++ self.samples-=1 ++ else: ++ pass ++ ++ def report(self, manager): ++ group = manager["sysinfo"] ++ self.samples = self.opts.pmGetOptionSamples() ++ t_s = group.contextCache.pmLocaltime(int(group.timestamp)) ++ timestamp = time.strftime(NfsiostatOptions.timefmt, t_s.struct_time()) ++ self.print_report(group,timestamp,manager['nfsiostat']) ++ ++class NfsiostatOptions(pmapi.pmOptions): ++ timefmt = "%m/%d/%Y %H:%M:%S" ++ def __init__(self): ++ pmapi.pmOptions.__init__(self, "a:s:Z:zV?") ++ self.pmSetLongOptionHeader("General options") ++ self.pmSetLongOptionHostZone() ++ self.pmSetLongOptionTimeZone() ++ self.pmSetLongOptionHelp() ++ self.pmSetLongOptionSamples() ++ self.pmSetLongOptionVersion() ++ self.samples=None ++ self.context=None ++ ++if __name__ == '__main__': ++ try: ++ opts = NfsiostatOptions() ++ mngr = pmcc.MetricGroupManager.builder(opts,sys.argv) ++ opts.context=mngr.type ++ missing = mngr.checkMissingMetrics(ALL_METRICS) ++ if missing is not None: ++ sys.stderr.write('Error: not all required metrics are available\nMissing %s\n' % missing) ++ sys.exit(1) ++ mngr["nfsiostat"] = ALL_METRICS ++ mngr["sysinfo"] = SYS_METRICS ++ mngr.printer = NfsiostatReport(opts,mngr) ++ sts = mngr.run() ++ sys.exit(sts) ++ except pmapi.pmErr as error: ++ sys.stderr.write('%s\n' % (error.message())) ++ except pmapi.pmUsageErr as usage: ++ usage.message() ++ sys.exit(1) ++ except IOError: ++ signal.signal(signal.SIGPIPE, signal.SIG_DFL) ++ except KeyboardInterrupt: ++ pass +-- +2.43.7 + diff --git a/SOURCES/1030-pcp-ps-implement-sort-option-to-allow-sorting-by-cpu.patch b/SOURCES/1030-pcp-ps-implement-sort-option-to-allow-sorting-by-cpu.patch new file mode 100644 index 0000000..d8458a2 --- /dev/null +++ b/SOURCES/1030-pcp-ps-implement-sort-option-to-allow-sorting-by-cpu.patch @@ -0,0 +1,1278 @@ +From 54644489bd8884d0091a9551e76c29794d5bc896 Mon Sep 17 00:00:00 2001 +From: sagar sagar +Date: Tue, 3 Mar 2026 16:07:13 +0530 +Subject: [PATCH OL8 1030/1032] pcp-ps implement --sort option to allow sorting + by %cpu, %mem + +- Implements the '--sort' option in 'pcp ps' include sorting by '%cpu' and '%mem'. + +upstream ref:- https://github.com/performancecopilot/pcp/pull/2436/ + +[Orabug: 38991685] +Signed-off-by: sagar sagar +--- + src/pcp/ps/pcp-ps.1 | 20 +- + src/pcp/ps/pcp-ps.py | 920 +++++++++++++++++++++++++------------------ + 2 files changed, 557 insertions(+), 383 deletions(-) + +diff --git a/src/pcp/ps/pcp-ps.1 b/src/pcp/ps/pcp-ps.1 +index 8c44e67..42d1d5f 100755 +--- a/src/pcp/ps/pcp-ps.1 ++++ b/src/pcp/ps/pcp-ps.1 +@@ -1,5 +1,4 @@ +-'\"! tbl | mmdoc +-'\"macro stdmacro ++'\" t + .\" + .\" Copyright (c) 2022 Oracle and/or its affiliates. + .\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +@@ -28,6 +27,8 @@ + [\f3\-P\f1 \f2pid1,pid2..\f1] + [\f3\-p\f1 \f2pid1,pid2..\f1] + [\f3\-o\f1 \f2col1,col2... or ALL\f1] ++[\f3\-O\f1 \f2%mem,%cpu\f1] ++[\f3\-d\f1] + [\f3\-Z\f1 \f2timezone\f1] + [\f3\-z\f1] + [\f3\-?\f1] +@@ -244,6 +245,21 @@ WCHAN and COMMAND. + T} + .TE + .TP ++.BR \-O\ \fI%mem,%cpu\fR ", " \fB\-\-sort=\fI%mem,%cpu\fR ++Sort the output processes by the specified column. ++This sorting can now be used in conjunction with the ++.BR \-o ++option to sort on any user-specified output column (e.g., -o pid,%mem -O %mem). ++The column given to -O/--sort must appear in the -o list. ++If the sorting column is missing from the output format, an error will be shown. ++(In case of an unsupported or missing field name, sorting will default to %cpu.) ++.TP ++.BR \-d\, ++debug mode ++.br ++Enable debug mode, which will cause debug messages to be written to ++stdout. ++.TP + .BR \-Z \ \fItimezone\fR ", "\fB\-\-timezone=\fItimezone\fR + By default, + .B pcp-ps +diff --git a/src/pcp/ps/pcp-ps.py b/src/pcp/ps/pcp-ps.py +index 94a428f..5b80589 100755 +--- a/src/pcp/ps/pcp-ps.py ++++ b/src/pcp/ps/pcp-ps.py +@@ -59,107 +59,86 @@ class NoneHandlingPrinterDecorator: + class ReportingMetricRepository: + def __init__(self, group): + self.group = group +- self.current_cached_values = {} +- self.previous_cached_values = {} +- +- def __fetch_current_values(self, metric, instance): +- if instance: +- return dict(map(lambda x: (x[0].inst, x[2]), self.group[metric].netValues)) +- else: +- return self.group[metric].netValues[0][2] +- +- def __fetch_previous_values(self, metric, instance): +- if instance: +- return dict(map(lambda x: (x[0].inst, x[2]), self.group[metric].netPrevValues)) +- else: +- return self.group[metric].netPrevValues[0][2] +- +- def current_value(self, metric, instance): +- if not metric in self.group: +- return None +- if instance: +- if self.current_cached_values.get(metric, None) is None: +- lst = self.__fetch_current_values(metric, instance) +- self.current_cached_values[metric] = lst +- +- return self.current_cached_values[metric].get(instance, None) +- else: +- if self.current_cached_values.get(metric, None) is None: +- self.current_cached_values[metric] = self.__fetch_current_values(metric, instance) +- return self.current_cached_values.get(metric, None) +- +- def previous_value(self, metric, instance): +- if not metric in self.group: +- return None +- if instance: +- if self.previous_cached_values.get(metric, None) is None: +- lst = self.__fetch_previous_values(metric, instance) +- self.previous_cached_values[metric] = lst +- +- return self.previous_cached_values[metric].get(instance, None) +- else: +- if self.previous_cached_values.get(metric, None) is None: +- self.previous_cached_values[metric] = self.__fetch_previous_values(metric, instance) +- return self.previous_cached_values.get(metric, None) ++ self._current_cache = {} ++ self._previous_cache = {} ++ ++ def _fetch_values(self, metric, use_previous=False): ++ """Fetch values - always returns a dictionary.""" ++ if metric not in self.group: ++ return {} ++ attr = "netPrevValues" if use_previous else "netValues" ++ values = getattr(self.group[metric], attr, []) ++ return {x[0].inst: x[2] for x in values} if values else {} ++ ++ def _get_values_dict(self, metric, use_previous=False): ++ """Get cached dictionary of all values for a metric.""" ++ cache = self._previous_cache if use_previous else self._current_cache ++ if metric not in cache: ++ cache[metric] = self._fetch_values(metric, use_previous) ++ return cache[metric] ++ ++ def current_value(self, metric, instance=None): ++ """Get current value. Returns single value if instance given, else returns dict.""" ++ values_dict = self._get_values_dict(metric, use_previous=False) ++ if instance is not None: ++ return values_dict.get(instance) ++ return values_dict ++ ++ def previous_value(self, metric, instance=None): ++ """Get previous value. Returns single value if instance given, else returns dict.""" ++ values_dict = self._get_values_dict(metric, use_previous=True) ++ if instance is not None: ++ return values_dict.get(instance) ++ return values_dict + + def current_values(self, metric_name): +- if self.group.get(metric_name, None) is None: +- return None +- if self.current_cached_values.get(metric_name, None) is None: +- self.current_cached_values[metric_name] = self.__fetch_current_values(metric_name, True) +- return self.current_cached_values.get(metric_name, None) ++ """Get all current values for a metric (returns dict).""" ++ return self._get_values_dict(metric_name, use_previous=False) + + def previous_values(self, metric_name): +- if self.group.get(metric_name, None) is None: +- return None +- if self.previous_cached_values.get(metric_name, None) is None: +- self.previous_cached_values[metric_name] = self.__fetch_previous_values(metric_name, True) +- return self.previous_cached_values.get(metric_name, None) ++ """Get all previous values for a metric (returns dict).""" ++ return self._get_values_dict(metric_name, use_previous=True) + + + class ProcessFilter: ++ """ ++ Optimized filtering of processes based on user-provided options. ++ Precomputes filter predicates at instantiation to minimize overhead per process, ++ and leverages generator expressions with all() for efficiency. ++ """ + def __init__(self, options): + self.options = options ++ self._predicates = [] ++ flag = getattr(options, "universal_flag", None) ++ # Username filter ++ if flag == "username" and getattr(options, "filtered_process_user", None) is not None: ++ required_user = options.filtered_process_user.strip() ++ self._predicates.append(lambda proc: proc.user_name().strip() == required_user) ++ # PID filter ++ if flag == "pid" and getattr(options, "pid_list", None) is not None: ++ try: ++ pids = set(int(pid) for pid in options.pid_list) ++ self._predicates.append(lambda proc: int(proc.pid()) in pids) ++ except Exception: ++ self._predicates.append(lambda proc: False) ++ # PPID filter ++ if flag == "ppid" and getattr(options, "ppid_list", None) is not None: ++ try: ++ ppids = set(int(ppid) for ppid in options.ppid_list) ++ self._predicates.append(lambda proc: int(proc.ppid()) in ppids) ++ except Exception: ++ self._predicates.append(lambda proc: False) ++ # Command name filter ++ if flag == "command" and getattr(options, "command_list", None) is not None: ++ commands = set(cmd.strip() for cmd in options.command_list if cmd is not None) ++ self._predicates.append(lambda proc: (proc.process_name() or "").strip() in commands) ++ # If no filter flag: no filter ++ if not getattr(options, "filter_flag", False) or not self._predicates: ++ self._predicates.append(lambda proc: True) + + def filter_processes(self, processes): +- return filter(lambda p: self.__predicate(p), processes) +- +- def __predicate(self, process): +- if self.options.filter_flag: +- return bool(self.__matches_process_username(process) +- and self.__matches_process_pid(process) +- and self.__matches_process_name(process) +- and self.__matches_process_ppid(process)) +- else: +- return True +- +- def __matches_process_username(self, process): +- if self.options.username_filter_flag is True and self.options.filtered_process_user is not None: +- return process.user_name().strip() == self.options.filtered_process_user.strip() +- else: +- return True +- +- def __matches_process_pid(self, process): +- if self.options.pid_filter_flag: +- if self.options.pid_list is not None: +- pid = int(process.pid()) +- return bool(pid in self.options.pid_list) +- return True +- +- def __matches_process_ppid(self, process): +- if self.options.ppid_filter_flag: +- if self.options.ppid_list is not None: +- ppid = int(process.ppid()) +- return bool(ppid in self.options.ppid_list) +- return True +- +- def __matches_process_name(self, process): +- name = process.process_name() +- if self.options.command_filter_flag is True and self.options.command_list is not None and name is not None: +- return name.strip() in self.options.command_list +- else: +- return True +- ++ """Yield processes matching all active predicates.""" ++ return (proc for proc in processes if all(pred(proc) for pred in self._predicates)) + + class ProcessStatusUtil: + def __init__(self, instance, manager, delta_time, metrics_repository): +@@ -168,106 +147,88 @@ class ProcessStatusUtil: + self.__delta_time = delta_time + self.__metric_repository = metrics_repository + ++ def __get_value(self, metric, instance=None): ++ return self.__metric_repository.current_value(metric, instance) ++ def __get_previous_value(self, metric, instance=None): ++ return self.__metric_repository.previous_value(metric, instance) ++ + def pid(self): +- data = str(self.__metric_repository.current_value('proc.psinfo.pid', self.instance)) +- if len(str(data)) < 8: +- whitespace = 8 - len(str(data)) +- res = data.ljust(whitespace + len(str(data)), ' ') +- return res +- else: +- return data ++ data = str(self.__get_value('proc.psinfo.pid', self.instance)) ++ return data.ljust(8) if len(data) < 8 else data ++ + + def ppid(self): +- data = str(self.__metric_repository.current_value('proc.psinfo.ppid', self.instance)) +- if len(str(data)) < 8: +- whitespace = 8 - len(str(data)) +- res = data.ljust(whitespace + len(str(data)), ' ') +- return res +- else: +- return data ++ data = str(self.__get_value('proc.psinfo.ppid', self.instance)) ++ return data.ljust(8) if len(data) < 8 else data + + def user_name(self): +- data = self.__metric_repository.current_value('proc.id.uid_nm', self.instance)[:10] +- if len(data) < 10: +- whitespace = 10 - len(data) +- res = data.ljust(whitespace + len(data), ' ') +- return res +- else: ++ data = self.__get_value('proc.id.uid_nm', self.instance) ++ if data is None: + return data ++ return data.ljust(10) if len(data) < 10 else data[:10] + + def process_name(self): +- try: +- data = self.__metric_repository.current_value('proc.psinfo.cmd', self.instance)[:20] +- if len(data) < 20: +- whitespace = 20 - len(data) +- res = data.ljust(whitespace + len(data), ' ') +- return res +- else: +- return data +- except TypeError: +- data = '-' ++ data = self.__get_value('proc.psinfo.cmd', self.instance) ++ if data is None: ++ return '-' ++ return data.ljust(20) if len(data) < 20 else data[:20] ++ ++ def process_name_with_args(self, flag=False): ++ data = self.__get_value('proc.psinfo.psargs', self.instance) ++ if data is None: + return data +- +- def process_name_with_args(self,flag = False): +- if flag is True: +- data = self.__metric_repository.current_value('proc.psinfo.psargs', self.instance) +- else: +- data = self.__metric_repository.current_value('proc.psinfo.psargs', self.instance)[:30] +- if len(data) < 30: +- whitespace = 30 - len(data) +- res = data.ljust(whitespace + len(data), ' ') +- return res ++ max_length = 30 ++ if not flag: ++ return data[:max_length].ljust(max_length) + else: + return data + + def process_name_with_args_last(self): + return self.process_name_with_args(True) + def vsize(self): +- return self.__metric_repository.current_value('proc.psinfo.vsize', self.instance) ++ return self.__get_value('proc.psinfo.vsize', self.instance) + + def rss(self): +- return self.__metric_repository.current_value('proc.psinfo.rss', self.instance) +- ++ return self.__get_value('proc.psinfo.rss', self.instance) + def mem(self): +- total_mem = self.__metric_repository.current_value('mem.physmem', None) +- rss = self.__metric_repository.current_value('proc.psinfo.rss', self.instance) ++ total_mem = self.__get_value('mem.physmem', None) ++ if isinstance(total_mem, dict): ++ total_mem = next(iter(total_mem.values()), None) ++ rss = self.__get_value('proc.psinfo.rss', self.instance) + if total_mem is not None and rss is not None: + return float("%.2f" % (100 * float(rss) / total_mem)) + else: + return None + + def s_name(self): +- return self.__metric_repository.current_value('proc.psinfo.sname', self.instance) ++ return self.__get_value('proc.psinfo.sname', self.instance) + + def cpu_number(self): +- return self.__metric_repository.current_value('proc.psinfo.processor', self.instance) ++ return self.__get_value('proc.psinfo.processor', self.instance) + + def system_percent(self): +- c_systemtime = self.__metric_repository.current_value('proc.psinfo.stime', self.instance) +- p_systemtime = self.__metric_repository.previous_value('proc.psinfo.stime', self.instance) ++ c_systemtime = self.__get_value('proc.psinfo.stime', self.instance) ++ p_systemtime = self.__get_previous_value('proc.psinfo.stime', self.instance) + if c_systemtime is not None and p_systemtime is not None: +- percent_of_time = 100 * float(c_systemtime - p_systemtime) / float(1000 * self.__delta_time) ++ system_time_diff = float(c_systemtime - p_systemtime) ++ delta_time_in_ms = float(1000 * self.__delta_time) ++ percent_of_time = 100 * system_time_diff / delta_time_in_ms + return float("%.2f" % percent_of_time) + else: +- return None ++ return '-' + + def wchan_s(self): +- process = self.__metric_repository.current_value('proc.psinfo.wchan_s', self.instance) +- if process is None: +- process = '-' +- return process +- elif len(process) < 30: +- whitespace = 30 - len(process) +- res = process.ljust(whitespace + len(process), ' ') +- return res +- return process[:30] ++ process = self.__get_value('proc.psinfo.wchan_s', self.instance) ++ if process is None or process == "0" or process == '': ++ return '-' + ' ' * 29 ++ return process.ljust(30) if len(process) < 30 else process[:30] + + def priority(self): +- return self.__metric_repository.current_value('proc.psinfo.priority', self.instance) ++ return self.__get_value('proc.psinfo.priority', self.instance) + + def user_percent(self): +- c_usertime = self.__metric_repository.current_value('proc.psinfo.utime', self.instance) +- p_usertime = self.__metric_repository.previous_value('proc.psinfo.utime', self.instance) ++ c_usertime = self.__get_value('proc.psinfo.utime', self.instance) ++ p_usertime = self.__get_previous_value('proc.psinfo.utime', self.instance) + if c_usertime is not None and p_usertime is not None: + percent_of_time = 100 * float(c_usertime - p_usertime) / float(1000 * self.__delta_time) + return float("%.2f" % percent_of_time) +@@ -275,8 +236,8 @@ class ProcessStatusUtil: + return None + + def guest_percent(self): +- c_guesttime = self.__metric_repository.current_value('proc.psinfo.guest_time', self.instance) +- p_guesttime = self.__metric_repository.previous_value('proc.psinfo.guest_time', self.instance) ++ c_guesttime = self.__get_value('proc.psinfo.guest_time', self.instance) ++ p_guesttime = self.__get_previous_value('proc.psinfo.guest_time', self.instance) + if c_guesttime is not None and p_guesttime is not None: + percent_of_time = 100 * float(c_guesttime - p_guesttime) / float(1000 * self.__delta_time) + return float("%.2f" % percent_of_time) +@@ -290,8 +251,8 @@ class ProcessStatusUtil: + return None + + def stime(self): +- c_systime = self.__metric_repository.current_value('proc.psinfo.stime', self.instance) +- p_systime = self.__metric_repository.previous_value('proc.psinfo.stime', self.instance) ++ c_systime = self.__get_value('proc.psinfo.stime', self.instance) ++ p_systime = self.__get_previous_value('proc.psinfo.stime', self.instance) + # sometimes the previous_value seems to be Nonetype, not sure why + if p_systime is None: # print a '?' here + return '?' +@@ -299,21 +260,28 @@ class ProcessStatusUtil: + return c_systime - p_systime + + def start(self): +- s_time = self.__metric_repository.current_value('proc.psinfo.start_time', self.instance) ++ s_time = self.__get_value('proc.psinfo.start_time', self.instance) + group = self.manager['psstat'] +- kernel_boottime = group['kernel.all.boottime'].netValues[0][2] +- ts = group.contextCache.pmLocaltime(int(kernel_boottime + (s_time / 1000))) +- if group.timestamp.tv_sec - (kernel_boottime + s_time / 1000) >= 24*60*60: +- # started one day or more ago, use MmmDD HH:MM ++ try: ++ kernel_boottime = group['kernel.all.boottime'].netValues[0][2] ++ except (KeyError, IndexError, TypeError, AttributeError): ++ return '?' ++ if s_time is None or kernel_boottime is None: ++ return '?' ++ ts_val = kernel_boottime + (s_time / 1000.0) ++ try: ++ ts = group.contextCache.pmLocaltime(int(ts_val)) ++ except Exception: ++ return '?' ++ if group.timestamp.tv_sec - ts_val >= 24*60*60: + return time.strftime("%b%d %H:%M", ts.struct_time()) + else: +- # started less than one day ago, use HH:MM:SS + return time.strftime("%H:%M:%S", ts.struct_time()) + + + def total_time(self): +- c_usertime = self.__metric_repository.current_value('proc.psinfo.stime', self.instance) +- p_guesttime = self.__metric_repository.previous_value('proc.psinfo.utime', self.instance) ++ c_usertime = self.__get_value('proc.psinfo.stime', self.instance) ++ p_guesttime = self.__get_previous_value('proc.psinfo.utime', self.instance) + timefmt = "%H:%M:%S" + if c_usertime and p_guesttime is not None: + total_time = (c_usertime / 1000) + (p_guesttime / 1000) +@@ -322,29 +290,28 @@ class ProcessStatusUtil: + return time.strftime(timefmt, time.gmtime(total_time)) + + def tty_name(self): +- return self.__metric_repository.current_value('proc.psinfo.ttyname', self.instance) ++ return self.__get_value('proc.psinfo.ttyname', self.instance) + + def user_id(self): +- return self.__metric_repository.current_value('proc.id.uid', self.instance) ++ return self.__get_value('proc.id.uid', self.instance) + + def start_time(self): +- return self.__metric_repository.current_value('proc.psinfo.start_time', self.instance) ++ return self.__get_value('proc.psinfo.start_time', self.instance) + + def func_state(self): +- s_name = self.__metric_repository.current_value('proc.psinfo.sname', self.instance) ++ s_name = self.__get_value('proc.psinfo.sname', self.instance) + if s_name == 'R': +- return 'N/A' ++ return '-' + elif s_name is None: +- return '?' ++ return '-' + else: + return self.wchan_s() + + def policy(self): +- policy_int = self.__metric_repository.current_value('proc.psinfo.policy', self.instance) +- if policy_int is not None and policy_int <= len(SCHED_POLICY): +- # return policy_int ++ policy_int = self.__get_value('proc.psinfo.policy', self.instance) ++ if isinstance(policy_int, int) and 0 <= policy_int < len(SCHED_POLICY): + return SCHED_POLICY[policy_int] +- return None ++ return '?' + + + PIDINFO_PAIR = {"%cpu": ('%CPU', ProcessStatusUtil.system_percent), +@@ -352,16 +319,16 @@ PIDINFO_PAIR = {"%cpu": ('%CPU', ProcessStatusUtil.system_percent), + "start": ("START\t", ProcessStatusUtil.start), + "time": ("TIME\t", ProcessStatusUtil.total_time), + "cls": ("CLS", ProcessStatusUtil.policy), +- "cmd": ("Command\t\t\t", ProcessStatusUtil.process_name), ++ "cmd": ("Command\t\t", ProcessStatusUtil.process_name), + "args": ("Command\t\t\t", ProcessStatusUtil.process_name_with_args), +- "args_last": ("Command\t\t\t", ProcessStatusUtil.process_name_with_args_last), ++ "args_last": ("Command", ProcessStatusUtil.process_name_with_args_last), + "pid": ("PID\t", ProcessStatusUtil.pid), + "ppid": ("PPID\t", ProcessStatusUtil.ppid), + "pri": ("PRI", ProcessStatusUtil.priority), + "state": ("S", ProcessStatusUtil.s_name), + "rss": ("RSS", ProcessStatusUtil.rss), + "rtprio": ("RTPRIO", ProcessStatusUtil.priority), +- "tty": ("TTY\t", ProcessStatusUtil.tty_name), ++ "tty": ("TTY", ProcessStatusUtil.tty_name), + "pname": ("Pname\t\t", ProcessStatusUtil.process_name), + "vsize": ("VSZ", ProcessStatusUtil.vsize), + "uname": ("USER\t", ProcessStatusUtil.user_name), +@@ -375,8 +342,8 @@ class ProcessStatus: + self.__metric_repository = metric_repository + + def get_processes(self, delta_time): +- return map(lambda pid: +- (ProcessStatusUtil(pid, self.__manager, delta_time, self.__metric_repository)), self.__pids()) ++ # Use generator expression for lazy evaluation and reduced memory usage ++ return (ProcessStatusUtil(pid, self.__manager, delta_time, self.__metric_repository) for pid in self.__pids()) + + def __pids(self): + pid_dict = self.__metric_repository.current_values('proc.psinfo.pid') +@@ -396,65 +363,114 @@ class DynamicProcessReporter: + self.processStatOptions.colum_list.index(key) == len(self.processStatOptions.colum_list) - 1 + def print_report(self, timestamp, header_indentation, value_indentation): + +- # when the print count is exhausted exit the program gracefully +- # we can't use break here because it's being called by the run manager +- if self.processStatOptions.context is not PM_CONTEXT_ARCHIVE: +- if self.processStatOptions.print_count == 0: +- sys.exit(0) ++ # Exit logic for non-archive context ++ if self.processStatOptions.context is not PM_CONTEXT_ARCHIVE and self.processStatOptions.print_count == 0: ++ sys.exit(0) ++ ++ # Sorting validations ++ sorting_idx = None ++ if self.processStatOptions.sorting_flag: ++ if self.processStatOptions.filterstate == "ALL": ++ if self.processStatOptions.sorting_order == '%mem': ++ sorting_idx = 7 ++ elif self.processStatOptions.sorting_order == '%cpu': ++ sorting_idx = 8 + else: +- self.processStatOptions.print_count -= 1 +- +- if self.processStatOptions.filterstate is not None: +- self.printer("Timestamp" + header_indentation + +- "USER\t\tPID\t\tPPID\t\tPRI\t%CPU\t%MEM\tVSZ\tRSS\tS\tSTARTED\t\tTIME\t\tWCHAN\t\t\t\tCommand") +- processes = self.process_filter.filter_processes(self.process_report.get_processes(self.delta_time)) ++ sorting_idx = next((idx for idx, key in enumerate(self.processStatOptions.colum_list) ++ if key == self.processStatOptions.sorting_order), ++ None) ++ if sorting_idx is None: ++ raise ValueError("Sorting order not found in output columns") ++ # Adjust for timestamp column ++ sorting_idx += 1 ++ ++ # Always compute process list ONCE ++ processes = self.process_filter.filter_processes( ++ self.process_report.get_processes(self.delta_time) ++ ) ++ ++ output_list = [] ++ header = None ++ ++ # -------- PATH 1: With filterstate -------- # ++ if self.processStatOptions.filterstate == "ALL": ++ header = ( ++ "Timestamp\tUSER\t\tPID\t\tPPID\t\tPRI\t%CPU\t%MEM\tVSZ" ++ "\tRSS\tS\tSTARTED\t\tTIME\t\t" ++ "WCHAN\t\t\t\tCommand" ++ ) ++ ++ # Precompute format string ++ # fmt = ( ++ # "{ts}{indent}{user}\t{pid}\t{ppid}\t{pri}\t{cpu}\t{mem}\t" ++ # "{vsz}\t{rss}\t{s}\t{started}\t{time}\t{wchan}\t{cmd}" ++ # ) + for process in processes: +- total_percent = process.total_percent() +- current_process_pid = process.pid() +- current_process_sname = process.s_name() +- if process.wchan_s() is not None: +- wchan = process.wchan_s() +- else: +- wchan = '-' +- key = (current_process_sname, current_process_pid) +- if key in process_state_info: +- process_state_info[key] = process_state_info[key] + self.delta_time +- else: +- process_state_info[key] = self.delta_time +- process_name = process.process_name_with_args() +- if 7 < len(wchan) < 15: +- self.printer("%s%s%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t\t%s" % +- (timestamp, value_indentation, process.user_name(), process.pid(), process.ppid(), +- process.priority(), total_percent, process.system_percent(), process.vsize(), +- process.rss(), current_process_sname, process.start(), process.total_time(), wchan, +- process_name)) +- elif len(wchan) >= 15: +- self.printer("%s%s%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % +- (timestamp, value_indentation, process.user_name(), process.pid(), process.ppid(), +- process.priority(), total_percent, process.system_percent(), process.vsize(), +- process.rss(), current_process_sname, process.start(), process.total_time(), wchan, +- process_name)) +- else: +- self.printer("%s%s%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t\t\t%s" % +- (timestamp, value_indentation, process.user_name(), process.pid(), process.ppid(), +- process.priority(), total_percent, process.system_percent(), process.vsize(), +- process.rss(), current_process_sname, process.start(), process.total_time(), wchan, +- process_name)) ++ # Maintain state info ++ key = (process.s_name(), process.pid()) ++ process_state_info[key] = process_state_info.get(key, 0) + self.delta_time ++ row = [timestamp] ++ row.extend([ ++ process.user_name(), ++ process.pid(), ++ process.ppid(), ++ process.priority(), ++ process.total_percent(), ++ process.system_percent(), ++ process.vsize(), ++ process.rss(), ++ process.s_name(), ++ process.start(), ++ process.total_time(), ++ process.wchan_s(), ++ process.process_name_with_args_last()[:45] ++ ]) ++ output_list.append( ++ "\t".join( ++ str(x) if x is not None else '' for x in row ++ ) ++ ) ++ ++ # -------- PATH 2: Customized column list -------- # + elif self.processStatOptions.colum_list is not None: +- header = "Timestamp" + '\t' ++ ++ header = "Timestamp\t" + for key in self.processStatOptions.colum_list: + if key in PIDINFO_PAIR: +- header += PIDINFO_PAIR[key][0] + '\t\t' +- print(header) +- processes = self.process_filter.filter_processes(self.process_report.get_processes(self.delta_time)) ++ header += PIDINFO_PAIR[key][0] + "\t" ++ + for process in processes: +- data_to_print = timestamp + '\t' ++ row = [timestamp] + for key in self.processStatOptions.colum_list: + if self._is_last_and_args(key): +- data_to_print += str(PIDINFO_PAIR["args_last"][1](process)) + '\t\t' ++ row.append(str(PIDINFO_PAIR["args_last"][1](process))) + elif key in PIDINFO_PAIR: +- data_to_print += str(PIDINFO_PAIR[key][1](process)) + '\t\t' +- print(data_to_print) ++ row.append(str(PIDINFO_PAIR[key][1](process))) ++ # print(row) ++ output_list.append("\t".join(str(x) if x is not None else '' for x in row)) ++ ++ # -------- PATH 3: Invalid filterstate or column list -------- # ++ # This should never happen, but just in case ++ else: ++ raise ValueError("No valid filterstate or column list provided") ++ ++ # Sorting logic ++ if self.processStatOptions.sorting_flag and sorting_idx is not None: ++ output_list.sort( ++ key=lambda x: ( ++ sorting_idx, ++ float('inf') if ( ++ len(x.split()) <= sorting_idx or ++ not x.split()[sorting_idx].replace('.', '', 1).isdigit() ++ ) else float(x.split()[sorting_idx]) ++ ), ++ reverse=True ++ ) ++ ++ # --------- Print output --------- # ++ self.printer(header) ++ self.printer('\n'.join(output_list)) ++ + + + class ProcessStatusReporter: +@@ -466,92 +482,110 @@ class ProcessStatusReporter: + self.processStatOptions = processStatOptions + + def print_report(self, timestamp, header_indentation, value_indentation): +- +- # when the print count is exhausted exit the program gracefully +- # we can't use break here because it's being called by the run manager +- if self.processStatOptions.context is not PM_CONTEXT_ARCHIVE: +- if self.processStatOptions.print_count == 0: +- sys.exit(0) +- else: +- self.processStatOptions.print_count -= 1 +- +- if self.processStatOptions.show_all_process: +- self.printer("Timestamp" + header_indentation + "PID\t\t\tTTY\tTIME\t\tCMD") +- processes = self.process_filter.filter_processes(self.process_report.get_processes(self.delta_time)) ++ if self.processStatOptions.debug_mode: ++ print("option selected: %s" % self.processStatOptions.universal_flag) ++ print("filer option status: %s" % self.processStatOptions.filterstate) ++ FORMAT_MAP = { ++ "empty_arg" : "Timestamp" + header_indentation + "PID\t\tTIME\t\tCMD", ++ "all" : "Timestamp" + header_indentation + "PID\t\t\tTTY\tTIME\t\tCMD", ++ "user": "Timestamp" + header_indentation + "USERNAME\tPID\t\t%CPU\t%MEM\tVSZ\tRSS\t" + ++ "TTY\tSTAT\tTIME\t\tSTART\t\tCOMMAND", ++ "pid": "Timestamp" + header_indentation + "PID\t\tPPID\t\tTTY\tTIME\t\tCMD", ++ "ppid": "Timestamp" + header_indentation + "PID\t\tPPID\t\tTTY\tTIME\t\tCMD", ++ "username": "Timestamp" + header_indentation + "USERNAME\t\tPID\t\t%CPU\t%MEM\tVSZ\tRSS\t" + ++ "TTY\tSTAT\t\tTIME\t\tSTART\t\tCOMMAND", ++ "command": "Timestamp" + header_indentation + "PID\t\tPPID\t\tTTY\tTIME\t\tCMD" ++ } ++ selected_flag = self.processStatOptions.universal_flag ++ header = FORMAT_MAP.get(selected_flag, FORMAT_MAP["all"]) ++ # Bulk buffer for all rows, print all at once for efficiency ++ output_rows = [] ++ cpu_idx , mem_idx = 0, 0 ++ processes = self.process_filter.filter_processes(self.process_report.get_processes(self.delta_time)) ++ def safe_str(val): ++ return '' if val is None else str(val) ++ if selected_flag == "all": + for process in processes: +- command = process.process_name_with_args(True) +- ttyname = process.tty_name() +- self.printer("%s%s%s\t\t%s\t%s\t%s" % (timestamp, value_indentation, process.pid(), ttyname, +- process.total_time(), command)) +- elif self.processStatOptions.empty_arg_flag: +- self.printer("Timestamp" + header_indentation + "PID\t\tTIME\t\tCMD") +- processes = self.process_filter.filter_processes(self.process_report.get_processes(self.delta_time)) ++ output_rows.append("%s%s%s\t\t%s\t%s\t%s" % ( ++ safe_str(timestamp), safe_str(value_indentation), safe_str(process.pid()), ++ safe_str(process.tty_name()), safe_str(process.total_time()), ++ safe_str(process.process_name_with_args(True)))) ++ elif selected_flag == "empty_arg": + for process in processes: +- pid = process.pid() +- command = process.process_name() +- self.printer("%s%s%s\t%s\t%s" % (timestamp, value_indentation, pid, +- process.total_time(), command)) +- elif self.processStatOptions.pid_filter_flag: +- self.printer("Timestamp" + header_indentation + "PID\t\tPPID\t\tTTY\tTIME\t\tCMD") +- processes = self.process_filter.filter_processes(self.process_report.get_processes(self.delta_time)) ++ output_rows.append("%s%s%s\t%s\t%s" % ( ++ safe_str(timestamp), safe_str(value_indentation), safe_str(process.pid()), ++ safe_str(process.total_time()), safe_str(process.process_name()))) ++ elif selected_flag == "pid": + for process in processes: +- pid = process.pid() +- command = process.process_name() +- ttyname = process.tty_name() +- self.printer("%s%s%s\t%s\t%s\t%s\t%s" % (timestamp, value_indentation, pid, process.ppid(), +- ttyname, process.total_time(), command)) +- elif self.processStatOptions.ppid_filter_flag: +- self.printer("Timestamp" + header_indentation + "PID\t\tPPID\t\tTTY\tTIME\t\tCMD") +- processes = self.process_filter.filter_processes(self.process_report.get_processes(self.delta_time)) ++ output_rows.append("%s%s%s\t%s\t%s\t%s\t%s" % ( ++ safe_str(timestamp), safe_str(value_indentation), safe_str(process.pid()), safe_str(process.ppid()), ++ safe_str(process.tty_name()), safe_str(process.total_time()), safe_str(process.process_name()))) ++ elif selected_flag == "ppid": + for process in processes: +- ppid = process.ppid() +- command = process.process_name() +- ttyname = process.tty_name() +- self.printer("%s%s%s\t%s\t%s\t%s\t%s" % (timestamp, value_indentation, process.pid(), ppid, ttyname, +- process.total_time(), command)) +- elif self.processStatOptions.username_filter_flag: +- self.printer("Timestamp" + header_indentation + "USERNAME\t\tPID\t\t%CPU\t%MEM\tVSZ\tRSS\t" + +- "TTY\tSTAT\t\tTIME\t\tSTART\t\tCOMMAND") +- processes = self.process_filter.filter_processes(self.process_report.get_processes(self.delta_time)) ++ output_rows.append("%s%s%s\t%s\t%s\t%s\t%s" % ( ++ safe_str(timestamp), safe_str(value_indentation), safe_str(process.pid()), ++ safe_str(process.ppid()), safe_str(process.tty_name()), ++ safe_str(process.total_time()), safe_str(process.process_name()))) ++ elif selected_flag == "username": + for process in processes: +- self.printer("%s%s%s\t\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % ( +- timestamp, value_indentation, process.user_name(), process.pid(), +- process.system_percent(), process.total_percent(), process.vsize(), process.rss(), +- process.tty_name(), process.ppid(), process.total_time(), process.start(), +- process.process_name())) +- +- elif self.processStatOptions.user_oriented_format: +- self.printer("Timestamp" + header_indentation + "USERNAME\tPID\t\t%CPU\t%MEM\tVSZ\tRSS\t" + +- "TTY\tSTAT\tTIME\t\tSTART\t\tCOMMAND") +- processes = self.process_filter.filter_processes(self.process_report.get_processes(self.delta_time)) ++ output_rows.append("%s%s%s\t\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % ( ++ safe_str(timestamp), safe_str(value_indentation), safe_str(process.user_name()), ++ safe_str(process.pid()),safe_str(process.system_percent()), safe_str(process.total_percent()), ++ safe_str(process.vsize()), safe_str(process.rss()), ++ safe_str(process.tty_name()), safe_str(process.ppid()), safe_str(process.total_time()), ++ safe_str(process.start()), ++ safe_str(process.process_name()))) ++ cpu_idx = 5 ++ mem_idx = 6 ++ elif selected_flag == "user": + for process in processes: +- self.printer("%s%s%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % ( +- timestamp, value_indentation, process.user_name(), process.pid(), +- process.system_percent(), process.total_percent(), process.vsize(), process.rss(), +- process.tty_name(), process.s_name(), process.total_time(), process.start(), +- process.process_name())) +- +- elif self.processStatOptions.command_filter_flag: +- self.printer("Timestamp" + header_indentation + "PID\t\tPPID\t\tTTY\tTIME\t\tCMD") +- processes = self.process_filter.filter_processes(self.process_report.get_processes(self.delta_time)) ++ output_rows.append("%s%s%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % ( ++ safe_str(timestamp), safe_str(value_indentation), safe_str(process.user_name()), ++ safe_str(process.pid()), ++ safe_str(process.system_percent()), safe_str(process.total_percent()), ++ safe_str(process.vsize()), safe_str(process.rss()), ++ safe_str(process.tty_name()), safe_str(process.s_name()), ++ safe_str(process.total_time()), safe_str(process.start()), ++ safe_str(process.process_name()))) ++ cpu_idx = 5 ++ mem_idx = 6 ++ elif selected_flag == "command": + for process in processes: +- ppid = process.ppid() +- command = process.process_name() +- ttyname = process.tty_name() +- self.printer("%s%s%s\t%s\t%s\t%s\t%s" % (timestamp, value_indentation, process.pid(), ppid, ttyname, +- process.total_time(), command)) +- ++ output_rows.append("%s%s%s\t%s\t%s\t%s\t%s" % ( ++ safe_str(timestamp), safe_str(value_indentation), safe_str(process.pid()), ++ safe_str(process.ppid()), safe_str(process.tty_name()), ++ safe_str(process.total_time()), safe_str(process.process_name()))) ++ else: # default fallback, print nothing extra ++ pass ++ if self.processStatOptions.sorting_flag: ++ if cpu_idx == 0 and mem_idx == 0: ++ raise ValueError("Sorting indices not set for selected flag, " ++ "please remove sorting flag or choose another flag for output") ++ if self.processStatOptions.sorting_order == '%cpu': ++ output_rows.sort( ++ key=lambda x: float(x.split()[cpu_idx]) if x.split()[cpu_idx].replace('.', '', 1).isdigit() ++ else float('-inf'), ++ reverse=True) ++ elif self.processStatOptions.sorting_order == '%mem': ++ output_rows.sort( ++ key=lambda x: float(x.split()[mem_idx]) if x.split()[mem_idx].replace('.', '', 1).isdigit() ++ else float('-inf'), ++ reverse=True) ++ if output_rows: ++ self.printer(header) ++ self.printer('\n'.join(output_rows)) + + class ProcessStatReport(pmcc.MetricGroupPrinter): + Machine_info_count = 0 + group = None +- def __init__(self, group=None): ++ def __init__(self, group=None, options = None): + self.group = group ++ self.processStatOptions = options + + def timeStampDelta(self): + s = self.group.timestamp.tv_sec - self.group.prevTimestamp.tv_sec +- u = self.group.timestamp.tv_usec - self.group.prevTimestamp.tv_usec +- return s + u / 1000000.0 ++ n = self.group.timestamp.tv_nsec - self.group.prevTimestamp.tv_nsec ++ return s + n / 1000000000.0 + + def print_machine_info(self,context): + timestamp = context.pmLocaltime(self.group.timestamp.tv_sec) +@@ -572,70 +606,85 @@ class ProcessStatReport(pmcc.MetricGroupPrinter): + return group['hinv.ncpu'].netValues[0][2] + + def __print_report(self, manager,timestamp, header_indentation, value_indentation,interval_in_seconds): ++ if self.processStatOptions.debug_mode: ++ print("Printing standard report") + metric_repository = ReportingMetricRepository(self.group) + process_report = ProcessStatus(manager, metric_repository) +- process_filter = ProcessFilter(ProcessStatOptions) ++ process_filter = ProcessFilter(self.processStatOptions) + stdout = StdoutPrinter() + printdecorator = NoneHandlingPrinterDecorator(stdout) + report = ProcessStatusReporter(process_report, process_filter, interval_in_seconds, +- printdecorator.Print, ProcessStatOptions) ++ printdecorator.Print, self.processStatOptions) + report.print_report(timestamp, header_indentation, value_indentation) + def __print_dynamic_report(self, manager,timestamp, header_indentation, value_indentation,interval_in_seconds): ++ if self.processStatOptions.debug_mode: ++ print("Printing dynamic report") + metric_repository = ReportingMetricRepository(self.group) + process_report = ProcessStatus(manager, metric_repository) +- process_filter = ProcessFilter(ProcessStatOptions) ++ process_filter = ProcessFilter(self.processStatOptions) + stdout = StdoutPrinter() + printdecorator = NoneHandlingPrinterDecorator(stdout) + report = DynamicProcessReporter(process_report, process_filter, interval_in_seconds, +- printdecorator.Print, ProcessStatOptions) ++ printdecorator.Print, self.processStatOptions) + report.print_report(timestamp, header_indentation, value_indentation) + def __get_timestamp(self): + ts = self.group.contextCache.pmLocaltime(int(self.group.timestamp)) +- timestamp = time.strftime(ProcessStatOptions.timefmt, ts.struct_time()) ++ timestamp = time.strftime(self.processStatOptions.timefmt, ts.struct_time()) + return timestamp + + def report(self, manager): + try: + if self.group['proc.psinfo.utime'].netPrevValues is None: +- # need two fetches to report rate converted counter metrics +- return ++ return False # Not ready, skip increment + if not self.group['hinv.ncpu'].netValues or not self.group['kernel.uname.sysname'].netValues: +- return ++ return False + try: + if not self.Machine_info_count: + self.print_machine_info(manager) + self.Machine_info_count = 1 + except IndexError: +- return ++ if self.processStatOptions.debug_mode: ++ print("IndexError while printing machine info") ++ return False ++ if self.processStatOptions.debug_mode: ++ print("Starting report generation") ++ print("Need to print samples: %s" % self.processStatOptions.print_count) ++ if self.processStatOptions.print_count == 0: ++ if self.processStatOptions.debug_mode: ++ print("Print count exhausted, exiting") ++ sys.exit(0) + timestamp = self.__get_timestamp() + interval_in_seconds = self.timeStampDelta() + header_indentation = " " if len(timestamp) < 9 else (len(timestamp) - 7) * " " + value_indentation = ((len(header_indentation) + 9) - len(timestamp)) * " " + + # Doing this for one single print instance in case there is no count specified +- if ProcessStatOptions.print_count is None: +- ProcessStatOptions.print_count = 1 ++ if self.processStatOptions.print_count is None \ ++ and self.processStatOptions.context is not PM_CONTEXT_ARCHIVE: ++ self.processStatOptions.print_count = 1 + # ================================================================ +- if ProcessStatOptions.selective_colum_flag: ++ if self.processStatOptions.selective_colum_flag: ++ if self.processStatOptions.debug_mode: ++ print("Selective column flag is set") + self.__print_dynamic_report(manager,timestamp, header_indentation, + value_indentation, interval_in_seconds) + else: + self.__print_report(manager,timestamp, header_indentation, value_indentation, interval_in_seconds) ++ if self.processStatOptions.context is not PM_CONTEXT_ARCHIVE: ++ self.processStatOptions.print_count -= 1 ++ return True # Data was printed + finally: + sys.stdout.flush() + + + class ProcessStatOptions(pmapi.pmOptions): +- show_all_process = False +- command_filter_flag = False +- ppid_filter_flag = False +- pid_filter_flag = False +- username_filter_flag = False ++ universal_flag = None + selective_colum_flag = False + filter_flag = False +- user_oriented_format = False +- empty_arg_flag = False + filterstate = None ++ debug_mode = False ++ sorting_flag = False ++ sorting_order = None + timefmt = "%H:%M:%S" + print_count = None + colum_list = [] +@@ -646,7 +695,7 @@ class ProcessStatOptions(pmapi.pmOptions): + context = None + + def __init__(self): +- pmapi.pmOptions.__init__(self, "t:c:e::p:ukVZ:z?:o:P:l:U:k") ++ pmapi.pmOptions.__init__(self, "t:c:e::p:ukVZ:z?:o:P:l:U:k:O:d") + self.pmSetOptionCallback(self.extraOptions) + self.pmSetOverrideCallback(self.override) + self.options() +@@ -661,108 +710,214 @@ class ProcessStatOptions(pmapi.pmOptions): + "Select the process by process ID") + self.pmSetLongOption("", 1, "P", "[ppid1,ppid2,...]", "Select the process by process parent ID") + self.pmSetLongOption("", 1, "U", "[User Name]", "Select the process by user name") +- self.pmSetLongOption("", 1, "o", "[col1,col2,... Or ALL]", "User -defined format " + +- "USE -o [all] or -B [col1, col2 , ...]" + +- "\n\t\t\tsupported user defined colums are command, wchan, started, Time, pid, ppid, " +- "%mem, pri, user, %cpu and S " +- "\n\t\t\tALL option shows USER,PID,PPID,PRI,%CPU,%MEM,VSZ,RSS,S,STARTED,TIME,WCHAN and " +- "Command") ++ self.pmSetLongOption( ++ "", ++ 1, ++ "o", ++ "[col1,col2,... Or ALL]", ++ ( ++ "User -defined format USE -o [all] or -B [col1, col2 , ...]\n" ++ "\t\t\tsupported user defined colums are command, wchan, started, Time, pid, ppid, " ++ "%mem, pri, user, %cpu and S\n" ++ "\t\t\tALL option shows USER,PID,PPID,PRI,%CPU,%MEM,VSZ,RSS,S,STARTED,TIME,WCHAN and\n" ++ "Command" ++ ), ++ ) + self.pmSetLongOptionText("\tCOL\tHEADER \tDESCRIPTION") + self.pmSetLongOptionText("\t%cpu\t%CPU \tcpu utilization of the process") + self.pmSetLongOptionText("\t%mem\t%MEM \tphysical memory on the machine expressed as a percentage") + self.pmSetLongOptionText("\tstart\tSTART \ttime the command started") + self.pmSetLongOptionText("\ttime\tTIME \taccumulated cpu time, user + system") +- self.pmSetLongOptionText("\tcls\tCLS \tscheduling class of the process") +- self.pmSetLongOptionText("\tcmd\tCMD\tsee args. (alias args, command).") +- self.pmSetLongOptionText("\tpid\tPID \tthe process ID") +- self.pmSetLongOptionText("\tppid\tPPID\tparent process ID") +- self.pmSetLongOptionText("\tpri\tPRI \tpriority of the process") +- self.pmSetLongOptionText("\tstate\tS \tsee s") +- self.pmSetLongOptionText("\trss\tRSS \tthe non-swapped physical memory that a task has used") +- self.pmSetLongOptionText("\trtprio\tRTPRIO \trealtime priority") +- self.pmSetLongOptionText("\tpname\tPname\tProcess name") +- # self.pmSetLongOptionText("\ttime\tTIME \tcumulative CPU time") +- self.pmSetLongOptionText("\ttty\tTT \tcontrolling tty (terminal)") +- self.pmSetLongOptionText("\tuid\tUID \tsee euid") +- self.pmSetLongOptionText("\tvsize\tVSZ \tsee vsz") +- self.pmSetLongOptionText("\tuname\tUSER \tsee euser") +- self.pmSetLongOptionText("\twchan\tWCHAN \tname of the kernel function in which the process is sleeping") +- self.pmSetLongOption("", 0, 'u', "", "Display user-oriented format") ++ self.pmSetLongOptionText( ++ "\tcls\tCLS \tscheduling class of the process" ++ ) ++ self.pmSetLongOptionText( ++ "\tcmd\tCMD\tsee args. (alias args, command)." ++ ) ++ self.pmSetLongOptionText( ++ "\tpid\tPID \tthe process ID" ++ ) ++ self.pmSetLongOptionText( ++ "\tppid\tPPID\tparent process ID" ++ ) ++ self.pmSetLongOptionText( ++ "\tpri\tPRI \tpriority of the process" ++ ) ++ self.pmSetLongOptionText( ++ "\tstate\tS \tsee s" ++ ) ++ self.pmSetLongOptionText( ++ "\trss\tRSS \tthe non-swapped physical memory that a task has used" ++ ) ++ self.pmSetLongOptionText( ++ "\trtprio\tRTPRIO \trealtime priority" ++ ) ++ self.pmSetLongOptionText( ++ "\tpname\tPname\tProcess name" ++ ) ++ self.pmSetLongOptionText( ++ "\ttty\tTT \tcontrolling tty (terminal)" ++ ) ++ self.pmSetLongOptionText( ++ "\tuid\tUID \tsee euid" ++ ) ++ self.pmSetLongOptionText( ++ "\tvsize\tVSZ \tsee vsz" ++ ) ++ self.pmSetLongOptionText( ++ "\tuname\tUSER \tsee euser" ++ ) ++ self.pmSetLongOptionText( ++ "\twchan\tWCHAN \tname of the kernel function in which the process is sleeping" ++ ) ++ self.pmSetLongOption("", 0, 'u', "", ++ "Display user-oriented format" ++ ) ++ self.pmSetLongOption( ++ "sort", 1, "O", "%cpu,%mem", ++ "sort the process list by %cpu or %mem values " ++ ) ++ self.pmSetLongOption("", 0, "d", "", "enable debug mode") + self.pmSetLongOptionVersion() + self.pmSetLongOptionTimeZone() + self.pmSetLongOptionHostZone() + self.pmSetLongOptionHelp() + + def override(self, opts): +- ProcessStatOptions.print_count = self.pmGetOptionSamples() ++ self.print_count = self.pmGetOptionSamples() + # """Override standard Pcp-ps option to show all process """ +- return bool(opts in ['p', 'c', 'o', 'P', 'U']) ++ return bool(opts in ['p', 'c', 'o', 'P', 'U', 'O', 'd']) + + def extraOptions(self, opts, optarg, index): +- if opts == 'e': +- ProcessStatOptions.show_all_process = True +- elif opts == 'c': +- ProcessStatOptions.command_filter_flag = True +- ProcessStatOptions.filter_flag = True ++ ++ def handle_e(): ++ if self.debug_mode: ++ print("e option selected") ++ self.universal_flag = "all" ++ ++ def handle_c(): ++ if self.debug_mode: ++ print("command option selected") ++ self.universal_flag = "command" ++ self.command_filter_flag = True ++ self.filter_flag = True + try: + if optarg is not None: +- ProcessStatOptions.command_list += optarg.replace(',', ' ').split(' ') ++ self.command_list += optarg.replace(',', ' ').split(' ') ++ if self.debug_mode: ++ print("Command List: %s" % self.command_list) + except ValueError: + print("Invalid command Id List: use comma separated pids without whitespaces") + sys.exit(1) +- elif opts == 'p': +- ProcessStatOptions.filter_flag = True +- ProcessStatOptions.pid_filter_flag = True ++ def handle_d(): ++ print("Debug mode selected") ++ self.debug_mode = True ++ ++ def handle_p(): ++ if self.debug_mode: ++ print("pid option selected") ++ self.universal_flag = "pid" ++ self.filter_flag = True ++ self.pid_filter_flag = True + try: + if optarg is not None: + dummy_list = optarg.replace(',', ' ').split(' ') +- ProcessStatOptions.pid_list += [int(x) for x in dummy_list] ++ self.pid_list += [int(x) for x in dummy_list] + except ValueError: + print("Invalid pid Id List: use comma separated pids without whitespaces") + sys.exit(1) +- elif opts == 'P': +- ProcessStatOptions.filter_flag = True +- ProcessStatOptions.ppid_filter_flag = True ++ ++ def handle_P(): ++ if self.debug_mode: ++ print("ppid option selected") ++ self.universal_flag = "ppid" ++ self.filter_flag = True ++ self.ppid_filter_flag = True + try: + if optarg is not None: + dummy_list = optarg.replace(',', ' ').split(' ') +- ProcessStatOptions.ppid_list += [int(x) for x in dummy_list] ++ self.ppid_list += [int(x) for x in dummy_list] + except ValueError: + print("Invalid ppid Id List: use comma separated pids without whitespaces") + sys.exit(1) +- elif opts == 'u': +- ProcessStatOptions.user_oriented_format = True +- elif opts == 'o': +- ProcessStatOptions.selective_colum_flag = True ++ ++ def handle_u(): ++ if self.debug_mode: ++ print("User-oriented format option selected") ++ self.universal_flag = "user" ++ self.user_oriented_format = True ++ ++ def handle_o(): ++ if self.debug_mode: ++ print("User-defined format option selected") ++ self.selective_colum_flag = True + try: + if optarg.upper() == "ALL": +- ProcessStatOptions.filterstate = optarg.upper() ++ self.filterstate = optarg.upper() + else: + dummy_list = optarg.replace(',', ' ').split(' ') ++ if self.debug_mode: ++ print("Custom Column List: %s" % dummy_list) + for key in dummy_list: + if key.lower() in PIDINFO_PAIR: +- ProcessStatOptions.colum_list.append(key.lower()) ++ self.colum_list.append(key.lower()) + else: + raise ValueError + except ValueError: +- print("Invalid ppid Id List: Either column name is not correct " +- "or use comma separated column names without whitespaces") ++ print("Invalid Column List: incorrect name or improper comma-separated format") + sys.exit(1) +- elif opts == 'U': +- ProcessStatOptions.username_filter_flag = True +- ProcessStatOptions.filter_flag = True +- ProcessStatOptions.filtered_process_user = optarg +- elif opts is None: +- ProcessStatOptions.show_all_process = True +- +- @staticmethod +- def checkOptions(): +- if ProcessStatOptions.selective_colum_flag or \ +- ProcessStatOptions.filter_flag or \ +- ProcessStatOptions.user_oriented_format: ++ ++ def handle_U(): ++ if self.debug_mode: ++ print("username option selected") ++ self.universal_flag = "username" ++ self.username_filter_flag = True ++ self.filter_flag = True ++ self.filtered_process_user = optarg ++ ++ def handle_none(): ++ if self.debug_mode: ++ print("No option selected, defaulting to show all process") ++ self.universal_flag = "all" ++ # self.show_all_process = True ++ ++ def handle_O(): ++ if self.debug_mode: ++ print("Sorting option selected") ++ self.sorting_flag = True ++ if optarg.lower() not in ['%cpu', '%mem']: ++ print("Invalid sorting option, defaulting to %cpu") ++ self.sorting_order = '%cpu' # default to %cpu ++ return ++ self.sorting_order = optarg.lower() ++ ++ # Dispatch map simulating switch-case ++ dispatch = { ++ 'e': handle_e, ++ 'c': handle_c, ++ 'p': handle_p, ++ 'P': handle_P, ++ 'u': handle_u, ++ 'o': handle_o, ++ 'U': handle_U, ++ 'O': handle_O, ++ 'd': handle_d, ++ None: handle_none, ++ } ++ # Execute handler or fallback to error ++ handler = dispatch.get(opts) ++ if handler: ++ handler() ++ else: ++ print("Unknown option: %s" % opts) ++ sys.exit(1) ++ def checkOptions(self): ++ if self.universal_flag is not None : + return True + else: +- ProcessStatOptions.empty_arg_flag = True ++ if self.debug_mode: ++ print("No filtering option selected, defaulting to empty argument mode") ++ self.universal_flag = "empty_arg" + return True + + +@@ -778,7 +933,7 @@ if __name__ == "__main__": + sys.stderr.write('Error: not all required metrics are available\nMissing %s\n' % missing) + sys.exit(1) + manager['psstat'] = PSSTAT_METRICS +- manager.printer = ProcessStatReport(manager['psstat']) ++ manager.printer = ProcessStatReport(manager['psstat'],opts) + sts = manager.run() + sys.exit(sts) + except pmapi.pmErr as pmerror: +@@ -786,6 +941,9 @@ if __name__ == "__main__": + except pmapi.pmUsageErr as usage: + usage.message() + sys.exit(1) ++ except ValueError as e: ++ sys.stderr.write("%s\n" % str(e)) ++ sys.exit(1) + except IOError: + signal.signal(signal.SIGPIPE, signal.SIG_DFL) + except KeyboardInterrupt: +-- +2.43.7 + diff --git a/SOURCES/1031-pmlogger_daily-add-disk-usage-limit-option-and-purge.patch b/SOURCES/1031-pmlogger_daily-add-disk-usage-limit-option-and-purge.patch new file mode 100644 index 0000000..8d2905b --- /dev/null +++ b/SOURCES/1031-pmlogger_daily-add-disk-usage-limit-option-and-purge.patch @@ -0,0 +1,366 @@ +From a60882f460d54c039c905aff24962e107ee59c93 Mon Sep 17 00:00:00 2001 +From: sagar sagar +Date: Tue, 3 Mar 2026 16:13:45 +0530 +Subject: [PATCH OL8 1031/1032] pmlogger_daily: add disk usage limit option and + purge logic + +Introduce -d/--disk option to set max disk usage per pmlogger instance. +Implement logic to check total archive size and purge oldest files when limit is exceeded. + +upstream ref:- 7b7c38c16c6904960ede400efa5225732935b830 + +[Orabug: 38991685] +Signed-off-by: sagar sagar +--- + src/pmlogger/pmlogger_daily.sh | 193 ++++++++++++++++++++++++++++++++- + src/pmlogger/utilproc.sh | 83 ++++++++++++++ + 2 files changed, 274 insertions(+), 2 deletions(-) + +diff --git a/src/pmlogger/pmlogger_daily.sh b/src/pmlogger/pmlogger_daily.sh +index 27b1550..53e5eab 100755 +--- a/src/pmlogger/pmlogger_daily.sh ++++ b/src/pmlogger/pmlogger_daily.sh +@@ -261,6 +261,7 @@ Options: + -E,--expunge expunge metrics with metadata inconsistencies when merging archives + -f,--force force actions (intended for QA, not production) + -k=TIME,--discard=TIME remove archives after TIME (format DD[:HH[:MM]]) ++ -d=fssize,--disk=fssize set maximum disk usage for archives for each pmlogger instance + -K compress, but no other changes + -l=FILE,--logfile=FILE send important diagnostic messages to FILE + -m=ADDRs,--mail=ADDRs send daily NOTICES entries to email addresses +@@ -302,6 +303,8 @@ MFLAG=false + EXPUNGE="" + FORCE=false + KILL=pmsignal ++SPACELIMIT_CMDLINE="" ++SPACELIMIT_DEFAULT="unlimited" + + ARGS=`pmgetopt --progname=$prog --config=$tmp/usage -- "$@"` + [ $? != 0 ] && exit 1 +@@ -315,6 +318,24 @@ do + CONTROLDIR="$2.d" + shift + ;; ++ -d) SPACELIMIT_CMDLINE="$2" ++ shift ++ if [ -n "$PCP_SPACELIMIT" -a "$PCP_SPACELIMIT" != "$SPACELIMIT_CMDLINE" ] ++ then ++ echo "Warning: -d value ($SPACELIMIT_CMDLINE) ignored because \$PCP_SPACELIMIT ($PCP_SPACELIMIT) set in environment" ++ SPACELIMIT_CMDLINE="" ++ continue ++ fi ++ if [ "$SPACELIMIT_CMDLINE" != unlimited ] ++ then ++ if ! _convert_to_kb "$SPACELIMIT_CMDLINE" >/dev/null ++ then ++ echo "Error: -d value ($SPACELIMIT_CMDLINE) not valid" ++ $NOERROR || status=1 ++ exit ++ fi ++ fi ++ ;; + -E) EXPUNGE="-E" + ;; + -f) FORCE=true +@@ -448,7 +469,7 @@ do + COMPRESSREGEX_CMDLINE="" + continue + fi +- ;; ++ ;; + --) shift + break + ;; +@@ -610,6 +631,43 @@ _warning() + echo "Warning: $@" + } + ++# Given a list of candidate directories, calculate the total ++# size below them in Kbytes ++# ++_calculate_total_size() ++{ ++ du -sk "$@" 2>$tmp/cts_err \ ++ | awk >$tmp/cts_out ' ++BEGIN { kb = 0 } ++ { kb += $1 } ++END { print kb }' >$tmp/cts_out ++ if [ -s $tmp/cts_err ] && $VERY_VERBOSE ++ then ++ echo >&2 "Warning: _calculate_total_size: du -sk $@ produced errors ..." ++ cat >&2 $tmp/cts_err ++ fi ++ $VERY_VERBOSE && echo >&2 "Info: _calculate_total_size -> `cat $tmp/cts_out` Kbytes" ++ cat $tmp/cts_out ++} ++ ++# Calculate the total size of the archive with basename $1 ++# ++_calculate_archive_size() ++{ ++ du -sk "$1".* 2>$tmp/cts_err \ ++ | awk >$tmp/cts_out ' ++BEGIN { kb = 0 } ++ { kb += $1 } ++END { print kb }' >$tmp/cts_out ++ if [ -s $tmp/cts_err ] && $VERY_VERBOSE ++ then ++ echo >&2 "Warning: _calculate_archive_size: du -sk $1.* produced errors ..." ++ cat >&2 $tmp/cts_err ++ fi ++ $VERY_VERBOSE && echo >&2 "Info: _calculate_archive_size $1 -> `cat $tmp/cts_out` Kbytes" ++ cat $tmp/cts_out ++} ++ + _skipping() + { + echo "$prog: Warning: $@" +@@ -713,6 +771,86 @@ _get_primary_logger_pid() + echo "$pid" + } + ++# Check disk space allocation for one pmlogger instance, and if more ++# than $SPACELIMIT Kbytes, purge files to try and get the space ++# allocated to be not more than $SPACELIMIT Kbytes. ++# ++# Oldest files are purged first and the most recent archives for today ++# (including those required by active pmlogger (1) processes are ++# never deleted. ++# ++# On entry, $find_dirs is a list of one or more directories holding ++# archives for a pmlogger instance, set in _callback_log_control(), ++# and $host is the host name field from the control line, set in ++# _parse_log_control(). ++# ++_do_purge() ++{ ++ SPACELIMIT="$PCP_SPACELIMIT" ++ [ -z "$SPACELIMIT" ] && SPACELIMIT="$SPACELIMIT_CMDLINE" ++ [ -z "$SPACELIMIT" ] && SPACELIMIT="$SPACELIMIT_DEFAULT" ++ [ "$SPACELIMIT" = unlimited ] && return ++ if ! _convert_to_kb "$SPACELIMIT" >$tmp/tmp ++ then ++ _warning "skipping purging because of invalid space limit" ++ return ++ fi ++ SPACELIMIT=`cat $tmp/tmp` ++ $VERY_VERBOSE && echo >&2 "SPACELIMIT=$SPACELIMIT" ++ __total_size=`_calculate_total_size $find_dirs` ++ if [ "$__total_size" -le "$SPACELIMIT" ] ++ then ++ $VERBOSE && echo "Info: No purging required for $host, archives ($__total_size Kbytes) <= size limit ($SPACELIMIT Kbytes)" ++ return ++ fi ++ $VERBOSE && echo "Info: archives for $host ($__total_size Kbytes) >= size limit ($SPACELIMIT Kbytes)" ++ ++ # algorithm to find archive basenames borrowed from _do_merge() ++ # output is in this format ... ++ # | ++ # ++ TODAY=`date +%Y%m%d` ++ find $find_dirs -maxdepth 1 -type f \ ++ | sed -n \ ++ -e '/\(.*\)\/\([12][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\)\(\.meta.*\)/s//\1|\2/p' \ ++ -e '/\(.*\)\/\([12][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\)\(\.[0-2][0-9].[0-5][0-9]\)\(\.meta.*\)/s//\1|\2\3/p' \ ++ -e '/\(.*\)\/\([12][0-9][0-9][0-9][0-1][0-9][0-3][0-9]\)\(\.[0-2][0-9].[0-5][0-9]-[0-9][0-9]\)\(\.meta.*\)/s//\1|\2\3/p' \ ++ -e '/\(.*\)\/\([0-9][0-9][0-1][0-9][0-3][0-9]\)\(\.meta.*\)/s//\1|\2/p' \ ++ -e '/\(.*\)\/\([0-9][0-9][0-1][0-9][0-3][0-9]\)\(\.[0-2][0-9].[0-5][0-9]\)\(\.meta.*\)/s//\1|\2\3/p' \ ++ -e '/\(.*\)\/\([0-9][0-9][0-1][0-9][0-3][0-9]\)\(\.[0-2][0-9].[0-5][0-9]-[0-9][0-9]\)\(\.meta.*\)/s//\1|\2\3/p' \ ++ | sort -t'|' -n -k2,2 \ ++ | $PCP_AWK_PROG -F'|' ' ++$2 == "'$TODAY'" { next } ++$2 ~ /^'$TODAY'/ { next } ++ { print }' >$tmp/purge_candidates ++ if [ ! -s $tmp/purge_candidates ] ++ then ++ $VERBOSE && echo "Info: No candidates to purge." ++ return ++ fi ++ ++ sed -e 's/|/ /' <$tmp/purge_candidates \ ++ | while read __dir __file ++ do ++ [ "$__dir" != "." ] && __file="$__dir/$__file" ++ __arch_size=`_calculate_archive_size "$__file"` ++ if $SHOWME ++ then ++ echo "+ rm `echo $__file.**`" ++ __total_size=`expr $__total_size - $__arch_size` ++ else ++ if rm "$__file".* ++ then ++ $VERBOSE && echo "Info: purge $__file, reclaims $__arch_size Kbytes" ++ __total_size=`expr $__total_size - $__arch_size` ++ else ++ $VERBOSE && echo "Warning: rm $__file.* failed" ++ fi ++ fi ++ [ "$__total_size" -le "$SPACELIMIT" ] && break ++ done ++} ++ + # mails out any entries for the previous 24hrs from the PCP notices file + # + if [ ! -z "$MAILME" ] +@@ -999,7 +1137,50 @@ s/^\([A-Za-z][A-Za-z0-9_]*\)=/export \1; \1=/p + fi + fi + ;; +- ++ 'export PCP_SPACELIMIT;'*) ++ _old_value="$PCP_SPACELIMIT" ++ _check=`echo "$_cmd" | sed -e 's/.*=//' -e 's/ *$//'` ++ if [ -n "$_check" ] ++ then ++ if [ "$_check" = unlimited ] ++ then ++ # no conversion ++ : ++ else ++ # check syntax & convert to canonical Kbytes ++ # ++ _kb=`_convert_to_kb "$_check"` ++ if [ $? != 0 ] ++ then ++ _warning "\$PCP_SPACELIMIT value ($_check) is invalid. Must be a positive integer and a unit (e.g. 100M)" ++ _cmd='' ++ else ++ $SHOWME && echo "+ $_cmd (normalized to $_kb Kbytes)" ++ # need to put back the "K" units here ++ # # because it will get re-processed by ++ # _convert_to_kb() later ++ # ++ _cmd=`echo "$_cmd" | sed -e "s/=.*/=${_kb}K/"` ++ fi ++ fi ++ if [ -n "$_cmd" ] ++ then ++ echo eval $_cmd >>$tmp/_cmd ++ eval $_cmd ++ if [ -n "$_old_value" -a "$_old_value" != "$PCP_SPACELIMIT" ] ++ then ++ _warning "\$PCP_SPACELIMIT ($PCP_SPACELIMIT) reset from control file, previous value ($_old_value) ignored" ++ fi ++ if [ -n "$PCP_SPACELIMIT" -a -n "$SPACELIMIT_CMDLINE" -a "$PCP_SPACELIMIT" != "$SPACELIMIT_CMDLINE" ] ++ then ++ _warning "\$PCP_SPACELIMIT ($PCP_SPACELIMIT) reset from control file, -d value ($SPACELIMIT_CMDLINE) ignored" ++ SPACELIMIT_CMDLINE="" ++ fi ++ fi ++ else ++ _warning "\$PCP_SPACELIMIT from control file missing a value, will be ignored" ++ fi ++ ;; + 'export PCP_COMPRESSREGEX;'*) + old_value="$PCP_COMPRESSREGEX" + $SHOWME && echo "+ $cmd" +@@ -1671,6 +1852,14 @@ p + $VERY_VERBOSE && echo >&2 "Warning: no trace files found to cull" + fi + fi ++ ++ # if space limit specified, potentially purge old archives if ++ # space limit exceeded ++ # ++ if [ -n "$PCP_SPACELIMIT" -o -n "$SPACELIMIT_CMDLINE" ] ++ then ++ _do_purge ++ fi + + _unlock "$dir" + done +diff --git a/src/pmlogger/utilproc.sh b/src/pmlogger/utilproc.sh +index 168d040..8c77b37 100644 +--- a/src/pmlogger/utilproc.sh ++++ b/src/pmlogger/utilproc.sh +@@ -152,3 +152,86 @@ END { exit sts }' + fi + return $? + } ++ ++# Converts a size string like 10G, 100M, 100K to integer KBytes for limit ++# checks. ++# Usage: _convert_to_kb size_string ++# Outputs: integer KBytes on stdout, returns 0 if OK, 1 if error ++_convert_to_kb() ++{ ++ __input="$1" ++ __num= ++ __unit= ++ __kb= ++ if [ -z "$__input" ] ++ then ++ echo "Error: _convert_to_kb(): missing argument" >&2 ++ return 1 ++ fi ++ __num=`echo "$__input" | sed -E 's/^([0-9]+)\s*([a-zA-Z]*)$/\1/'` ++ case "$__num" ++ in ++ "" ) ++ echo "Error: _convert_to_kb(): argument '$__input' does not start with a number" >&2 ++ return 1 ++ ;; ++ *[!0-9]* ) ++ echo "Error: _convert_to_kb(): argument '$__input' has a non-numeric value" >&2 ++ return 1 ++ ;; ++ 0 ) ++ echo "Error: _convert_to_kb(): argument '$__input' resolves to zero (not allowed)" >&2 ++ return 1 ++ ;; ++ esac ++ __unit=`echo "$__input" | sed -E 's/^([0-9]+)\s*([a-zA-Z]*)$/\2/'` ++ case "$__unit" ++ in ++ G|g|M|m|K|k) ++ ;; ++ '') ++ echo "Error: _convert_to_kb(): missing unit after '$__num'" >&2 ++ return 1 ++ ;; ++ *) ++ echo "Error: _convert_to_kb(): invalid unit '$__unit'" >&2 ++ return 1 ++ ;; ++ esac ++ ++ MAX_INT32=2147483647 ++ ++ case "$__unit" ++ in ++ G|g) ++ # Check before multiplying ++ __max=`expr $MAX_INT32 / \( 1024 \* 1024 \)` ++ if [ $__num -gt $__max ] ++ then ++ echo "Error: overflow, $__num Gbytes too large for Kbytes in a 32-bit signed int" >&2 ++ return 1 ++ fi ++ __kb=`expr $__num \* 1024 \* 1024` ++ ;; ++ M|m) ++ # Check before multiplying ++ __max=`expr $MAX_INT32 / 1024` ++ if [ $__num -gt $__max ] ++ then ++ echo "Error: overflow, $__num Mbytes too large for Kbytes in a 32-bit signed int" >&2 ++ return 1 ++ fi ++ __kb=`expr $__num \* 1024` ++ ;; ++ K|k) ++ if [ $__num -gt $MAX_INT32 ] ++ then ++ echo "Error: overflow, $__num Kbytes too large for 32-bit signed int" >&2 ++ return 1 ++ fi ++ __kb=$__num ++ ;; ++ esac ++ echo "$__kb" ++ return 0 ++} +\ No newline at end of file +-- +2.43.7 + diff --git a/SOURCES/1032-pcp-system-tools-restore-backward-compatibility-with.patch b/SOURCES/1032-pcp-system-tools-restore-backward-compatibility-with.patch new file mode 100644 index 0000000..1c60269 --- /dev/null +++ b/SOURCES/1032-pcp-system-tools-restore-backward-compatibility-with.patch @@ -0,0 +1,328 @@ +From 28b612d8743b36429df222a4baa5cb48dcaf8bc7 Mon Sep 17 00:00:00 2001 +From: sagar sagar +Date: Tue, 3 Mar 2026 16:15:10 +0530 +Subject: [PATCH OL8 1032/1032] pcp-system-tools: restore backward + compatibility with older pmapi versions + +Commit 0a37ed0 introduced support for pmapi version 4, but upgrading to the latest pmapi is not currently desired. +This change updates pcp-iostat, mpstat, pidstat, and ps to fall back to tv_usec when tv_nsec is unavailable +during timestamp delta calculation, ensuring compatibility with older pmapi versions and collectors that only expose tv_usec + +- optimized code in pcp-ps for dynamic sorting +- fixed sorting colum indexes in -u case + +[Orabug: 38991685] +Signed-off-by: Sagar Sagar +--- + src/pcp/iostat/pcp-iostat.py | 15 +++- + src/pcp/mpstat/pcp-mpstat.py | 13 +++- + src/pcp/pidstat/pcp-pidstat.py | 13 +++- + src/pcp/ps/pcp-ps.py | 123 ++++++++++++------------------- + src/pcp/tapestat/pcp-tapestat.py | 15 +++- + 5 files changed, 95 insertions(+), 84 deletions(-) + +diff --git a/src/pcp/iostat/pcp-iostat.py b/src/pcp/iostat/pcp-iostat.py +index 6b7d32d..80799a2 100755 +--- a/src/pcp/iostat/pcp-iostat.py ++++ b/src/pcp/iostat/pcp-iostat.py +@@ -55,9 +55,18 @@ class IostatReport(pmcc.MetricGroupPrinter): + Hcount = 0 + def timeStampDelta(self, group): + s = group.timestamp.tv_sec - group.prevTimestamp.tv_sec +- u = group.timestamp.tv_usec - group.prevTimestamp.tv_usec +- # u may be negative here, calculation is still correct. +- return s + u / 1000000.0 ++ # pmapi timestamps may provide sub-second resolution via tv_nsec (nanoseconds) ++ # or tv_usec (microseconds) depending on the collector. Prefer nanoseconds ++ # when available, but gracefully fall back to microseconds to avoid ++ if hasattr(group.timestamp, 'tv_nsec') and hasattr(group.prevTimestamp, 'tv_nsec'): ++ n = group.timestamp.tv_nsec - group.prevTimestamp.tv_nsec ++ # n may be negative here, calculation is still correct. ++ return s + n / 1000000000.0 ++ elif hasattr(group.timestamp, 'tv_usec') and hasattr(group.prevTimestamp, 'tv_usec'): ++ u = group.timestamp.tv_usec - group.prevTimestamp.tv_usec ++ return s + u / 1000000.0 ++ # it should not reach here ++ return s + + def instlist(self, group, name): + return dict(map(lambda x: (x[1], x[2]), group[name].netValues)).keys() +diff --git a/src/pcp/mpstat/pcp-mpstat.py b/src/pcp/mpstat/pcp-mpstat.py +index 09a8182..9ffee11 100755 +--- a/src/pcp/mpstat/pcp-mpstat.py ++++ b/src/pcp/mpstat/pcp-mpstat.py +@@ -503,8 +503,17 @@ class MpstatReport(pmcc.MetricGroupPrinter): + + def timeStampDelta(self, group): + s = group.timestamp.tv_sec - group.prevTimestamp.tv_sec +- u = group.timestamp.tv_usec - group.prevTimestamp.tv_usec +- return s + u / 1000000.0 ++ # pmapi timestamps may provide sub-second resolution via tv_nsec (nanoseconds) ++ # or tv_usec (microseconds) depending on the collector. Prefer nanoseconds ++ # when available, but gracefully fall back to microseconds to avoid ++ if hasattr(group.timestamp, 'tv_nsec') and hasattr(group.prevTimestamp, 'tv_nsec'): ++ n = group.timestamp.tv_nsec - group.prevTimestamp.tv_nsec ++ return s + n / 1000000000.0 ++ elif hasattr(group.timestamp, 'tv_usec') and hasattr(group.prevTimestamp, 'tv_usec'): ++ u = group.timestamp.tv_usec - group.prevTimestamp.tv_usec ++ return s + u / 1000000.0 ++ # it should not reach here ++ return s + + def print_machine_info(self,group, context): + self.get_summary_metrics(group) +diff --git a/src/pcp/pidstat/pcp-pidstat.py b/src/pcp/pidstat/pcp-pidstat.py +index a086e0f..a479cc4 100755 +--- a/src/pcp/pidstat/pcp-pidstat.py ++++ b/src/pcp/pidstat/pcp-pidstat.py +@@ -907,8 +907,17 @@ class PidstatReport(pmcc.MetricGroupPrinter): + + def timeStampDelta(self, group): + s = group.timestamp.tv_sec - group.prevTimestamp.tv_sec +- u = group.timestamp.tv_usec - group.prevTimestamp.tv_usec +- return s + u / 1000000.0 ++ # pmapi timestamps may provide sub-second resolution via tv_nsec (nanoseconds) ++ # or tv_usec (microseconds) depending on the collector. Prefer nanoseconds ++ # when available, but gracefully fall back to microseconds to avoid ++ if hasattr(group.timestamp, 'tv_nsec') and hasattr(group.prevTimestamp, 'tv_nsec'): ++ n = group.timestamp.tv_nsec - group.prevTimestamp.tv_nsec ++ return s + n / 1000000000.0 ++ elif hasattr(group.timestamp, 'tv_usec') and hasattr(group.prevTimestamp, 'tv_usec'): ++ u = group.timestamp.tv_usec - group.prevTimestamp.tv_usec ++ return s + u / 1000000.0 ++ # it should not reach here ++ return s + + def print_machine_info(self,group, context): + timestamp = context.pmLocaltime(group.timestamp.tv_sec) +diff --git a/src/pcp/ps/pcp-ps.py b/src/pcp/ps/pcp-ps.py +index 5b80589..1c27cf1 100755 +--- a/src/pcp/ps/pcp-ps.py ++++ b/src/pcp/ps/pcp-ps.py +@@ -248,7 +248,7 @@ class ProcessStatusUtil: + if self.user_percent() is not None and self.guest_percent() is not None and self.system_percent() is not None: + return float("%.2f" % (self.user_percent() + self.guest_percent() + self.system_percent())) + else: +- return None ++ return 0.0 + + def stime(self): + c_systime = self.__get_value('proc.psinfo.stime', self.instance) +@@ -358,6 +358,20 @@ class DynamicProcessReporter: + self.printer = printer + self.processStatOptions = processStatOptions + ++ def __sort_by_idx(self, output_list, sorting_idx, reverse=True): ++ # Rows are tab-delimited; splitting on whitespace breaks when ++ # command/args contain spaces and shifts sortable column indexes. ++ return sorted( ++ output_list, ++ key=lambda row: ( ++ float(row.split('\t')[sorting_idx].strip()) ++ if sorting_idx < len(row.split('\t')) ++ and row.split('\t')[sorting_idx].strip().replace('.', '', 1).replace('-', '', 1).isdigit() ++ else float('-inf') ++ ), ++ reverse=reverse ++ ) ++ + def _is_last_and_args(self, key): + return (key == "args") and \ + self.processStatOptions.colum_list.index(key) == len(self.processStatOptions.colum_list) - 1 +@@ -370,19 +384,15 @@ class DynamicProcessReporter: + # Sorting validations + sorting_idx = None + if self.processStatOptions.sorting_flag: +- if self.processStatOptions.filterstate == "ALL": +- if self.processStatOptions.sorting_order == '%mem': +- sorting_idx = 7 +- elif self.processStatOptions.sorting_order == '%cpu': +- sorting_idx = 8 +- else: +- sorting_idx = next((idx for idx, key in enumerate(self.processStatOptions.colum_list) +- if key == self.processStatOptions.sorting_order), +- None) +- if sorting_idx is None: +- raise ValueError("Sorting order not found in output columns") +- # Adjust for timestamp column +- sorting_idx += 1 ++ # For dynamic output, sorting key must be present in selected columns. ++ if self.processStatOptions.sorting_order not in self.processStatOptions.colum_list: ++ raise ValueError("Sorting order not found in output columns") ++ ++ # Find sorting column index and adjust for Timestamp at position 0. ++ sorting_idx = next((idx for idx, key in enumerate(self.processStatOptions.colum_list) ++ if key == self.processStatOptions.sorting_order), None) ++ # to account for Timestamp colum ++ sorting_idx += 1 + + # Always compute process list ONCE + processes = self.process_filter.filter_processes( +@@ -392,47 +402,8 @@ class DynamicProcessReporter: + output_list = [] + header = None + +- # -------- PATH 1: With filterstate -------- # +- if self.processStatOptions.filterstate == "ALL": +- header = ( +- "Timestamp\tUSER\t\tPID\t\tPPID\t\tPRI\t%CPU\t%MEM\tVSZ" +- "\tRSS\tS\tSTARTED\t\tTIME\t\t" +- "WCHAN\t\t\t\tCommand" +- ) +- +- # Precompute format string +- # fmt = ( +- # "{ts}{indent}{user}\t{pid}\t{ppid}\t{pri}\t{cpu}\t{mem}\t" +- # "{vsz}\t{rss}\t{s}\t{started}\t{time}\t{wchan}\t{cmd}" +- # ) +- for process in processes: +- # Maintain state info +- key = (process.s_name(), process.pid()) +- process_state_info[key] = process_state_info.get(key, 0) + self.delta_time +- row = [timestamp] +- row.extend([ +- process.user_name(), +- process.pid(), +- process.ppid(), +- process.priority(), +- process.total_percent(), +- process.system_percent(), +- process.vsize(), +- process.rss(), +- process.s_name(), +- process.start(), +- process.total_time(), +- process.wchan_s(), +- process.process_name_with_args_last()[:45] +- ]) +- output_list.append( +- "\t".join( +- str(x) if x is not None else '' for x in row +- ) +- ) +- +- # -------- PATH 2: Customized column list -------- # +- elif self.processStatOptions.colum_list is not None: ++ # -------- Dynamic column list path -------- # ++ if self.processStatOptions.colum_list is not None: + + header = "Timestamp\t" + for key in self.processStatOptions.colum_list: +@@ -449,23 +420,14 @@ class DynamicProcessReporter: + # print(row) + output_list.append("\t".join(str(x) if x is not None else '' for x in row)) + +- # -------- PATH 3: Invalid filterstate or column list -------- # ++ # -------- Invalid column list -------- # + # This should never happen, but just in case + else: + raise ValueError("No valid filterstate or column list provided") + + # Sorting logic + if self.processStatOptions.sorting_flag and sorting_idx is not None: +- output_list.sort( +- key=lambda x: ( +- sorting_idx, +- float('inf') if ( +- len(x.split()) <= sorting_idx or +- not x.split()[sorting_idx].replace('.', '', 1).isdigit() +- ) else float(x.split()[sorting_idx]) +- ), +- reverse=True +- ) ++ output_list = self.__sort_by_idx(output_list, sorting_idx, reverse=True) + + # --------- Print output --------- # + self.printer(header) +@@ -530,25 +492,25 @@ class ProcessStatusReporter: + for process in processes: + output_rows.append("%s%s%s\t\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % ( + safe_str(timestamp), safe_str(value_indentation), safe_str(process.user_name()), +- safe_str(process.pid()),safe_str(process.system_percent()), safe_str(process.total_percent()), ++ safe_str(process.pid()),safe_str(process.system_percent()), safe_str(process.mem()), + safe_str(process.vsize()), safe_str(process.rss()), + safe_str(process.tty_name()), safe_str(process.ppid()), safe_str(process.total_time()), + safe_str(process.start()), + safe_str(process.process_name()))) +- cpu_idx = 5 +- mem_idx = 6 ++ cpu_idx = 3 ++ mem_idx = 4 + elif selected_flag == "user": + for process in processes: + output_rows.append("%s%s%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s" % ( + safe_str(timestamp), safe_str(value_indentation), safe_str(process.user_name()), + safe_str(process.pid()), +- safe_str(process.system_percent()), safe_str(process.total_percent()), ++ safe_str(process.system_percent()), safe_str(process.mem()), + safe_str(process.vsize()), safe_str(process.rss()), + safe_str(process.tty_name()), safe_str(process.s_name()), + safe_str(process.total_time()), safe_str(process.start()), + safe_str(process.process_name()))) +- cpu_idx = 5 +- mem_idx = 6 ++ cpu_idx = 3 ++ mem_idx = 4 + elif selected_flag == "command": + for process in processes: + output_rows.append("%s%s%s\t%s\t%s\t%s\t%s" % ( +@@ -584,8 +546,17 @@ class ProcessStatReport(pmcc.MetricGroupPrinter): + + def timeStampDelta(self): + s = self.group.timestamp.tv_sec - self.group.prevTimestamp.tv_sec +- n = self.group.timestamp.tv_nsec - self.group.prevTimestamp.tv_nsec +- return s + n / 1000000000.0 ++ # pmapi timestamps may provide sub-second resolution via tv_nsec (nanoseconds) ++ # or tv_usec (microseconds) depending on the collector. Prefer nanoseconds ++ # when available, but gracefully fall back to microseconds to avoid ++ if hasattr(self.group.timestamp, 'tv_nsec') and hasattr(self.group.prevTimestamp, 'tv_nsec'): ++ n = self.group.timestamp.tv_nsec - self.group.prevTimestamp.tv_nsec ++ return s + n / 1000000000.0 ++ elif hasattr(self.group.timestamp, 'tv_usec') and hasattr(self.group.prevTimestamp, 'tv_usec'): ++ u = self.group.timestamp.tv_usec - self.group.prevTimestamp.tv_usec ++ return s + u / 1000000.0 ++ # it should not reach here ++ return s + + def print_machine_info(self,context): + timestamp = context.pmLocaltime(self.group.timestamp.tv_sec) +@@ -854,6 +825,10 @@ class ProcessStatOptions(pmapi.pmOptions): + try: + if optarg.upper() == "ALL": + self.filterstate = optarg.upper() ++ self.colum_list = [ ++ "uname", "pid", "ppid", "pri", "%cpu", "%mem", ++ "vsize", "rss", "state", "start", "time", "wchan", "args" ++ ] + else: + dummy_list = optarg.replace(',', ' ').split(' ') + if self.debug_mode: +diff --git a/src/pcp/tapestat/pcp-tapestat.py b/src/pcp/tapestat/pcp-tapestat.py +index 4f01c56..42c1a7a 100644 +--- a/src/pcp/tapestat/pcp-tapestat.py ++++ b/src/pcp/tapestat/pcp-tapestat.py +@@ -67,9 +67,18 @@ class TapestatReport(pmcc.MetricGroupPrinter): + Hcount = 0 + def timeStampDelta(self, group): + s = group.timestamp.tv_sec - group.prevTimestamp.tv_sec +- u = group.timestamp.tv_usec - group.prevTimestamp.tv_usec +- # u may be negative here, calculation is still correct. +- return s + u / 1000000.0 ++ # pmapi timestamps may provide sub-second resolution via tv_nsec (nanoseconds) ++ # or tv_usec (microseconds) depending on the collector. Prefer nanoseconds ++ # when available, but gracefully fall back to microseconds to avoid ++ if hasattr(group.timestamp, 'tv_nsec') and hasattr(group.prevTimestamp, 'tv_nsec'): ++ n = group.timestamp.tv_nsec - group.prevTimestamp.tv_nsec ++ # n may be negative here, calculation is still correct. ++ return s + n / 1000000000.0 ++ elif hasattr(group.timestamp, 'tv_usec') and hasattr(group.prevTimestamp, 'tv_usec'): ++ u = group.timestamp.tv_usec - group.prevTimestamp.tv_usec ++ return s + u / 1000000.0 ++ # it should not reach here ++ return s + def instlist(self, group, name): + return dict(map(lambda x: (x[1], x[2]), group[name].netValues)).keys() + +-- +2.43.7 + diff --git a/SOURCES/1033-orabug38902336-adds-interval-option-in-nfsiostat.patch b/SOURCES/1033-orabug38902336-adds-interval-option-in-nfsiostat.patch new file mode 100644 index 0000000..fde7f96 --- /dev/null +++ b/SOURCES/1033-orabug38902336-adds-interval-option-in-nfsiostat.patch @@ -0,0 +1,364 @@ +From c79976edb317272dcc8ae9352778d5d335763f10 Mon Sep 17 00:00:00 2001 +From: Sourav Sharma +Date: Wed, 25 Feb 2026 12:45:43 +0000 +Subject: [PATCH] Add interval and count support for nfsiostat tool + +Signed-off-by: Sourav Sharma + +Cherry-pick-commit: https://github.com/performancecopilot/pcp/commit/02d9b5a7b3c2ea16de2665c1f8cd6b81843fee15 + +Orabug: 38902336 + +Signed-off-by: Sourav Sharma + +--- + src/pcp/nfsiostat/pcp-nfsiostat.py | 269 ++++++++++++++++------------- + 1 file changed, 145 insertions(+), 124 deletions(-) + +diff --git a/src/pcp/nfsiostat/pcp-nfsiostat.py b/src/pcp/nfsiostat/pcp-nfsiostat.py +index 0b0376d..e19fa41 100644 +--- a/src/pcp/nfsiostat/pcp-nfsiostat.py ++++ b/src/pcp/nfsiostat/pcp-nfsiostat.py +@@ -22,7 +22,7 @@ import signal + import sys + import time + from pcp import pmapi, pmcc +-from cpmapi import PM_CONTEXT_ARCHIVE ++from cpmapi import PM_CONTEXT_ARCHIVE, PM_MODE_FORW + + SYS_METRICS= ["kernel.uname.sysname","kernel.uname.release", + "kernel.uname.nodename","kernel.uname.machine","hinv.ncpu"] +@@ -40,98 +40,54 @@ def adjust_length(name): + class ReportingMetricRepository: + + def __init__(self,group): +- self.group=group +- self.current_cached_values = {} +- +- def __sorted(self,data): +- return dict(sorted(data.items(), key=lambda item: item[0].lower())) +- +- def __fetch_current_value(self,metric): +- val=dict(map(lambda x: (x[1], x[2]), self.group[metric].netValues)) +- val=self.__sorted(val) +- return dict(val) +- +- def current_value(self,metric): +- if not metric in self.group: +- return None +- if self.current_cached_values.get(metric) is None: +- first_value=self.__fetch_current_value(metric) +- self.current_cached_values[metric]=first_value +- return self.current_cached_values[metric] ++ self.group = group ++ self._current_cache = {} ++ self._previous_cache = {} ++ ++ def _fetch_values(self, metric, use_previous=False): ++ """Fetch values - always returns a dictionary.""" ++ if metric not in self.group: ++ return {} ++ attr = "netPrevValues" if use_previous else "netValues" ++ values = getattr(self.group[metric], attr, []) ++ return {x[0].inst: x[2] for x in values} if values else {} ++ ++ def _get_values_dict(self, metric, use_previous=False): ++ """Get cached dictionary of all values for a metric.""" ++ cache = self._previous_cache if use_previous else self._current_cache ++ if metric not in cache: ++ cache[metric] = self._fetch_values(metric, use_previous) ++ return cache[metric] ++ ++ def previous_value(self, metric, instance=None): ++ """Get previous value. Returns single value if instance given, else returns dict.""" ++ values_dict = self._get_values_dict(metric, use_previous=True) ++ if instance is not None: ++ return values_dict.get(instance) ++ return values_dict ++ ++ def current_value(self, metric, instance=None): ++ """Get current value. Returns single value if instance given, else returns dict.""" ++ values_dict = self._get_values_dict(metric, use_previous=False) ++ if instance is not None: ++ return values_dict.get(instance) ++ return values_dict ++ ++ def previous_value(self, metric, instance=None): ++ """Get previous value. Returns single value if instance given, else returns dict.""" ++ values_dict = self._get_values_dict(metric, use_previous=True) ++ if instance is not None: ++ return values_dict.get(instance) ++ return values_dict + + class NfsioStatUtil: + def __init__(self,metrics_repository): + self.__metric_repository=metrics_repository + self.report=ReportingMetricRepository(self.__metric_repository) + +- def mount_point(self): +- return self.report.current_value('nfsclient.mountpoint') +- +- def mount_share(self): +- return self.report.current_value('nfsclient.export') +- +- def mount_share_keys(self): +- data = self.report.current_value('nfsclient.export') +- return data.keys() +- +- def sample_time(self): +- return self.report.current_value('nfsclient.age') +- +- def xprt_sends(self): +- return self.report.current_value('nfsclient.xprt.sends') +- +- def xprt_backlog(self): +- return self.report.current_value('nfsclient.xprt.backlog_u') +- +- def readops(self): +- return self.report.current_value('nfsclient.ops.read.ops') +- +- def readerrors(self): +- return self.report.current_value('nfsclient.ops.read.errors') +- +- def readexecute(self): +- return self.report.current_value('nfsclient.ops.read.execute') +- +- def readrtt(self): +- return self.report.current_value('nfsclient.ops.read.rtt') +- +- def readqueue(self): +- return self.report.current_value('nfsclient.ops.read.queue') +- +- def readbytesrecv(self): +- return self.report.current_value('nfsclient.ops.read.bytes_recv') +- +- def readbytessent(self): +- return self.report.current_value('nfsclient.ops.read.bytes_sent') +- +- def readntrans(self): +- return self.report.current_value('nfsclient.ops.read.ntrans') +- +- def writeops(self): +- return self.report.current_value('nfsclient.ops.write.ops') +- +- def writeerrors(self): +- return self.report.current_value('nfsclient.ops.write.errors') +- +- def writeexecute(self): +- return self.report.current_value('nfsclient.ops.write.execute') +- +- def writertt(self): +- return self.report.current_value('nfsclient.ops.write.rtt') +- +- def writequeue(self): +- return self.report.current_value('nfsclient.ops.write.queue') +- +- def writebytesrecv(self): +- return self.report.current_value('nfsclient.ops.write.bytes_recv') +- +- def writebytessent(self): +- return self.report.current_value('nfsclient.ops.write.bytes_sent') +- +- def writentrans(self): +- return self.report.current_value('nfsclient.ops.write.ntrans') +- + class NfsiostatReport(pmcc.MetricGroupPrinter): ++ machine_info_count = 0 ++ + def __init__(self,opts,group): + self.opts = opts + self.group = group +@@ -156,34 +112,67 @@ class NfsiostatReport(pmcc.MetricGroupPrinter): + header_string += context['kernel.uname.machine'].netValues[0][2] + ' ' + print("%s (%s CPU)" % (header_string, self.__get_ncpu(context))) + +- def __print_values(self,timestamp, nfsstatus): +- n_shares = nfsstatus.mount_share_keys() +- mountshare = nfsstatus.mount_share() +- mountpoint = nfsstatus.mount_point() +- sampletime = nfsstatus.sample_time() +- sends = nfsstatus.xprt_sends() +- backlog = nfsstatus.xprt_backlog() +- readops = nfsstatus.readops() +- readerrors = nfsstatus.readerrors() +- readexecute = nfsstatus.readexecute() +- readrtt = nfsstatus.readrtt() +- readqueue = nfsstatus.readqueue() +- readbytesrecv = nfsstatus.readbytesrecv() +- readbytessent = nfsstatus.readbytessent() +- readntrans = nfsstatus.readntrans() +- writeops = nfsstatus.writeops() +- writeerrors = nfsstatus.writeerrors() +- writeexecute = nfsstatus.writeexecute() +- writertt = nfsstatus.writertt() +- writequeue = nfsstatus.writequeue() +- writebytesrecv = nfsstatus.writebytesrecv() +- writebytessent = nfsstatus.writebytessent() +- writentrans = nfsstatus.writentrans() ++ # -------------------------------------------------------- ++ ++ def __collect(self, nfs): ++ return { ++ metric: nfs.report.current_value(metric) ++ for metric in NFSIOSTAT_METRICS ++ } ++ ++ # -------------------------------------------------------- ++ ++ def __delta(self, new: dict, nfs): ++ delta = {} ++ old = { ++ metric: nfs.report.previous_value(metric) ++ for metric in NFSIOSTAT_METRICS ++ } ++ ++ for metric in new: ++ delta[metric] = {} ++ ++ for inst in new[metric]: ++ new_val = new[metric][inst] ++ old_val = old.get(metric, {}).get(inst, 0) ++ ++ # If value is numeric → subtract ++ if isinstance(new_val, (int, float)): ++ delta[metric][inst] = new_val - old_val ++ else: ++ # If string → just copy (no subtraction) ++ delta[metric][inst] = new_val ++ ++ return delta ++ ++ def __print_values(self,timestamp, delta): ++ ++ sampletime = delta["nfsclient.age"] ++ readops = delta["nfsclient.ops.read.ops"] ++ writeops = delta["nfsclient.ops.write.ops"] ++ readbytesrecv = delta["nfsclient.ops.read.bytes_recv"] ++ writebytesrecv = delta["nfsclient.ops.write.bytes_recv"] ++ mountpoint = delta["nfsclient.mountpoint"] ++ mountshare = delta["nfsclient.export"] ++ sends = delta["nfsclient.xprt.sends"] ++ backlog = delta["nfsclient.xprt.backlog_u"] ++ readerrors = delta["nfsclient.ops.read.errors"] ++ readexecute = delta["nfsclient.ops.read.execute"] ++ readrtt = delta["nfsclient.ops.read.rtt"] ++ readqueue = delta["nfsclient.ops.read.queue"] ++ readbytessent = delta["nfsclient.ops.read.bytes_sent"] ++ readntrans = delta["nfsclient.ops.read.ntrans"] ++ writeerrors = delta["nfsclient.ops.write.errors"] ++ writeexecute = delta["nfsclient.ops.write.execute"] ++ writertt = delta["nfsclient.ops.write.rtt"] ++ writequeue = delta["nfsclient.ops.write.queue"] ++ writebytessent = delta["nfsclient.ops.write.bytes_sent"] ++ writentrans = delta["nfsclient.ops.write.ntrans"] + + print("%-18s:%s"%("Timestamp", timestamp)) + print() + +- for name in n_shares: ++ for name in mountshare: + # read + r_kilobytes = (readbytessent[name] + readbytesrecv[name]) / 1024 + if sampletime[name] > 0: +@@ -277,13 +266,24 @@ class NfsiostatReport(pmcc.MetricGroupPrinter): + ) + print() + +- def print_report(self,group,timestamp, manager_nfsiostat): ++ def get_timestamp(self, group): ++ t_s = group.contextCache.pmLocaltime(int(group.timestamp)) ++ timestamp = time.strftime(NfsiostatOptions.timefmt, t_s.struct_time()) ++ return timestamp ++ ++ def print_report(self,group, manager_nfsiostat, mgr): + def __print_nfs_status(): +- nfsstatus = NfsioStatUtil(manager_nfsiostat) +- if nfsstatus.mount_share(): ++ timestamp = self.get_timestamp(group) ++ nfs = NfsioStatUtil(manager_nfsiostat) ++ if nfs.report.current_value("nfsclient.export"): + try: +- self.__print_machine_info(group) +- self.__print_values(timestamp, nfsstatus) ++ if self.machine_info_count == 0: ++ self.__print_machine_info(group) ++ self.machine_info_count = 1 ++ current = self.__collect(nfs) ++ diff_dict = self.__delta(current, nfs) ++ self. __print_values(timestamp, diff_dict) ++ + except IndexError: + print("Incorrect machine info due to some missing metrics") + return +@@ -292,7 +292,6 @@ class NfsiostatReport(pmcc.MetricGroupPrinter): + + if self.context != PM_CONTEXT_ARCHIVE and self.samples is None: + __print_nfs_status() +- sys.exit(0) + elif self.context == PM_CONTEXT_ARCHIVE and self.samples is None: + __print_nfs_status() + elif self.samples >=1: +@@ -302,30 +301,52 @@ class NfsiostatReport(pmcc.MetricGroupPrinter): + pass + + def report(self, manager): +- group = manager["sysinfo"] + self.samples = self.opts.pmGetOptionSamples() +- t_s = group.contextCache.pmLocaltime(int(group.timestamp)) +- timestamp = time.strftime(NfsiostatOptions.timefmt, t_s.struct_time()) +- self.print_report(group,timestamp,manager['nfsiostat']) ++ self.print_report(manager["sysinfo"] ,manager['nfsiostat'], manager) + + class NfsiostatOptions(pmapi.pmOptions): + timefmt = "%m/%d/%Y %H:%M:%S" ++ uflag = False ++ def checkOptions(self, manager): ++ if NfsiostatOptions.uflag: ++ if manager._options.pmGetOptionInterval(): ++ print("Error: -t incompatible with -u") ++ return False ++ if manager.type != PM_CONTEXT_ARCHIVE: ++ print("Error: -u can only be specified with -a archive") ++ return False ++ return True ++ ++ def extraOptions(self, opt, optarg, index): ++ if opt == "u": ++ NfsiostatOptions.uflag = True ++ + def __init__(self): +- pmapi.pmOptions.__init__(self, "a:s:Z:zV?") ++ pmapi.pmOptions.__init__(self, "a:s:Z:t:uzV?") ++ self.pmSetOptionCallback(self.extraOptions) + self.pmSetLongOptionHeader("General options") + self.pmSetLongOptionHostZone() + self.pmSetLongOptionTimeZone() +- self.pmSetLongOptionHelp() ++ self.pmSetLongOptionArchive() + self.pmSetLongOptionSamples() ++ self.pmSetLongOptionInterval() ++ self.pmSetLongOption("no-interpolation", 0, "u", "", "disable interpolation mode with archives") ++ self.pmSetLongOptionHelp() + self.pmSetLongOptionVersion() +- self.samples=None +- self.context=None ++ self.context = None ++ self.samples = None + + if __name__ == '__main__': + try: + opts = NfsiostatOptions() + mngr = pmcc.MetricGroupManager.builder(opts,sys.argv) + opts.context=mngr.type ++ if not opts.checkOptions(mngr): ++ raise pmapi.pmUsageErr ++ ++ if NfsiostatOptions.uflag: ++ # -u turns off interpolation ++ mngr.pmSetMode(PM_MODE_FORW, mngr._options.pmGetOptionOrigin(), None) + missing = mngr.checkMissingMetrics(ALL_METRICS) + if missing is not None: + sys.stderr.write('Error: not all required metrics are available\nMissing %s\n' % missing) +-- +2.43.7 + diff --git a/SOURCES/1034-orabug38509848-introduces-numa-maps-metrics-and-adds-numastat-process-option.patch b/SOURCES/1034-orabug38509848-introduces-numa-maps-metrics-and-adds-numastat-process-option.patch new file mode 100644 index 0000000..c17556b --- /dev/null +++ b/SOURCES/1034-orabug38509848-introduces-numa-maps-metrics-and-adds-numastat-process-option.patch @@ -0,0 +1,1287 @@ +From 5e73c147bec91feb2b5a42171b20da8c3d558183 Mon Sep 17 00:00:00 2001 +From: Sourav Sharma +Date: Wed, 25 Mar 2026 05:19:39 +0000 +Subject: [PATCH] Introduces numa_maps metrics inside linux_proc pmda + +Implemented option -p in pcp numastat tool same as numactl numastat tool + + - Add new per-process NUMA maps metrics derived from /proc//numa_maps: proc.numa_maps.huge, proc.numa_maps.heap, proc.numa_maps.stack, + proc.numa_maps.private (per-node usage in MB, exported as nodeN: pairs). + - Extend pcp numastat/pcp-numastat with -p/--process to display per-process NUMA memory usage in a numastat -p-style layout. + - Convert N= counts to MB using system page size (and Hugepagesize where applicable, with fallback). + + How to Test + + - pcp numastat -p (detail view) and pcp numastat -p (summary view) + +Signed-off-by: Sourav Sharma + +Cherry-pick-commit: +https://github.com/sourav-sharma796/pcp/commit/0ea70c7fda4021cb9e35a0d4e26a30dd97409ddb +https://github.com/sourav-sharma796/pcp/commit/95fe35c176c9394ddcef0af5f4d50606308c77d1 +https://github.com/sourav-sharma796/pcp/commit/757c2a1e1c4b51ee3e304f6c3f3038e6030432f3 + +Orabug: 38509848 + +Signed-off-by: Sourav Sharma + +--- + src/pcp/numastat/pcp-numastat.1 | 23 +- + src/pcp/numastat/pcp-numastat.py | 573 ++++++++++++++++++++++++++++++- + src/pmdas/linux_proc/clusters.h | 3 +- + src/pmdas/linux_proc/help | 13 + + src/pmdas/linux_proc/indom.h | 1 + + src/pmdas/linux_proc/pmda.c | 74 ++++ + src/pmdas/linux_proc/pmdaproc.1 | 4 + + src/pmdas/linux_proc/proc_pid.c | 269 +++++++++++++++ + src/pmdas/linux_proc/proc_pid.h | 17 + + src/pmdas/linux_proc/root_proc | 8 + + 10 files changed, 972 insertions(+), 13 deletions(-) + +diff --git a/src/pcp/numastat/pcp-numastat.1 b/src/pcp/numastat/pcp-numastat.1 +index 631c6cb..7d608fc 100644 +--- a/src/pcp/numastat/pcp-numastat.1 ++++ b/src/pcp/numastat/pcp-numastat.1 +@@ -18,7 +18,7 @@ + \f3pcp-numastat\f1 \- report on NUMA memory allocation + .SH SYNOPSIS + \f3pcp\f1 [\f2pcp\ options\f1] \f3numastat\f1 +-[\fB-V\fR] [\fB-w\fR \fIwidth\fR] [\fB-m\fR][-n\fR] [\fB-?\fR] ++[\fB-V\fR] [\fB-w\fR \fIwidth\fR] [\fB-m\fR][-n\fR] [\fB\-p\fR [\fIprocess\fR ...]] [\fB-?\fR] + .SH DESCRIPTION + .B pcp-numastat + displays NUMA allocation statistics from the kernel memory +@@ -75,13 +75,32 @@ Display meminfo-like system-wide memory usage. + \fB-n\fR, \fB--numastat\fR + Display the numastat statistics info. + .TP ++\fB\-p\fR, \fB\-\-process\fR ++Display per-process NUMA memory usage from \fBproc.numa_maps\fR metrics. ++Any trailing \fIprocess\fR operands are treated as process IDs (when the ++operand is all digits) or regular expressions for command name matching. ++Matching for command names is performed against the full command line ++(as reported by \fBproc.psinfo.psargs\fR). ++When a single process ID operand is provided and it matches exactly one ++process, a detailed table of Hugepage, Heap, Stack and Private mappings is ++shown (as in \fBnumastat \-p\fR). When multiple process ID operands are ++provided, a per-process summary table is shown (also like ++\fBnumastat \-p\fR) and may be split into multiple node column blocks ++based on the available display width. ++.PP ++In the per-process view, node columns are always shown for all NUMA nodes ++present on the system (as reported by PCP NUMA inventory metrics), even if ++individual \fBproc.numa_maps\fR metric instances omit some nodes. Missing ++per-process metrics are reported as zero. ++.TP + \fB\-?\fR, \fB\-\-help\fR + Display usage message and exit. + .SH NOTES + .B pcp-numastat + is inspired by the + .BR numastat (1) +-command and produces exactly the same output. ++command and produces the same output for the system-wide views. The ++per-process view (\fB\-p\fR) follows the \fBnumastat \-p\fR layout. + .SH PCP ENVIRONMENT + Environment variables with the prefix \fBPCP_\fP are used to parameterize + the file and directory names used by PCP. +diff --git a/src/pcp/numastat/pcp-numastat.py b/src/pcp/numastat/pcp-numastat.py +index 2a044c9..decdf12 100755 +--- a/src/pcp/numastat/pcp-numastat.py ++++ b/src/pcp/numastat/pcp-numastat.py +@@ -17,6 +17,7 @@ + """ Display NUMA memory allocation statistucs """ + + import os ++import re + import signal + import sys + import time +@@ -86,6 +87,23 @@ SYS_METRICS = [ + + ALL_METRICS = NUMA_METRICS + MEM_METRICS + ++PROCESS_METRICS = [ ++ "proc.psinfo.pid", ++ "proc.psinfo.cmd", ++ "proc.psinfo.psargs", ++ "proc.numa_maps.hugepage", ++ "proc.numa_maps.heap", ++ "proc.numa_maps.stack", ++ "proc.numa_maps.private", ++] ++ ++PROCESS_NUMA_METRICS = [ ++ ("Huge", "proc.numa_maps.hugepage"), ++ ("Heap", "proc.numa_maps.heap"), ++ ("Stack", "proc.numa_maps.stack"), ++ ("Private", "proc.numa_maps.private"), ++] ++ + def prefix(metric): + last_part = metric.split('.')[-1] + result = last_part[0].upper() + last_part[1:] +@@ -96,6 +114,7 @@ class MetricRepository: + self.group = group + self.current_cached_values = {} + self.previous_cached_values = {} ++ self.current_cached_instance_names = {} + + def _fetch_current_values(self, metric, instance): + if instance is not None: +@@ -192,22 +211,465 @@ class NUMAStat: + def print_numa(self, width, nodes, data): + self.__format_table(width, nodes, data) + ++class ProcessNUMAStat: ++ def __init__(self, group, ignore_pid=None): ++ self.group = group ++ self.repo = MetricRepository(group) ++ self.ignore_pid = ignore_pid ++ ++ def __resize(self, width): ++ """ Find a suitable display width limit (matches NUMAStat.resize) """ ++ if width == 0: ++ if not sys.stdout.isatty(): ++ width = 1000000000 # mimic numastat(1) here ++ else: ++ try: ++ # popen() is SAFE, command is a literal string ++ (_, width) = os.popen('stty size', 'r').read().split() ++ width = int(width) ++ except Exception: ++ width = 80 ++ width = int(os.getenv('NUMASTAT_WIDTH', str(width))) ++ return max(int(width), 32) ++ ++ def __normalize_value(self, value): ++ if value is None: ++ return "" ++ if hasattr(value, "decode"): ++ try: ++ return value.decode("utf-8") ++ except Exception: ++ return value.decode("utf-8", "ignore") ++ return str(value) ++ ++ def __normalize_cmdline(self, value): ++ if value is None: ++ return "" ++ ++ # Convert bytes → string ++ if isinstance(value, bytes): ++ value = value.decode("utf-8", "ignore") ++ ++ # /proc//cmdline uses NULL separators ++ if "\0" in value: ++ parts = value.split("\0") ++ value = " ".join(p for p in parts if p) ++ ++ return value.strip() ++ ++ def __is_missing_command(self, command): ++ normalized = self.__normalize_value(command).strip() ++ return normalized == "" or normalized.lower() == "(null)" ++ ++ def __parse_nodes(self, value): ++ node_values = {} ++ text = self.__normalize_value(value) ++ if not text: ++ return node_values ++ for token in text.split(','): ++ if ':' not in token: ++ continue ++ name, raw_value = token.split(':', 1) ++ name = name.strip() ++ if not name.startswith("node"): ++ continue ++ try: ++ node_id = int(name[4:]) ++ node_values[node_id] = float(raw_value) ++ except (TypeError, ValueError): ++ continue ++ return node_values ++ ++ def __matches_process(self, pid, selectors, haystack): ++ if not selectors: ++ return True ++ haystack = self.__normalize_value(haystack) ++ for selector in selectors: ++ selector_text = self.__normalize_value(selector) ++ if re.fullmatch(r"\d+", selector_text): ++ try: ++ if int(selector_text) == int(pid): ++ return True ++ except (TypeError, ValueError): ++ continue ++ continue ++ if selector_text in haystack: ++ return True ++ return False ++ ++ def __collect_process_categories(self, inst_id, metric_maps): ++ category_values = {} ++ nodes = set() ++ has_data = False ++ for label, metric in PROCESS_NUMA_METRICS: ++ parsed = self.__parse_nodes(metric_maps[metric].get(inst_id, "")) ++ if parsed: ++ has_data = True ++ category_values[label] = parsed ++ nodes.update(parsed.keys()) ++ return category_values, nodes, has_data ++ ++ def __sum_categories(self, category_values): ++ node_totals = {} ++ for values in category_values.values(): ++ for node_id, value in values.items(): ++ node_totals[node_id] = node_totals.get(node_id, 0.0) + value ++ return node_totals ++ ++ def __process_rows(self, selectors, system_nodes=None): ++ rows = [] ++ nodes = set(system_nodes or []) ++ selectors_provided = bool(selectors) ++ requested_pids = set() ++ for selector in selectors or []: ++ selector_text = self.__normalize_value(selector) ++ if re.fullmatch(r"\d+", selector_text): ++ try: ++ requested_pids.add(int(selector_text)) ++ except (TypeError, ValueError): ++ continue ++ pid_map = self.repo.current_values("proc.psinfo.pid") or {} ++ command_map = self.repo.current_values("proc.psinfo.cmd") or {} ++ psargs_map = self.repo.current_values("proc.psinfo.psargs") or {} ++ metric_maps = {} ++ for _, metric in PROCESS_NUMA_METRICS: ++ metric_maps[metric] = self.repo.current_values(metric) or {} ++ ++ # Restrict scanning to processes that are actually present in proc.numa_maps.*. ++ numa_inst_ids = set() ++ for values in metric_maps.values(): ++ try: ++ numa_inst_ids.update(values.keys()) ++ except Exception: ++ continue ++ ++ for inst_id, pid in sorted(pid_map.items(), key=lambda item: item[1]): ++ if inst_id not in numa_inst_ids and int(pid) not in requested_pids: ++ continue ++ if ( ++ self.ignore_pid is not None ++ and int(pid) == int(self.ignore_pid) ++ and int(pid) not in requested_pids ++ ): ++ continue ++ command = command_map.get(inst_id, "") ++ full_command = psargs_map.get(inst_id, command) ++ if self.__is_missing_command(command): ++ if int(pid) in requested_pids: ++ command = "unknown" ++ full_command = "unknown" ++ else: ++ continue ++ # Constrain matching to the same process set and labels as the ++ # proc.numa_maps.* instance domains (e.g. `pminfo -f proc.numa_maps.heap`). ++ match_text = "%s %s" % ( ++ self.__normalize_value(command), ++ self.__normalize_cmdline(full_command), ++ ) ++ if not self.__matches_process(pid, selectors, match_text): ++ continue ++ ++ category_values, category_nodes, has_data = self.__collect_process_categories( ++ inst_id, ++ metric_maps, ++ ) ++ if not has_data and not selectors_provided: ++ continue ++ if not has_data and self.__is_missing_command(command): ++ continue ++ ++ if category_nodes: ++ nodes.update(category_nodes) ++ node_totals = self.__sum_categories(category_values) ++ rows.append((pid, command, node_totals, category_values)) ++ return rows, sorted(nodes) ++ ++ def __node_blocks_for_table(self, nodes, width, pid_col_width): ++ num_col_width = 15 ++ sep = " " ++ col_width = len(sep) + num_col_width ++ ++ width = self.__resize(width) ++ max_cols = int((width - pid_col_width) / col_width) ++ max_cols = max(1, max_cols) ++ max_nodes_no_total = max_cols ++ ++ # If we can only fit one numeric column, there is no room to display ++ # any node column together with a Total column. Emit the nodes first ++ # (one per block), then a final Total-only block. ++ if max_cols <= 1: ++ for node_id in nodes: ++ yield [node_id], False ++ yield [], True ++ return ++ ++ max_nodes_with_total = max_cols - 1 ++ ++ if len(nodes) <= max_nodes_with_total: ++ yield nodes, True ++ return ++ ++ done = 0 ++ while len(nodes) - done > max_nodes_with_total: ++ remaining = len(nodes) - done ++ chunk_size = min(max_nodes_no_total, remaining) ++ ++ # Avoid consuming all remaining nodes in a non-total block (which ++ # would otherwise suppress the Total column entirely when nodes ++ # exactly fill the display width). ++ if remaining <= max_nodes_no_total and remaining - chunk_size == 0: ++ chunk_size = max(1, remaining - 1) ++ ++ chunk = nodes[done:done + chunk_size] ++ if not chunk: ++ break ++ yield chunk, False ++ done += chunk_size ++ ++ yield nodes[done:], True ++ ++ def __print_process_table(self, rows, nodes, width): ++ print("Per-node process memory usage (in MBs)") ++ pid_col_width = max( ++ 16, ++ max( ++ len("%s (%s)" % (pid, self.__normalize_value(command))) ++ for pid, command, _, _ in rows ++ ), ++ ) ++ num_col_width = 15 ++ sep = " " ++ ++ node_totals_all = dict((node_id, 0.0) for node_id in nodes) ++ row_totals = {} ++ grand_total = 0.0 ++ for pid, _, per_node, _ in rows: ++ total = 0.0 ++ for node_id in nodes: ++ value = per_node.get(node_id, 0.0) ++ node_totals_all[node_id] += value ++ total += value ++ row_totals[pid] = total ++ grand_total += total ++ ++ for chunk, include_total in self.__node_blocks_for_table(nodes, width, pid_col_width): ++ header = "%-*s" % (pid_col_width, "PID") ++ for node_id in chunk: ++ header += "%s%*s" % (sep, num_col_width, "Node %d" % node_id) ++ if include_total: ++ header += "%s%*s" % (sep, num_col_width, "Total") ++ print(header) ++ ++ line = "-" * pid_col_width ++ for _ in range(len(chunk) + (1 if include_total else 0)): ++ line += "%s%s" % (sep, "-" * num_col_width) ++ print(line) ++ ++ for pid, command, per_node, _ in rows: ++ label = "%s (%s)" % (pid, self.__normalize_value(command)) ++ row = "%-*s" % (pid_col_width, label) ++ for node_id in chunk: ++ row += "%s%*.2f" % (sep, num_col_width, per_node.get(node_id, 0.0)) ++ if include_total: ++ row += "%s%*.2f" % (sep, num_col_width, row_totals.get(pid, 0.0)) ++ print(row) ++ ++ print(line) ++ total_row = "%-*s" % (pid_col_width, "Total") ++ for node_id in chunk: ++ total_row += "%s%*.2f" % (sep, num_col_width, node_totals_all.get(node_id, 0.0)) ++ if include_total: ++ total_row += "%s%*.2f" % (sep, num_col_width, grand_total) ++ print(total_row) ++ print() ++ ++ def __node_blocks(self, nodes, width): ++ label_width = 16 ++ num_col_width = 15 ++ sep = " " ++ col_width = len(sep) + num_col_width ++ ++ width = self.__resize(width) ++ max_cols = int((width - label_width) / col_width) ++ max_cols = max(1, max_cols) ++ max_nodes_no_total = max_cols ++ ++ # If we can only fit one numeric column, there is no room to display ++ # any node column together with a Total column. Emit the nodes first ++ # (one per block), then a final Total-only block. ++ if max_cols <= 1: ++ for node_id in nodes: ++ yield [node_id], False ++ yield [], True ++ return ++ ++ max_nodes_with_total = max_cols - 1 ++ ++ if len(nodes) <= max_nodes_with_total: ++ yield nodes, True ++ return ++ ++ done = 0 ++ while len(nodes) - done > max_nodes_with_total: ++ remaining = len(nodes) - done ++ chunk_size = min(max_nodes_no_total, remaining) ++ ++ # Avoid consuming all remaining nodes in a non-total block (which ++ # would otherwise suppress the Total column entirely when nodes ++ # exactly fill the display width). ++ if remaining <= max_nodes_no_total and remaining - chunk_size == 0: ++ chunk_size = max(1, remaining - 1) ++ ++ chunk = nodes[done:done + chunk_size] ++ if not chunk: ++ break ++ yield chunk, False ++ done += chunk_size ++ ++ yield nodes[done:], True ++ ++ def __print_process_detail(self, row, nodes, width): ++ pid, command, _, categories = row ++ print("Per-node process memory usage (in MBs) for PID %s (%s)" % ++ (pid, self.__normalize_value(command))) ++ label_width = 16 ++ num_col_width = 15 ++ sep = " " ++ ++ if not nodes: ++ nodes = [0] ++ ++ category_totals = {} ++ node_totals = dict((node_id, 0.0) for node_id in nodes) ++ all_total = 0.0 ++ for label, _ in PROCESS_NUMA_METRICS: ++ values = categories.get(label, {}) ++ total = 0.0 ++ for node_id in nodes: ++ value = values.get(node_id, 0.0) ++ total += value ++ node_totals[node_id] += value ++ category_totals[label] = total ++ all_total += total ++ ++ for chunk, include_total in self.__node_blocks(nodes, width): ++ header = "%-*s" % (label_width, "") ++ for node_id in chunk: ++ header += "%s%*s" % (sep, num_col_width, "Node %d" % node_id) ++ if include_total: ++ header += "%s%*s" % (sep, num_col_width, "Total") ++ print(header) ++ ++ header_line = " " * label_width ++ for _ in range(len(chunk) + (1 if include_total else 0)): ++ header_line += "%s%s" % (sep, "-" * num_col_width) ++ print(header_line) ++ ++ for label, _ in PROCESS_NUMA_METRICS: ++ row = "%-*s" % (label_width, label) ++ values = categories.get(label, {}) ++ for node_id in chunk: ++ row += "%s%*.2f" % (sep, num_col_width, values.get(node_id, 0.0)) ++ if include_total: ++ row += "%s%*.2f" % (sep, num_col_width, category_totals.get(label, 0.0)) ++ print(row) ++ ++ line = "-" * label_width ++ for _ in range(len(chunk) + (1 if include_total else 0)): ++ line += "%s%s" % (sep, "-" * num_col_width) ++ print(line) ++ ++ total_row = "%-*s" % (label_width, "Total") ++ for node_id in chunk: ++ total_row += "%s%*.2f" % (sep, num_col_width, node_totals.get(node_id, 0.0)) ++ if include_total: ++ total_row += "%s%*.2f" % (sep, num_col_width, all_total) ++ print(total_row) ++ print() ++ ++ def print_processes(self, selectors, system_nodes=None, width=0): ++ rows, nodes = self.__process_rows(selectors, system_nodes=system_nodes) ++ if not rows: ++ if selectors: ++ print("No matching processes with NUMA maps data.") ++ else: ++ print("No processes with NUMA maps data.") ++ print() ++ return ++ if not nodes: ++ nodes = [0] ++ selector_texts = [self.__normalize_value(s).strip() for s in (selectors or [])] ++ selectors_are_pids = bool(selector_texts) and all( ++ re.fullmatch(r"\d+", text) for text in selector_texts ++ ) ++ if selectors_are_pids: ++ requested = [] ++ for text in selector_texts: ++ try: ++ requested.append(int(text)) ++ except (TypeError, ValueError): ++ continue ++ ++ rows_by_pid = {} ++ for pid, command, per_node, categories in rows: ++ try: ++ rows_by_pid[int(pid)] = (pid, command, per_node, categories) ++ except (TypeError, ValueError): ++ continue ++ ++ if len(requested) == 1: ++ pid = requested[0] ++ found = rows_by_pid.get(pid) ++ if found is None: ++ print("No matching process with NUMA maps data for PID %s." % pid) ++ print() ++ return ++ self.__print_process_detail(found, nodes, width) ++ return ++ ++ selected_rows = [] ++ for pid in requested: ++ found = rows_by_pid.get(pid) ++ if found is None: ++ print("No matching process with NUMA maps data for PID %s." % pid) ++ print() ++ continue ++ row_pid, command, per_node, categories = found ++ selected_rows.append((row_pid, command, per_node, categories)) ++ if selected_rows: ++ self.__print_process_table(selected_rows, nodes, width) ++ return ++ ++ single_selector = len(selectors or []) == 1 ++ if single_selector and len(rows) == 1: ++ self.__print_process_detail(rows[0], nodes, width) ++ return ++ ++ self.__print_process_table(rows, nodes, width) ++ + class NumaStatOption(pmapi.pmOptions): + context = None + timefmt = "%m/%d/%Y %H:%M:%S" + width = 0 + mem_out = False + numa_out = False ++ process_out = False ++ process_filters = [] + + def override(self,opt): + """ Override standard PCP options to match numastat(1) """ +- if opt == 'n': ++ if opt in ('n', 'p'): + return True + return False + + def __init__(self): + pmapi.pmOptions.__init__(self) +- self.pmSetShortOptions("w:mV?:n") ++ self.width = 0 ++ self.mem_out = False ++ self.numa_out = False ++ self.process_out = False ++ self.process_filters = [] ++ self.pmSetShortOptions("w:mV?np") + self.pmSetOptionCallback(self.extraOptions) + self.pmSetOverrideCallback(self.override) + self.pmSetLongOptionHeader("Numastat options") +@@ -215,6 +677,7 @@ class NumaStatOption(pmapi.pmOptions): + # Map long options to our non-conflicting short letters + self.pmSetLongOption("meminfo", 0, 'm', "", "show meminfo-like system-wide memory usage") + self.pmSetLongOption("numastat", 0, 'n', "", "show the numastat statistics info") ++ self.pmSetLongOption("process", 0, 'p', "", "show per-process NUMA memory usage") + self.pmSetLongOptionVersion() + self.pmSetLongOptionHelp() + +@@ -225,6 +688,8 @@ class NumaStatOption(pmapi.pmOptions): + self.mem_out = True + elif opt == "n": + self.numa_out = True ++ elif opt == "p": ++ self.process_out = True + elif opt == "V": + pass + else: +@@ -232,7 +697,7 @@ class NumaStatOption(pmapi.pmOptions): + return True + + def checkoptions(self): +- if (not self.mem_out) and (not self.numa_out) and (self.width == 0): ++ if (not self.mem_out) and (not self.numa_out) and (not self.process_out): + self.numa_out = True + if self.width < 0: + return False +@@ -284,6 +749,33 @@ class NumaStatReport(pmcc.MetricGroupPrinter): + nodes.sort(key=lambda t: t[0]) + return nodes + ++ def __discover_nodes_all(self, group, name): ++ # Build list of nodes from instances (instance id, instance name) ++ nodes = [] ++ try: ++ for ent in group[name].netValues: ++ inst_id = ent[0].inst ++ inst_name = ent[1] # usually "node0", "node1", ... ++ nodes.append((inst_id, inst_name)) ++ except Exception: ++ pass ++ nodes.sort(key=lambda t: t[0]) ++ return nodes ++ ++ def __node_ids(self, nodes): ++ node_ids = [] ++ for inst_id, inst_name in nodes or []: ++ match = re.match(r"node(\d+)$", str(inst_name)) ++ if match: ++ node_ids.append(int(match.group(1))) ++ continue ++ try: ++ node_ids.append(int(inst_id)) ++ except (TypeError, ValueError): ++ continue ++ node_ids = sorted(set(node_ids)) ++ return node_ids or None ++ + def report(self, manager): + # Print in a stable order + group = manager["sys_info"] +@@ -296,17 +788,54 @@ class NumaStatReport(pmcc.MetricGroupPrinter): + + output_numa = ( + self.options.numa_out +- or (not self.options.mem_out and not self.options.numa_out) + ) + output_mem = self.options.mem_out +- group = manager["numastat"] +- nodes = self.__discover_nodes(group, "mem.numa.util.total") +- timestamp = self.__get_timestamp(group) ++ output_process = self.options.process_out ++ ++ if output_mem or output_numa: ++ group = manager["numastat"] ++ timestamp_group = group ++ elif output_process: ++ group = manager["process_numa"] ++ timestamp_group = group ++ else: ++ return ++ ++ timestamp = self.__get_timestamp(timestamp_group) + print("%-20s : %s"%("Timestamp", timestamp)) + if output_mem: ++ nodes = self.__discover_nodes(group, "mem.numa.util.total") + NUMAStat(group).print_mem(self.options.width, nodes, "meminfo") + if output_numa: ++ nodes = self.__discover_nodes(group, "mem.numa.util.total") + NUMAStat(group).print_numa(self.options.width, nodes, "numastat") ++ if output_process: ++ ignore_pid = None ++ if ( ++ NumaStatOption.context is not PM_CONTEXT_ARCHIVE ++ and not self.options.pmGetOptionHosts() ++ ): ++ ignore_pid = os.getpid() ++ system_nodes = None ++ try: ++ system_nodes = self.__node_ids( ++ self.__discover_nodes(manager["sys_info"], "hinv.node.online") ++ ) ++ except Exception: ++ system_nodes = None ++ if system_nodes is None: ++ try: ++ system_nodes = self.__node_ids( ++ self.__discover_nodes_all(manager["sys_info"], "mem.numa.alloc.hit") ++ ) ++ except Exception: ++ system_nodes = None ++ ++ ProcessNUMAStat(manager["process_numa"], ignore_pid).print_processes( ++ self.options.process_filters, ++ system_nodes=system_nodes, ++ width=self.options.width, ++ ) + + if ( + NumaStatOption.context is not PM_CONTEXT_ARCHIVE +@@ -323,13 +852,37 @@ if __name__ == '__main__': + raise pmapi.pmUsageErr() + NumaStatOption.context = mngr.type + +- missing = mngr.checkMissingMetrics(ALL_METRICS) ++ opts.process_filters = opts.pmGetOperands() ++ if opts.process_filters and not opts.process_out: ++ print("Process selectors require -p/--process option") ++ raise pmapi.pmUsageErr() ++ if not opts.process_filters and opts.process_out: ++ print("Provide pid or process name for -p/--process option") ++ raise pmapi.pmUsageErr() ++ ++ required_metrics = list(SYS_METRICS) ++ if opts.mem_out or opts.numa_out: ++ required_metrics.extend(ALL_METRICS) ++ if opts.process_out: ++ required_metrics.extend(PROCESS_METRICS) ++ required_metrics = list(dict.fromkeys(required_metrics)) ++ ++ missing = mngr.checkMissingMetrics(required_metrics) + if missing is not None: + sys.stderr.write('Error: not all required metrics are available\nMissing: %s\n' % (missing)) + sys.exit(1) + +- mngr["numastat"] = ALL_METRICS +- mngr["sys_info"] = SYS_METRICS ++ sys_info_metrics = list(SYS_METRICS) ++ if mngr.checkMissingMetrics(["hinv.node.online"]) is None: ++ sys_info_metrics.append("hinv.node.online") ++ if mngr.checkMissingMetrics(["mem.numa.alloc.hit"]) is None: ++ sys_info_metrics.append("mem.numa.alloc.hit") ++ ++ if opts.mem_out or opts.numa_out: ++ mngr["numastat"] = ALL_METRICS ++ if opts.process_out: ++ mngr["process_numa"] = PROCESS_METRICS ++ mngr["sys_info"] = sys_info_metrics + mngr.printer = NumaStatReport(opts) + sts = mngr.run() + sys.exit(sts) +diff --git a/src/pmdas/linux_proc/clusters.h b/src/pmdas/linux_proc/clusters.h +index fb97a0f..244dd0c 100644 +--- a/src/pmdas/linux_proc/clusters.h ++++ b/src/pmdas/linux_proc/clusters.h +@@ -69,8 +69,9 @@ + #define CLUSTER_HOTPROC_PID_CWD 73 /* /proc//cwd */ + #define CLUSTER_PID_AUTOGROUP 74 /* /proc//autogroup */ + #define CLUSTER_HOTPROC_PID_AUTOGROUP 75 /* /proc//autogroup */ ++#define CLUSTER_PID_NUMA_MAPS 76 /* /proc//numa_maps */ + + #define MIN_CLUSTER 8 /* first cluster number we use here */ +-#define MAX_CLUSTER 76 /* one more than highest cluster number used */ ++#define MAX_CLUSTER 77 /* one more than highest cluster number used */ + + #endif /* _CLUSTERS_H */ +diff --git a/src/pmdas/linux_proc/help b/src/pmdas/linux_proc/help +index 3a24d7a..45c3d27 100644 +--- a/src/pmdas/linux_proc/help ++++ b/src/pmdas/linux_proc/help +@@ -75,6 +75,19 @@ kernel threads + @ proc.runq.kernel number of kernel threads + Instantaneous number of processes with virtual size of zero (kernel threads) + ++@ proc.numa_maps.hugepage per-node hugepage mapped memory in MB (/proc//numa_maps) ++Hugepage map values are reported as comma-separated node/value pairs, e.g. ++node0:0.00,node1:4.00 where each value is in megabytes. ++@ proc.numa_maps.heap per-node heap mapped memory in MB (/proc//numa_maps) ++Heap map values are reported as comma-separated node/value pairs, e.g. ++node0:0.00,node1:4.00 where each value is in megabytes. ++@ proc.numa_maps.stack per-node stack mapped memory in MB (/proc//numa_maps) ++Stack map values are reported as comma-separated node/value pairs, e.g. ++node0:0.00,node1:4.00 where each value is in megabytes. ++@ proc.numa_maps.private per-node private mapped memory in MB (/proc//numa_maps) ++Private map values are reported as comma-separated node/value pairs, e.g. ++node0:0.00,node1:4.00 where each value is in megabytes. ++ + @ proc.control.all.threads process indom includes threads + If set to one, the process instance domain as reported by pmdaproc + contains all threads as well as the processes that started them. +diff --git a/src/pmdas/linux_proc/indom.h b/src/pmdas/linux_proc/indom.h +index abe2596..c5c00a6 100644 +--- a/src/pmdas/linux_proc/indom.h ++++ b/src/pmdas/linux_proc/indom.h +@@ -62,6 +62,7 @@ extern FILE *proc_statsfile(const char *, char *, int); + + /* Generic globals setup during PMDA startup */ + extern size_t _pm_system_pagesize; ++extern size_t _pm_system_hugepagesize; + extern long _pm_hertz; + + /* +diff --git a/src/pmdas/linux_proc/pmda.c b/src/pmdas/linux_proc/pmda.c +index 67baf1a..21821c1 100644 +--- a/src/pmdas/linux_proc/pmda.c ++++ b/src/pmdas/linux_proc/pmda.c +@@ -65,6 +65,7 @@ static int autogroup = -1; /* =1 autogroup enabled */ + static unsigned int threads; /* control.all.threads */ + static char * cgroups; /* control.all.cgroups */ + size_t _pm_system_pagesize; ++size_t _pm_system_hugepagesize; + long _pm_hertz; + + /* +@@ -1331,6 +1332,24 @@ static pmdaMetric metrictab[] = { + /* acct.control.enabled */ + { NULL, { PMDA_PMID(CLUSTER_ACCT,CONTROL_ACCT_ENABLE), PM_TYPE_U32, PM_INDOM_NULL, + PM_SEM_DISCRETE, PMDA_PMUNITS(0,0,0,0,0,0) }, }, ++ ++/* ++* numa_maps cluster ++*/ ++ ++/* proc.numa_maps.hugepage */ ++ { NULL, { PMDA_PMID(CLUSTER_PID_NUMA_MAPS,0), PM_TYPE_STRING, PROC_INDOM, ++ PM_SEM_INSTANT, PMDA_PMUNITS(0,0,0,0,0,0)}}, ++/* proc.numa_maps.heap */ ++ { NULL, { PMDA_PMID(CLUSTER_PID_NUMA_MAPS,1), PM_TYPE_STRING, PROC_INDOM, ++ PM_SEM_INSTANT, PMDA_PMUNITS(0,0,0,0,0,0)}}, ++/* proc.numa_maps.stack */ ++ { NULL, { PMDA_PMID(CLUSTER_PID_NUMA_MAPS,2), PM_TYPE_STRING, PROC_INDOM, ++ PM_SEM_INSTANT, PMDA_PMUNITS(0,0,0,0,0,0)}}, ++/* proc.numa_maps.private */ ++ { NULL, { PMDA_PMID(CLUSTER_PID_NUMA_MAPS,3), PM_TYPE_STRING, PROC_INDOM, ++ PM_SEM_INSTANT, PMDA_PMUNITS(0,0,0,0,0,0)}}, ++ + }; + + pmInDom +@@ -3380,7 +3399,34 @@ proc_fetchCallBack(pmdaMetric *mdesc, unsigned int inst, pmAtomValue *atom) + return PM_ERR_PMID; + } + break; ++ case CLUSTER_PID_NUMA_MAPS: ++ if (!have_access) ++ return PM_ERR_PERMISSION; ++ if ((entry = fetch_proc_pid_numa_maps(inst, active_proc_pid, &sts)) == NULL) ++ return sts; ++ if (!(entry->success & PROC_PID_FLAG_NUMA_MAPS)) ++ return 0; ++ ++ switch(item) { ++ case 0: /* proc.numa_maps.hugepage */ ++ atom->cp = proc_strings_lookup(entry->numa_maps.huge_id); ++ break; ++ ++ case 1: /* proc.numa_maps.heap */ ++ atom->cp = proc_strings_lookup(entry->numa_maps.heap_id); ++ break; ++ ++ case 2: /* proc.numa_maps.stack */ ++ atom->cp = proc_strings_lookup(entry->numa_maps.stack_id); ++ break; + ++ case 3: /* proc.numa_maps.private */ ++ atom->cp = proc_strings_lookup(entry->numa_maps.private_id); ++ break; ++ default: /* unknown cluster */ ++ return PM_ERR_PMID; ++ } ++ break; + default: /* unknown cluster */ + return PM_ERR_PMID; + } +@@ -3743,6 +3789,30 @@ proc_gidname_lookup(int gid) + return ""; + } + ++static size_t ++proc_hugepagesize(void) ++{ ++ unsigned long huge_page_size_kb = 0; ++ char buf[128]; ++ FILE *fs; ++ ++ if ((fs = fopen("/proc/meminfo", "r")) == NULL) ++ return 0; ++ ++ while (fgets(buf, sizeof(buf), fs)) { ++ if (sscanf(buf, "Hugepagesize: %lu kB", &huge_page_size_kb) == 1) ++ break; ++ } ++ fclose(fs); ++ ++ /* Guard against overflow (CID 502014) */ ++ if (huge_page_size_kb > ULONG_MAX / 1024UL) { ++ return 0; ++ } ++ ++ return huge_page_size_kb * 1024UL; ++} ++ + /* + * Initialise the agent (both daemon and DSO). + */ +@@ -3764,6 +3834,10 @@ proc_init(pmdaInterface *dp) + _pm_system_pagesize = atoi(envpath); + else + _pm_system_pagesize = getpagesize(); ++ if ((envpath = getenv("PROC_HUGEPAGESIZE")) != NULL) ++ _pm_system_hugepagesize = atoi(envpath); ++ else ++ _pm_system_hugepagesize = proc_hugepagesize(); + if ((envpath = getenv("PROC_STATSPATH")) != NULL) + proc_statspath = envpath; + if ((envpath = getenv("PROC_THREADS")) != NULL) +diff --git a/src/pmdas/linux_proc/pmdaproc.1 b/src/pmdas/linux_proc/pmdaproc.1 +index 75f6b4b..d51c675 100644 +--- a/src/pmdas/linux_proc/pmdaproc.1 ++++ b/src/pmdas/linux_proc/pmdaproc.1 +@@ -34,6 +34,10 @@ The + PMDA exports metrics that measure the memory, processor and + other resource use of each process, as well as summary information + collated across all of the running processes. ++This includes per-process NUMA placement summaries from ++.I /proc//numa_maps ++via the ++.BR proc.numa_maps.*\ metrics. + The PMDA uses credentials passed from the + .BR PMAPI (3) + monitoring tool identifying the user requesting the information, +diff --git a/src/pmdas/linux_proc/proc_pid.c b/src/pmdas/linux_proc/proc_pid.c +index bb5e94d..cfb02b3 100644 +--- a/src/pmdas/linux_proc/proc_pid.c ++++ b/src/pmdas/linux_proc/proc_pid.c +@@ -2286,3 +2286,272 @@ fetch_proc_pid_autogroup(int id, proc_pid_t *proc_pid, int *sts) + } + return (*sts < 0) ? NULL : ep; + } ++ ++#define PROCESS_HUGE_INDEX 0 ++#define PROCESS_HEAP_INDEX 1 ++#define PROCESS_STACK_INDEX 2 ++#define PROCESS_PRIVATE_INDEX 3 ++#define PROCESS_CATEGORY_COUNT 4 ++ ++#define MEGABYTE (1024.0 * 1024.0) ++ ++static const char *process_mem_tokens[] = { ++ "huge", ++ "heap", ++ "stack", ++}; ++ ++typedef struct { ++ char *s; ++ size_t len; ++ size_t cap; ++} strbuf_t; ++ ++typedef struct { ++ int node; ++ double values[PROCESS_CATEGORY_COUNT]; ++} numa_node_totals_t; ++ ++static int ++append_numa_maps_node(strbuf_t *b, int node_num, double value_mb) ++{ ++ char tmp[64]; ++ char *newptr; ++ size_t needed, newcap; ++ int n; ++ ++ n = pmsprintf(tmp, sizeof(tmp), "%snode%d:%.2f", ++ b->len > 0 ? "," : "", node_num, value_mb); ++ if (n < 0 || n >= (int)sizeof(tmp)) ++ return -E2BIG; ++ ++ if (b->s == NULL) { ++ b->cap = 128; ++ b->s = (char *)malloc(b->cap); ++ if (b->s == NULL) ++ return -ENOMEM; ++ b->len = 0; ++ b->s[0] = '\0'; ++ } ++ ++ needed = b->len + (size_t)n + 1; ++ if (needed > b->cap) { ++ newcap = b->cap; ++ while (newcap < needed) ++ newcap *= 2; ++ ++ newptr = (char *)realloc(b->s, newcap); ++ if (newptr == NULL) ++ return -ENOMEM; ++ ++ b->s = newptr; ++ b->cap = newcap; ++ } ++ ++ memcpy(b->s + b->len, tmp, (size_t)n); ++ b->len += (size_t)n; ++ b->s[b->len] = '\0'; ++ return 0; ++} ++ ++static int ++find_or_add_numa_node(numa_node_totals_t **nodes, int *node_count, int node) ++{ ++ numa_node_totals_t *new_nodes; ++ int i; ++ ++ for (i = 0; i < *node_count; i++) { ++ if ((*nodes)[i].node == node) ++ return i; ++ } ++ ++ new_nodes = (numa_node_totals_t *)realloc(*nodes, ++ (*node_count + 1) * sizeof(*new_nodes)); ++ if (new_nodes == NULL) ++ return -ENOMEM; ++ ++ *nodes = new_nodes; ++ (*nodes)[*node_count].node = node; ++ memset((*nodes)[*node_count].values, 0, sizeof((*nodes)[*node_count].values)); ++ (*node_count)++; ++ return *node_count - 1; ++} ++ ++static int ++compare_numa_node_totals(const void *a, const void *b) ++{ ++ const numa_node_totals_t *node_a = (const numa_node_totals_t *)a; ++ const numa_node_totals_t *node_b = (const numa_node_totals_t *)b; ++ ++ return node_a->node - node_b->node; ++} ++ ++static int ++numa_maps_category(const char *line) ++{ ++ char *copy, *tok, *saveptr = NULL; ++ int i; ++ ++ if ((copy = strdup(line)) == NULL) ++ return PROCESS_PRIVATE_INDEX; ++ ++ tok = strtok_r(copy, " \t", &saveptr); ++ while (tok != NULL) { ++ for (i = PROCESS_HUGE_INDEX; i <= PROCESS_STACK_INDEX; i++) { ++ if (strcmp(tok, process_mem_tokens[i]) == 0) { ++ free(copy); ++ return i; ++ } ++ } ++ tok = strtok_r(NULL, " \t", &saveptr); ++ } ++ free(copy); ++ return PROCESS_PRIVATE_INDEX; ++} ++ ++static int ++parse_proc_numa_maps(proc_pid_entry_t *ep, size_t buflen, char *buf) ++{ ++ strbuf_t huge = {0}, heap = {0}, stack = {0}, priv = {0}; ++ numa_node_totals_t *nodes = NULL; ++ double page_size_bytes, huge_page_size_bytes; ++ int node_count = 0; ++ int sts = 0; ++ char *cur = buf; ++ char *end; ++ ++ if (buf == NULL || buflen == 0) ++ return 0; ++ /* ++ * Ensure the proc buffer is NUL-terminated so the string routines below ++ * cannot read past the end. read_proc_entry() allocates len+1 bytes and ++ * uses buflen (len) for the bytes-read value passed here. ++ */ ++ buf[buflen] = '\0'; ++ end = buf + buflen; ++ ++ page_size_bytes = (double)_pm_system_pagesize; ++ if (page_size_bytes <= 0.0) ++ page_size_bytes = 4096.0; ++ ++ huge_page_size_bytes = (double)_pm_system_hugepagesize; ++ if (huge_page_size_bytes <= 0.0) ++ huge_page_size_bytes = 2048 * 1024; // Taking a common hugepagesize value as a fallback ++ ++ while (cur < end && *cur) { ++ char *nl = memchr(cur, '\n', (size_t)(end - cur)); ++ char *tok, *saveptr = NULL; ++ int category; ++ ++ if (nl != NULL) ++ *nl = '\0'; ++ ++ category = numa_maps_category(cur); ++ tok = strtok_r(cur, " \t", &saveptr); ++ while (tok != NULL) { ++ int node, index; ++ double pages, bytes; ++ ++ if (tok[0] == 'N' && sscanf(tok, "N%d=%lf", &node, &pages) == 2) { ++ index = find_or_add_numa_node(&nodes, &node_count, node); ++ if (index < 0) { ++ sts = index; ++ goto cleanup; ++ } ++ ++ if (category == PROCESS_HUGE_INDEX) ++ bytes = pages * huge_page_size_bytes; ++ else ++ bytes = pages * page_size_bytes; ++ ++ nodes[index].values[category] += bytes / MEGABYTE; ++ } ++ tok = strtok_r(NULL, " \t", &saveptr); ++ } ++ ++ if (nl == NULL) ++ break; ++ *nl = '\n'; ++ cur = nl + 1; ++ } ++ ++ if (node_count > 1) ++ qsort(nodes, node_count, sizeof(*nodes), compare_numa_node_totals); ++ ++ for (int i = 0; i < node_count; i++) { ++ sts = append_numa_maps_node(&huge, nodes[i].node, ++ nodes[i].values[PROCESS_HUGE_INDEX]); ++ if (sts < 0) ++ goto cleanup; ++ sts = append_numa_maps_node(&heap, nodes[i].node, ++ nodes[i].values[PROCESS_HEAP_INDEX]); ++ if (sts < 0) ++ goto cleanup; ++ sts = append_numa_maps_node(&stack, nodes[i].node, ++ nodes[i].values[PROCESS_STACK_INDEX]); ++ if (sts < 0) ++ goto cleanup; ++ sts = append_numa_maps_node(&priv, nodes[i].node, ++ nodes[i].values[PROCESS_PRIVATE_INDEX]); ++ if (sts < 0) ++ goto cleanup; ++ } ++ ++ if (huge.s != NULL) ++ ep->numa_maps.huge_id = proc_strings_insert(huge.s); ++ if (heap.s != NULL) ++ ep->numa_maps.heap_id = proc_strings_insert(heap.s); ++ if (stack.s != NULL) ++ ep->numa_maps.stack_id = proc_strings_insert(stack.s); ++ if (priv.s != NULL) ++ ep->numa_maps.private_id = proc_strings_insert(priv.s); ++ ++cleanup: ++ free(nodes); ++ free(huge.s); ++ free(heap.s); ++ free(stack.s); ++ free(priv.s); ++ return sts; ++} ++ ++static int ++refresh_proc_pid_numa_maps(proc_pid_entry_t *ep) ++{ ++ int fd, sts; ++ ++ if (ep->success & PROC_PID_FLAG_NUMA_MAPS) ++ return 0; ++ if ((fd = proc_open("numa_maps", ep)) < 0) ++ return maperr(); ++ ep->numa_maps.huge_id = -1; ++ ep->numa_maps.heap_id = -1; ++ ep->numa_maps.stack_id = -1; ++ ep->numa_maps.private_id = -1; ++ if ((sts = read_proc_entry(fd, &procbuflen, &procbuf)) >= 0) { ++ sts = parse_proc_numa_maps(ep, procbuflen, procbuf); ++ if (sts >= 0) ++ ep->success |= PROC_PID_FLAG_NUMA_MAPS; ++ } ++ close(fd); ++ return sts; ++} ++ ++/* ++ * fetch data from /proc//numa_maps entries for pid ++ */ ++proc_pid_entry_t * ++fetch_proc_pid_numa_maps(int id, proc_pid_t *proc_pid, int *sts) ++{ ++ proc_pid_entry_t *ep = proc_pid_entry_lookup(id, proc_pid); ++ ++ *sts = 0; ++ if (!ep) ++ return NULL; ++ ++ if (!(ep->fetched & PROC_PID_FLAG_NUMA_MAPS)) { ++ *sts = refresh_proc_pid_numa_maps(ep); ++ ep->fetched |= PROC_PID_FLAG_NUMA_MAPS; ++ } ++ return (*sts < 0) ? NULL : ep; ++} +diff --git a/src/pmdas/linux_proc/proc_pid.h b/src/pmdas/linux_proc/proc_pid.h +index 937c2d6..4ed28ab 100644 +--- a/src/pmdas/linux_proc/proc_pid.h ++++ b/src/pmdas/linux_proc/proc_pid.h +@@ -201,6 +201,16 @@ typedef struct { + uint64_t locked; + } proc_pid_smaps_t; + ++/* ++ * metrics in /proc//numa_maps ++ */ ++typedef struct { ++ int huge_id; ++ int heap_id; ++ int stack_id; ++ int private_id; ++} proc_pid_numa_maps_t; ++ + enum { + PROC_PID_FLAG_VALID = 1<<0, + +@@ -220,6 +230,7 @@ enum { + PROC_PID_FLAG_CWD = 1<<14, + PROC_PID_FLAG_EXE = 1<<15, + PROC_PID_FLAG_AUTOGROUP = 1<<16, ++ PROC_PID_FLAG_NUMA_MAPS = 1<<17, + }; + + typedef struct { +@@ -253,6 +264,9 @@ typedef struct { + /* /proc//smaps_rollup cluster */ + proc_pid_smaps_t smaps; + ++ /* /proc//numa_maps cluster */ ++ proc_pid_numa_maps_t numa_maps; ++ + /* /proc//maps cluster */ + size_t maps_buflen; + +@@ -301,6 +315,9 @@ typedef struct { + /* lookup a proc hash entry */ + extern proc_pid_entry_t *proc_pid_entry_lookup(int, proc_pid_t *); + ++/* fetch a proc//numa_maps entry for pid */ ++extern proc_pid_entry_t *fetch_proc_pid_numa_maps(int, proc_pid_t *, int *); ++ + /* refresh the proc indom, reset all "fetched" flags */ + extern int refresh_proc_pid(proc_pid_t *, proc_runq_t *, int, const char *, const char *, int); + +diff --git a/src/pmdas/linux_proc/root_proc b/src/pmdas/linux_proc/root_proc +index 4bb3c69..a714054 100644 +--- a/src/pmdas/linux_proc/root_proc ++++ b/src/pmdas/linux_proc/root_proc +@@ -441,6 +441,14 @@ proc { + smaps PROC:*:* + autogroup PROC:*:* + control ++ numa_maps ++} ++ ++proc.numa_maps { ++ hugepage PROC:76:0 ++ heap PROC:76:1 ++ stack PROC:76:2 ++ private PROC:76:3 + } + + hotproc { +-- +2.43.7 + diff --git a/SOURCES/1035-pmrep-add-unit-information-option-for-CSV-headers.patch b/SOURCES/1035-pmrep-add-unit-information-option-for-CSV-headers.patch new file mode 100644 index 0000000..aec81a0 --- /dev/null +++ b/SOURCES/1035-pmrep-add-unit-information-option-for-CSV-headers.patch @@ -0,0 +1,776 @@ +From 18ad74bfbec889c1a68a5ba055248b3aeb8a5280 Mon Sep 17 00:00:00 2001 +From: Sagar Sagar +Date: Mon, 11 May 2026 12:51:12 +0000 +Subject: [PATCH OL8 Patch1035 1/1] pmrep: add unit information option for CSV + headers + +Add --csv-unit-info to include metric unit strings in CSV header fields, +using metric(unit) and metric[instance](unit) formatting. Keep stdout +unit header behavior separate by clarifying --no-unit-info as stdout-only. + +Centralize CSV header sanitization, update instance formatting in CSV +headers, and refresh pmrep documentation for the new option, pcp2csv, +debug options, and derived metric handling. + +Orabug: 39064482 +Signed-off-by: Sagar Sagar +--- + src/pmrep/pmrep.1 | 225 +++++++++++++++++++++++++++++++++++---------- + src/pmrep/pmrep.py | 92 ++++++++++-------- + 2 files changed, 231 insertions(+), 86 deletions(-) + +diff --git a/src/pmrep/pmrep.1 b/src/pmrep/pmrep.1 +index bafecbb..3d3a11d 100644 +--- a/src/pmrep/pmrep.1 ++++ b/src/pmrep/pmrep.1 +@@ -1,6 +1,6 @@ +-'\"macro stdmacro ++'\" t + .\" +-.\" Copyright (C) 2015-2021 Marko Myllynen ++.\" Copyright (C) 2015-2026 Marko Myllynen + .\" Copyright (c) 2016-2018 Red Hat. + .\" + .\" This program is free software; you can redistribute it and/or modify it +@@ -16,7 +16,7 @@ + .\" + .TH PMREP 1 "PCP" "Performance Co-Pilot" + .SH NAME +-\f3pmrep\f1 \- performance metrics reporter ++\f3pmrep\f1, \f3pcp2csv\f1 \- performance metrics reporter + .SH SYNOPSIS + \fBpmrep\fP + [\fB\-12357CdgGHIjkLmnprRuUvVxz?\fP] +@@ -29,6 +29,8 @@ + [\fB\-b\fP|\fB\-B\fP \fIspace-scale\fP] + [\fB\-c\fP \fIconfig\fP] + [\fB\-\-container\fP \fIcontainer\fP] ++[\fB\-\-csv\-unit\-info\fP] ++[\f3\-D\f1 \f2debug\f1] + [\fB\-\-daemonize\fP] + [\fB\-e\fP \fIderived\fP] + [\fB\-E\fP \fIlines\fP] +@@ -84,7 +86,7 @@ collects selected metric values through the facilities of the + Performance Co-Pilot (PCP), see + .BR PCPIntro (1). + The metrics to be reported are specified on the command line, +-in a configuration file, or both. ++in configuration files, or both. + Metrics can be automatically converted and scaled using the PCP facilities, + either by default or by per-metric scaling specifications. + In addition to the existing metrics, derived metrics can be defined using +@@ -95,7 +97,7 @@ A wide range of metricsets (see below) is included by default, providing + reports on per-process details, NUMA performance, mimicking other tools + like + .BR sar(1) +-and more, see the \fBpmrep\fP configuration files under ++and more, see the \fBpmrep\fP configuration files in + .I $PCP_SYSCONF_DIR/pmrep + (typically \fI/etc/pcp/pmrep\fP) for details. + Tab completion for options, metrics, and metricsets +@@ -113,7 +115,7 @@ The + .B \-a + option causes + .B pmrep +-to use the specified set of archive logs rather than connecting to a PMCD. ++to use the specified set of archives rather than connecting to a PMCD. + The + .B \-a + and +@@ -141,7 +143,7 @@ If a metricspec specifies a non-leaf node in the + Performance Metrics Name Space (PMNS), then + .B pmrep + will recursively descend the PMNS and report on all leaf nodes +-(i.e., metrics) for that metricspec. ++(i.e. metrics) for that metricspec. + Use + .BR pminfo (1) + to list all the metrics (PMNS lead nodes) and their descriptions. +@@ -151,11 +153,13 @@ A + has three different forms. + First, on the command line it can start with a colon (``:'') to indicate a + .I metricset +-to be read from a ++to be read from + .B pmrep +-configuration file (see ++configuration files (see ++.B \-c ++and + .BR pmrep.conf (5)), +-which can then consist of any number of metrics. ++which may then consist of any number of metrics. + Second, a + .I metricspec + starting with non-colon specifies a PMNS node as described above, +@@ -165,7 +169,7 @@ This so-called + of a metricspec is defined as follows: + .PP + .in 0.5i +-.ft CW ++.ft CR + .nf + metric[,label[,instances[,unit/scale[,type[,width[,precision[,limit]]]]]]] + .fi +@@ -175,7 +179,7 @@ metric[,label[,instances[,unit/scale[,type[,width[,precision[,limit]]]]]]] + A valid PMNS node + .RI ( metric ) + is mandatory. +-It can be followed by a text ++It may be followed by a text + .I label + used with + .I stdout +@@ -240,7 +244,7 @@ are optional, they must always be provided in the order specified above, + thus the commas. + .PP + .in 1.5i +-.ft CW ++.ft CR + .nf + kernel.all.sysfork,forks,,,,8 + .fi +@@ -261,6 +265,10 @@ Configuration file options override the corresponding + environment variables (if any). + Command line options override the corresponding configuration + file options (if any). ++.PP ++.B pcp2csv ++is an alias for ++.BR pmrep . + .SH OPTIONS + The available command line options are: + .TP 5 +@@ -271,7 +279,7 @@ but this option \fIwill\fP override per-metric specifications. + .TP + \fB\-1\fR, \fB\-\-dynamic\-header\fR + Print a new dynamically adjusted header every time changes in +-availability of metric and instance values occur. ++the availability of metric and instance values occur. + By default a static header that never changes is printed once. + See also + .BR \-4 , +@@ -308,12 +316,37 @@ Valid values for + .I action + are \fBupdate\fP (refresh metrics being sampled), + \fBignore\fP (do nothing \- the default behaviour) +-and \fBabort\fP (exit the program if such an event happens). ++and \fBabort\fP (exit the program if such an event occurs). + \fIupdate\fP implies \fB\-\-dynamic\-header\fP. + .TP + \fB\-5\fR, \fB\-\-ignore\-unknown\fR +-Silently ignore any metric name that cannot be resolved. +-At least one metric must be found for the tool to start. ++A metric that ++.B pmrep ++is asked to report may be ``unknown'' for a number of reasons: ++the metric is not in the PMNS of the requested source of metrics (\c ++.BR pmcd (1) ++for live metrics from a host, or a PCP archive for historical metrics), ++or one or more operand metrics in a derived metric definition is not available, ++or a derived metric definition contains syntax errors. ++By default, ++.B pmrep ++will report errors and exit if ++.B any ++requested metric is unknown. ++The ++.B \-5 ++option changes the default behaviour and ++.B pmrep ++will silently ignore any metric that is unknown, provided ++at least one known metric remains to be reported. ++.RS ++.PP ++If an unknown metric is associated with a derived metric definition, ++refer to ++.BR pmRegisterDerivedMetric (3) ++for a deeper explanation of derived metrics and the options available ++for diagnosing issues with their definition and evaluation. ++.RE + .TP + \fB\-6\fR, \fB\-\-sort\-metric\fR=\fIsort-metric\fR + Specify a sort reference metric to sort output by values with +@@ -355,7 +388,7 @@ but this option \fIwill\fP override per-metric specifications. + .TP + \fB\-a\fR \fIarchive\fR, \fB\-\-archive\fR=\fIarchive\fR + Performance metric values are retrieved from the set of Performance +-Co-Pilot (PCP) archive log files identified by the ++Co-Pilot (PCP) archive files identified by the + .I archive + argument, which is a comma-separated list of names, + each of which may be the base name of an archive or the name of +@@ -402,7 +435,7 @@ but this option \fIwill\fP override per-metric specifications. + Specify the + .I config + file or directory to use. +-In case \fIconfig\fP is a directory all files under it ending ++In case \fIconfig\fP is a directory all files in it ending + \fB.conf\fP will be included. + The default is the first found of: + .IR ./pmrep.conf , +@@ -420,6 +453,14 @@ Fetch performance metrics from the specified + either local or remote (see + .BR \-h ). + .TP ++\fB\-\-csv\-unit\-info\fR ++Append unit strings to metric names in the CSV header using the form ++.I "metric(unit)" ++or ++.IR "metric[inst](unit)" . ++See also ++.BR \-k . ++.TP + \fB\-C\fR, \fB\-\-check\fR + Exit before reporting any values, but after parsing the configuration + and metrics and printing possible headers. +@@ -432,7 +473,7 @@ to effect a pause, rather than + the default behaviour of replaying at full speed. + .TP + .B \-\-daemonize +-Daemonize on startup. ++Daemonise on startup. + .TP + \fB\-e\fR \fIderived\fR, \fB\-\-derived\fR=\fIderived\fR + Specify +@@ -441,12 +482,25 @@ performance metrics. + If + .I derived + starts with a slash (``/'') or with a dot (``.'') it will be +-interpreted as a derived metrics configuration file, otherwise it will ++interpreted as a PCP derived metrics configuration file, otherwise it will + be interpreted as comma- or semicolon-separated derived metric expressions. +-For details see ++For complete description of derived metrics and PCP derived metrics ++configuration files see + .BR pmLoadDerivedConfig (3) + and + .BR pmRegisterDerived (3). ++Alternatively, using ++.BR pmrep.conf (5) ++configuration syntax allows defining derived metrics as part of metricsets. ++.RS ++.PP ++In case of issues with derived metrics, review the aforementioned manual ++pages in detail and ensure all the required metrics are available, ++especially when using archives. ++Use ++.B \-Dderive ++to see additional debug information about parsing and evaluating derived metrics. ++.RE + .TP + \fB\-E\fR \fIlines\fR, \fB\-\-repeat\-header\fR=\fIlines\fR + Repeat the header every +@@ -469,7 +523,7 @@ method which is mostly the same as that described in + .BR strftime (3). + An empty + .I format +-string (i.e., "") will remove the timestamps from the output. ++string (i.e. "") will remove the timestamps from the output. + Defaults to + .B %H:%M:%S + when using the +@@ -550,7 +604,7 @@ Multiple + options are allowed as an alternative way of specifying more than + one non-metric-specific instance filters. + .PP +-An individual instance filter may be one of the following: ++An individual instance filter can be one of the following: + .TP 10 + .I name + Full instance name. +@@ -598,16 +652,30 @@ $ pmrep \-i '1 minute','5 minute' 'kernel.all.load,,.*' + .RE + .TP + \fB\-I\fR, \fB\-\-ignore\-incompat\fR +-Ignore incompatible metrics. +-By default incompatible metrics (that is, +-their type is unsupported or they cannot be scaled as requested) +-will cause ++Similar to unknown metrics described above for the ++.B \-5 ++option, a metric that ++.B pmrep ++is asked to report may be considered ``incompatible'' for a number of reasons: ++a metric type that is not supported by ++.B pmrep ++(e.g. PM_TYPE_AGGREGATE or PM_TYPE_EVENT), ++or a derived metric definition that contains semantic errors, ++or the metric is known in the PMNS but the metric's metadata is not available. ++By default, ++.B pmrep ++will report errors and exit if ++.B any ++requested metric is incompatible. ++The ++.B \-I ++option changes the default behaviour and + .B pmrep +-to terminate with an error message. +-With this option all incompatible metrics are silently omitted +-from reporting. ++will silently ignore any metric that is incompatible, provided ++at least one compatible metric remains to be reported. + This may be especially useful when requesting +-non-leaf nodes of the PMNS tree for reporting. ++non-leaf nodes of the PMNS tree for reporting when the ++associated metrics have different metadata. + .TP + \fB\-\-include\-texts\fR + When writing a PCP archive, +@@ -640,6 +708,8 @@ and + \fB\-k\fR, \fB\-\-extended\-csv\fR + Write extended CSV output, similar to + .BR sadf (1). ++See also ++.BR \-\-csv\-unit\-info . + .TP + \fB\-K\fR \fIspec\fR, \fB\-\-spec\-local\fR=\fIspec\fR + When fetching metrics from a local context (see +@@ -667,9 +737,14 @@ The default for + .I stdout + is two spaces (`` '') and comma (``,'') for + .IR csv . +-In case of CSV output or stdout output with non-whitespace delimiter, +-any instances of the delimiter in string values will be replaced by ++When using a non-whitespace delimiter, ++all instances of the delimiter in string values will be replaced by + the underscore (``_'') character. ++Note that many default metricsets specify a delimiter (that may ++not be a comma) so it might be ++necessary to use this option with metricsets to explicitly ++set the delimiter as comma for CSV output, i.e. \c. ++.B \-\-delimiter=, + .TP + \fB\-L\fR, \fB\-\-local\-PMDA\fR + Use a local context to collect metrics from DSO PMDAs on the local host +@@ -677,8 +752,8 @@ without PMCD. + See also + .BR \-K . + .TP +-\fB-m\fR, \fB\-\-include\-labels\fR +-Include metric labels in the output. ++\fB\-m\fR, \fB\-\-include\-labels\fR ++Include PCP metric labels in the output. + .TP + \fB\-n\fR, \fB\-\-invert\-filter\fR + Perform ranking before live filtering. +@@ -917,7 +992,7 @@ to disable). + .RE + .TP + \fB\-U\fR, \fB\-\-no\-unit\-info\fR +-Omit unit information from headers. ++Omit unit information from \fIstdout\fP headers. + .TP + \fB\-v\fR, \fB\-\-omit\-flat\fR + Report only set-valued metrics with instances (e.g. disk.dev.read) and +@@ -1012,6 +1087,8 @@ the metric values, no external utilities are needed. + The referenced colon-starting + .I metricsets + are part of the default \fBpmrep\fR configuration. ++With bash and zsh tab completes available options, metrics, and after a ++colon metricsets. + .PP + Display network interface metrics on the local host: + .RS +4 +@@ -1037,7 +1114,7 @@ Display the slab total usage (in MB) of two specific slab instances: + .RS +4 + .ft B + .nf +-$ pmrep mem.slabinfo.slabs.total_size,,'kmalloc-4k|xfs_inode',MB ++$ pmrep mem.slabinfo.slabs.total_size,,'kmalloc\-4k|xfs_inode',MB + .fi + .ft P + .RE +@@ -1045,8 +1122,7 @@ $ pmrep mem.slabinfo.slabs.total_size,,'kmalloc-4k|xfs_inode',MB + Display timestamped + .BR vmstat (8) + like information using megabytes instead of kilobytes and also include +-the number of inodes used (tab completes available metrics and +-after a colon metricsets with bash and zsh): ++the number of inodes used: + .RS +4 + .ft B + .nf +@@ -1087,7 +1163,7 @@ containing details about I/O requests by current + .RS +4 + .ft B + .nf +-$ pmrep \-gp \-i pmlogger :proc-io ++$ pmrep \-gp \-i pmlogger :proc\-io + .fi + .ft P + .RE +@@ -1124,7 +1200,7 @@ on one minute interval at every full minute in a background process: + .ft B + .nf + $ pmrep \-\-daemonize \-A 1m \-t 1m \-i '.*java.*' \-j \-o archive \-F ./a \\ +- :proc-info :proc-cpu :proc-mem :proc-io ++ :proc\-info :proc\-cpu :proc\-mem :proc\-io + .fi + .ft P + .RE +@@ -1154,7 +1230,7 @@ $ pmrep \-o archive \-F ./a \-J 3 \-N proc.memory.rss proc.memory proc.io + .I pmrep.conf + \fBpmrep\fP configuration file (see \fB\-c\fP) + .TP +-.I \f(CW$PCP_SYSCONF_DIR\fP/pmrep/*.conf ++.I \f(CR$PCP_SYSCONF_DIR\fP/pmrep/*.conf + system provided default \fBpmrep\fP configuration files + .SH PCP ENVIRONMENT + Environment variables with the prefix \fBPCP_\fP are used to parameterize +@@ -1165,11 +1241,51 @@ The \fB$PCP_CONF\fP variable may be used to specify an alternative + configuration file, as described in \fBpcp.conf\fP(5). + .PP + For environment variables affecting PCP tools, see \fBpmGetOptions\fP(3). ++.PP ++Of particular note, ++.B PCP_DISCRETE_ONCE ++can be set to ensure that discrete metric values are reported only once, ++unless they change at some point. ++.SH DEBUGGING OPTIONS ++The ++.B \-D ++or ++.B \-\-debug ++option enables the output of additional diagnostics on ++.I stderr ++to help triage problems, although the information is sometimes cryptic and ++primarily intended to provide guidance for developers rather end-users. ++.I debug ++is a comma separated list of debugging options; use ++.BR pmdbg (1) ++with the ++.B \-l ++option to obtain ++a list of the available debugging options and their meaning. ++.PP ++Debugging options specific to ++.B pmrep ++are as follows: ++.TS ++box; ++lf(B) | lf(B) ++lf(B) | lxf(R) . ++Option Description ++_ ++appl1 T{ ++.ad l ++dump keywords for configurations and specifications ++T} ++_ ++derive T{ ++.ad l ++dump details as each derived metric is parsed ++T} ++.TE + .SH SEE ALSO +-.BR mkaf (1), + .BR PCPIntro (1), ++.BR mkaf (1), + .BR pcp (1), +-.BR pcp-atop (1), + .BR pcp2elasticsearch (1), + .BR pcp2graphite (1), + .BR pcp2influxdb (1), +@@ -1178,13 +1294,14 @@ For environment variables affecting PCP tools, see \fBpmGetOptions\fP(3). + .BR pcp2xlsx (1), + .BR pcp2xml (1), + .BR pcp2zabbix (1), ++.BR pcp\-atop (1), + .BR pmcd (1), + .BR pmchart (1), + .BR pmdiff (1), +-.BR pmdumplog (1), + .BR pmdumptext (1), + .BR pminfo (1), + .BR pmiostat (1), ++.BR pmlogdump (1), + .BR pmlogextract (1), + .BR pmlogsummary (1), + .BR pmprobe (1), +@@ -1192,16 +1309,28 @@ For environment variables affecting PCP tools, see \fBpmGetOptions\fP(3). + .BR pmval (1), + .BR sadf (1), + .BR sar (1), ++.BR PMAPI (3), + .BR pmGetOptions (3), +-.BR pmSpecLocalPMDA (3), + .BR pmLoadDerivedConfig (3), + .BR pmParseUnitsStr (3), + .BR pmRegisterDerived (3), ++.BR pmSpecLocalPMDA (3), + .BR strftime (3), + .BR LOGARCHIVE (5), +-.BR pcp.conf (5), + .BR PMNS (5), ++.BR pcp.conf (5), + .BR pmrep.conf (5), + .BR environ (7) + and + .BR vmstat (8). ++ ++.\" control lines for scripts/man-spell ++.\" +ok+ CdgGHIjkLmnprRuUvVxz EST NUMA XFS csv datetime ++.\" +ok+ eth incompat influxdb inodes java ++.\" +ok+ kmalloc metricset metricsets sda slabinfo ++.\" +ok+ total_bytes total_size vfs vmstat wlan ++.\" +ok+ xfs xfs_inode zsh ++.\" +ok+ ds {from ds389} gp gUJ {all from command line -xxx args} ++.\" +ok+ sp {from .sp in troff macro} un {from (un)available)} ++.\" +ok+ Dderive {from -Dderive} ++.\" +ok+ PCP_DISCRETE_ONCE {from pmrep-only env var} +diff --git a/src/pmrep/pmrep.py b/src/pmrep/pmrep.py +index 69d1c9c..a7b0dde 100755 +--- a/src/pmrep/pmrep.py ++++ b/src/pmrep/pmrep.py +@@ -1,6 +1,6 @@ + #!/usr/bin/env pmpython + # +-# Copyright (C) 2015-2021 Marko Myllynen ++# Copyright (C) 2015-2026 Marko Myllynen + # + # This program is free software; you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by the +@@ -17,7 +17,7 @@ + # pylint: disable=too-many-boolean-expressions, too-many-statements + # pylint: disable=too-many-instance-attributes, too-many-locals + # pylint: disable=too-many-branches, too-many-nested-blocks +-# pylint: disable=broad-except, too-many-arguments ++# pylint: disable=broad-except, too-many-arguments, too-many-positional-arguments + # pylint: disable=too-many-lines, too-many-public-methods + + """ Performance Metrics Reporter """ +@@ -38,17 +38,14 @@ import os + + # PCP Python PMAPI + from pcp import pmapi, pmi, pmconfig +-from cpmapi import PM_CONTEXT_ARCHIVE, PM_CONTEXT_LOCAL +-from cpmapi import PM_INDOM_NULL, PM_IN_NULL, PM_DEBUG_APPL1, PM_TIME_SEC ++from cpmapi import PM_CONTEXT_ARCHIVE, PM_CONTEXT_LOCAL, PM_DEBUG_APPL1 ++from cpmapi import PM_INDOM_NULL, PM_IN_NULL, PM_TIME_SEC + from cpmapi import PM_SEM_DISCRETE, PM_TYPE_STRING + from cpmapi import PM_TEXT_PMID, PM_TEXT_INDOM, PM_TEXT_ONELINE, PM_TEXT_HELP + from cpmapi import PM_LABEL_INDOM, PM_LABEL_INSTANCES + from cpmapi import PM_LABEL_DOMAIN, PM_LABEL_CLUSTER, PM_LABEL_ITEM + from cpmi import PMI_ERR_DUPINSTNAME, PMI_ERR_DUPTEXT + +-if sys.version_info[0] >= 3: +- long = int # pylint: disable=redefined-builtin +- + # Default config + DEFAULT_CONFIG = ["./pmrep.conf", "$HOME/.pmrep.conf", "$HOME/.pcp/pmrep.conf", "$PCP_SYSCONF_DIR/pmrep/pmrep.conf", "$PCP_SYSCONF_DIR/pmrep"] + +@@ -80,7 +77,7 @@ class PMReporter(object): + self.keys = ('source', 'output', 'derived', 'header', 'globals', + 'samples', 'interval', 'type', 'precision', 'daemonize', + 'timestamp', 'unitinfo', 'colxrow', 'separate_header', 'fixed_header', +- 'delay', 'width', 'delimiter', 'extcsv', 'width_force', ++ 'delay', 'width', 'delimiter', 'extcsv', 'width_force', 'csv_unitinfo', + 'extheader', 'repeat_header', 'timefmt', 'interpol', + 'dynamic_header', 'overall_rank', 'overall_rank_alt', 'sort_metric', + 'count_scale', 'space_scale', 'time_scale', 'version', +@@ -106,7 +103,7 @@ class PMReporter(object): + self.globals = 1 + self.timestamp = 0 + self.samples = None # forever +- self.interval = pmapi.timeval(1) # 1 sec ++ self.interval = pmapi.timespec(1) # 1 sec + self.opts.pmSetOptionInterval(str(1)) # 1 sec + self.delay = 0 + self.type = 0 +@@ -159,6 +156,7 @@ class PMReporter(object): + self.localtz = None + self.prev_ts = None + self.runtime = -1 ++ self.csv_unitinfo = 0 + self.found_insts = [] + self.prev_insts = None + self.static_header = 1 +@@ -206,7 +204,8 @@ class PMReporter(object): + + opts.pmSetLongOptionHeader("Reporting options") + opts.pmSetLongOption("no-header", 0, "H", "", "omit headers") +- opts.pmSetLongOption("no-unit-info", 0, "U", "", "omit unit info from headers") ++ opts.pmSetLongOption("no-unit-info", 0, "U", "", "omit unit info from stdout headers") ++ opts.pmSetLongOption("csv-unit-info", 0, "", "", "include unit info in CSV headers") + opts.pmSetLongOption("no-inst-info", 0, "", "", "omit instance info from headers") + opts.pmSetLongOption("no-globals", 0, "G", "", "omit global metrics") + opts.pmSetLongOption("timestamps", 0, "p", "", "print timestamps") +@@ -272,6 +271,8 @@ class PMReporter(object): + self.daemonize = 1 + elif opt == 'include-texts': + self.include_texts = 1 ++ elif opt == 'csv-unit-info': ++ self.csv_unitinfo = 1 + elif opt == 'no-inst-info': + self.instinfo = 0 + elif opt == 'K': +@@ -413,9 +414,7 @@ class PMReporter(object): + + self.pmconfig.validate_common_options() + +- if self.output != OUTPUT_ARCHIVE and \ +- self.output != OUTPUT_CSV and \ +- self.output != OUTPUT_STDOUT: ++ if self.output not in (OUTPUT_ARCHIVE, OUTPUT_CSV, OUTPUT_STDOUT): + sys.stderr.write("Error while parsing options: Invalid output target specified.\n") + sys.exit(1) + +@@ -489,8 +488,8 @@ class PMReporter(object): + """ Fetch and report """ + # Debug + if self.context.pmDebug(PM_DEBUG_APPL1): +- sys.stdout.write("Known config file keywords: " + str(self.keys) + "\n") +- sys.stdout.write("Known metric spec keywords: " + str(self.pmconfig.metricspec) + "\n") ++ sys.stderr.write("Known config file keywords: " + str(self.keys) + "\n") ++ sys.stderr.write("Known metric spec keywords: " + str(self.pmconfig.metricspec) + "\n") + + # Set delay mode, interpolation + if self.context.type != PM_CONTEXT_ARCHIVE: +@@ -750,13 +749,22 @@ class PMReporter(object): + samples = self.samples + else: + duration = float(self.opts.pmGetOptionFinish()) - origin ++ # Avoid "too large value" with time.asctime(time.localtime(endtime)) ++ now = datetime.now() ++ try: ++ next_year = now.replace(year=now.year + 1) ++ except ValueError: ++ # Handle Feb 29 ++ next_year = now.replace(year=now.year + 1, month=2, day=28) ++ year_secs = (next_year - now).total_seconds() ++ duration = min(duration, year_secs) + samples = int(duration / float(self.interval) + 1) + samples = max(0, samples) + duration = (samples - 1) * float(self.interval) + duration = max(0, duration) + endtime = origin + duration + +- instances = sum([len(x[0]) for x in self.pmconfig.insts]) ++ instances = sum(len(x[0]) for x in self.pmconfig.insts) + insts_txt = "instances" if instances != 1 else "instance" + if not self.static_header: + if self.context.type == PM_CONTEXT_ARCHIVE: +@@ -786,9 +794,9 @@ class PMReporter(object): + samples = "N/A" + + comm = "#" if self.output == OUTPUT_CSV else "" ++ source = self.source + " (archive)" if self.context.type == PM_CONTEXT_ARCHIVE else "pmcd (live)" + self.writer.write(comm + "\n") +- if self.context.type == PM_CONTEXT_ARCHIVE: +- self.writer.write(comm + " archive: " + self.source + "\n") ++ self.writer.write(comm + " source: " + source + "\n") + self.writer.write(comm + " host: " + host + "\n") + self.writer.write(comm + " timezone: " + timezone + "\n") + self.writer.write(comm + " start: " + time.asctime(time.localtime(origin)) + "\n") +@@ -812,12 +820,12 @@ class PMReporter(object): + """ Helper to get number of instances of current results """ + if self.static_header: + if self.colxrow is None: +- c = len(str(sum([len(i[0]) for i in self.pmconfig.insts]))) ++ c = len(str(sum(len(i[0]) for i in self.pmconfig.insts))) + else: + c = len(str(len(self.metrics))) + else: + if self.colxrow is None: +- c = len(str(sum([len(results[i]) for i in results]))) ++ c = len(str(sum(len(results[i]) for i in results))) + else: + c = len(str(len(results))) + return c +@@ -927,19 +935,21 @@ class PMReporter(object): + for i, metric in enumerate(self.metrics): + for j, n in self.get_results_iter(i, metric, results): + name = metric +- if not self.dynamic_header: +- if self.pmconfig.descs[i].contents.indom != PM_INDOM_NULL: +- # Always mark metrics with instance domain +- name += "-" +- if self.pmconfig.insts[i][1][j]: +- # Append instance name when present +- name += self.pmconfig.insts[i][1][j] +- else: +- if self.pmconfig.descs[i].contents.indom != PM_INDOM_NULL: +- name += "-" + n[1] +- if self.delimiter: +- name = name.replace(self.delimiter, " ") +- name = name.replace("\n", " ").replace("\"", " ") ++ if self.instinfo: ++ if not self.dynamic_header: ++ if self.pmconfig.descs[i].contents.indom != PM_INDOM_NULL: ++ # Always mark metrics with instance domain ++ name += "[" ++ if self.pmconfig.insts[i][1][j]: ++ # Append instance name when present ++ name += self.pmconfig.insts[i][1][j] ++ name += "]" ++ else: ++ if self.pmconfig.descs[i].contents.indom != PM_INDOM_NULL: ++ name += "[" + n[1] + "]" ++ if self.csv_unitinfo and self.metrics[metric][2][0] is not None: ++ name += "(" + self.metrics[metric][2][0] + ")" ++ name = self.sanitize_csv_header_item(name) + self.writer.write(self.delimiter + "\"" + name + "\"") + if self.include_labels: + ins = j if not self.dynamic_header else n[0] +@@ -947,7 +957,7 @@ class PMReporter(object): + if self.delimiter: + repl = ";" if self.delimiter == "," else "," + labels = labels.replace(self.delimiter, repl) +- labels = labels.replace("\n", " ").replace("\"", " ") ++ labels = self.sanitize_csv_header_item(labels) + self.writer.write(self.delimiter + "\"" + labels + "\"") + self.writer.write("\n") + +@@ -1132,14 +1142,14 @@ class PMReporter(object): + continue + try: + self.pmi.pmiPutValue(metric, name, str(value)) +- except pmi.pmiErr as pmierror: ++ except pmi.pmiErr: + pass + data = 1 + self.prev_res = results # pylint: disable=attribute-defined-outside-init + + # Flush + if data: +- self.pmi.pmiWrite(int(self.pmfg_ts().strftime('%s')), self.pmfg_ts().microsecond) ++ self.pmi.pmiWrite(int(self.pmfg_ts().timestamp()), self.pmfg_ts().microsecond) + + def dynamic_header_update(self, results, line=None): + """ Update dynamic header as needed """ +@@ -1187,6 +1197,12 @@ class PMReporter(object): + value = value.replace(self.delimiter, " ") + return value + ++ def sanitize_csv_header_item(self, item): ++ """ Sanitize CSV header item """ ++ if self.delimiter: ++ item = item.replace(self.delimiter, " ") ++ return item.replace("\n", " ").replace("\"", " ") ++ + def write_csv(self, timestamp): + """ Write results in CSV format """ + if timestamp is None: +@@ -1255,7 +1271,7 @@ class PMReporter(object): + + def format_stdout_value(self, value, width, precision, fmt, k): + """ Format value for stdout output """ +- if isinstance(value, (int, long)): ++ if isinstance(value, int): + if len(str(value)) > width: + value = pmconfig.TRUNC + else: +@@ -1542,7 +1558,7 @@ class PMReporter(object): + self.writer.flush() + except IOError as ioerror: + if ioerror.errno != errno.EPIPE: +- raise error ++ raise ioerror + try: + self.writer.close() + except Exception: +-- +2.43.7 + diff --git a/SOURCES/redhat-bugzilla-2219731-hacluster-metrics.patch b/SOURCES/redhat-bugzilla-2219731-hacluster-metrics.patch new file mode 100644 index 0000000..51629f0 --- /dev/null +++ b/SOURCES/redhat-bugzilla-2219731-hacluster-metrics.patch @@ -0,0 +1,749 @@ +diff -Naurp pcp-5.3.7.orig/qa/1897.out pcp-5.3.7/qa/1897.out +--- pcp-5.3.7.orig/qa/1897.out 2023-07-10 16:51:15.049365731 +1000 ++++ pcp-5.3.7/qa/1897.out 2023-07-10 16:52:18.069511419 +1000 +@@ -376,12 +376,12 @@ is given as label metadata values for th + inst [2 or "node-2:test_clone_state"] value 1 + inst [3 or "node-2:test_site"] value 1 + +-ha_cluster.pacemaker.nodes.status.dc PMID: 155.3.8 [Whether the node status is given as disconnected] ++ha_cluster.pacemaker.nodes.status.dc PMID: 155.3.8 [Whether the node status is given as the DC] + Data Type: 32-bit unsigned int InDom: 155.2 0x26c00002 + Semantics: instant Units: count + Help: +-Whether the disconnected status is reported by the node in the cluster, a +-value of 1 confirms the node status as disconnected. ++Whether the DC status is reported by the node in the cluster, a ++value of 1 confirms the node status as the designated coordinator. + inst [0 or "node-1"] value 0 + inst [1 or "node-2"] value 1 + +@@ -680,6 +680,632 @@ ha_cluster.drbd.split_brain + === std err === + === filtered valgrind report === + Memcheck, a memory error detector ++Command: pminfo -L -K clear -K add,155,PCP_PMDAS_DIR/hacluster/pmda_hacluster.so,hacluster_init -f ha_cluster.pacemaker.config_last_change ha_cluster.corosync.quorate ha_cluster.sbd.devices.path ha_cluster.drbd.split_brain ++LEAK SUMMARY: ++definitely lost: 0 bytes in 0 blocks ++indirectly lost: 0 bytes in 0 blocks ++ERROR SUMMARY: 0 errors from 0 contexts ... ++ ++== done ++ ++== Checking metric descriptors and values - hacluster-root-002.tgz ++ ++ha_cluster.corosync.member_votes.local PMID: 155.6.1 [Votes that are local to this node] ++ Data Type: 32-bit unsigned int InDom: 155.5 0x26c00005 ++ Semantics: instant Units: count ++Help: ++The quorum votes which are local to this node in the cluster. ++ inst [0 or "rhel9-node1"] value 1 ++ inst [1 or "rhel9-node2"] value 0 ++ ++ha_cluster.corosync.member_votes.node_id PMID: 155.6.2 [Node ID] ++ Data Type: 64-bit unsigned int InDom: 155.5 0x26c00005 ++ Semantics: instant Units: count ++Help: ++The full corosync ID for the nodes in the cluster. ++ inst [0 or "rhel9-node1"] value 1 ++ inst [1 or "rhel9-node2"] value 2 ++ ++ha_cluster.corosync.member_votes.votes PMID: 155.6.0 [Quorum votes per node] ++ Data Type: 32-bit unsigned int InDom: 155.5 0x26c00005 ++ Semantics: instant Units: count ++Help: ++The number of quorum votes allocated to each node in the cluster. ++ inst [0 or "rhel9-node1"] value 1 ++ inst [1 or "rhel9-node2"] value 1 ++ ++ha_cluster.corosync.quorate PMID: 155.7.0 [Value given for quorate] ++ Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff ++ Semantics: instant Units: count ++Help: ++The value represents whether or not the cluster is quorate. ++ value 1 ++ ++ha_cluster.corosync.quorum_votes.expected_votes PMID: 155.7.1 [Expected vote count] ++ Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff ++ Semantics: instant Units: count ++Help: ++The number of expected quorum votes for the cluster. ++ value 2 ++ ++ha_cluster.corosync.quorum_votes.highest_expected PMID: 155.7.2 [Highest expected vote count] ++ Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff ++ Semantics: instant Units: count ++Help: ++The highest number of expected quorum votes for the cluster. ++ value 2 ++ ++ha_cluster.corosync.quorum_votes.quorum PMID: 155.7.4 [Whether cluster is quorate] ++ Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff ++ Semantics: instant Units: count ++Help: ++The value reported for the quorate for the cluster. ++ value 1 ++ ++ha_cluster.corosync.quorum_votes.total_votes PMID: 155.7.3 [Total number of votes] ++ Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff ++ Semantics: instant Units: count ++Help: ++The total number of quorum votes for the cluster. ++ value 2 ++ ++ha_cluster.corosync.ring_errors PMID: 155.7.5 [Number of faulty rings] ++ Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff ++ Semantics: instant Units: count ++Help: ++The total number of Corosync rings which are faulty. ++ value 0 ++ ++ha_cluster.corosync.rings.address PMID: 155.8.1 [IP Address for ring] ++ Data Type: string InDom: 155.6 0x26c00006 ++ Semantics: instant Units: count ++Help: ++The IP address locally linked to this ring. ++ inst [0 or "0"] value "192.168.122.148" ++ ++ha_cluster.corosync.rings.all PMID: 155.15.0 [Corosync rings information] ++ Data Type: 32-bit unsigned int InDom: 155.13 0x26c0000d ++ Semantics: instant Units: count ++Help: ++Value is 1 if a ring exists. The details of the corresponding ring ++is given as label metadata values for this metric. ++ inst [0 or "0"] value 1 ++ ++ha_cluster.corosync.rings.node_id PMID: 155.8.2 [ID of the local node] ++ Data Type: 64-bit unsigned int InDom: 155.6 0x26c00006 ++ Semantics: instant Units: count ++Help: ++The internal Corosync node ID to the node matched to the ring. ++ inst [0 or "0"] value 1 ++ ++ha_cluster.corosync.rings.number PMID: 155.8.3 [Ring number] ++ Data Type: 32-bit unsigned int InDom: 155.6 0x26c00006 ++ Semantics: instant Units: count ++Help: ++The number for the Corosync ring. ++ inst [0 or "0"] value 0 ++ ++ha_cluster.corosync.rings.ring_id PMID: 155.8.4 [Ring ID] ++ Data Type: string InDom: 155.6 0x26c00006 ++ Semantics: instant Units: count ++Help: ++The internal Corosync ring ID, corresponds to the first node to join. ++ inst [0 or "0"] value "1.9" ++ ++ha_cluster.corosync.rings.status PMID: 155.8.0 [Corosync ring status] ++ Data Type: 32-bit unsigned int InDom: 155.6 0x26c00006 ++ Semantics: instant Units: count ++Help: ++The status for each Corosync ring in the cluster, a value of 1 is faulty and ++0 is healthy. ++ inst [0 or "0"] value 0 ++ ++ha_cluster.drbd.al_writes PMID: 155.10.6 [Writes to the activity log] ++ Data Type: 64-bit unsigned int InDom: 155.8 0x26c00008 ++ Semantics: instant Units: count ++Help: ++Amount of writes to the activity log area of metadata by the DRBD ++resource:volume. ++No value(s) available! ++ ++ha_cluster.drbd.bm_writes PMID: 155.10.7 [Writes to bitmap area] ++ Data Type: 64-bit unsigned int InDom: 155.8 0x26c00008 ++ Semantics: instant Units: count ++Help: ++Amount of writes to the bitmap area of metadata by the DRBD resource:volume. ++No value(s) available! ++ ++ha_cluster.drbd.connections.all PMID: 155.18.0 [DRBD Peer disk information] ++ Data Type: 32-bit unsigned int InDom: 155.16 0x26c00010 ++ Semantics: instant Units: count ++Help: ++Value is 1 if a drbd peer connection exists. The details of the corresponding DRBD peer ++connection is given as label metadata values for this metric. ++No value(s) available! ++ ++ha_cluster.drbd.connections.peer_disk_state PMID: 155.11.4 [Peer disk state] ++ Data Type: string InDom: 155.9 0x26c00009 ++ Semantics: instant Units: count ++Help: ++The reported peer disk state for the connection. ++No value(s) available! ++ ++ha_cluster.drbd.connections.peer_node_id PMID: 155.11.1 [The ID the connection is for] ++ Data Type: string InDom: 155.9 0x26c00009 ++ Semantics: instant Units: count ++Help: ++The given peer node ID for which the connection is for. ++No value(s) available! ++ ++ha_cluster.drbd.connections.peer_role PMID: 155.11.2 [Role of the connection] ++ Data Type: string InDom: 155.9 0x26c00009 ++ Semantics: instant Units: count ++Help: ++The reported role type for the connection. ++No value(s) available! ++ ++ha_cluster.drbd.connections.resource PMID: 155.11.0 [Resource that the connection is for] ++ Data Type: string InDom: 155.9 0x26c00009 ++ Semantics: instant Units: count ++Help: ++The given resource that the DRBD connection is for each resource:volume. ++No value(s) available! ++ ++ha_cluster.drbd.connections.volume PMID: 155.11.3 [Volume number] ++ Data Type: 32-bit unsigned int InDom: 155.9 0x26c00009 ++ Semantics: instant Units: count ++Help: ++The reported volume for the connection. ++No value(s) available! ++ ++ha_cluster.drbd.connections_pending PMID: 155.11.8 [Number of connections pending] ++ Data Type: 32-bit unsigned int InDom: 155.9 0x26c00009 ++ Semantics: instant Units: count ++Help: ++The number of requests sent which have not yet been received by DRBD for the ++resource:volume. ++No value(s) available! ++ ++ha_cluster.drbd.connections_received PMID: 155.11.6 [Volume of data received] ++ Data Type: 64-bit unsigned int InDom: 155.9 0x26c00009 ++ Semantics: instant Units: count ++Help: ++The volume of data received via the network connection in KiB by DRBD for the ++resource:volume. ++No value(s) available! ++ ++ha_cluster.drbd.connections_sent PMID: 155.11.7 [Volume of data sent] ++ Data Type: 64-bit unsigned int InDom: 155.9 0x26c00009 ++ Semantics: instant Units: count ++Help: ++The volume of data sent via the network connection in KiB by DRBD for the ++resource:volume. ++No value(s) available! ++ ++ha_cluster.drbd.connections_sync PMID: 155.11.5 [Connections in sync] ++ Data Type: float InDom: 155.9 0x26c00009 ++ Semantics: instant Units: count ++Help: ++The number of DRBD connections in sync for each resource:volume, this value is ++between 0 to 100. ++No value(s) available! ++ ++ha_cluster.drbd.connections_unacked PMID: 155.11.9 [Number of connection not acknowledged] ++ Data Type: 32-bit unsigned int InDom: 155.9 0x26c00009 ++ Semantics: instant Units: count ++Help: ++The number of requests sent which have not yet been acknowledged by DRBD for ++the resource:volume. ++No value(s) available! ++ ++ha_cluster.drbd.lower_pending PMID: 155.10.9 [Number of open requests] ++ Data Type: 64-bit unsigned int InDom: 155.8 0x26c00008 ++ Semantics: instant Units: count ++Help: ++The number of open requests to the local I/O subsystem by DRBD for the ++resource:volume. ++No value(s) available! ++ ++ha_cluster.drbd.quorum PMID: 155.10.10 [Quorum status of DRBD resource:volume] ++ Data Type: 32-bit unsigned int InDom: 155.8 0x26c00008 ++ Semantics: instant Units: count ++Help: ++The Quorum status of the DRBD resource according to resource:volume, 1 is ++quorate and 0 is non-quorate. ++No value(s) available! ++ ++ha_cluster.drbd.read PMID: 155.10.5 [Amount read by DRBD resource] ++ Data Type: 32-bit unsigned int InDom: 155.8 0x26c00008 ++ Semantics: instant Units: count ++Help: ++Amount in KiB read by the DRBD resource:volume. ++No value(s) available! ++ ++ha_cluster.drbd.resources.all PMID: 155.17.0 [DRBD resource information] ++ Data Type: 32-bit unsigned int InDom: 155.15 0x26c0000f ++ Semantics: instant Units: count ++Help: ++Value is 1 if a drbd resource exists. The details of the corresponding drbd resource ++is given as label metadata values for this metric. ++No value(s) available! ++ ++ha_cluster.drbd.resources.disk_state PMID: 155.10.3 [Disk state] ++ Data Type: string InDom: 155.8 0x26c00008 ++ Semantics: instant Units: count ++Help: ++The current reported disk state of for the resource:volume. ++No value(s) available! ++ ++ha_cluster.drbd.resources.resource PMID: 155.10.0 [Name of the resource] ++ Data Type: string InDom: 155.8 0x26c00008 ++ Semantics: instant Units: count ++Help: ++The name given for the DRBD resource for each resource:volume. ++No value(s) available! ++ ++ha_cluster.drbd.resources.role PMID: 155.10.1 [Role of the resource] ++ Data Type: string InDom: 155.8 0x26c00008 ++ Semantics: instant Units: count ++Help: ++The reported role for the DRBD resource for each resource:volume. ++No value(s) available! ++ ++ha_cluster.drbd.resources.volume PMID: 155.10.2 [Volume of the resource] ++ Data Type: string InDom: 155.8 0x26c00008 ++ Semantics: instant Units: count ++Help: ++The volume number of the resource for each resource:volume. ++No value(s) available! ++ ++ha_cluster.drbd.split_brain PMID: 155.10.11 [Signal for split brain detection.] ++ Data Type: 32-bit unsigned int InDom: 155.8 0x26c00008 ++ Semantics: instant Units: count ++Help: ++This metric signals if there has been a split brain occurring in DRBD for the ++resource:volume, value is 1 is a split brain has been detected. ++No value(s) available! ++ ++ha_cluster.drbd.upper_pending PMID: 155.10.8 [Block I/O requests pending] ++ Data Type: 64-bit unsigned int InDom: 155.8 0x26c00008 ++ Semantics: instant Units: count ++Help: ++The number of the block I/O requests forwarded but not yet answered by DRBD ++for the resource:volume. ++No value(s) available! ++ ++ha_cluster.drbd.written PMID: 155.10.4 [Amount written to DRBD resource] ++ Data Type: 32-bit unsigned int InDom: 155.8 0x26c00008 ++ Semantics: instant Units: count ++Help: ++Amount in KiB written to the DRBD resource:volume. ++No value(s) available! ++ ++ha_cluster.pacemaker.config_last_change PMID: 155.0.0 [Unix timestamp corresponding to last Pacemaker configuration change] ++ Data Type: 64-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff ++ Semantics: instant Units: count ++Help: ++Unix timestamp in seconds corresponding to the last time that the Pacemaker ++configuration was changed on the system. ++ value 1687428694 ++ ++ha_cluster.pacemaker.fail_count PMID: 155.1.0 [The number of fail count recorded] ++ Data Type: 64-bit unsigned int InDom: 155.0 0x26c00000 ++ Semantics: instant Units: count ++Help: ++The number of fail count per node and resource ID, the actual maximum value ++depends on Pacemaker internals. ++No value(s) available! ++ ++ha_cluster.pacemaker.location_constraints.all PMID: 155.12.0 [Location constraint information] ++ Data Type: 32-bit unsigned int InDom: 155.10 0x26c0000a ++ Semantics: instant Units: count ++Help: ++Value is 1 if a location constraint exists. The details of the location constraint ++is given as label metadata values for this metric. ++No value(s) available! ++ ++ha_cluster.pacemaker.location_constraints.node PMID: 155.2.0 [Node of the location constraint] ++ Data Type: string InDom: 155.1 0x26c00001 ++ Semantics: instant Units: count ++Help: ++The node that the location constraint applies to in the cluster. ++No value(s) available! ++ ++ha_cluster.pacemaker.location_constraints.resource PMID: 155.2.1 [Resource of the location constraint] ++ Data Type: string InDom: 155.1 0x26c00001 ++ Semantics: instant Units: count ++Help: ++The resource that the location constraint applies to in the cluster. ++No value(s) available! ++ ++ha_cluster.pacemaker.location_constraints.role PMID: 155.2.2 [Resource role of the location constraint] ++ Data Type: string InDom: 155.1 0x26c00001 ++ Semantics: instant Units: count ++Help: ++The resource role that the location constraint applies to, if any. ++No value(s) available! ++ ++ha_cluster.pacemaker.location_constraints.score PMID: 155.2.3 [Score of the location constraint] ++ Data Type: string InDom: 155.1 0x26c00001 ++ Semantics: instant Units: count ++Help: ++The score given to the location constraint by Pacemaker, the value depends on ++Pacemaker internals. ++No value(s) available! ++ ++ha_cluster.pacemaker.migration_threshold PMID: 155.1.1 [Migration threshold per node and resource ID] ++ Data Type: 64-bit unsigned int InDom: 155.0 0x26c00000 ++ Semantics: instant Units: count ++Help: ++The value for the migration threshold per node and resource ID set by the ++Pacemaker cluster. ++No value(s) available! ++ ++ha_cluster.pacemaker.node_attributes PMID: 155.4.0 [Metadata used by Resource Agents] ++ Data Type: string InDom: 155.3 0x26c00003 ++ Semantics: instant Units: count ++Help: ++The raw values for the cluster metadata attributes and their value per node as ++used by the Resource Agents. ++No value(s) available! ++ ++ha_cluster.pacemaker.node_attributes_all PMID: 155.13.0 [Metadata information] ++ Data Type: 32-bit unsigned int InDom: 155.11 0x26c0000b ++ Semantics: instant Units: count ++Help: ++Value is 1 if a node metadata exists. The details of the node metadata ++is given as label metadata values for this metric. ++No value(s) available! ++ ++ha_cluster.pacemaker.nodes.status.dc PMID: 155.3.8 [Whether the node status is given as the DC] ++ Data Type: 32-bit unsigned int InDom: 155.2 0x26c00002 ++ Semantics: instant Units: count ++Help: ++Whether the DC status is reported by the node in the cluster, a ++value of 1 confirms the node status as the designated coordinator. ++ inst [0 or "rhel9-node1"] value 0 ++ inst [1 or "rhel9-node2"] value 1 ++ ++ha_cluster.pacemaker.nodes.status.expected_up PMID: 155.3.7 [Whether the node status is given as expected_up] ++ Data Type: 32-bit unsigned int InDom: 155.2 0x26c00002 ++ Semantics: instant Units: count ++Help: ++Whether the expected_up status is reported by the node in the cluster, a ++value of 1 confirms the node status as expected_up. ++ inst [0 or "rhel9-node1"] value 1 ++ inst [1 or "rhel9-node2"] value 1 ++ ++ha_cluster.pacemaker.nodes.status.maintenance PMID: 155.3.3 [Whether the node status is given as maintenance] ++ Data Type: 32-bit unsigned int InDom: 155.2 0x26c00002 ++ Semantics: instant Units: count ++Help: ++Whether the maintenance status is reported by the node in the cluster, a ++value of 1 confirms the node status as online. ++ inst [0 or "rhel9-node1"] value 0 ++ inst [1 or "rhel9-node2"] value 0 ++ ++ha_cluster.pacemaker.nodes.status.online PMID: 155.3.0 [Whether the node status is given as online] ++ Data Type: 32-bit unsigned int InDom: 155.2 0x26c00002 ++ Semantics: instant Units: count ++Help: ++Whether the online status is reported by the node in the cluster, a value of ++1 confirms the node status as online. ++ inst [0 or "rhel9-node1"] value 1 ++ inst [1 or "rhel9-node2"] value 1 ++ ++ha_cluster.pacemaker.nodes.status.pending PMID: 155.3.4 [Whether the node status is given as pending] ++ Data Type: 32-bit unsigned int InDom: 155.2 0x26c00002 ++ Semantics: instant Units: count ++Help: ++Whether the pending status is reported by the node in the cluster, a value of ++1 confirms the node status as pending. ++ inst [0 or "rhel9-node1"] value 0 ++ inst [1 or "rhel9-node2"] value 0 ++ ++ha_cluster.pacemaker.nodes.status.shutdown PMID: 155.3.6 [Whether the node status is given as shutdown] ++ Data Type: 32-bit unsigned int InDom: 155.2 0x26c00002 ++ Semantics: instant Units: count ++Help: ++Whether the shutdown status is reported by the node in the cluster, a value ++of 1 confirms the node status as shutdown. ++ inst [0 or "rhel9-node1"] value 0 ++ inst [1 or "rhel9-node2"] value 0 ++ ++ha_cluster.pacemaker.nodes.status.standby PMID: 155.3.1 [Whether the node status is given as standby] ++ Data Type: 32-bit unsigned int InDom: 155.2 0x26c00002 ++ Semantics: instant Units: count ++Help: ++Whether the standby status is reported by the node in the cluster, a value of ++1 confirms the node status as standby. ++ inst [0 or "rhel9-node1"] value 0 ++ inst [1 or "rhel9-node2"] value 0 ++ ++ha_cluster.pacemaker.nodes.status.standby_on_fail PMID: 155.3.2 [Whether the node status is given as standby_on_fail] ++ Data Type: 32-bit unsigned int InDom: 155.2 0x26c00002 ++ Semantics: instant Units: count ++Help: ++Whether the standby_on_fail status is reported by the node in the cluster, ++a value of 1 confirms the node status as standby_on_fail. ++ inst [0 or "rhel9-node1"] value 0 ++ inst [1 or "rhel9-node2"] value 0 ++ ++ha_cluster.pacemaker.nodes.status.unclean PMID: 155.3.5 [Whether the node status is given as unclean] ++ Data Type: 32-bit unsigned int InDom: 155.2 0x26c00002 ++ Semantics: instant Units: count ++Help: ++Whether the unclean status is reported by the node in the cluster, a value of ++1 confirms the node status as unclean. ++ inst [0 or "rhel9-node1"] value 0 ++ inst [1 or "rhel9-node2"] value 0 ++ ++ha_cluster.pacemaker.nodes.type PMID: 155.3.9 [The type given to the node] ++ Data Type: string InDom: 155.2 0x26c00002 ++ Semantics: instant Units: count ++Help: ++The membership type given to the node in the Pacemaker cluster. ++ inst [0 or "rhel9-node1"] value "member" ++ inst [1 or "rhel9-node2"] value "member" ++ ++ha_cluster.pacemaker.resources.agent PMID: 155.5.0 [The name of the resource agent for this resource] ++ Data Type: string InDom: 155.4 0x26c00004 ++ Semantics: instant Units: count ++Help: ++The name given for the resource agent for the given resource instance in the ++cluster. ++No value(s) available! ++ ++ha_cluster.pacemaker.resources.all PMID: 155.14.0 [Pacemaker resources information] ++ Data Type: 32-bit unsigned int InDom: 155.12 0x26c0000c ++ Semantics: instant Units: count ++Help: ++Value is 1 if a resources exists. The details of the resource ++is given as label metadata values for this metric. ++No value(s) available! ++ ++ha_cluster.pacemaker.resources.clone PMID: 155.5.1 [The name of the clone given for this resource] ++ Data Type: string InDom: 155.4 0x26c00004 ++ Semantics: instant Units: count ++Help: ++The name given for the clone for the given resource instance in the cluster, ++if any. ++No value(s) available! ++ ++ha_cluster.pacemaker.resources.group PMID: 155.5.2 [The name of the group given for this resource] ++ Data Type: string InDom: 155.4 0x26c00004 ++ Semantics: instant Units: count ++Help: ++The name given for the group for the given resource instance in the cluster, ++if any. ++No value(s) available! ++ ++ha_cluster.pacemaker.resources.managed PMID: 155.5.3 [Value is either true or false] ++ Data Type: 32-bit unsigned int InDom: 155.4 0x26c00004 ++ Semantics: instant Units: count ++Help: ++The value of whether the resource instance in the cluster is managed or not. ++No value(s) available! ++ ++ha_cluster.pacemaker.resources.role PMID: 155.5.4 [The given role state] ++ Data Type: string InDom: 155.4 0x26c00004 ++ Semantics: instant Units: count ++Help: ++The value of the given role state for the resource instance in the cluster. ++No value(s) available! ++ ++ha_cluster.pacemaker.resources.status.active PMID: 155.5.5 [Whether the resources status is given as active] ++ Data Type: 32-bit unsigned int InDom: 155.4 0x26c00004 ++ Semantics: instant Units: count ++Help: ++Whether the active status is reported by the resource in the cluster, a ++value of 1 confirms the resource status as active. ++No value(s) available! ++ ++ha_cluster.pacemaker.resources.status.blocked PMID: 155.5.7 [Whether the resources status is given as blocked] ++ Data Type: 32-bit unsigned int InDom: 155.4 0x26c00004 ++ Semantics: instant Units: count ++Help: ++Whether the blocked status is reported by the resource in the cluster, a ++value of 1 confirms the resource status as blocked. ++No value(s) available! ++ ++ha_cluster.pacemaker.resources.status.failed PMID: 155.5.8 [Whether the resources status is given as failed] ++ Data Type: 32-bit unsigned int InDom: 155.4 0x26c00004 ++ Semantics: instant Units: count ++Help: ++Whether the failed status is reported by the resource in the cluster, a ++value of 1 confirms the resource status as failed. ++No value(s) available! ++ ++ha_cluster.pacemaker.resources.status.failure_ignored PMID: 155.5.9 [Whether the resources status is given as failure_ignored] ++ Data Type: 32-bit unsigned int InDom: 155.4 0x26c00004 ++ Semantics: instant Units: count ++Help: ++Whether the failure_ignored status is reported by the resource in the ++cluster, a value of 1 confirms the resource status as failure_ignored. ++No value(s) available! ++ ++ha_cluster.pacemaker.resources.status.orphaned PMID: 155.5.6 [Whether the resources status is given as orphaned] ++ Data Type: 32-bit unsigned int InDom: 155.4 0x26c00004 ++ Semantics: instant Units: count ++Help: ++Whether the orphaned status is reported by the resource in the cluster, a ++value of 1 confirms the resource status as orphaned. ++No value(s) available! ++ ++ha_cluster.pacemaker.stonith_enabled PMID: 155.0.1 [Whether stonith is enabled in the cluster] ++ Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff ++ Semantics: instant Units: count ++Help: ++Value returns as to whether stonith is enabled or disabled for the cluster. ++ value 0 ++ ++ha_cluster.sbd.all PMID: 155.16.0 [SBD device information] ++ Data Type: 32-bit unsigned int InDom: 155.14 0x26c0000e ++ Semantics: instant Units: count ++Help: ++Value is 1 if a sbd device exists. The details of the corresponding SBD device ++is given as label metadata values for this metric. ++No value(s) available! ++ ++ha_cluster.sbd.devices.path PMID: 155.9.0 [Path of SBD device] ++ Data Type: string InDom: 155.7 0x26c00007 ++ Semantics: instant Units: count ++Help: ++The full path given to each SBD device. ++No value(s) available! ++ ++ha_cluster.sbd.devices.status PMID: 155.9.1 [Status of the SBD device] ++ Data Type: string InDom: 155.7 0x26c00007 ++ Semantics: instant Units: count ++Help: ++The current status given for each of the SBD devices, the value is one of ++healthy or unhealthy. ++No value(s) available! ++ ++ha_cluster.sbd.timeouts.allocate PMID: 155.9.3 [allocate timeout value] ++ Data Type: 32-bit unsigned int InDom: 155.7 0x26c00007 ++ Semantics: instant Units: count ++Help: ++The value threshold for allocate timeouts for the given SBD device. ++No value(s) available! ++ ++ha_cluster.sbd.timeouts.loop PMID: 155.9.4 [loop timeout value] ++ Data Type: 32-bit unsigned int InDom: 155.7 0x26c00007 ++ Semantics: instant Units: count ++Help: ++The value threshold for loop timeouts for the given SBD device. ++No value(s) available! ++ ++ha_cluster.sbd.timeouts.mgswait PMID: 155.9.2 [mgswait timeout value] ++ Data Type: 32-bit unsigned int InDom: 155.7 0x26c00007 ++ Semantics: instant Units: count ++Help: ++The value threshold for msgwait timeouts for the given SBD device. ++No value(s) available! ++ ++ha_cluster.sbd.timeouts.watchdog PMID: 155.9.5 [watchdog timeout value] ++ Data Type: 32-bit unsigned int InDom: 155.7 0x26c00007 ++ Semantics: instant Units: count ++Help: ++The value threshold for watchdog timeouts for the given SBD device. ++No value(s) available! ++== Checking with valgrind - hacluster-root-002.tgz ++=== std out === ++ ++ha_cluster.pacemaker.config_last_change ++ value 1687428694 ++ ++ha_cluster.corosync.quorate ++ value 1 ++ ++ha_cluster.sbd.devices.path ++No value(s) available! ++ ++ha_cluster.drbd.split_brain ++No value(s) available! ++=== std err === ++=== filtered valgrind report === ++Memcheck, a memory error detector + Command: pminfo -L -K clear -K add,155,PCP_PMDAS_DIR/hacluster/pmda_hacluster.so,hacluster_init -f ha_cluster.pacemaker.config_last_change ha_cluster.corosync.quorate ha_cluster.sbd.devices.path ha_cluster.drbd.split_brain + LEAK SUMMARY: + definitely lost: 0 bytes in 0 blocks +diff -Naurp pcp-5.3.7.orig/qa/hacluster/GNUmakefile pcp-5.3.7/qa/hacluster/GNUmakefile +--- pcp-5.3.7.orig/qa/hacluster/GNUmakefile 2023-07-10 16:51:15.069365777 +1000 ++++ pcp-5.3.7/qa/hacluster/GNUmakefile 2023-07-10 16:52:18.069511419 +1000 +@@ -8,7 +8,7 @@ default setup default_pcp: + + install install_pcp: $(ROOTFILES) + $(INSTALL) -m 755 -d $(TESTDIR) +- $(INSTALL) -m 755 -f $(ROOTFILES) $(TESTDIR)/$(ROOTFILES) ++ $(INSTALL) -m 644 -f $(ROOTFILES) $(TESTDIR) + $(INSTALL) -m 644 -f GNUmakefile.install $(TESTDIR)/GNUmakefile + + include $(BUILDRULES) +diff -Naurp pcp-5.3.7.orig/qa/hacluster/hacluster-root-002.tgz pcp-5.3.7/qa/hacluster/hacluster-root-002.tgz +--- pcp-5.3.7.orig/qa/hacluster/hacluster-root-002.tgz 1970-01-01 10:00:00.000000000 +1000 ++++ pcp-5.3.7/qa/hacluster/hacluster-root-002.tgz 2023-07-10 16:53:58.649743937 +1000 +@@ -0,0 +1,15 @@ ++[[s6k+C -ٵ*IĚ$X@R,MI-dl  NzO>0'< Q <O'l#(9cO2qSuE_r?D,=o; ؾ? ҮZ>*wp8?G} ?"+TޛGiOlղf;Xd ++\̔S;8zqp-US'HݣD&}8,-YN5u366+31W]":˂HA<{Gx\GOTbP?H`AD#Rj-p-d^$Sg-(:c_a(r# ++Av.ВYLzM ++bd9\Tp2x߿5\@<Sgg7P`5N}C[+]nx;rOsQ8*Fi'[Tc$.!VMjPZ{W|rgQ*K u3G"qw-R7Lz쳴ޮ9OȍT}>ȳ,ᦷnl^$J/TQ\@Dh>ZѼ"BVgJGM ++*}Tj)woJ]`2Aхj}F+R#C}+x2ŢgPj"mIaL̈́EPԒ3:pc<&+ܻ}[VYi`kT{qC~s5$yrW,v0aiV/n|7xqc{Lмi"X9 Qi= ZYˤ1 f:/4E"`;f@p얹b4N߷mDIu:3ESH1B1m 5d.vCY5-f5ڭޤ!!aɈQNK.7wfBͪy[ZP!![KwX)34H7ʑc9d;JU$hjZivwY5YBAI}&dKq\T!O:v<:D"JP>, DfGe{5voc@vSID`nd>Ϡ_rCz-iEǂǖe F- PUD+#7lltZsʙS]x_UCcmv{fdc'9gj|1{hڠ''hmppacxb}u1f9g?^` ++z [RBbRO&Q[[bP/|09mL(˼.ۚ6'S 28W"pxڰ4ZPܒaMq9`󐑠.Rś}?Cg/.^}{fJH6Db3Z|}b5g44etٕК׈ęcQsMzc2$ ++Yي+dJMum$ 1aZ+f0DYJ WR yu}i2YϪF[BjR'!ˆefH$jBH,P\ ++lk>9d5 Feeh23Hxlp)BKd1C4]<'}1RJoP?rRd!N,[r%jN9v# ++a*@vR%4h8"IasAh/e^;cV#J,B>X,Qn5n %KWI;/E8?èh#ekCsC8+DuƎbD"Uje~r33\ %F__ ++V:Aj1 ++Qs`H cb"_,bQv3q"*@?dZ8 S1 V%*ٵ=wEhow LVXp,8C <*M֌ "\⻳NwwbrzuC`m㯵Js&-V;) D±駳ߜE6 0 B~ej}A:Լ_ouR@9^S72T5"Hq=&Pih%_ 0V hDO)ֈB<0Vd 7 CUiJ)2QtTjœG( a^\]rr)8 ƈ_@h@dpPiRjuWad#L]z7F3 %8H3<[p}w"/m4UƙoE[4}EJ7f57aEqy@WMrI7F#"AǀYՕ\nx%Dw y2Q3?YeϹZE&ðk92%Et[8Db%ej&04&P5nkxjU6E6;& n#^pLRd}2>ITPcSԣV pg ʀ ++1ƞia iBH"X>LًׯMCzJ;  ++dj@ayd))jiZ<0Q'~a>#oǀ濟ȢG;G~ci1lZhZhZhZhZhZh//VHP +\ No newline at end of file +diff -Naurp pcp-5.3.7.orig/src/pmdas/hacluster/help pcp-5.3.7/src/pmdas/hacluster/help +--- pcp-5.3.7.orig/src/pmdas/hacluster/help 2023-07-10 16:51:15.069365777 +1000 ++++ pcp-5.3.7/src/pmdas/hacluster/help 2023-07-10 16:52:18.069511419 +1000 +@@ -103,9 +103,9 @@ of 1 confirms the node status as shutdow + Whether the expected_up status is reported by the node in the cluster, a + value of 1 confirms the node status as expected_up. + +-@ ha_cluster.pacemaker.nodes.status.dc Whether the node status is given as disconnected +-Whether the disconnected status is reported by the node in the cluster, a +-value of 1 confirms the node status as disconnected. ++@ ha_cluster.pacemaker.nodes.status.dc Whether the node status is given as the DC ++Whether the DC status is reported by the node in the cluster, a ++value of 1 confirms the node status as the designated coordinator. + + @ ha_cluster.pacemaker.resources.agent The name of the resource agent for this resource + The name given for the resource agent for the given resource instance in the +diff -Naurp pcp-5.3.7.orig/src/pmdas/hacluster/pacemaker.c pcp-5.3.7/src/pmdas/hacluster/pacemaker.c +--- pcp-5.3.7.orig/src/pmdas/hacluster/pacemaker.c 2023-07-10 16:51:15.069365777 +1000 ++++ pcp-5.3.7/src/pmdas/hacluster/pacemaker.c 2023-07-10 16:52:18.069511419 +1000 +@@ -534,18 +534,33 @@ hacluster_refresh_pacemaker_nodes(const + + /* Collect our node names */ + if (found_nodes && strstr(buffer, node_name)) { +- sscanf(buffer, "%*s %*s %*s online=\"%9[^\"]\" standby=\"%9[^\"]\" standby_onfail=\"%9[^\"]\" maintenance=\"%9[^\"]\" pending=\"%9[^\"]\" unclean=\"%9[^\"]\" shutdown=\"%9[^\"]\" expected_up=\"%9[^\"]\" is_dc =\"%9[^\"]\" %*s type=\"%9[^\"]\"", +- online, +- standby, +- standby_on_fail, +- maintenance, +- pending, +- unclean, +- shutdown, +- expected_up, +- dc, +- nodes->type +- ); ++ if(strstr(buffer, "feature_set")) { ++ sscanf(buffer, "%*s %*s %*s online=\"%9[^\"]\" standby=\"%9[^\"]\" standby_onfail=\"%9[^\"]\" maintenance=\"%9[^\"]\" pending=\"%9[^\"]\" unclean=\"%9[^\"]\" %*s %*s shutdown=\"%9[^\"]\" expected_up=\"%9[^\"]\" is_dc =\"%9[^\"]\" %*s type=\"%9[^\"]\"", ++ online, ++ standby, ++ standby_on_fail, ++ maintenance, ++ pending, ++ unclean, ++ shutdown, ++ expected_up, ++ dc, ++ nodes->type ++ ); ++ } else { ++ sscanf(buffer, "%*s %*s %*s online=\"%9[^\"]\" standby=\"%9[^\"]\" standby_onfail=\"%9[^\"]\" maintenance=\"%9[^\"]\" pending=\"%9[^\"]\" unclean=\"%9[^\"]\" shutdown=\"%9[^\"]\" expected_up=\"%9[^\"]\" is_dc =\"%9[^\"]\" %*s type=\"%9[^\"]\"", ++ online, ++ standby, ++ standby_on_fail, ++ maintenance, ++ pending, ++ unclean, ++ shutdown, ++ expected_up, ++ dc, ++ nodes->type ++ ); ++ } + + nodes->online = bool_convert(online); + nodes->standby = bool_convert(standby); diff --git a/SOURCES/redhat-issues-RHEL-213662-CVE-2026-16524.patch b/SOURCES/redhat-issues-RHEL-213662-CVE-2026-16524.patch new file mode 100644 index 0000000..a743b12 --- /dev/null +++ b/SOURCES/redhat-issues-RHEL-213662-CVE-2026-16524.patch @@ -0,0 +1,270 @@ +From 37171c2042b007037730eb3c61719548c43b5142 Mon Sep 17 00:00:00 2001 +From: Nathan Scott +Date: Thu, 2 Jul 2026 15:41:11 +1000 +Subject: [PATCH] linux_sockets pmda: fix command injection via + network.persocket.filter (CWE-78) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The sockets_check_filter() validation helper returns 1 for safe input +and 0 for unsafe input. The guard in sockets_store() tested +if (sockets_check_filter(av.cp)) — rejecting safe input and accepting +malicious input containing shell metacharacters. The accepted filter +was later passed to popen() via shell interpretation, enabling arbitrary +command execution as the PMDA process user. + +Fix: +- Invert the guard: if (!sockets_check_filter(av.cp)) +- Replace popen()/pclose() in ss_open_stream() with the libpcp + __pmProcessAddArg()/__pmProcessPipe()/__pmProcessPipeClose() API + which uses execvp() internally, eliminating shell interpretation + of the filter string entirely +- Add qa/2101 verifying that valid filters are accepted and shell + metacharacters (semicolons, backticks, pipes) are rejected + +Reported-by: Francisco Alisson Bezerra, TIM Security Red Team +Reported-by: Lucas Gabriel Alves, TIM Security Red Team +Reported-by: Massimiliano Brolli, TIM Security Red Team + +Co-Authored-By: Claude Opus 4.6 (1M context) +--- + qa/2101 | 70 +++++++++++++++++++++++++++++ + qa/2101.out | 15 +++++++ + qa/group | 1 + + src/pmdas/linux_sockets/pmda.c | 8 ++-- + src/pmdas/linux_sockets/ss_stream.c | 53 ++++++++++++++++++---- + 5 files changed, 133 insertions(+), 14 deletions(-) + create mode 100755 qa/2101 + create mode 100644 qa/2101.out + +diff --git a/qa/2101 b/qa/2101 +new file mode 100755 +index 000000000..733b7f70c +--- /dev/null ++++ b/qa/2101 +@@ -0,0 +1,69 @@ ++#!/bin/sh ++# PCP QA Test No. 2101 ++# Verify linux_sockets PMDA filter validation rejects shell metacharacters ++# and accepts valid filter expressions (CWE-78 fix verification) ++# ++# Copyright (c) 2026 Red Hat. All Rights Reserved. ++# ++ ++seq=`basename $0` ++echo "QA output created by $seq" ++ ++# get standard environment, filters and checks ++. ./common.product ++. ./common.filter ++. ./common.check ++ ++[ $PCP_PLATFORM = linux ] || _notrun "Linux-specific sockets testing" ++[ -f $PCP_PMDAS_DIR/sockets/pmdasockets ] || _notrun "sockets PMDA not installed" ++ ++_cleanup() ++{ ++ _cleanup_pmda sockets ++ cd $here ++ $sudo rm -rf $tmp $tmp.* ++} ++ ++status=0 # success is the default! ++trap "_cleanup; exit \$status" 0 1 2 3 15 ++ ++_prepare_pmda sockets ++_stop_auto_restart pmcd ++ ++# install the sockets PMDA ++cd $PCP_PMDAS_DIR/sockets ++$sudo ./Remove >/dev/null 2>&1 ++$sudo ./Install $tmp.out 2>&1 ++ ++# check the PMDA is alive ++pmprobe -v network.persocket.filter >$tmp.probe 2>&1 ++grep -q 'No PMCD agent' $tmp.probe && _notrun "sockets PMDA failed to install" ++ ++# real QA test starts here ++ ++echo "=== valid filter should be accepted ===" ++pmstore network.persocket.filter "sport == 22" 2>&1 \ ++| grep -q 'Bad input' && echo "FAIL: valid filter rejected" || echo "valid filter accepted" ++ ++echo ++echo "=== shell metacharacter semicolon should be rejected ===" ++pmstore network.persocket.filter ';id' 2>&1 \ ++| grep -q 'Bad input' && echo "metacharacter rejected" || echo "FAIL: metacharacter not rejected" ++ ++echo ++echo "=== shell metacharacter backtick should be rejected ===" ++pmstore network.persocket.filter '`id`' 2>&1 \ ++| grep -q 'Bad input' && echo "metacharacter rejected" || echo "FAIL: metacharacter not rejected" ++ ++echo ++echo "=== shell metacharacter pipe should be rejected ===" ++pmstore network.persocket.filter '|cat /etc/passwd' 2>&1 \ ++| grep -q 'Bad input' && echo "metacharacter rejected" || echo "FAIL: metacharacter not rejected" ++ ++echo ++echo "=== shell metacharacter dollar should be rejected ===" ++pmstore network.persocket.filter '${IFS}id' 2>&1 \ ++| grep -q 'Bad input' && echo "metacharacter rejected" || echo "FAIL: metacharacter not rejected" ++ ++# success, all done ++exit +diff --git a/qa/2101.out b/qa/2101.out +new file mode 100644 +index 000000000..02f9ac565 +--- /dev/null ++++ b/qa/2101.out +@@ -0,0 +1,15 @@ ++QA output created by 2101 ++=== valid filter should be accepted === ++valid filter accepted ++ ++=== shell metacharacter semicolon should be rejected === ++metacharacter rejected ++ ++=== shell metacharacter backtick should be rejected === ++metacharacter rejected ++ ++=== shell metacharacter pipe should be rejected === ++metacharacter rejected ++ ++=== shell metacharacter dollar should be rejected === ++metacharacter rejected +diff --git a/qa/group b/qa/group +index cf7a93e56..updated 100644 +--- a/qa/group ++++ b/qa/group +@@ -1980,7 +1980,8 @@ x11 + 1984 pmlogconf pmda.redis local + 1985 pmfind local valgrind + 1986 pmfind local ++2101 pmda.sockets local security + 2104 libpcp local security + 2100 pmproxy local security + 2105 libpcp pmcd local security pmcd.pdu + 4751 libpcp threads valgrind local pcp helgrind +diff --git a/src/pmdas/linux_sockets/pmda.c b/src/pmdas/linux_sockets/pmda.c +index 5a3018d8a..59e69a675 100644 +--- a/src/pmdas/linux_sockets/pmda.c ++++ b/src/pmdas/linux_sockets/pmda.c +@@ -162,11 +162,9 @@ sockets_check_filter(const char *string) + const char *p; + + for (p = string; *p; p++) { +- if (isspace(*p)) ++ if (isspace(*p) || isalnum(*p)) + continue; +- if (isalnum(*p)) +- continue; +- if (*p == '(' || *p == ')') ++ if (strchr("()=!<>:.*/-,", *p) != NULL) + continue; + return 0; /* disallow */ + } +@@ -191,7 +189,7 @@ sockets_store(pmResult *result, pmdaExt *pmda) + case 0: /* network.persocket.filter */ + if ((sts = pmExtractValue(vsp->valfmt, &vsp->vlist[0], + PM_TYPE_STRING, &av, PM_TYPE_STRING)) >= 0) { +- if (sockets_check_filter(av.cp)) { ++ if (!sockets_check_filter(av.cp)) { + sts = PM_ERR_BADSTORE; + free(av.cp); + break; +diff --git a/src/pmdas/linux_sockets/ss_stream.c b/src/pmdas/linux_sockets/ss_stream.c +index 421c65fd1..833fc275a 100644 +--- a/src/pmdas/linux_sockets/ss_stream.c ++++ b/src/pmdas/linux_sockets/ss_stream.c +@@ -14,18 +14,19 @@ + + #include + #include ++#include + #include "ss_stats.h" + + #define SS_OPTIONS "-noemitauO" + +-char *ss_filter = NULL; /* storable: network.persocket.filter */ ++char *ss_filter; /* storable: network.persocket.filter */ ++static int using_pipe; /* pipe is normal operation, QA uses files */ + + FILE * + ss_open_stream() + { +- FILE *fp; ++ FILE *fp = NULL; + char *path; +- char cmd[MAXPATHLEN]; + + if (ss_filter == NULL) { + /* pmstore to network.persocket.filter frees this if changing */ +@@ -38,17 +39,51 @@ ss_open_stream() + fp = fopen(path, "r"); + if (pmDebugOptions.appl0) + fprintf(stderr, "ss_open_stream: open PCPQA_PMDA_SOCKETS=%s\n", path); ++ using_pipe = 0; + } else { ++ __pmExecCtl_t *argp = NULL; ++ int sts; ++ + if (access((path = "/usr/sbin/ss"), X_OK) != 0) { + if (access((path = "/usr/bin/ss"), X_OK) != 0) { + fprintf(stderr, "Error: no \"ss\" binary found\n"); + return NULL; + } + } +- pmsprintf(cmd, sizeof(cmd), "%s %s %s", path, SS_OPTIONS, ss_filter); +- fp = popen(cmd, "r"); ++ if ((sts = __pmProcessAddArg(&argp, path)) < 0 || ++ (sts = __pmProcessAddArg(&argp, SS_OPTIONS)) < 0) { ++ if (pmDebugOptions.appl0) ++ fprintf(stderr, "ss_open_stream: __pmProcessAddArg failed: %s\n", ++ pmErrStr(sts)); ++ return NULL; ++ } ++ if (ss_filter[0] != '\0') { ++ char *s, *tok, *saveptr; ++ ++ if ((s = strdup(ss_filter)) == NULL) ++ return NULL; ++ for (tok = strtok_r(s, " \t", &saveptr); tok != NULL; ++ tok = strtok_r(NULL, " \t", &saveptr)) { ++ if ((sts = __pmProcessAddArg(&argp, tok)) < 0) { ++ free(s); ++ if (pmDebugOptions.appl0) ++ fprintf(stderr, "ss_open_stream: __pmProcessAddArg failed: %s\n", ++ pmErrStr(sts)); ++ return NULL; ++ } ++ } ++ free(s); ++ } ++ if ((sts = __pmProcessPipe(&argp, "r", PM_EXEC_TOSS_NONE, &fp)) < 0) { ++ if (pmDebugOptions.appl0) ++ fprintf(stderr, "ss_open_stream: __pmProcessPipe failed: %s\n", ++ pmErrStr(sts)); ++ return NULL; ++ } + if (pmDebugOptions.appl0) +- fprintf(stderr, "ss_open_stream: popen %s\n", cmd); ++ fprintf(stderr, "ss_open_stream: exec %s %s %s\n", ++ path, SS_OPTIONS, ss_filter); ++ using_pipe = 1; + } + + return fp; +@@ -57,8 +92,8 @@ ss_open_stream() + void + ss_close_stream(FILE *fp) + { +- if (getenv("PCPQA_PMDA_SOCKETS") != NULL) +- fclose(fp); ++ if (using_pipe) ++ __pmProcessPipeClose(fp); + else +- pclose(fp); ++ fclose(fp); + } diff --git a/SOURCES/redhat-issues-RHEL-213686-CVE-2026-16526.patch b/SOURCES/redhat-issues-RHEL-213686-CVE-2026-16526.patch new file mode 100644 index 0000000..562b2e7 --- /dev/null +++ b/SOURCES/redhat-issues-RHEL-213686-CVE-2026-16526.patch @@ -0,0 +1,221 @@ +From 3af40048474ed643d3904497312e710ee378329c Mon Sep 17 00:00:00 2001 +From: Nathan Scott +Date: Thu, 2 Jul 2026 16:23:26 +1000 +Subject: [PATCH] libpcp, libpcp_pmda: set FD_CLOEXEC on AF_UNIX sockets + (CWE-403) + +The __pmInitSocket() function returns early for AF_UNIX sockets, +skipping all subsequent socket hardening including FD_CLOEXEC. +This causes the pmdaroot Unix socket fd to be inherited by child +processes spawned via popen()/fork(), enabling privilege escalation +when combined with the linux_sockets command injection (vuln 3): +an attacker's popen() child inherits the pmdaroot fd and can send +a PDUROOT_STARTPMDA_REQ to execute commands as root. + +Fix: +- Set FD_CLOEXEC on AF_UNIX sockets in __pmInitSocket() before the + early return, matching the behavior TCP sockets get via + __pmConnectRestoreFlags() +- Set FD_CLOEXEC on pmdarootfd in pmdaRootConnect() after connect() + succeeds, as belt-and-suspenders for this critical fd +- Add qa/src/check_cloexec.c and qa/2104 verifying FD_CLOEXEC is set + on sockets created by __pmCreateUnixSocket() + +Note: SO_PEERCRED peer credential verification on the pmdaroot server +side is a separate hardening measure to be addressed as a follow-up. + +Reported-by: Francisco Alisson Bezerra, TIM Security Red Team +Reported-by: Lucas Gabriel Alves, TIM Security Red Team +Reported-by: Massimiliano Brolli, TIM Security Red Team + +Co-Authored-By: Claude Opus 4.6 (1M context) +--- + qa/2104 | 31 ++++++++++++++++++++++++++++++ + qa/2104.out | 2 ++ + qa/group | 1 + + qa/src/GNUlocaldefs | 11 ++++++++++- + qa/src/check_cloexec.c | 38 +++++++++++++++++++++++++++++++++++++ + src/libpcp/src/auxconnect.c | 6 +++++- + src/libpcp_pmda/src/root.c | 5 ++++- + 7 files changed, 91 insertions(+), 3 deletions(-) + create mode 100755 qa/2104 + create mode 100644 qa/2104.out + create mode 100644 qa/src/check_cloexec.c + +diff --git a/qa/2104 b/qa/2104 +new file mode 100755 +index 000000000..0b2b0b602 +--- /dev/null ++++ b/qa/2104 +@@ -0,0 +1,31 @@ ++#!/bin/sh ++# PCP QA Test No. 2104 ++# Verify AF_UNIX sockets have FD_CLOEXEC set (CWE-403 fix) ++# ++# Copyright (c) 2026 Red Hat. All Rights Reserved. ++# ++ ++seq=`basename $0` ++echo "QA output created by $seq" ++ ++# get standard environment, filters and checks ++. ./common.product ++. ./common.filter ++. ./common.check ++ ++[ -f src/check_cloexec ] || _notrun "check_cloexec not built" ++ ++_cleanup() ++{ ++ cd $here ++ $sudo rm -rf $tmp $tmp.* ++} ++ ++status=0 # success is the default! ++trap "_cleanup; exit \$status" 0 1 2 3 15 ++ ++# real QA test starts here ++src/check_cloexec ++ ++# success, all done ++exit +diff --git a/qa/2104.out b/qa/2104.out +new file mode 100644 +index 000000000..900a95ec7 +--- /dev/null ++++ b/qa/2104.out +@@ -0,0 +1,2 @@ ++QA output created by 2104 ++FD_CLOEXEC is set +diff --git a/qa/group b/qa/group +index a8b52b68e..cf7a93e56 100644 +--- a/qa/group ++++ b/qa/group +@@ -1982,5 +1982,6 @@ x11 + 1985 pmfind local valgrind + 1986 pmfind local ++2104 libpcp local security + 2100 pmproxy local security + 2105 libpcp pmcd local security pmcd.pdu + 4751 libpcp threads valgrind local pcp helgrind +diff --git a/qa/src/GNUlocaldefs b/qa/src/GNUlocaldefs +index c5abe0bd3..5238b7a52 100644 +--- a/qa/src/GNUlocaldefs ++++ b/qa/src/GNUlocaldefs +@@ -51,7 +51,9 @@ CFILES = disk_test.c exercise.c context_test.c chkoptfetch.c \ + timeshift.c checkstructs.c bcc_profile.c sha1int2ext.c \ + getdomainname.c profilecrash.c store_and_fetch.c test_service_notify.c \ + ctx_derive.c pmstrn.c pmfstring.c pmfg-derived.c mmv_help.c sizeof.c \ +- stampconv.c ++ stampconv.c \ ++ check_cloexec.c ++ + + ifeq ($(shell test -f ../localconfig && echo 1), 1) + include ../localconfig +@@ -533,6 +535,11 @@ sortinst: sortinst.c + # --- need libpcp_import + # + ++check_cloexec: check_cloexec.c ++ rm -f $@ ++ $(CCF) $(CDEFS) -o $@ $@.c $(LDLIBS) ++ $(LINKER_MAKERULE) ++ + check_import: check_import.c + rm -f $@ + $(CCF) $(CDEFS) -o $@ $@.c $(LDLIBS) -lpcp_import +@@ -814,6 +821,8 @@ xlog.o: libpcp.h + xmktime.o: libpcp.h + xxx.o: libpcp.h + ++check_cloexec.o: libpcp.h ++ + bozo: + @echo CFILES_TARGETS=$(CFILES_TARGETS) + @echo "patsubst ->" $(patsubst %.c,%,$(CFILES_TARGETS)) +diff --git a/qa/src/check_cloexec.c b/qa/src/check_cloexec.c +new file mode 100644 +index 000000000..ebc438d30 +--- /dev/null ++++ b/qa/src/check_cloexec.c +@@ -0,0 +1,38 @@ ++/* ++ * Verify that AF_UNIX sockets created by __pmCreateUnixSocket() ++ * have FD_CLOEXEC set. ++ */ ++ ++#include ++#include "libpcp.h" ++#include ++ ++int ++main(int argc, char **argv) ++{ ++ int fd, flags; ++ ++ pmSetProgname(argv[0]); ++ ++ fd = __pmCreateUnixSocket(); ++ if (fd < 0) { ++ fprintf(stderr, "Error: __pmCreateUnixSocket failed: %s\n", ++ pmErrStr(fd)); ++ return 1; ++ } ++ ++ flags = fcntl(fd, F_GETFD); ++ if (flags < 0) { ++ fprintf(stderr, "Error: fcntl F_GETFD failed\n"); ++ close(fd); ++ return 1; ++ } ++ ++ if (flags & FD_CLOEXEC) ++ printf("FD_CLOEXEC is set\n"); ++ else ++ printf("FAIL: FD_CLOEXEC is NOT set\n"); ++ ++ close(fd); ++ return 0; ++} +diff --git a/src/libpcp/src/auxconnect.c b/src/libpcp/src/auxconnect.c +index 2afd53cb7..ee6e93fa0 100644 +--- a/src/libpcp/src/auxconnect.c ++++ b/src/libpcp/src/auxconnect.c +@@ -516,8 +516,12 @@ __pmInitSocket(int fd, int family) + } + + #if defined(HAVE_STRUCT_SOCKADDR_UN) +- if (family == AF_UNIX) ++ if (family == AF_UNIX) { ++ int fdFlags; ++ if ((fdFlags = __pmGetFileDescriptorFlags(fd)) >= 0) ++ __pmSetFileDescriptorFlags(fd, fdFlags | FD_CLOEXEC); + return fd; ++ } + #endif + + /* Avoid 200 ms delay. This option is not supported for unix domain sockets. */ +diff --git a/src/libpcp_pmda/src/root.c b/src/libpcp_pmda/src/root.c +index 1d3223b57..3950e4f1e 100644 +--- a/src/libpcp_pmda/src/root.c ++++ b/src/libpcp_pmda/src/root.c +@@ -32,7 +32,7 @@ pmdaRootConnect(const char *path) + char *tmpdir; + char socketpath[MAXPATHLEN]; + char errmsg[PM_MAXERRMSGLEN]; +- int fd, sts, version, features; ++ int fd, sts, version, features, fdFlags; + + /* Initialize the socket address. */ + if ((addr = __pmSockAddrAlloc()) == NULL) +@@ -72,6 +72,9 @@ pmdaRootConnect(const char *path) + return sts; + } + ++ if ((fdFlags = __pmGetFileDescriptorFlags(fd)) >= 0) ++ __pmSetFileDescriptorFlags(fd, fdFlags | FD_CLOEXEC); ++ + /* Check server connection information */ + if ((sts = __pmdaRecvRootPDUInfo(fd, &version, &features)) < 0) { + pmNotifyErr(LOG_ERR, diff --git a/SOURCES/redhat-issues-RHEL-213720-pmproxy-auth-flags.patch b/SOURCES/redhat-issues-RHEL-213720-pmproxy-auth-flags.patch new file mode 100644 index 0000000..318e10b --- /dev/null +++ b/SOURCES/redhat-issues-RHEL-213720-pmproxy-auth-flags.patch @@ -0,0 +1,205 @@ +From ccbe2d6cb72c2f3f8969564e59f864e588b3d54e Mon Sep 17 00:00:00 2001 +From: Nathan Scott +Date: Thu, 2 Jul 2026 15:28:34 +1000 +Subject: [PATCH] pmproxy: fix missing -Q and -S authentication flags (CWE-306) + +The pmproxy -Q (require client certificate) and -S (require +authenticated clients) flags existed as case blocks in the option +parser but were absent from the short_options string and the longopts +table, making them permanently unreachable. An unauthenticated HTTP +client could access all REST API endpoints including /store and /derive. + +Fix: +- Add Q and S to short_options so pmgetopt_r() delivers them +- Add --certreqd and --reqauth entries to the longopts table +- Document both flags in the pmproxy(1) man page +- Add qa/2100 verifying the flags are accepted and that -S correctly + rejects unauthenticated REST API requests with HTTP 403 + +Note: -S enforcement in the REST API path already exists in http.c and +webapi.c. -Q (CERT_REQD) enforcement is only implemented for the +legacy PCP wire protocol path, not the REST API; this is a pre-existing +limitation to be addressed separately. + +Reported-by: Francisco Alisson Bezerra, TIM Security Red Team +Reported-by: Lucas Gabriel Alves, TIM Security Red Team +Reported-by: Massimiliano Brolli, TIM Security Red Team + +Co-Authored-By: Claude Opus 4.6 (1M context) +--- + man/man1/pmproxy.1 | 6 +++ + qa/2100 | 85 +++++++++++++++++++++++++++++++++++++++ + qa/2100.out | 12 ++++++ + qa/group | 1 + + src/pmproxy/src/pmproxy.c | 4 +- + 5 files changed, 107 insertions(+), 1 deletion(-) + create mode 100755 qa/2100 + create mode 100644 qa/2100.out + +diff --git a/man/man1/pmproxy.1 b/man/man1/pmproxy.1 +index 90ec61be8..30758a114 100644 +--- a/man/man1/pmproxy.1 ++++ b/man/man1/pmproxy.1 +@@ -271,6 +271,9 @@ be unreadable by any user other than the user running the + .B pmproxy + process). + .TP ++\fB\-Q\f1, \fB\-\-certreqd\f1 ++Require that all client connections provide a trusted client certificate. ++.TP + \f3\-r\f1 \f2port\f1, \f3\-\-redisport\f1=\f2port\f1 + Specify an alternate Redis + .I port +@@ -285,6 +288,9 @@ The default value is + .IR $PCP_RUN_DIR/pmproxy.socket . + This option implies \f3pmproxy\f1 is running in \f3timeseries\f1 mode. + .TP ++\fB\-S\f1, \fB\-\-reqauth\f1 ++Require that all client connections be authenticated. ++.TP + \fB\-t\f1, \fB\-\-timeseries\f1 + Operate in automatic archive timeseries discovery mode. + This mode of operation will enable the +diff --git a/qa/2100 b/qa/2100 +new file mode 100755 +index 000000000..1de957a2f +--- /dev/null ++++ b/qa/2100 +@@ -0,0 +1,85 @@ ++#!/bin/sh ++# PCP QA Test No. 2100 ++# Verify pmproxy -Q and -S authentication flags are accepted ++# and that -S (reqauth) enforces authentication on REST API ++# ++# Copyright (c) 2026 Red Hat. All Rights Reserved. ++# ++ ++seq=`basename $0` ++echo "QA output created by $seq" ++ ++# get standard environment, filters and checks ++. ./common.product ++. ./common.filter ++. ./common.check ++ ++which curl >/dev/null 2>&1 || _notrun "no curl executable installed" ++ ++_cleanup() ++{ ++ [ -n "$__pid" ] && kill $__pid 2>/dev/null ++ wait $__pid 2>/dev/null ++ cd $here ++ $sudo rm -rf $tmp $tmp.* ++} ++ ++status=0 # success is the default! ++__pid="" ++trap "_cleanup; exit \$status" 0 1 2 3 15 ++ ++# real QA test starts here ++ ++echo "=== checking -Q and -S appear in usage ===" ++pmproxy --help 2>&1 | grep -E '\-[QS]' | sed -e 's/^ *//' ++ ++echo ++echo "=== checking -S enforces authentication on REST API ===" ++__port=`_find_free_port` ++$PCP_BINADM_DIR/pmproxy -S -f -p $__port -l $tmp.log & ++__pid=$! ++sleep 1 ++if kill -0 $__pid 2>/dev/null; then ++ echo "pmproxy with -S started" ++ ++ # unauthenticated request should be rejected ++ __code=`curl -s -o /dev/null -w '%{http_code}' "http://localhost:$__port/pmapi/context?hostspec=localhost" 2>/dev/null` ++ if [ "$__code" = "403" ]; then ++ echo "unauthenticated request correctly rejected (HTTP $__code)" ++ else ++ echo "FAIL: expected HTTP 403, got HTTP $__code" ++ fi ++ ++ kill $__pid ++ wait $__pid 2>/dev/null ++ __pid="" ++else ++ echo "FAIL: pmproxy with -S did not start" ++fi ++ ++echo ++echo "=== checking without -S allows unauthenticated access ===" ++__port=`_find_free_port` ++$PCP_BINADM_DIR/pmproxy -f -p $__port -l $tmp.log2 & ++__pid=$! ++sleep 1 ++if kill -0 $__pid 2>/dev/null; then ++ echo "pmproxy without -S started" ++ ++ # unauthenticated request should succeed ++ __code=`curl -s -o /dev/null -w '%{http_code}' "http://localhost:$__port/pmapi/context?hostspec=localhost" 2>/dev/null` ++ if [ "$__code" = "200" ]; then ++ echo "unauthenticated request correctly allowed (HTTP $__code)" ++ else ++ echo "FAIL: expected HTTP 200, got HTTP $__code" ++ fi ++ ++ kill $__pid ++ wait $__pid 2>/dev/null ++ __pid="" ++else ++ echo "FAIL: pmproxy without -S did not start" ++fi ++ ++# success, all done ++exit +diff --git a/qa/2100.out b/qa/2100.out +new file mode 100644 +index 000000000..5302aea77 +--- /dev/null ++++ b/qa/2100.out +@@ -0,0 +1,12 @@ ++QA output created by 2100 ++=== checking -Q and -S appear in usage === ++-Q, --certreqd require client certificate authentication ++-S, --reqauth require all client connections to be authenticated ++ ++=== checking -S enforces authentication on REST API === ++pmproxy with -S started ++unauthenticated request correctly rejected (HTTP 403) ++ ++=== checking without -S allows unauthenticated access === ++pmproxy without -S started ++unauthenticated request correctly allowed (HTTP 200) +diff --git a/qa/group b/qa/group +index 742d3b54b..a8b52b68e 100644 +--- a/qa/group ++++ b/qa/group +@@ -1980,5 +1980,6 @@ x11 + 1984 pmlogconf pmda.redis local + 1985 pmfind local valgrind + 1986 pmfind local ++2100 pmproxy local security + 2105 libpcp pmcd local security pmcd.pdu + 4751 libpcp threads valgrind local pcp helgrind +diff --git a/src/pmproxy/src/pmproxy.c b/src/pmproxy/src/pmproxy.c +index d975ef37a..43766c20f 100644 +--- a/src/pmproxy/src/pmproxy.c ++++ b/src/pmproxy/src/pmproxy.c +@@ -86,7 +86,9 @@ static pmLongOptions longopts[] = { + PMAPI_OPTIONS_HEADER("Connection options"), + { "interface", 1, 'i', "ADDR", "accept connections on this IP address" }, + { "port", 1, 'p', "PORT", "accept connections on this port" }, ++ { "certreqd", 0, 'Q', 0, "require client certificate authentication" }, + { "socket", 1, 's', "PATH", "Unix domain socket file [default $PCP_RUN_DIR/pmproxy.socket]" }, ++ { "reqauth", 0, 'S', 0, "require all client connections to be authenticated" }, + { "redisport", 1, 'r', "PORT", "Connect to Redis instance on this TCP/IP port (implies --timeseries)" }, + { "redishost", 1, 'h', "HOST", "Connect to Redis instance on this host name (implies --timeseries)" }, + PMAPI_OPTIONS_HEADER("Diagnostic options"), +@@ -96,7 +98,7 @@ static pmLongOptions longopts[] = { + }; + + static pmOptions opts = { +- .short_options = "Ac:C:dD:Ffh:i:l:L:M:p:P:r:s:tU:x:?", ++ .short_options = "Ac:C:dD:Ffh:i:l:L:M:p:P:Qr:s:StU:x:?", + .long_options = longopts, + }; + diff --git a/SOURCES/redhat-issues-RHEL-213729-pdu-integer-overflow.patch b/SOURCES/redhat-issues-RHEL-213729-pdu-integer-overflow.patch new file mode 100644 index 0000000..fb6bfe7 --- /dev/null +++ b/SOURCES/redhat-issues-RHEL-213729-pdu-integer-overflow.patch @@ -0,0 +1,223 @@ +From 7800c577023232c994113c42336b84a2138cb561 Mon Sep 17 00:00:00 2001 +From: Nathan Scott +Date: Thu, 2 Jul 2026 16:59:54 +1000 +Subject: [PATCH] libpcp: fix integer overflow in __pmGetPDU() (CWE-190) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +When php->len is near INT_MAX (e.g. 0x7FFFFFFF), the buffer size +computation PDU_CHUNK * (1 + php->len / PDU_CHUNK) overflows signed +int, producing a negative value that permanently corrupts the static +maxsize variable. Every subsequent __pmFindPDUBuf() call returns NULL, +rendering the affected daemon (pmlogger, pmcd) unable to process any +further PDUs for the remainder of its lifetime — a persistent denial +of service requiring a restart. + +Fix: add an overflow guard (php->len > INT_MAX - PDU_CHUNK) before +the multiplication, returning PM_ERR_TOOBIG for absurdly large PDU +lengths. This protects the NO_LIMIT code path used by pmcd and +pmlogger that is not covered by the existing ceiling check. + +Also add _filter_pmcd() to qa/common.pmcd.pdu to normalize fd=N in +pmcd log output, and qa/2105 with a crafted PDU exercising the +overflow. + +Reported-by: Francisco Alisson Bezerra, TIM Security Red Team +Reported-by: Lucas Gabriel Alves, TIM Security Red Team +Reported-by: Massimiliano Brolli, TIM Security Red Team + +Co-Authored-By: Claude Opus 4.6 (1M context) +--- + qa/2105 | 17 +++++++ + qa/2105.out | 10 ++++ + qa/common.pmcd.pdu | 108 +++++++++++++++++++++++++++++++++++++++++++ + qa/group | 1 + + src/libpcp/src/pdu.c | 8 ++++ + 5 files changed, 144 insertions(+) + create mode 100755 qa/2105 + create mode 100644 qa/2105.out + create mode 100644 qa/common.pmcd.pdu + +diff --git a/qa/2105 b/qa/2105 +new file mode 100755 +index 000000000..44b849ad3 +--- /dev/null ++++ b/qa/2105 +@@ -0,0 +1,17 @@ ++#!/bin/sh ++# PCP QA Test No. 2105 ++# Verify __pmGetPDU rejects PDU with len near INT_MAX ++# (integer overflow in buffer size computation, CWE-190) ++# ++# Copyright (c) 2026 Red Hat. All Rights Reserved. ++# ++ ++seq=`basename $0` ++echo "QA output created by $seq" ++ ++pdu_data=pdudata/pdu-getpdu-overflow ++grep_pattern="bad PDU len=.*exceeds maximum|PDU len=.*too large" ++ ++# this is one of the generic pmcd PDU exerciser tests ... ++# ++. ./common.pmcd.pdu +diff --git a/qa/2105.out b/qa/2105.out +new file mode 100644 +index 000000000..a304f9d91 +--- /dev/null ++++ b/qa/2105.out +@@ -0,0 +1,10 @@ ++QA output created by 2105 ++expect error(s) to be logged ... ++__pmGetPDU: fd=N type=0x8000 bad PDU len=2147483647 in hdr exceeds maximum client PDU size (65536) ++ ++and no valgrind badness ... ++Memcheck, a memory error detector ++LEAK SUMMARY: ++definitely lost: 0 bytes in 0 blocks ++indirectly lost: 0 bytes in 0 blocks ++ERROR SUMMARY: 0 errors from 0 contexts ... +diff --git a/qa/common.pmcd.pdu b/qa/common.pmcd.pdu +new file mode 100644 +index 000000000..8fa832aa8 +--- /dev/null ++++ b/qa/common.pmcd.pdu +@@ -0,0 +1,108 @@ ++# This is really a full QA test for stress testing pmcd's protocol ++# handling ... set the shell variables ++# $pdu_data ++# ascii pdu specifications suitable for src/pdu-gadget or binary ++# protocol data stream, these typically contain malformed PDUs ++# (see the qa/pdudata directory for examples) ... this needs ++# to be a relative path ++# $grep_pattern ++# a grep -E pattern for scanning pmcd.log once the test has been ++# run ++# and then source this file ++ ++[ -z "$pdu_data" ] && echo "Botch! \$pdu_data not set" && exit 1 ++[ -z "$grep_pattern" ] && echo "Botch! \$grep_pattern not set" && exit 1 ++ ++# get standard environment, filters and checks ++. ./common.product ++. ./common.filter ++. ./common.check ++ ++[ ! -f "$here/$pdu_data" ] && echo "Botch! PDU data file $here/$pdu_data not found" && exit 1 ++ ++ ++which nc >/dev/null 2>&1 || _notrun "no nc executable installed" ++# Need nc option to terminate when EOF encountered on stdin, ++# but unfortunately there are multiple versions of nc(1) ... ++nc --help >$tmp.out 2>&1 ++if grep -q '.-[^ ]*N' $tmp.out ++then ++ __nc_opt=-N ++elif grep -q '.--send-only' $tmp.out ++then ++ __nc_opt="--send-only" ++else ++ cat $tmp.out >>$here/$seq.full ++ _notrun 'nc --help is not helping ... see $seq.full' ++fi ++_check_valgrind ++ ++_cleanup() ++{ ++ cat pmcd.log >>$here/$seq.full ++ cd $here ++ $sudo rm -rf $tmp $tmp.* ++} ++ ++status=0 # success is the default! ++trap "_cleanup; exit \$status" 0 1 2 3 15 ++ ++_filter() ++{ ++ sed \ ++ -e '/^Command: /d' \ ++ # end ++} ++ ++_filter_pmcd() ++{ ++ sed \ ++ -e 's/fd=[0-9][0-9]*/fd=N/g' \ ++ -e 's/^\[.*\] pmcd([0-9]*) [A-Za-z]*: //' \ ++ # end ++} ++ ++mkdir $tmp || exit 1 ++cd $tmp ++grep sampledso $PCP_PMCDCONF_PATH >pmcd.conf ++$PCP_AWK_PROG <$PCP_PMCDCONF_PATH >>pmcd.conf ' ++$1 == "[access]" { print ""; want = 1 } ++want == 1 { print }' ++cat pmcd.conf >>$here/$seq.full ++__port=`_find_free_port` ++echo "__port=$__port" >>$here/$seq.full ++ ++# real QA test starts here ++valgrind --leak-check=full $PCP_BINADM_DIR/pmcd -f -Dpdu,appl3,attr -c ./pmcd.conf -s ./pmcd.socket -p $__port >out 2>err & ++valgrind_pid=$! ++sleep 2 ++__pmcd_pid=`$PCP_PS_PROG $PCP_PS_ALL_FLAGS | grep '[p]mcd -f -Dpdu' | $PCP_AWK_PROG '{ print $2 }'` ++echo "__pmcd_pid=$__pmcd_pid" >>$here/$seq.full ++case "`file $here/$pdu_data`" ++in ++ *'ASCII text'*) ++ # assume ascii PDU specification as input to pdu-gadget ++ $here/src/pdu-gadget -p $__port <$here/$pdu_data 2>$tmp.err ++ ;; ++ *) ++ # assume binary data, e.g. SUSE reproducers ++ rm -f $tmp.err ++ nc $__nc_opt <$here/$pdu_data localhost $__port 2>&1 \ ++ ;; ++esac \ ++| od -X >>$here/$seq.full ++sleep 2 ++kill -TERM $__pmcd_pid ++wait ++ ++[ -s $tmp.err ] && cat $tmp.err ++ ++echo "expect error(s) to be logged ..." ++grep -E "$grep_pattern" pmcd.log | _filter_pmcd ++ ++echo ++echo "and no valgrind badness ..." ++cat out err | _filter_valgrind | _filter ++ ++# success, all done ++exit +diff --git a/qa/group b/qa/group +index 86265eb1f..742d3b54b 100644 +--- a/qa/group ++++ b/qa/group +@@ -1980,4 +1980,5 @@ x11 + 1984 pmlogconf pmda.redis local + 1985 pmfind local valgrind + 1986 pmfind local ++2105 libpcp pmcd local security pmcd.pdu + 4751 libpcp threads valgrind local pcp helgrind +diff --git a/src/libpcp/src/pdu.c b/src/libpcp/src/pdu.c +index 4afe5719c..5b934513a 100644 +--- a/src/libpcp/src/pdu.c ++++ b/src/libpcp/src/pdu.c +@@ -585,6 +585,14 @@ check_read_len: + + PM_LOCK(pdu_lock); + if (php->len > maxsize) { ++ if (php->len > INT_MAX - PDU_CHUNK) { ++ PM_UNLOCK(pdu_lock); ++ if (pmDebugOptions.pdu) ++ pmNotifyErr(LOG_ERR, "%s: fd=%d PDU len=%d too large", ++ "__pmGetPDU", fd, php->len); ++ __pmUnpinPDUBuf(pdubuf); ++ return PM_ERR_TOOBIG; ++ } + tmpsize = PDU_CHUNK * ( 1 + php->len / PDU_CHUNK); + maxsize = tmpsize; + } diff --git a/SPECS/pcp.spec b/SPECS/pcp.spec index 086765d..6047da5 100644 --- a/SPECS/pcp.spec +++ b/SPECS/pcp.spec @@ -1,12 +1,13 @@ Name: pcp Version: 5.3.7 -Release: 22%{?dist} +Release: 22.0.12%{?dist}.5 Summary: System-level performance monitoring and performance management License: GPLv2+ and LGPLv2+ and CC-BY URL: https://pcp.io %global artifactory https://performancecopilot.jfrog.io/artifactory Source0: %{artifactory}/pcp-source-release/pcp-%{version}.src.tar.gz +Source1: pdu-getpdu-overflow Patch0: redhat-bugzilla-2003956-pmdabcc-update-kernel-version-check-due-to-backporting.patch Patch1: redhat-bugzilla-1981886-pmdasockets-backporting.patch Patch2: redhat-bugzilla-2059461-pmie-systemd-fixup.patch @@ -33,6 +34,69 @@ Patch22: redhat-issues-RHEL-57796-pmcd-pmstore-corruption.patch Patch23: redhat-issues-RHEL-57799-pmpost-symlink-handling.patch Patch24: redhat-issues-RHEL-34586-pmproxy-pmcd-fd-leak.patch Patch25: redhat-issues-RHEL-57788-pmdahacluster-update.patch +# https://issues.redhat.com/browse/RHEL-213729 +# https://github.com/performancecopilot/pcp/commit/ef848fb978d26335f9676933f541c73b58f130a6 +Patch26: redhat-issues-RHEL-213729-pdu-integer-overflow.patch +Patch27: redhat-issues-RHEL-213720-pmproxy-auth-flags.patch +# https://issues.redhat.com/browse/RHEL-213686 +# https://github.com/performancecopilot/pcp/commit/7e27614006ff6fc4925991edbedaf1eab6b14731 +Patch28: redhat-issues-RHEL-213686-CVE-2026-16526.patch +# https://issues.redhat.com/browse/RHEL-213662 +# https://github.com/performancecopilot/pcp/commit/c5cbeceb7d3c2af357c04065cdd911efdc270de0 +Patch29: redhat-issues-RHEL-213662-CVE-2026-16524.patch + +#oracle patch +Patch1001: 1001-pcp-ps-utilty-to-view-ps-like-output-for-pcp.patch +Patch1002: 1002-pcp-ps-python2-print-issue-and-o-option-fix.patch +Patch1003: 1003-pcp-ps-added-capabilities-to-show-n-sample-with-arch.patch +Patch1004: 1004-Fixed-multiple-pcp-ps-and-pcp-mpstat-issue.patch +Patch1005: 1005-Fixed-PCP-python-utility-issues.patch +#pcp-meminfo +Patch1006: 1006-pcp-meminfo-initial-PCP-implementation-of-meminfo.patch +#pcp-slabinfo +Patch1007: 1007-pcp-slabinfo-initial-PCP-implementation-of-slabinfo.patch +#pcp-buddyinfo +Patch1008: 1008-pcp-buddyinfo-initial-commit-of-pcp-implementation.patch +#pcp-netstat +Patch1009: 1009-pcp-netstat-Initial-implemenation-of-pcp-netstat-tool.patch +#pcp-zoneinfo +Patch1010: 1010-pcp-zoneinfo-Initial-implemenation.patch +Patch1011: 1011-pcp-zoneinfo-ol7-replay-fix.patch +#pmlogcheck +Patch1012: 1012-pmlogcheck-Fixed-o-n-n-nested-hash-table-lookup.patch +#pcp-ps +Patch1013: 1013-pcp-ps-added-args-option-to-view-full-process-argume.patch +#pcp-buddyinfo +Patch1014: 1014-pcp-buddyinfo-Added-timestamp-and-no-interpolation.patch +#pcp-meminfo +Patch1015: 1015-pcp-meminfo-Added-timestamp-in-pcp-meinfo.patch +#pmstat +Patch1016: 1016-pmstat-avoid-corner-case-infinite-loop.patch +#rocestat-pmda +Patch1017: 1017-Merge-branch-mohith-kumar-thummaluru-rocestat-pmda.patch +#rocestat-client +Patch1018: 1018-Merge-branch-pcp-rocestat-of-https-github.com-mohith.patch +Patch1019: 1019-pcp-meminfo-additional-metrics-added-for-mem.util-to.patch +Patch1020: 1020-additional-mem.util-metrics-recent-kernel.patch +Patch1021: 1021-meminfo-added-kreclaimable-and-hugtlb-metrics.patch +Patch1022: 1022-fix-mpstat-showing-inconsistent-values.patch +Patch1023: 1023-fix-broken-pipe-error-iostat.patch +Patch1024: 1024-add-missing-numastat-metrics.patch +Patch1025: 1025-add-numastat-support-for-mn-options.patch +Patch1026: 1026-Fixes-higepagesize-metric-value-from-bytes-to-KB.patch + +#pmlogger_daily +Patch1027: 1027-xz-default-compression-changed-to-level-3.patch + +Patch1028: 1028-orabug38724884-fix-nfsclient-per-op-parsing.patch +Patch1029: 1029-orabug38817091-Introduce-PCP-implementation-of-nfsiostat.patch + +Patch1030: 1030-pcp-ps-implement-sort-option-to-allow-sorting-by-cpu.patch +Patch1031: 1031-pmlogger_daily-add-disk-usage-limit-option-and-purge.patch +Patch1032: 1032-pcp-system-tools-restore-backward-compatibility-with.patch +Patch1033: 1033-orabug38902336-adds-interval-option-in-nfsiostat.patch +Patch1034: 1034-orabug38509848-introduces-numa-maps-metrics-and-adds-numastat-process-option.patch +Patch1035: 1035-pmrep-add-unit-information-option-for-CSV-headers.patch # The additional linker flags break out-of-tree PMDAs. # https://bugzilla.redhat.com/show_bug.cgi?id=2043092 @@ -575,7 +639,7 @@ Requires: pcp-pmda-bpftrace Requires: pcp-pmda-gluster pcp-pmda-zswap pcp-pmda-unbound pcp-pmda-mic Requires: pcp-pmda-libvirt pcp-pmda-lio pcp-pmda-openmetrics pcp-pmda-haproxy Requires: pcp-pmda-lmsensors pcp-pmda-netcheck pcp-pmda-rabbitmq -Requires: pcp-pmda-openvswitch pcp-pmda-mongodb +Requires: pcp-pmda-openvswitch pcp-pmda-mongodb pcp-pmda-rocestat %endif %if !%{disable_mssql} Requires: pcp-pmda-mssql @@ -1533,6 +1597,24 @@ This package contains the PCP Performance Metrics Domain Agent (PMDA) for collecting metrics about the gluster filesystem. # end pcp-pmda-gluster +# +# pcp-pmda-rocestat +# +%package pmda-rocestat +License: GPLv2+ +Summary: Performance Co-Pilot (PCP) metrics for the reporting Nvidia RoCE device metrics +URL: https://pcp.io +Requires: pcp = %{version}-%{release} pcp-libs = %{version}-%{release} +%if !%{disable_python3} +Requires: python3-pcp +%else +Requires: %{__python2}-pcp +%endif +%description pmda-rocestat +This package contains the PCP Performance Metrics Domain Agent (PMDA) for +collecting metrics about the Nvidia RoCE device metrics. +# end pcp-pmda-rocestat + # # pcp-pmda-nfsclient # @@ -2304,6 +2386,7 @@ updated policy package. %prep %autosetup -p1 +install -D -m 644 %{SOURCE1} qa/pdudata/pdu-getpdu-overflow %build # the buildsubdir macro gets defined in %setup and is apparently only available in the next step (i.e. the %build step) @@ -2531,6 +2614,7 @@ basic_manifest | keep '(etc/pcp|pmdas)/postfix(/|$)' >pcp-pmda-postfix-files basic_manifest | keep '(etc/pcp|pmdas)/postgresql(/|$)' >pcp-pmda-postgresql-files basic_manifest | keep '(etc/pcp|pmdas)/rabbitmq(/|$)' >pcp-pmda-rabbitmq-files basic_manifest | keep '(etc/pcp|pmdas)/redis(/|$)' >pcp-pmda-redis-files +basic_manifest | keep '(etc/pcp|pmdas)/rocestat(/|$)' >pcp-pmda-rocestat-files basic_manifest | keep '(etc/pcp|pmdas)/roomtemp(/|$)' >pcp-pmda-roomtemp-files basic_manifest | keep '(etc/pcp|pmdas)/rpm(/|$)' >pcp-pmda-rpm-files basic_manifest | keep '(etc/pcp|pmdas)/rsyslog(/|$)' >pcp-pmda-rsyslog-files @@ -2567,7 +2651,7 @@ for pmda_package in \ nutcracker nvidia \ openmetrics openvswitch oracle \ pdns perfevent podman postfix postgresql \ - rabbitmq redis roomtemp rpm rsyslog \ + rabbitmq redis rocestat roomtemp rpm rsyslog \ samba sendmail shping slurm smart snmp \ sockets statsd summary systemd \ unbound \ @@ -2897,6 +2981,9 @@ exit 0 %preun pmda-gluster %{pmda_remove "$1" "gluster"} +%preun pmda-rocestat +%{pmda_remove "$1" "rocestat"} + %preun pmda-zswap %{pmda_remove "$1" "zswap"} @@ -3043,6 +3130,26 @@ done %endif %endif +%post pmda-rocestat +PCP_PMDAS_DIR=%{_pmdasdir} +PCP_SYSCONFIG_DIR=%{_sysconfdir}/sysconfig +PCP_PMCDCONF_PATH=%{_confdir}/pmcd/pmcd.conf + +# Auto-install rocestat PMDA if not already in pmcd.conf +if ! grep -q "rocestat/pmdarocestat" "$PCP_PMCDCONF_PATH"; then + if [ ! -d /sys/class/infiniband ]; then + if ! lsmod | grep -q '^ib_core'; then + echo "Skipping install for PMDA Rocestat (IB kernel modules are not loaded)" >&2 + else + echo "Skipping install for PMDA Rocestat (No IB devices detected)" >&2 + fi + else + cd "$PCP_PMDAS_DIR/rocestat" && \ + chmod +x Install && \ + ./Install < /dev/null + fi +fi + %post PCP_PMNS_DIR=%{_pmnsdir} PCP_LOG_DIR=%{_logsdir} @@ -3236,6 +3343,8 @@ fi %if !%{disable_python2} || !%{disable_python3} %files pmda-gluster -f pcp-pmda-gluster-files.rpm +%files pmda-rocestat -f pcp-pmda-rocestat-files.rpm + %files pmda-zswap -f pcp-pmda-zswap-files.rpm %files pmda-unbound -f pcp-pmda-unbound-files.rpm @@ -3375,6 +3484,56 @@ fi %files zeroconf -f pcp-zeroconf-files.rpm %changelog +* Mon Aug 17 2026 EL Errata - 5.3.7-22.0.12.el8_10.5 +- Implemented units header in csv output using pmrep[Orabug: 39064482] +- Adds interval option support in PCP nfsiostat tool [Orabug: 38902336] +- Introduces proc.numa_maps metrics in linux_proc PMDA [Orabug: 38509848] +- adds numastat process option in the tool +- Added support for size based cleanup for pcp archives [Orabug: 38991685] +- Added --sort option in pcp ps utility [Orabug: 38991685] +- Merges new PCP nfsiostat parser in OL [Orabug: 38817091] +- pmdanfsclient: fix regex to correctly parse NFS op stats [Orabug: 38724884] +- pmda/rocestat: skip installation when IB is absent [Orabug: 38742706] +- pmlogger_daily default xz compression changed to level 3 [Orabug: 38592558] +- Backports various pcp bugs and enhancements [Orabug: 35778072] +- [Orabug: 36932629] [Orabug: 38526407] [Orabug: 38526462] +- [Orabug: 38526444] [Orabug: 38531609] +- Add support for rocestat pmda [Orabug: 38109218] +- Add support for rocestat client [Orabug: 38109360] +- Fixed pmstat infinte loop issue in archive replay [Orabug: 37638447] +- Fixed pmlogcheck time consuming issue [Orabug: 36995894] +- Added pcp-ps arg option to view full command argument [Orabug: 37062125] +- Added no interpolation option in pcp-buddyinfo [Orabug: 36985368] +- Added timestamp and fixed broken pipe in pcp-meminfo [Orabug: 36985368] +- pcp-zoneinfo fix to replay ol7 archives [Orabug: 35903733] +- Backporting of python tool pcp-meminfo [Orabug: 35759707] +- Backporting of python tool pcp-slabinfo [Orabug: 35560940] +- Backporting of python tool pcp-buddyinfo [Orabug: 35660932] +- Backporting of python tool pcp-netstat [Orabug: 34324779] +- Backporting of python tool pcp-zoneinfo [Orabug: 35660927] +- Fixed multiple pcp python utiltites issues[Orabug: 35434363] +- Fixed broken pipe issue in pcp ps utlity[Orabug: 34830203] +- Fixed pcp mpstat utiltiy crash issue [Orabug: 34891338] +- Pcp mpstat utiltiy initial archive file read error fix [Orabug: 34869451] +- Fix pcp-ps to show n sample with archives[Orabug: 34849959] +- Pcp ps Utility -o option and print issue fix [Orabug: 34321683] +- Pcp ps utilty has been added [Orabug: 34321683] + +* Fri Aug 14 2026 Jan Kurik - 5.3.7-22.5 +- Fix qa/2101 and qa/common.pmcd.pdu for PCP 5.3.7 testsuite compatibility + +* Thu Jul 30 2026 RHEL Packaging Agent - 5.3.7-22.4 +- Fix CVE-2026-16524: command injection in linux_sockets PMDA (RHEL-213662) + +* Thu Jul 30 2026 RHEL Packaging Agent - 5.3.7-22.3 +- Fix CVE-2026-16526: set FD_CLOEXEC on AF_UNIX sockets (RHEL-213686) + +* Thu Jul 30 2026 RHEL Packaging Agent - 5.3.7-22.2 +- Fix missing pmproxy -Q and -S authentication flags (CVE-2026-16527) + +* Thu Jul 30 2026 RHEL Packaging Agent - 5.3.7-22.1 +- Fix integer overflow in __pmGetPDU PDU handling (RHEL-213729) + * Mon Sep 09 2024 Nathan Scott - 5.3.7-22 - Fix buffer sizing checks in pmstore PDU handling (RHEL-57796) - Guard against symlink attacks in pmpost program (RHEL-57799)