diff --git a/0002-fix-some-pcp-pidstat-bugs.patch b/0002-fix-some-pcp-pidstat-bugs.patch new file mode 100644 index 0000000000000000000000000000000000000000..81877b2e1ce3ac4e10bf2041f6c9d620dff4cfa3 --- /dev/null +++ b/0002-fix-some-pcp-pidstat-bugs.patch @@ -0,0 +1,67 @@ +From a0263117a9383623860cda6d60a6cacfb957f445 Mon Sep 17 00:00:00 2001 +From: si-gui <245140120@qq.com> +Date: Fri, 18 Sep 2020 21:10:58 +0800 +Subject: [PATCH] fix some pcp-pidstat bugs + +Signed-off-by: si-gui <245140120@qq.com> +--- + src/pcp/pidstat/pcp-pidstat.1 | 8 +------- + src/pcp/pidstat/pcp-pidstat.py | 5 ++--- + 2 files changed, 3 insertions(+), 10 deletions(-) + +diff --git a/src/pcp/pidstat/pcp-pidstat.1 b/src/pcp/pidstat/pcp-pidstat.1 +index 2e0dafe..b929085 100644 +--- a/src/pcp/pidstat/pcp-pidstat.1 ++++ b/src/pcp/pidstat/pcp-pidstat.1 +@@ -22,7 +22,7 @@ + .SH DESCRIPTION + .B pcp-pidstat + command is used for monitoring individual tasks currently being managed by the Linux kernel. Using various options it helps user to see useful information related with the processes. This information can include percentage CPU, memory and stack usages, scheduling and priority information. By default pcp-pidstat reports live +-data for the local host but can also report for a remote host (--host) or from a previously captured PCP archive (-a). ++data for the local host but can also report from a previously captured PCP archive (-a). + .BR pcp-pidstat + fetches the data to be analysed from PMCD unless provided \-a option. (See below) + +@@ -51,12 +51,6 @@ Causes pcp\-pidstat to use the specified archive than connecting to PMCD. The ar + list of names, each of which may be the base name of an archive or the name of a directory containing one or more archives. Archives can be created using + .BR pmlogger (1)\. + +-.TP +-.B \--host +-Current performance metric values are retrieved from the nominated +-.I host +-machine. +- + .TP + .BR \-B \fR + Report process states. The argument to -B is one of the following: +diff --git a/src/pcp/pidstat/pcp-pidstat.py b/src/pcp/pidstat/pcp-pidstat.py +index a790793..d126fba 100755 +--- a/src/pcp/pidstat/pcp-pidstat.py ++++ b/src/pcp/pidstat/pcp-pidstat.py +@@ -776,12 +776,11 @@ class PidstatOptions(pmapi.pmOptions): + #After reading in the provided command line options + #initalize them by passing them in + def __init__(self): +- pmapi.pmOptions.__init__(self,"a:s:t:G:IU::p:RrkVZ:z?:f:B:l") ++ pmapi.pmOptions.__init__(self,"a:s:t:G:IU:p:RrkVZ:z?f:B:l") + self.pmSetOptionCallback(self.extraOptions) + self.pmSetOverrideCallback(self.override) + self.pmSetLongOptionHeader("General options") + self.pmSetLongOptionArchive() +- self.pmSetLongOptionHost() # --host for remote monitoring + self.pmSetLongOptionSamples() + self.pmSetLongOptionInterval() + self.pmSetLongOption("process-name",1,"G","NAME","Select process names using regular expression.") +@@ -791,7 +790,7 @@ class PidstatOptions(pmapi.pmOptions): + self.pmSetLongOption("",0,"R","","Report realtime priority and scheduling policy information.") + self.pmSetLongOption("",0,"r","","Report page faults and memory utilization.") + self.pmSetLongOption("",0,"k","","Report stack utilization.") +- self.pmSetLongOption("",0,"f","","Format the timestamp output") ++ self.pmSetLongOption("",0,"f","","Format the timestamp output,use -f [FORMAT] specify the timestamp format") + self.pmSetLongOption("",0,"B","state1,state2,..","Report process state information. Use -B [all] or -B [comma separated states]. Use -B detail for showing time spent in every state per process") + self.pmSetLongOptionVersion() + self.pmSetLongOptionTimeZone() +-- +2.23.0 + diff --git a/pcp.spec b/pcp.spec index 64b4d64ce7a346f623365381f6119b9aff53f6ef..afdab4d1bd1e01a12150f71e0a05999a1eb549d9 100644 --- a/pcp.spec +++ b/pcp.spec @@ -9,7 +9,7 @@ Name: pcp Version: 4.1.3 Summary: System-level performance monitoring and performance management -Release: 11 +Release: 12 License: GPLv2+ and LGPLv2.1+ and CC-BY URL: https://pcp.io Source0: https://dl.bintray.com/pcp/source/pcp-4.1.3.tar.gz @@ -21,6 +21,7 @@ Patch0000: 0000-Fix-some-options-and-syntax-errors.patch Patch0001: 0001-Fix-collectl2pcp-option.patch Patch6000: CVE-2019-3695-CVE-2019-3696.patch Patch9000: 9000-fix-new-function-not-found-when-Install.patch +Patch9001: 0002-fix-some-pcp-pidstat-bugs.patch BuildRequires: gcc gcc-c++ procps autoconf bison flex nss-devel rpm-devel avahi-devel xz-devel zlib-devel BuildRequires: python2-devel python3-devel ncurses-devel readline-devel cyrus-sasl-devel papi-devel libpfm-devel >= 4 @@ -866,6 +867,7 @@ This package installs selinux support files for PCP. %patch0001 -p1 %patch6000 -p1 %patch9000 -p1 +%patch9001 -p1 %build @@ -2221,6 +2223,10 @@ fi %config(noreplace) /etc/pcp/pmrep/* %changelog +* Fri Sep 18 2020 Guoshuai Sun -4.1.3-12 +- Fix some bugs in pcp-pidstat,include -U option error,-? need an arg, + And del unused -h/--host options + * Thu Sep 17 2020 lingsheng - 4.1.3-11 - Fix collect2pcp option