Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kmcdonell committed Apr 10, 2024
2 parents 62b0979 + d2602db commit 934a947
Show file tree
Hide file tree
Showing 54 changed files with 841 additions and 471 deletions.
59 changes: 57 additions & 2 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,11 +1,66 @@
pcp-6.2.2 (29 May 2024)
- Work-in-progress, not yet released.

pcp-6.2.1 (10 April 2024)
- Work-in-progress.
- PMDA additions, enhancements and bug fixes:
pmdauwsgi: (new) instrumentation from uWSGI servers
pmdalinux: new hugepage metrics from sysfs (fixed size hugepages)
pmdalinux: new filesys.uuid and filesys.type metrics
pmdalinux: new TcpExt metrics from /proc/net/netstat
pmdalinux: new softnet metrics from newer kernel versions
pmdalinux: new /proc/vmstat khugepaged metrics
pmdabpf: updates to add eBPF networking metrics for pcp-atop
pmdaopenmetrics: fix script error diagnostic cascading exception
- Client tools and utilities:
pcp2openmetrics: (new) push PCP metrics in OpenMetrics format
pmcheck: (new) interrogate and control PCP components
pmcheck: Redis server detection and agent recommendation
pmcheck: PostgreSQL server detection and agent recommendation
pmcheck: uwSGI server detection and agent recommendation
pcp-atopsar: fix TZ mishandling relating to day-crossover
pcp-dstat: fix an I/O config typo, sum reads and writes
pcp-htop: sync latest htop-3.3.0 fixes
pmrep.conf: use bpf instead of bcc pmda for proc net metrics
pmrep.conf: proc-essential cosmetic improvements
pmrep.conf: remove vmeff field from sar -B config
pmrepconf: use pmrep-internal representations for each metric
- Server-side utilities and log management scripts:
pmlogger: bizarre timezone fix (github #1936)
pmlogger: improve handling of a change in metadata semantics
pmlogdump: add support for multi-archive contexts
pmproxy: disable Redis protocol proxying by default
runaspcp: remove hard-coded "pcp" for user and group
init scripts: drop conditonal use of setpriv(1) or runuser(1)
- libpcp, libpcp_pmda, libpcp_mmv, libpcp_web and language bindings:
libpcp: fix logmeta.c SEGV with V3 archives
libpcp: fix memleak on repeated __pmFixPMNSHashTab calls
libpcp: add pmgetopt pmflush() call for warnings
libpcp: fixes for V3 archives and multi-archive contexts
libpcp: export __pmLogChangeArchive() interface to tools
libpcp: fix for PMNS with multi-archive contexts
libpcp: small derived metrics bug fix (github #1921)
- Build, infrastructure and packaging updates:
Linux MX distro support (Debian without systemd)
riscv: configure pmdabpf_arch value correctly
tar packages: fix perl modules install in postinstall script
eBPF updates: add submodule for blazesym, sync to latest
debian build: add postrm for pcp-zeroconf
build: removed cppcheck from 'make check', too flakey
container: Fedora 40 container testing added
constainer: fixed Fedora base image location (quay.io)
build: add support for riscv64 to pcp rpm spec files
- Security Enhanced Linux:
selinux policy: small tweak for pmie signal handling
- Documentation:
man pages: document pmlogger_check and pmlogger_daily SaveLogs
man pages: man-spell and corrections
docs: updated donations page with new fiscal sponsor details

pcp-6.2.0 (12 February 2024)
- Client tools and utilities:
pmlogger: default to creating version 3 PCP archives
pmie, pmlogger, pmcd, pmproxy: init script hardening to
run less as root:root, more as pcp:pcp and more safely
run less as root:root, more as pcp:pcp and more safely
pcp-reboot-init: new systemd service for $PCP_RC_DIR setup
pcp2arrow: new, export metrics to parquet format for pandas
pcp-atop: deterministic process sort when handling NULLs
Expand Down
13 changes: 5 additions & 8 deletions INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,21 +226,18 @@ cross-compilation. Currently packaging is no longer performed,
although previously MSI builds were possible. Work on tackling
this short-coming would be most welcome.

Base package list needed for Fedora (26+) cross-compilation:
Base package list needed for Fedora (39+) cross-compilation:
mingw64-gcc
mingw64-binutils
mingw64-qt5-qttools-tools
mingw64-qt5-qtbase-devel
mingw64-qt6-qttools
mingw64-qt6-qtsvg
mingw64-qt6-qt3d
mingw64-pkg-config
mingw64-readline
mingw64-xz-libs
mingw64-qt5-qtsvg
mingw64-pdcurses
mingw64-libgnurx

Since Fedora 28, there are also Python packages available:

mingw64-python2
mingw64-python3

### 2. Account creation

Expand Down
4 changes: 2 additions & 2 deletions Makepkgs
Original file line number Diff line number Diff line change
Expand Up @@ -318,10 +318,10 @@ in
mingw|mingw64|windows)
target=mingw
dorpm=false
configopts="$configopts --disable-ssp --without-qt3d"
configopts="$configopts --disable-ssp --without-python3"
export configure="/usr/bin/mingw64-configure"
export MAKE="/usr/bin/mingw64-make"
export QMAKE="/usr/bin/mingw64-qmake-qt5"
export QMAKE="/usr/bin/mingw64-qmake-qt6"
export PKG_CONFIG="/usr/bin/mingw64-pkg-config"
;;
linux)
Expand Down
2 changes: 1 addition & 1 deletion VERSION.pcp
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
#
PACKAGE_MAJOR=6
PACKAGE_MINOR=2
PACKAGE_REVISION=1
PACKAGE_REVISION=2
PACKAGE_BUILD=1
4 changes: 2 additions & 2 deletions build/rpm/redhat.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: pcp
Version: 6.2.1
Version: 6.2.2
Release: 1%{?dist}
Summary: System-level performance monitoring and performance management
License: GPL-2.0-or-later AND LGPL-2.1-or-later AND CC-BY-3.0
Expand Down Expand Up @@ -3530,5 +3530,5 @@ fi
%files zeroconf -f pcp-zeroconf-files.rpm

%changelog
* Wed Apr 10 2024 Nathan Scott <nathans@redhat.com> - 6.2.1-1
* Wed May 29 2024 Nathan Scott <nathans@redhat.com> - 6.2.2-1
- Latest release.
9 changes: 8 additions & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
pcp (6.2.2-1) unstable; urgency=low

* New release (full details in CHANGELOG).

-- Nathan Scott <nathans@debian.org> Wed, 29 May 2024 06:22:01 +1000

pcp (6.2.1-1) unstable; urgency=low

* New release (full details in CHANGELOG).
* Drop BCC metrics as python3-bpfcc is no more (closes: #1068389)

-- Nathan Scott <nathans@debian.org> Wed, 10 Apr 2024 09:14:46 +1100
-- Nathan Scott <nathans@debian.org> Wed, 10 Apr 2024 09:14:46 +1000

pcp (6.2.0-1) unstable; urgency=low

Expand Down
1 change: 0 additions & 1 deletion qa/1041
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ pmdalibvirt_install()

cat <<EOF >$tmp.config
[pmda]
#oldapi = False
user = root
uri = qemu:///system
EOF
Expand Down
2 changes: 1 addition & 1 deletion qa/1180.out
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ Report created: ...

# Wed Mar 7 16:36:43.514833 2018
# TCP statistics
active/s passive/s iseg/s oseg/s atmptf/s estres/s retrans/s isegerr/s orsts/s
active/s passive/s iseg/s oseg/s atmptf/s estres/s retrseg/s isegerr/s orsts/s
16:36:43 N/A N/A N/A N/A N/A N/A N/A N/A N/A
17:06:43 N/A N/A N/A N/A N/A N/A N/A N/A N/A
17:36:43 0.00 0.00 0.57 0.40 0.00 0.00 0.00 0.00 0.00
Expand Down
6 changes: 3 additions & 3 deletions qa/1428.out
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ STAMP 323 20 12 0 0 1

# DATE
# TCP statistics
active/s passive/s iseg/s oseg/s atmptf/s estres/s retrans/s isegerr/s orsts/s
active/s passive/s iseg/s oseg/s atmptf/s estres/s retrseg/s isegerr/s orsts/s
STAMP N/A N/A N/A N/A N/A N/A N/A N/A N/A
STAMP N/A N/A N/A N/A N/A N/A N/A N/A N/A
STAMP 0.00 0.00 42.00 41.50 0.00 0.00 0.00 0.00 0.00
Expand Down Expand Up @@ -701,7 +701,7 @@ STAMP 323 20 12 0 0 1

# DATE
# TCP statistics
active/s passive/s iseg/s oseg/s atmptf/s estres/s retrans/s isegerr/s orsts/s
active/s passive/s iseg/s oseg/s atmptf/s estres/s retrseg/s isegerr/s orsts/s
STAMP N/A N/A N/A N/A N/A N/A N/A N/A N/A
STAMP N/A N/A N/A N/A N/A N/A N/A N/A N/A
STAMP 0.00 0.00 42.00 41.50 0.00 0.00 0.00 0.00 0.00
Expand Down Expand Up @@ -1122,7 +1122,7 @@ STAMP 323 20 12 0 0 1

# DATE
# TCP statistics
active/s passive/s iseg/s oseg/s atmptf/s estres/s retrans/s isegerr/s orsts/s
active/s passive/s iseg/s oseg/s atmptf/s estres/s retrseg/s isegerr/s orsts/s
STAMP N/A N/A N/A N/A N/A N/A N/A N/A N/A
STAMP N/A N/A N/A N/A N/A N/A N/A N/A N/A
STAMP 0.00 0.00 42.00 41.50 0.00 0.00 0.00 0.00 0.00
Expand Down
6 changes: 6 additions & 0 deletions qa/1491
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,26 @@ s/measure overhead of PCP components/.../
s/not currently available for .*/.../
}' \
-e '/^pmda-postgresql /{
s/PostgreSQL/postgresql/g
s/inactive/OK/
s/could be activated/OK/
s/cannot be activated/OK/
s/ No systemd unit file installed//
s/not currently available .*/metrics from postgresql/
}' \
-e '/^pmda-redis /{
s/Redis/redis/g
s/inactive/OK/
s/could be activated/OK/
s/cannot be activated/OK/
s/not currently available .*/metrics from redis-server(1)/
}' \
-e '/^pmda-uwsgi /{
s/uWSGI/uwsgi/g
s/inactive/OK/
s/could be activated/OK/
s/cannot be activated/OK/
s/not currently available .*/metrics from uwsgi servers/
}' \
-e '/^zeroconf /{
s/inactive/OK/
Expand Down
6 changes: 3 additions & 3 deletions qa/1491.out
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ zeroconf
-- -lv --
pmcd Performance Metrics Collection Daemon - local source of performance data
pmda-overhead overhead PMDA - ...
pmda-postgresql PostgreSQL PMDA - metrics from PostgreSQL
pmda-redis Redis PMDA - metrics from redis-server(1)
pmda-postgresql postgresql PMDA - metrics from postgresql
pmda-redis redis PMDA - metrics from redis-server(1)
pmda-sample sample PMDA
pmda-uwsgi uWSGI PMDA - metrics from uWSGI servers
pmda-uwsgi uwsgi PMDA - metrics from uwsgi servers
pmie Inference Engine - rule-based monitoring
pmlogger Archive logger - record performance data for subsequent replay
pmproxy Proxy Daemon - proxy, web and redis integration
Expand Down
2 changes: 1 addition & 1 deletion src/collectl2pcp/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ HFILES = metrics.h
CFILES = collectl2pcp.c cpu.c disk.c net.c load.c timestamp.c util.c \
metrics.c header.c generic.c proc.c

CMDTARGET = collectl2pcp
CMDTARGET = collectl2pcp$(EXECSUFFIX)
LLDLIBS = -L$(TOPDIR)/src/libpcp_import/src -lpcp_import $(PCPLIB)
# LCFLAGS += -pg

Expand Down
8 changes: 4 additions & 4 deletions src/find-filter/find-filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ main(int argc, char **argv)
switch (pred) {
case PRED_CTIME:
#if defined(HAVE_ST_MTIME_WITH_E) && defined(HAVE_STAT_TIME_T)
check.tv_sec = sbuf.st_ctime.tv_sec;
check.tv_usec = sbuf.st_ctime.tv_usec;
check.tv_sec = sbuf.st_ctime;
check.tv_usec = 0;
#elif defined(HAVE_ST_MTIME_WITH_SPEC)
check.tv_sec = sbuf.st_ctimespec.tv_sec;
check.tv_usec = sbuf.st_ctimespec.tv_nsec / 1000;
Expand All @@ -198,8 +198,8 @@ main(int argc, char **argv)

case PRED_MTIME:
#if defined(HAVE_ST_MTIME_WITH_E) && defined(HAVE_STAT_TIME_T)
check.tv_sec = sbuf.st_mtime.tv_sec;
check.tv_usec = sbuf.st_mtime.tv_usec;
check.tv_sec = sbuf.st_mtime;
check.tv_usec = 0;
#elif defined(HAVE_ST_MTIME_WITH_SPEC)
check.tv_sec = sbuf.st_mtimespec.tv_sec;
check.tv_usec = sbuf.st_mtimespec.tv_nsec / 1000;
Expand Down
1 change: 1 addition & 0 deletions src/include/pcp/platform_defs.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ extern const char *wsastrerror(int);
#define S_IRWXO 0
#endif
#define S_ISVTX 0
#define S_ISLNK(mode) 0 /* no symlink support */

#define fcntl(f, cmd, ...) 0
#define mkdir2(path, mode) mkdir(path)
Expand Down
26 changes: 16 additions & 10 deletions src/libpcp/src/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -3176,9 +3176,11 @@ inodetype(mode_t st_mode)
case S_IFCHR: return "character device";
case S_IFDIR: return "directory";
case S_IFIFO: return "FIFO/pipe";
case S_IFLNK: return "symlink";
case S_IFREG: return "regular file";
#if !defined(IS_MINGW)
case S_IFLNK: return "symlink";
case S_IFSOCK: return "socket";
#endif
default: return "unknown?";
}
}
Expand Down Expand Up @@ -3229,20 +3231,22 @@ check_map_name(const char *path, const char *name, const char *link, const char
}
return 0;
}
if (kill(pid, 0) < 0) {
if (oserror() == ESRCH) {
if (pmDebugOptions.appl9) {
fprintf(stderr, "__pmCleanMapDir: %s", path);
if (link) fprintf(stderr, " -> %s (%s)", link, link_pid);
fprintf(stderr, ": remove: process does not exist\n");
}
return 0;
if (!__pmProcessExists(pid)) {
if (pmDebugOptions.appl9) {
fprintf(stderr, "__pmCleanMapDir: %s", path);
if (link) fprintf(stderr, " -> %s (%s)", link, link_pid);
fprintf(stderr, ": remove: process does not exist\n");
}
return 0;
}

return 1;
}

#if defined(IS_MINGW)
#define lstat(p,s) stat(p,s)
#endif

/*
* remove old files from a map directory
* - use -Dappl9 for verbose diagnostics
Expand Down Expand Up @@ -3278,6 +3282,7 @@ __pmCleanMapDir(const char *dirname, const char * special)
return sts;
}

#if !defined(IS_MINGW)
if (sbuf.st_uid != geteuid()) {
sts = -EPERM;
PM_UNLOCK(__pmLock_extcall);
Expand All @@ -3295,6 +3300,7 @@ __pmCleanMapDir(const char *dirname, const char * special)
dirname, sbuf.st_gid, getegid(), pmErrStr_r(sts, errmsg, sizeof(errmsg)));
return sts;
}
#endif

if ((dirp = opendir(dirname)) == NULL) {
sts = -oserror();
Expand Down Expand Up @@ -3331,7 +3337,7 @@ __pmCleanMapDir(const char *dirname, const char * special)
path, pmErrStr_r(sts, errmsg, sizeof(errmsg)));
goto unlink;
}
if ((sbuf.st_mode & S_IFMT) != S_IFLNK) {
if (!S_ISLNK(sbuf.st_mode)) {
if (pmDebugOptions.appl9)
fprintf(stderr, "__pmCleanMapDir: %s [special]: remove: is a %s, expected a symlink\n",
path, inodetype(sbuf.st_mode));
Expand Down
6 changes: 4 additions & 2 deletions src/pcp/atop/atopsar.c
Original file line number Diff line number Diff line change
Expand Up @@ -936,13 +936,15 @@ pratopsaruse(char *myname, pmOptions *opts)
static time_t
daylimit(time_t timval)
{
struct tm *tp = localtime(&timval);
struct tm tt, *tp;

tp = pmLocaltime(&timval, &tt);

tp->tm_hour = 23;
tp->tm_min = 59;
tp->tm_sec = 59;

return mktime(tp);
return __pmMktime(tp);
}

/*
Expand Down
4 changes: 2 additions & 2 deletions src/pmdas/apache/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ build-me: $(TARGETS)
install: build-me
$(INSTALL) -m 755 -d $(PMDAADMDIR)
$(INSTALL) -m 755 -d $(PMDAVARDIR)
$(INSTALL) -m 755 -t $(PMDAVARDIR)/pmda$(IAM) $(IAM) $(PMDAADMDIR)/pmda$(IAM)
$(INSTALL) -m 755 -t $(PMDAVARDIR)/pmda$(IAM) $(TARGETS) $(PMDAADMDIR)/pmda$(IAM)
$(INSTALL) -m 755 -t $(PMDAVARDIR) $(SCRIPTS) $(PMDAADMDIR)
$(INSTALL) -m 644 -t $(PMDAVARDIR) $(DFILES) pmns help root domain.h $(PMDAADMDIR)
ifeq "$(ENABLE_QT)" "true"
Expand All @@ -55,7 +55,7 @@ endif
$(INSTALL) -m 644 -t $(PMLOGCONFVARDIR)/summary pmlogconf.summary $(PMLOGCONFETCDIR)/summary
$(INSTALL) -m 644 -t $(PMLOGCONFVARDIR)/uptime pmlogconf.uptime $(PMLOGCONFETCDIR)/uptime

$(IAM)$(EXECSUFFIX): $(OBJECTS)
$(TARGETS): $(OBJECTS)

$(OBJECTS): domain.h

Expand Down

0 comments on commit 934a947

Please sign in to comment.