Update to 5.3.5
This commit is contained in:
parent
f158c90de8
commit
37d8777136
@ -1,184 +0,0 @@
|
||||
diff --git a/src/pcp/collectl/pcp-collectl.py b/src/pcp/collectl/pcp-collectl.py
|
||||
index 3cff1f9..58b8c64 100755
|
||||
--- a/src/pcp/collectl/pcp-collectl.py
|
||||
+++ b/src/pcp/collectl/pcp-collectl.py
|
||||
@@ -841,7 +841,7 @@ class _Options(object):
|
||||
opts = pmapi.pmOptions()
|
||||
opts.pmSetOptionCallback(self.option_callback)
|
||||
opts.pmSetOverrideCallback(self.override)
|
||||
- opts.pmSetShortOptions("vp:a:c:f:R:i:s:h:?")
|
||||
+ opts.pmSetShortOptions("Vvp:a:c:f:R:i:s:h:?")
|
||||
opts.pmSetLongOptionText("")
|
||||
opts.pmSetLongOptionText("Interactive: pcp collectl [-h HOST] [options]")
|
||||
opts.pmSetLongOptionText("Read PCP archive: pcp collectl -a ARCHIVE [options]")
|
||||
diff --git a/src/pcp/dmcache/pcp-dmcache.py b/src/pcp/dmcache/pcp-dmcache.py
|
||||
index cd88ed4..29eb0ec 100755
|
||||
--- a/src/pcp/dmcache/pcp-dmcache.py
|
||||
+++ b/src/pcp/dmcache/pcp-dmcache.py
|
||||
@@ -155,7 +155,7 @@ class DmCachePrinter(pmcc.MetricGroupPrinter):
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
- options = pmapi.pmOptions('iR:?')
|
||||
+ options = pmapi.pmOptions('ViR:?')
|
||||
options.pmSetShortUsage('[options] [device ...]')
|
||||
options.pmSetOptionCallback(option)
|
||||
options.pmSetLongOptionHeader('Options')
|
||||
diff --git a/src/pcp/dstat/pcp-dstat.py b/src/pcp/dstat/pcp-dstat.py
|
||||
index c178874..cdd7991 100755
|
||||
--- a/src/pcp/dstat/pcp-dstat.py
|
||||
+++ b/src/pcp/dstat/pcp-dstat.py
|
||||
@@ -727,7 +727,7 @@ class DstatTool(object):
|
||||
# opts.pmSetLongOption('zones', 0, None, '', 'enable zoneinfo stats')
|
||||
opts.pmSetLongOptionText('')
|
||||
opts.pmSetLongOption('list', 0, None, '', 'list all available plugins')
|
||||
- opts.pmSetLongOption('plugin', 0, None, '', 'enable external plugin by name, see --list')
|
||||
+ opts.pmSetLongOption('<plugin-name>', 0, None, '', 'enable external plugin by name, see --list')
|
||||
opts.pmSetLongOptionText('')
|
||||
opts.pmSetLongOption('all', 0, 'a', '', 'equals -cdngy (default)')
|
||||
opts.pmSetLongOption('full', 0, 'f', '', 'automatically expand -C, -D, -I, -N and -S lists')
|
||||
@@ -785,7 +785,7 @@ class DstatTool(object):
|
||||
self.disklist = sorted([x for x in insts if x != 'total'])
|
||||
if 'total' in insts:
|
||||
self.disklist.append('total')
|
||||
- elif opt in ['--filesystem']:
|
||||
+ elif opt in ['filesystem']:
|
||||
self.plugins.append('fs')
|
||||
elif opt in ['g']:
|
||||
self.plugins.append('page')
|
||||
diff --git a/src/pcp/iostat/pcp-iostat.py b/src/pcp/iostat/pcp-iostat.py
|
||||
index bc716c2..b3a810c 100755
|
||||
--- a/src/pcp/iostat/pcp-iostat.py
|
||||
+++ b/src/pcp/iostat/pcp-iostat.py
|
||||
@@ -165,11 +165,11 @@ class IostatReport(pmcc.MetricGroupPrinter):
|
||||
if "t" in IostatOptions.xflag:
|
||||
heading = ('# Timestamp', 'Device',rrqmspace, 'rrqm/s',wrqmspace, 'wrqm/s',precision+5, 'r/s',precision+4,\
|
||||
'w/s',precision+6, 'rkB/s',precision+6, 'wkB/s', avgrqszspace,'avgrq-sz',precision+6, 'avgqu-sz',precision+5, \
|
||||
- 'await',precision+5, 'r_await', precision+5,'w_await',utilspace, '%util')
|
||||
+ 'await_t',precision+5, 'r_await', precision+5,'w_await',utilspace, '%util')
|
||||
else:
|
||||
heading = ('# Device',rrqmspace, 'rrqm/s',wrqmspace, 'wrqm/s',precision+5, 'r/s',precision+4, 'w/s'\
|
||||
,precision+6, 'rkB/s',precision+6, 'wkB/s', avgrqszspace,'avgrq-sz',precision+6, 'avgqu-sz',precision+5,\
|
||||
- 'await',awaitspace, 'r_await',awaitspace, 'w_await',utilspace, '%util')
|
||||
+ 'await_t',awaitspace, 'r_await',awaitspace, 'w_await',utilspace, '%util')
|
||||
print(headfmt % heading)
|
||||
|
||||
if p_rrqm == {} or p_wrqm == {} or p_r == {} or p_w == {} or \
|
||||
@@ -205,7 +205,7 @@ class IostatReport(pmcc.MetricGroupPrinter):
|
||||
# total active time in seconds (same units as dt)
|
||||
tot_active = (float)(c_avactive[inst] - p_avactive[inst]) / 1000.0
|
||||
|
||||
- avgrqsz = avgqsz = await = r_await = w_await = util = 0.0
|
||||
+ avgrqsz = avgqsz = await_t = r_await = w_await = util = 0.0
|
||||
|
||||
# average request size units are KB (sysstat reports in units of sectors)
|
||||
if tot_ios:
|
||||
@@ -214,9 +214,9 @@ class IostatReport(pmcc.MetricGroupPrinter):
|
||||
# average queue length
|
||||
avgqsz = (float)((c_ractive[inst] - p_ractive[inst]) + (c_wactive[inst] - p_wactive[inst])) / dt / 1000.0
|
||||
|
||||
- # await, r_await, w_await
|
||||
+ # await_t, r_await, w_await
|
||||
if tot_ios:
|
||||
- await = ((c_ractive[inst] - p_ractive[inst]) + (c_wactive[inst] - p_wactive[inst])) / tot_ios
|
||||
+ await_t = ((c_ractive[inst] - p_ractive[inst]) + (c_wactive[inst] - p_wactive[inst])) / tot_ios
|
||||
|
||||
if tot_rios:
|
||||
r_await = (c_ractive[inst] - p_ractive[inst]) / tot_rios
|
||||
@@ -229,7 +229,7 @@ class IostatReport(pmcc.MetricGroupPrinter):
|
||||
util = 100.0 * tot_active / dt
|
||||
|
||||
device = inst # prepare name for printing
|
||||
- badcounters = rrqm < 0 or wrqm < 0 or r < 0 or w < 0 or await < 0 or avgrqsz < 0 or avgqsz < 0 or util < 0
|
||||
+ badcounters = rrqm < 0 or wrqm < 0 or r < 0 or w < 0 or await_t < 0 or avgrqsz < 0 or avgqsz < 0 or util < 0
|
||||
|
||||
if "t" in IostatOptions.xflag:
|
||||
if badcounters:
|
||||
@@ -250,7 +250,7 @@ class IostatReport(pmcc.MetricGroupPrinter):
|
||||
if not IostatOptions.Gflag:
|
||||
print(valfmt % (timestamp, device,rrqmspace, precision, rrqm,wrqmspace,precision, wrqm,precision+5,precision,\
|
||||
r,precision+4,precision, w,precision+6,precision, rkb,precision+6,precision, wkb, avgrqszspace,precision+1 ,avgrqsz,\
|
||||
- avgrqszspace,precision+1, avgqsz,precision+5,precision, await,awaitspace,precision, r_await,awaitspace,precision,\
|
||||
+ avgrqszspace,precision+1, avgqsz,precision+5,precision, await_t,awaitspace,precision, r_await,awaitspace,precision,\
|
||||
w_await,utilspace,precision, util))
|
||||
else:
|
||||
if badcounters:
|
||||
@@ -270,7 +270,7 @@ class IostatReport(pmcc.MetricGroupPrinter):
|
||||
if not IostatOptions.Gflag:
|
||||
print(valfmt % (device,rrqmspace, precision, rrqm,wrqmspace,precision, wrqm,precision+5,precision, r,precision+4,\
|
||||
precision, w,precision+6,precision, rkb,precision+6,precision, wkb,\
|
||||
- avgrqszspace,precision+1 ,avgrqsz,avgrqszspace,precision+1, avgqsz,precision+5,precision, await,awaitspace,precision,\
|
||||
+ avgrqszspace,precision+1 ,avgrqsz,avgrqszspace,precision+1, avgqsz,precision+5,precision, await_t,awaitspace,precision,\
|
||||
r_await,awaitspace,precision, w_await,utilspace,precision, util))
|
||||
|
||||
if IostatOptions.Gflag and not badcounters:
|
||||
@@ -282,7 +282,7 @@ class IostatReport(pmcc.MetricGroupPrinter):
|
||||
aggr_wkb = aggregate(aggr, aggr_wkb, wkb)
|
||||
aggr_avgrqsz = aggregate(aggr, aggr_avgrqsz, avgrqsz)
|
||||
aggr_avgqsz = aggregate(aggr, aggr_avgqsz, avgqsz)
|
||||
- aggr_await = aggregate(aggr, aggr_await, await)
|
||||
+ aggr_await = aggregate(aggr, aggr_await, await_t)
|
||||
aggr_r_await = aggregate(aggr, aggr_r_await, r_await)
|
||||
aggr_w_await = aggregate(aggr, aggr_w_await, w_await)
|
||||
aggr_util = aggregate(aggr, aggr_util, util)
|
||||
diff --git a/src/pmlogconf/pmlogconf.sh b/src/pmlogconf/pmlogconf.sh
|
||||
index 44f5099..af2bf37 100755
|
||||
--- a/src/pmlogconf/pmlogconf.sh
|
||||
+++ b/src/pmlogconf/pmlogconf.sh
|
||||
@@ -161,7 +161,7 @@ _split()
|
||||
$PCP_AWK_PROG <$tmp/ctl '
|
||||
BEGIN { out = "'"$tmp/head"'" }
|
||||
/DO NOT UPDATE THE FILE ABOVE/ { seen = 1 }
|
||||
-seen == 0 && /^\#\? [^:]*:[ynx]:/ { print >"'"$tmp/tag"'"
|
||||
+seen == 0 && /^#\? [^:]*:[ynx]:/ { print >"'"$tmp/tag"'"
|
||||
out = "'"$tmp/tail"'"
|
||||
seen = 1
|
||||
next
|
||||
@@ -180,8 +180,8 @@ _update()
|
||||
$PCP_AWK_PROG <$tmp/in >$tmp/ctl '
|
||||
/DO NOT UPDATE THE FILE ABOVE/ { tail = 1 }
|
||||
tail == 1 { print; next }
|
||||
-/^\#\+ [^:]*:[ynx]:/ { sub(/\+/, "?", $1); print; skip = 1; next }
|
||||
-skip == 1 && /^\#----/ { skip = 0; next }
|
||||
+/^#\+ [^:]*:[ynx]:/ { sub(/\+/, "?", $1); print; skip = 1; next }
|
||||
+skip == 1 && /^#----/ { skip = 0; next }
|
||||
skip == 1 { next }
|
||||
{ print }'
|
||||
|
||||
diff --git a/src/pmprobe/pmprobe.c b/src/pmprobe/pmprobe.c
|
||||
index dcf1567..d6d7ab5 100644
|
||||
--- a/src/pmprobe/pmprobe.c
|
||||
+++ b/src/pmprobe/pmprobe.c
|
||||
@@ -63,7 +63,7 @@ overrides(int opt, pmOptions *opts)
|
||||
|
||||
static pmOptions opts = {
|
||||
.flags = PM_OPTFLAG_STDOUT_TZ,
|
||||
- .short_options = "a:b:D:efh:IiK:Ln:FO:VvZ:z?",
|
||||
+ .short_options = "a:b:D:defh:IiK:Ln:FO:VvZ:z?",
|
||||
.long_options = longopts,
|
||||
.short_usage = "[options] [metricname ...]",
|
||||
.override = overrides,
|
||||
diff --git a/src/pmstat/pmstat.c b/src/pmstat/pmstat.c
|
||||
index c4f9881..b3986d7 100644
|
||||
--- a/src/pmstat/pmstat.c
|
||||
+++ b/src/pmstat/pmstat.c
|
||||
@@ -371,6 +371,10 @@ main(int argc, char *argv[])
|
||||
case 'x': /* extended CPU reporting */
|
||||
extraCpuStats = 1;
|
||||
break;
|
||||
+ case 'V':
|
||||
+ pmprintf("%s version %s\n", pmGetProgname(), PCP_VERSION);
|
||||
+ opts.flags |= PM_OPTFLAG_EXIT;
|
||||
+ break;
|
||||
default:
|
||||
opts.errors++;
|
||||
break;
|
||||
@@ -387,7 +391,7 @@ main(int argc, char *argv[])
|
||||
opts.errors++;
|
||||
}
|
||||
|
||||
- if (opts.errors) {
|
||||
+ if (opts.errors || (opts.flags & PM_OPTFLAG_EXIT)) {
|
||||
pmUsageMessage(&opts);
|
||||
exit(1);
|
||||
}
|
||||
@ -1,54 +0,0 @@
|
||||
From 3d2902236c931a8022e5031043853e19484e3530 Mon Sep 17 00:00:00 2001
|
||||
From: lingsheng <lingsheng@huawei.com>
|
||||
Date: Fri, 18 Sep 2020 09:47:00 +0800
|
||||
Subject: [PATCH] Fix collectl2pcp option
|
||||
|
||||
---
|
||||
src/collectl2pcp/collectl2pcp.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/src/collectl2pcp/collectl2pcp.c b/src/collectl2pcp/collectl2pcp.c
|
||||
index ceb73c6..ad44558 100644
|
||||
--- a/src/collectl2pcp/collectl2pcp.c
|
||||
+++ b/src/collectl2pcp/collectl2pcp.c
|
||||
@@ -98,7 +98,7 @@ int indom_cnt[NUM_INDOMS];
|
||||
|
||||
/* global options */
|
||||
int vflag;
|
||||
-int Fflag;
|
||||
+int fflag;
|
||||
int kernel_all_hz;
|
||||
int utc_offset;
|
||||
|
||||
@@ -112,7 +112,7 @@ static pmLongOptions longopts[] = {
|
||||
};
|
||||
|
||||
static pmOptions opts = {
|
||||
- .short_options = "FD:v?",
|
||||
+ .short_options = "fD:v?",
|
||||
.long_options = longopts,
|
||||
.short_usage = "inputfile [inputfile ...] archive\n"
|
||||
"Each 'inputfile' is a collectl archive, must be for the same host (may be gzipped).\n"
|
||||
@@ -141,8 +141,8 @@ main(int argc, char *argv[])
|
||||
|
||||
while ((c = pmGetOptions(argc, argv, &opts)) != EOF) {
|
||||
switch (c) {
|
||||
- case 'F':
|
||||
- Fflag = 1;
|
||||
+ case 'f':
|
||||
+ fflag = 1;
|
||||
break;
|
||||
case 'v':
|
||||
vflag++;
|
||||
@@ -166,7 +166,7 @@ main(int argc, char *argv[])
|
||||
exit(1);
|
||||
}
|
||||
|
||||
- if (Fflag) {
|
||||
+ if (fflag) {
|
||||
pmsprintf(buf, BUFSIZE, "%s.meta", archive); unlink(buf);
|
||||
pmsprintf(buf, BUFSIZE, "%s.index", archive); unlink(buf);
|
||||
for (j=0;; j++) {
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@ -1,67 +0,0 @@
|
||||
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
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
diff --git a/src/pmlogconf/tools/pidstat b/src/pmlogconf/tools/pidstat
|
||||
index b3cfbce..c040a60 100644
|
||||
--- a/src/pmlogconf/tools/pidstat
|
||||
+++ b/src/pmlogconf/tools/pidstat
|
||||
@@ -1,6 +1,6 @@
|
||||
#pmlogconf-setup 2.0
|
||||
ident metrics used by the pcp-pidstat(1) command
|
||||
-probe proc.psinfo.rss values ? available : exclude
|
||||
+force include
|
||||
|
||||
proc.nprocs
|
||||
proc.psinfo.pid
|
||||
@ -1,39 +0,0 @@
|
||||
From 7fecf25e72225dfd2b3e8ba04e7ec8773fed1df8 Mon Sep 17 00:00:00 2001
|
||||
From: wangxiao <wangxiao65@huawei.com>
|
||||
Date: Wed, 21 Oct 2020 21:47:04 +0800
|
||||
Subject: [PATCH] modify python2.7 to python3.8
|
||||
|
||||
---
|
||||
configure | 2 +-
|
||||
configure.ac | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 71574ce..dfd4ea6 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -7348,7 +7348,7 @@ fi
|
||||
|
||||
test -n "$PYTHON" && break
|
||||
done
|
||||
-test -n "$PYTHON" || PYTHON="python2.7"
|
||||
+test -n "$PYTHON" || PYTHON="python3.8"
|
||||
|
||||
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 2a94208..c42a17b 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -785,7 +785,7 @@ AC_CHECK_PROGS(PYLINT, pylint, /bin/true)
|
||||
AC_SUBST(PYLINT)
|
||||
|
||||
dnl check if python available for the build and runtime
|
||||
-AC_CHECK_PROGS(PYTHON, python, python2.7)
|
||||
+AC_CHECK_PROGS(PYTHON, python, python3.8)
|
||||
AC_SUBST(PYTHON)
|
||||
|
||||
dnl check if python3 available for the build and runtime
|
||||
--
|
||||
2.23.0
|
||||
|
||||
Binary file not shown.
@ -1,56 +0,0 @@
|
||||
From f11997e1ce300515016be55c5dcef8d52352af9e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=E6=BD=98=E6=99=A8=E5=8D=9A?= <panchenbo@uniontech.com>
|
||||
Date: Tue, 23 Jun 2020 14:15:14 +0800
|
||||
Subject: [PATCH] fix new function not found when Install
|
||||
|
||||
---
|
||||
src/pmdas/activemq/GNUmakefile | 4 +++-
|
||||
src/pmdas/activemq/pmdaactivemq.pl | 14 +++++++-------
|
||||
2 files changed, 10 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/pmdas/activemq/GNUmakefile b/src/pmdas/activemq/GNUmakefile
|
||||
index da9c583..26bb78e 100644
|
||||
--- a/src/pmdas/activemq/GNUmakefile
|
||||
+++ b/src/pmdas/activemq/GNUmakefile
|
||||
@@ -41,7 +41,9 @@ build-me: check_domain
|
||||
install install_pcp: default
|
||||
$(INSTALL) -m 755 -d $(PMDADIR)
|
||||
$(INSTALL) -m 755 Install Remove $(PMDADIR)
|
||||
- $(INSTALL) -m 644 pmda$(IAM).pl $(MODULES) $(PMDADIR)
|
||||
+ $(INSTALL) -m 644 pmda$(IAM).pl $(PMDADIR)/pmda$(IAM).pl
|
||||
+ $(INSTALL) -m 755 -d $(PMDADIR)/PCP
|
||||
+ $(INSTALL) -m 644 $(MODULES) $(PMDADIR)/PCP
|
||||
@$(INSTALL_MAN)
|
||||
else
|
||||
build-me:
|
||||
diff --git a/src/pmdas/activemq/pmdaactivemq.pl b/src/pmdas/activemq/pmdaactivemq.pl
|
||||
index 7f835aa..4b54516 100755
|
||||
--- a/src/pmdas/activemq/pmdaactivemq.pl
|
||||
+++ b/src/pmdas/activemq/pmdaactivemq.pl
|
||||
@@ -49,16 +49,16 @@ my $jvm_garbage_collection_cluster = 5;
|
||||
for my $file (pmda_config('PCP_PMDAS_DIR') . '/activemq/activemq.conf', 'activemq.conf') {
|
||||
eval `cat $file` unless ! -f $file;
|
||||
}
|
||||
-my $timesource = TimeSource->new;
|
||||
-my $cache = Cache->new($timesource, $cache_time);
|
||||
+my $timesource = PCP::TimeSource->new;
|
||||
+my $cache = PCP::Cache->new($timesource, $cache_time);
|
||||
my $http_client = LWP::UserAgent->new;
|
||||
$http_client->agent('pmdaactivemq');
|
||||
$http_client->timeout($rest_timeout);
|
||||
-my $rest_client = RESTClient->new($http_client, $cache, $rest_hostname, $rest_port, $rest_username, $rest_password, $rest_realm);
|
||||
-my $activemq = ActiveMQ->new($rest_client);
|
||||
-my $jvm_memory = JVMMemory->new($rest_client);
|
||||
-my $jvm_memory_pool = JVMMemoryPool->new($rest_client);
|
||||
-my $jvm_garbage_collection = JVMGarbageCollection->new($rest_client);
|
||||
+my $rest_client = PCP::RESTClient->new($http_client, $cache, $rest_hostname, $rest_port, $rest_username, $rest_password, $rest_realm);
|
||||
+my $activemq = PCP::ActiveMQ->new($rest_client);
|
||||
+my $jvm_memory = PCP::JVMMemory->new($rest_client);
|
||||
+my $jvm_memory_pool = PCP::JVMMemoryPool->new($rest_client);
|
||||
+my $jvm_garbage_collection = PCP::JVMGarbageCollection->new($rest_client);
|
||||
|
||||
my %queue_instances;
|
||||
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@ -1,55 +0,0 @@
|
||||
From 630e0e4e304c751127329009000dc0abcb5a62dc Mon Sep 17 00:00:00 2001
|
||||
From: lingsheng <lingsheng@huawei.com>
|
||||
Date: Tue, 8 Jun 2021 10:39:37 +0800
|
||||
Subject: [PATCH] Add pcp_domain selinux policy
|
||||
|
||||
---
|
||||
src/selinux/pcpupstream.te.in | 11 +++++++++--
|
||||
1 file changed, 9 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/selinux/pcpupstream.te.in b/src/selinux/pcpupstream.te.in
|
||||
index 8a8cc22..77ede46 100644
|
||||
--- a/src/selinux/pcpupstream.te.in
|
||||
+++ b/src/selinux/pcpupstream.te.in
|
||||
@@ -1,6 +1,9 @@
|
||||
module pcpupstream @PACKAGE_VERSION@;
|
||||
|
||||
require {
|
||||
+ attribute domain;
|
||||
+ attribute pcp_domain;
|
||||
+
|
||||
type pcp_pmcd_t;
|
||||
type user_home_t;
|
||||
type user_home_dir_t; #RHBZ1488116
|
||||
@@ -79,7 +82,7 @@ require {
|
||||
type system_cronjob_t;
|
||||
type xdm_t;
|
||||
type postgresql_t;
|
||||
- class sem { unix_read associate getattr };
|
||||
+ class sem { unix_read associate getattr read};
|
||||
class lnk_file { read getattr };
|
||||
class file { append create execute execute_no_trans getattr ioctl lock open read write @PCP_HOSTNAME_EXEC_MAP@ };
|
||||
class dir { add_name open read search write getattr };
|
||||
@@ -93,7 +96,7 @@ require {
|
||||
@PCP_SOCK_FILE_GETATTR@
|
||||
@PCP_CLASS_STATUS@
|
||||
class tcp_socket { name_bind name_connect };
|
||||
- class shm { unix_read associate getattr };
|
||||
+ class shm { unix_read associate getattr read};
|
||||
class filesystem mount;
|
||||
class blk_file { ioctl open read };
|
||||
class msgq { unix_read };
|
||||
@@ -286,6 +289,10 @@ allow pcp_pmcd_t postgresql_t:shm { associate getattr unix_read };
|
||||
#type=AVC msg=audit(...): avc: denied { connectto } for pid=NNN comm="python" path="/run/postgresql/.s.PGSQL.5432" scontext=system_u:system_r:pcp_pmcd_t:s0 tcontext=system_u:system_r:postgresql_t:s0 tclass=unix_stream_socket
|
||||
allow pcp_pmcd_t postgresql_t:unix_stream_socket connectto;
|
||||
|
||||
+# allow pcp_pmcd_t domain to read shared memory and semaphores of all domain on system
|
||||
+allow pcp_domain domain:shm r_sem_perms;
|
||||
+allow pcp_domain domain:sem r_shm_perms;
|
||||
+
|
||||
#============= pcp_pmlogger_t ==============
|
||||
allow pcp_pmlogger_t kmsg_device_t:chr_file { open write };
|
||||
allow pcp_pmlogger_t self:capability kill;
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@ -1,200 +0,0 @@
|
||||
From 34c83f7ee46224fe410572f33c57a739f7bd044f Mon Sep 17 00:00:00 2001
|
||||
From: Nathan Scott <nathans@redhat.com>
|
||||
Date: Sun, 6 Oct 2019 14:10:40 +1100
|
||||
Subject: [PATCH] build: drop old config file transition code from rpm specs
|
||||
|
||||
Its been many years since this transition was done, good time
|
||||
now with pcp-5.0.0 to full this old shell code. Also remove
|
||||
the Fedora crontab transition logic as thats completely moved
|
||||
over to systemd now.
|
||||
---
|
||||
build/rpm/GNUmakefile | 1 +
|
||||
build/rpm/fedora.spec | 57 +---------------------------------------
|
||||
build/rpm/pcp.spec.in | 60 ++-----------------------------------------
|
||||
3 files changed, 4 insertions(+), 114 deletions(-)
|
||||
|
||||
diff --git a/build/rpm/GNUmakefile b/build/rpm/GNUmakefile
|
||||
index cf6d21f..40a9efe 100644
|
||||
--- a/build/rpm/GNUmakefile
|
||||
+++ b/build/rpm/GNUmakefile
|
||||
@@ -111,6 +111,7 @@ pcp.spec: pcp.spec.in
|
||||
-e's|@pcp_sysconf_dir@|$(PCP_SYSCONF_DIR)|g' \
|
||||
-e's|@pcp_share_dir@|$(PCP_SHARE_DIR)|g' \
|
||||
-e's|@pcp_log_dir@|$(PCP_LOG_DIR)|g' \
|
||||
+ -e's|@pcp_sa_dir@|$(PCP_LOG_DIR)|g' \
|
||||
-e's|@pcp_var_dir@|$(PCP_VAR_DIR)|g' \
|
||||
-e's|@pcp_etc_dir@|$(PCP_ETC_DIR)|g' \
|
||||
-e's|@pcp_binadm_dir@|$(PCP_BINADM_DIR)|g' \
|
||||
diff --git a/build/rpm/fedora.spec b/build/rpm/fedora.spec
|
||||
index 0471dbd..1256926 100644
|
||||
--- a/build/rpm/fedora.spec
|
||||
+++ b/build/rpm/fedora.spec
|
||||
@@ -2427,56 +2427,6 @@ exit 0
|
||||
getent group pcp >/dev/null || groupadd -r pcp
|
||||
getent passwd pcp >/dev/null || \
|
||||
useradd -c "Performance Co-Pilot" -g pcp -d %{_localstatedir}/lib/pcp -M -r -s /sbin/nologin pcp
|
||||
-PCP_CONFIG_DIR=%{_localstatedir}/lib/pcp/config
|
||||
-PCP_SYSCONF_DIR=%{_confdir}
|
||||
-PCP_LOG_DIR=%{_logsdir}
|
||||
-PCP_ETC_DIR=%{_sysconfdir}
|
||||
-# rename crontab files to align with current Fedora packaging guidelines
|
||||
-for crontab in pmlogger pmie
|
||||
-do
|
||||
- test -f "$PCP_ETC_DIR/cron.d/$crontab" || continue
|
||||
- mv -f "$PCP_ETC_DIR/cron.d/$crontab" "$PCP_ETC_DIR/cron.d/pcp-$crontab"
|
||||
-done
|
||||
-# produce a script to run post-install to move configs to their new homes
|
||||
-save_configs_script()
|
||||
-{
|
||||
- _new="$1"
|
||||
- shift
|
||||
- for _dir
|
||||
- do
|
||||
- [ "$_dir" = "$_new" ] && continue
|
||||
- if [ -d "$_dir" ]
|
||||
- then
|
||||
- ( cd "$_dir" ; find . -maxdepth 1 -type f ) | sed -e 's/^\.\///' \
|
||||
- | while read _file
|
||||
- do
|
||||
- [ "$_file" = "control" ] && continue
|
||||
- _want=true
|
||||
- if [ -f "$_new/$_file" ]
|
||||
- then
|
||||
- # file exists in both directories, pick the more
|
||||
- # recently modified one
|
||||
- _try=`find "$_dir/$_file" -newer "$_new/$_file" -print`
|
||||
- [ -n "$_try" ] || _want=false
|
||||
- fi
|
||||
- $_want && echo cp -p "$_dir/$_file" "$_new/$_file"
|
||||
- done
|
||||
- fi
|
||||
- done
|
||||
-}
|
||||
-# migrate and clean configs if we have had a previous in-use installation
|
||||
-[ -d "$PCP_LOG_DIR" ] || exit 0 # no configuration file upgrades required
|
||||
-rm -f "$PCP_LOG_DIR/configs.sh"
|
||||
-for daemon in pmie pmlogger
|
||||
-do
|
||||
- save_configs_script >> "$PCP_LOG_DIR/configs.sh" "$PCP_CONFIG_DIR/$daemon" \
|
||||
- "$PCP_SYSCONF_DIR/$daemon"
|
||||
-done
|
||||
-for daemon in pmcd pmproxy
|
||||
-do
|
||||
- save_configs_script >> "$PCP_LOG_DIR/configs.sh" "$PCP_SYSCONF_DIR/$daemon"\
|
||||
- "$PCP_CONFIG_DIR/$daemon" /etc/$daemon
|
||||
-done
|
||||
exit 0
|
||||
|
||||
%if !%{disable_microhttpd}
|
||||
@@ -2828,11 +2778,7 @@ pmieconf -c enable dmthin
|
||||
%{pmda_notready "$1" "prometheus"}
|
||||
|
||||
%post
|
||||
-PCP_LOG_DIR=%{_logsdir}
|
||||
PCP_PMNS_DIR=%{_pmnsdir}
|
||||
-# restore saved configs, if any
|
||||
-test -s "$PCP_LOG_DIR/configs.sh" && source "$PCP_LOG_DIR/configs.sh"
|
||||
-rm -f $PCP_LOG_DIR/configs.sh
|
||||
|
||||
chown -R pcp:pcp %{_logsdir}/pmcd 2>/dev/null
|
||||
chown -R pcp:pcp %{_logsdir}/pmlogger 2>/dev/null
|
||||
@@ -2860,7 +2806,7 @@ chmod 644 "$PCP_PMNS_DIR/.NeedRebuild"
|
||||
/sbin/service pmproxy condrestart
|
||||
%endif
|
||||
|
||||
-cd $PCP_PMNS_DIR && ./Rebuild -s && rm -f .NeedRebuild
|
||||
+cd "$PCP_PMNS_DIR" && ./Rebuild -s && rm -f .NeedRebuild
|
||||
cd
|
||||
|
||||
%post libs -p /sbin/ldconfig
|
||||
diff --git a/build/rpm/pcp.spec.in b/build/rpm/pcp.spec.in
|
||||
index dba589e..c37e934 100755
|
||||
--- a/build/rpm/pcp.spec.in
|
||||
+++ b/build/rpm/pcp.spec.in
|
||||
@@ -2764,11 +2764,6 @@ chown -R pcpqa:pcpqa @pcp_var_dir@/testsuite 2>/dev/null
|
||||
getent group pcp >/dev/null || groupadd -r pcp
|
||||
getent passwd pcp >/dev/null || \
|
||||
useradd -c "Performance Co-Pilot" -g pcp -d @pcp_var_dir@ -M -r -s /sbin/nologin pcp
|
||||
-# new directories; they should match /etc/pcp.conf settings after install
|
||||
-PCP_CONFIG_DIR=@pcp_var_dir@/config
|
||||
-PCP_SYSCONF_DIR=@pcp_sysconf_dir@
|
||||
-PCP_LOG_DIR=@pcp_log_dir@
|
||||
-PCP_ETC_DIR=@pcp_etc_dir@
|
||||
|
||||
# transition pmdadmcache over to pmdadm (device mapper)
|
||||
PCP_PMCDCONF_PATH=@pcp_pmcdconf_path@
|
||||
@@ -2780,52 +2780,6 @@
|
||||
touch "$PCP_PMDAS_DIR/dmcache/.NeedRemove"
|
||||
fi
|
||||
|
||||
-# rename crontab files to align with current Fedora packaging guidelines
|
||||
-for crontab in pmlogger pmie
|
||||
-do
|
||||
- test -f "$PCP_ETC_DIR/cron.d/$crontab" || continue
|
||||
- mv -f "$PCP_ETC_DIR/cron.d/$crontab" "$PCP_ETC_DIR/cron.d/pcp-$crontab"
|
||||
-done
|
||||
-# produce a script to run post-install to move configs to their new homes
|
||||
-save_configs_script()
|
||||
-{
|
||||
- _new="$1"
|
||||
- shift
|
||||
- for _dir
|
||||
- do
|
||||
- [ "$_dir" = "$_new" ] && continue
|
||||
- if [ -d "$_dir" ]
|
||||
- then
|
||||
- ( cd "$_dir" ; find . -maxdepth 1 -type f ) | sed -e 's/^\.\///' \
|
||||
- | while read _file
|
||||
- do
|
||||
- [ "$_file" = "control" ] && continue
|
||||
- _want=true
|
||||
- if [ -f "$_new/$_file" ]
|
||||
- then
|
||||
- # file exists in both directories, pick the more
|
||||
- # recently modified one
|
||||
- _try=`find "$_dir/$_file" -newer "$_new/$_file" -print`
|
||||
- [ -n "$_try" ] || _want=false
|
||||
- fi
|
||||
- $_want && echo cp -p "$_dir/$_file" "$_new/$_file"
|
||||
- done
|
||||
- fi
|
||||
- done
|
||||
-}
|
||||
-# migrate and clean configs if we have had a previous in-use installation
|
||||
-[ -d "$PCP_LOG_DIR" ] || exit 0 # no configuration file upgrades required
|
||||
-rm -f "$PCP_LOG_DIR/configs.sh"
|
||||
-for daemon in pmie pmlogger
|
||||
-do
|
||||
- save_configs_script >> "$PCP_LOG_DIR/configs.sh" "$PCP_CONFIG_DIR/$daemon" \
|
||||
- "$PCP_SYSCONF_DIR/$daemon"
|
||||
-done
|
||||
-for daemon in pmcd pmproxy
|
||||
-do
|
||||
- save_configs_script >> "$PCP_LOG_DIR/configs.sh" "$PCP_SYSCONF_DIR/$daemon"\
|
||||
- "$PCP_CONFIG_DIR/$daemon" /etc/$daemon
|
||||
-done
|
||||
exit 0
|
||||
|
||||
%if "@enable_webapi@" == "true"
|
||||
@@ -3191,11 +3129,7 @@ fi
|
||||
%post
|
||||
PCP_PMNS_DIR=@pcp_var_dir@/pmns
|
||||
PCP_LOG_DIR=@pcp_log_dir@
|
||||
-PCP_SYSCONFIG_DIR=@pcp_sysconfig_dir@
|
||||
-
|
||||
-# restore saved configs, if any
|
||||
-test -s "$PCP_LOG_DIR/configs.sh" && source "$PCP_LOG_DIR/configs.sh"
|
||||
-rm -f $PCP_LOG_DIR/configs.sh
|
||||
+PCP_SA_DIR=@pcp_sa_dir@
|
||||
|
||||
chown -R pcp:pcp "$PCP_LOG_DIR/pmcd" 2>/dev/null
|
||||
chown -R pcp:pcp "$PCP_LOG_DIR/pmlogger" 2>/dev/null
|
||||
@@ -3224,7 +3158,7 @@ chmod 644 "$PCP_PMNS_DIR/.NeedRebuild"
|
||||
/sbin/service pmproxy condrestart
|
||||
%endif
|
||||
|
||||
-cd $PCP_PMNS_DIR && ./Rebuild -s && rm -f .NeedRebuild
|
||||
+cd "$PCP_PMNS_DIR" && ./Rebuild -s && rm -f .NeedRebuild
|
||||
cd
|
||||
|
||||
%post libs -p /sbin/ldconfig
|
||||
@ -1,94 +0,0 @@
|
||||
diff --git a/src/external/sds.h b/src/external/sds.h
|
||||
index 1bdb60d..adcc12c 100644
|
||||
--- a/src/external/sds.h
|
||||
+++ b/src/external/sds.h
|
||||
@@ -34,7 +34,7 @@
|
||||
#define __SDS_H
|
||||
|
||||
#define SDS_MAX_PREALLOC (1024*1024)
|
||||
-const char *SDS_NOINIT;
|
||||
+extern const char *SDS_NOINIT;
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <stdarg.h>
|
||||
diff --git a/src/pmdas/cifs/pmda.c b/src/pmdas/cifs/pmda.c
|
||||
index 84fb50f..9240e3d 100644
|
||||
--- a/src/pmdas/cifs/pmda.c
|
||||
+++ b/src/pmdas/cifs/pmda.c
|
||||
@@ -25,8 +25,8 @@ static int _isDSO = 1; /* for local contexts */
|
||||
|
||||
static char *cifs_procfsdir = "/proc/fs/cifs";
|
||||
static char *cifs_statspath = "";
|
||||
-unsigned int global_version_major;
|
||||
-unsigned int global_version_minor;
|
||||
+extern unsigned int global_version_major;
|
||||
+extern unsigned int global_version_minor;
|
||||
|
||||
pmdaIndom indomtable[] = {
|
||||
{ .it_indom = CIFS_FS_INDOM },
|
||||
diff --git a/src/pmdas/perfevent/configparser.h b/src/pmdas/perfevent/configparser.h
|
||||
index 4f504ea..c6726f2 100644
|
||||
--- a/src/pmdas/perfevent/configparser.h
|
||||
+++ b/src/pmdas/perfevent/configparser.h
|
||||
@@ -69,9 +69,9 @@ typedef struct configuration {
|
||||
pmcdynamic_t *dynamicpmc;
|
||||
} configuration_t;
|
||||
|
||||
-int context_newpmc;
|
||||
-int context_derived; /* A flag to check the current pmc */
|
||||
-int context_dynamic; /* check the current dynamic pmc */
|
||||
+extern int context_newpmc;
|
||||
+extern int context_derived; /* A flag to check the current pmc */
|
||||
+extern int context_dynamic; /* check the current dynamic pmc */
|
||||
|
||||
/* \brief parse the perf event configuration file
|
||||
* This function allocates memory. The returned object should be passed to
|
||||
diff --git a/src/pmdas/perfevent/configparser.l b/src/pmdas/perfevent/configparser.l
|
||||
index bb139fe..fbdaeca 100644
|
||||
--- a/src/pmdas/perfevent/configparser.l
|
||||
+++ b/src/pmdas/perfevent/configparser.l
|
||||
@@ -20,6 +20,10 @@
|
||||
%{
|
||||
#include "configparser.h"
|
||||
|
||||
+int context_newpmc;
|
||||
+int context_derived;
|
||||
+int context_dynamic;
|
||||
+
|
||||
static int is_derived(char *name)
|
||||
{
|
||||
char *str = NULL;
|
||||
diff --git a/src/pmdas/perfevent/parse_events.c b/src/pmdas/perfevent/parse_events.c
|
||||
index efe356f..f6d1a7b 100644
|
||||
--- a/src/pmdas/perfevent/parse_events.c
|
||||
+++ b/src/pmdas/perfevent/parse_events.c
|
||||
@@ -18,6 +18,8 @@
|
||||
#include "parse_events.h"
|
||||
#include "perfinterface.h"
|
||||
|
||||
+char dev_dir[PATH_MAX]; /* Optional path prefix for the PMU devices */
|
||||
+
|
||||
static void cleanup_property(struct property *prop)
|
||||
{
|
||||
if (!prop)
|
||||
diff --git a/src/pmdas/perfevent/parse_events.h b/src/pmdas/perfevent/parse_events.h
|
||||
index 4e09496..8f7a393 100644
|
||||
--- a/src/pmdas/perfevent/parse_events.h
|
||||
+++ b/src/pmdas/perfevent/parse_events.h
|
||||
@@ -80,11 +80,11 @@ struct software_event {
|
||||
unsigned long long config;
|
||||
};
|
||||
|
||||
-char dev_dir[PATH_MAX]; /* Optional path prefix for the PMU devices */
|
||||
+extern char dev_dir[]; /* Optional path prefix for the PMU devices */
|
||||
|
||||
-int init_dynamic_events(struct pmu **pmu_list);
|
||||
-void setup_cpu_config(struct pmu *pmu_ptr, int *ncpus, int **cpuarr);
|
||||
-int get_file_string(char *path, char *buf);
|
||||
-void cleanup_pmu_list(struct pmu *pmu);
|
||||
+extern int init_dynamic_events(struct pmu **pmu_list);
|
||||
+extern void setup_cpu_config(struct pmu *pmu_ptr, int *ncpus, int **cpuarr);
|
||||
+extern int get_file_string(char *path, char *buf);
|
||||
+extern void cleanup_pmu_list(struct pmu *pmu);
|
||||
|
||||
#endif /* PARSE_EVENTS_H_ */
|
||||
@ -1,6 +0,0 @@
|
||||
<constraints>
|
||||
<linux><version>
|
||||
<min>4.0</min>
|
||||
</version></linux>
|
||||
</constraints>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user