Skip to content

Commit

Permalink
Merge branch 'main' of ../pcp
Browse files Browse the repository at this point in the history
  • Loading branch information
kmcdonell committed Mar 25, 2024
2 parents 1fbc0c0 + 5964674 commit c4bec38
Show file tree
Hide file tree
Showing 12 changed files with 80 additions and 70 deletions.
12 changes: 6 additions & 6 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -4878,11 +4878,11 @@ then :
PCFLAGS="$PCFLAGS -Wshadow"
fi
fi
if ! echo "$CFLAGS" | grep -- -Wno-array-bound >/dev/null
if ! echo "$CFLAGS" | grep -- -Wno-array-bounds >/dev/null
then
if test "x$cc_is_gcc" = xyes
then :
PCFLAGS="$PCFLAGS -Wno-array-bound"
PCFLAGS="$PCFLAGS -Wno-array-bounds"
fi
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking sizeof off_t" >&5
Expand Down Expand Up @@ -5296,11 +5296,11 @@ if test x$ac_prog_cxx_stdcxx = xno
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5
printf %s "checking for $CXX option to enable C++11 features... " >&6; }
if test ${ac_cv_prog_cxx_cxx11+y}
if test ${ac_cv_prog_cxx_11+y}
then :
printf %s "(cached) " >&6
else $as_nop
ac_cv_prog_cxx_cxx11=no
ac_cv_prog_cxx_11=no
ac_save_CXX=$CXX
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
Expand Down Expand Up @@ -5342,11 +5342,11 @@ if test x$ac_prog_cxx_stdcxx = xno
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5
printf %s "checking for $CXX option to enable C++98 features... " >&6; }
if test ${ac_cv_prog_cxx_cxx98+y}
if test ${ac_cv_prog_cxx_98+y}
then :
printf %s "(cached) " >&6
else $as_nop
ac_cv_prog_cxx_cxx98=no
ac_cv_prog_cxx_98=no
ac_save_CXX=$CXX
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -434,9 +434,9 @@ then
AS_IF([test "x$cc_is_gcc" = xyes ],[PCFLAGS="$PCFLAGS -Wshadow"])
fi
dnl Disable array bounds as pmResult is often mischaracterised
if ! echo "$CFLAGS" | grep -- -Wno-array-bound >/dev/null
if ! echo "$CFLAGS" | grep -- -Wno-array-bounds >/dev/null
then
AS_IF([test "x$cc_is_gcc" = xyes ],[PCFLAGS="$PCFLAGS -Wno-array-bound"])
AS_IF([test "x$cc_is_gcc" = xyes ],[PCFLAGS="$PCFLAGS -Wno-array-bounds"])
fi
dnl and we need to worry about off_t ... we need it to be 64-bits for V3 archives
AC_MSG_CHECKING([sizeof off_t])
Expand Down
1 change: 1 addition & 0 deletions qa/1488
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ _filter()
-e '/added/{
s@namespace ""@namespace <OK>@
s@namespace "/unified"@namespace <OK>@
s@namespace "/systemd"@namespace <OK>@
}' \
-e "s@$$@MYPID@g" \
-e 's/ */ /g' \
Expand Down
6 changes: 5 additions & 1 deletion qa/1491
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,11 @@ fi
pmcheck -s pmcd
echo '-- and -a again with -v --'
pmcheck -v -a pmcd 2>&1 \
| sed -e 's/ed via .*/ed via .../'
| sed \
-e '/^ *already /d' \
-e 's/ enabled via .*/ STARTED via .../' \
-e 's/ started via .*/ STARTED via .../' \
# end

# success, all done
exit
3 changes: 1 addition & 2 deletions qa/1491.out
Original file line number Diff line number Diff line change
Expand Up @@ -172,5 +172,4 @@ pmcd success
1491: pmcd started
pmcd active
-- and -a again with -v --
pmcd success already enabled via ...
already started via ...
pmcd success already STARTED via ...
8 changes: 8 additions & 0 deletions qa/1492
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ fi
. ./common.filter
. ./common.check

if which pcp-atopsar >/dev/null 2>&1
then
:
else
_notrun "no pcp-atopsar executable installed"
# NOTREACHED
fi

$sudo rm -rf $tmp $tmp.* $seq.full

do_valgrind=false
Expand Down
4 changes: 0 additions & 4 deletions qa/1501.out
Original file line number Diff line number Diff line change
Expand Up @@ -797,10 +797,6 @@ Fri Mar 15 09:53:18.120389385 2024
[1] name(19,4) : value(25,9) [domain]
Cluster 30.0 labels (18 bytes): {"cluster":"zero"}
[0] name(2,7) : value(11,6) [cluster]
InDom 29.12[1] labels (0 bytes):
InDom 29.12[2] labels (0 bytes):
InDom 29.12[3] labels (0 bytes):
InDom 29.12[4] labels (0 bytes):
InDom 29.12[10] labels (0 bytes):
InDom 29.12[13] labels (0 bytes):
InDom 29.12[14] labels (0 bytes):
Expand Down
96 changes: 48 additions & 48 deletions qa/480.out.2
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,7 @@ Note: timezone set to local timezone of host "moomba" from archive


Descriptions for Metrics in the Log ...
PMID: 40.0.4 (40.0.4)
Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff
Semantics: counter Units: count
PMID: 1.80.7 (disk.dev.total)
Data Type: 32-bit unsigned int InDom: 1.2 0x400002
Semantics: counter Units: count
PMID: 40.0.5 (40.0.5)
PMID: 1.10.3 (kernel.all.pswitch)
Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff
Semantics: counter Units: count
PMID: 1.10.7 (kernel.all.cpu.idle)
Expand All @@ -29,60 +23,60 @@ PMID: 1.10.7 (kernel.all.cpu.idle)
PMID: 1.10.8 (kernel.all.cpu.intr)
Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff
Semantics: counter Units: millisec
PMID: 1.25.7 (network.interface.in.bytes)
Data Type: 32-bit unsigned int InDom: 1.6 0x400006
Semantics: counter Units: count
PMID: 40.0.7 (40.0.7)
Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff
Semantics: counter Units: count
PMID: 1.10.9 (kernel.all.cpu.sys)
Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff
Semantics: counter Units: millisec
PMID: 40.0.8 (40.0.8)
Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff
Semantics: counter Units: count
PMID: 1.10.10 (kernel.all.cpu.sxbrk)
Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff
Semantics: counter Units: millisec
PMID: 1.10.53 (kernel.all.ipc.msg)
Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff
Semantics: counter Units: count
PMID: 1.10.11 (kernel.all.cpu.user)
Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff
Semantics: counter Units: millisec
PMID: 1.10.54 (kernel.all.ipc.sema)
Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff
Semantics: counter Units: count
PMID: 1.10.12 (kernel.all.cpu.wait.total)
Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff
Semantics: counter Units: millisec
PMID: 1.25.12 (network.interface.out.bytes)
Data Type: 32-bit unsigned int InDom: 1.6 0x400006
Semantics: counter Units: count
PMID: 1.10.14 (kernel.all.readch)
Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff
Semantics: counter Units: byte
PMID: 1.80.1 (disk.dev.read)
Data Type: 32-bit unsigned int InDom: 1.2 0x400002
Semantics: counter Units: count
PMID: 1.10.29 (kernel.all.writech)
Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff
Semantics: counter Units: byte
PMID: 1.10.15 (kernel.all.runocc)
Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff
Semantics: counter Units: none
PMID: 1.10.16 (kernel.all.runque)
Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff
Semantics: counter Units: none
PMID: 1.10.19 (kernel.all.syscall)
Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff
Semantics: counter Units: count
PMID: 1.10.29 (kernel.all.writech)
Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff
Semantics: counter Units: byte
PMID: 1.10.53 (kernel.all.ipc.msg)
Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff
Semantics: counter Units: count
PMID: 1.10.54 (kernel.all.ipc.sema)
Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff
Semantics: counter Units: count
PMID: 1.18.3 (kernel.all.load)
Data Type: float InDom: 1.5 0x400005
Semantics: instant Units: none
PMID: 1.25.7 (network.interface.in.bytes)
Data Type: 32-bit unsigned int InDom: 1.6 0x400006
Semantics: counter Units: count
PMID: 1.25.12 (network.interface.out.bytes)
Data Type: 32-bit unsigned int InDom: 1.6 0x400006
Semantics: counter Units: count
PMID: 1.80.1 (disk.dev.read)
Data Type: 32-bit unsigned int InDom: 1.2 0x400002
Semantics: counter Units: count
PMID: 1.80.2 (disk.dev.write)
Data Type: 32-bit unsigned int InDom: 1.2 0x400002
Semantics: counter Units: count
PMID: 1.80.7 (disk.dev.total)
Data Type: 32-bit unsigned int InDom: 1.2 0x400002
Semantics: counter Units: count
PMID: 40.0.0 (40.0.0)
Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff
Semantics: counter Units: millisec
PMID: 1.10.3 (kernel.all.pswitch)
Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff
Semantics: counter Units: count
PMID: 40.0.1 (40.0.1)
Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff
Semantics: counter Units: millisec
Expand All @@ -92,24 +86,20 @@ PMID: 40.0.2 (40.0.2)
PMID: 40.0.3 (40.0.3)
Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff
Semantics: counter Units: count
PMID: 1.18.3 (kernel.all.load)
Data Type: float InDom: 1.5 0x400005
Semantics: instant Units: none
PMID: 1.10.19 (kernel.all.syscall)
PMID: 40.0.4 (40.0.4)
Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff
Semantics: counter Units: count
PMID: 40.0.5 (40.0.5)
Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff
Semantics: counter Units: count
PMID: 40.0.7 (40.0.7)
Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff
Semantics: counter Units: count
PMID: 40.0.8 (40.0.8)
Data Type: 32-bit unsigned int InDom: PM_INDOM_NULL 0xffffffff
Semantics: counter Units: count

Instance Domains in the Log ...
InDom: 1.5
14:25:09.043538 3 instances
1 or "1 minute"
5 or "5 minute"
15 or "15 minute"
InDom: 1.6
14:25:09.043538 3 instances
1 or "et0"
2 or "lo0"
3 or "sl0"
InDom: 1.2
14:25:09.043538 9 instances
131329 or "dks1d1"
Expand All @@ -121,6 +111,16 @@ InDom: 1.2
131844 or "dks3d4"
132097 or "dks4d1"
132098 or "dks4d2"
InDom: 1.5
14:25:09.043538 3 instances
1 or "1 minute"
5 or "5 minute"
15 or "15 minute"
InDom: 1.6
14:25:09.043538 3 instances
1 or "et0"
2 or "lo0"
3 or "sl0"

=== libpcp/logmeta.c:5 ===
Log for pmlogger on HOST started DATE
Expand Down
3 changes: 3 additions & 0 deletions src/include/pcp/libpcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -1553,6 +1553,9 @@ PCP_CALL extern void __pmPutTimeval(const __pmTimestamp *, __int32_t *);
/* remove old files from a map directory */
PCP_CALL extern int __pmCleanMapDir(const char *, const char *);

/* Check for duplicate label sets. */
PCP_CALL extern void __pmCheckDupLabels(const __pmArchCtl *);

#ifdef __cplusplus
}
#endif
Expand Down
3 changes: 3 additions & 0 deletions src/libpcp/src/context.c
Original file line number Diff line number Diff line change
Expand Up @@ -955,6 +955,9 @@ initarchive(__pmContext *ctxp, const char *name)
*/
__pmFixPMNSHashTab(acp->ac_log->pmns, acp->ac_log->numpmid, 1);

/* Check for duplicate label sets. */
__pmCheckDupLabels(acp);

if (acp->ac_num_logs > 1) {
/*
* In order to maintain API semantics with the old single archive
Expand Down
1 change: 1 addition & 0 deletions src/libpcp/src/exports.in
Original file line number Diff line number Diff line change
Expand Up @@ -859,4 +859,5 @@ PCP_3.39 {

PCP_3.40 {
__pmLogChangeArchive;
__pmCheckDupLabels;
} PCP_3.39;
9 changes: 2 additions & 7 deletions src/libpcp/src/logmeta.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,8 @@ discard_dup_labelsets(__pmLogLabelSet *idp, const __pmLogLabelSet *idp_next)
* has been read. At this point we know that the label sets are stored in reverse
* chronological order.
*/
static void
check_dup_labels(const __pmArchCtl *acp)
void
__pmCheckDupLabels(const __pmArchCtl *acp)
{
__pmLogCtl *lcp;
__pmLogLabelSet *idp, *idp_prior, *idp_next;
Expand Down Expand Up @@ -1010,11 +1010,6 @@ PM_FAULT_POINT("libpcp/" __FILE__ ":16", PM_FAULT_ALLOC);
}/*for*/
end:

/* Check for duplicate label sets. */
check_dup_labels(acp);

__pmFseek(f, (long)__pmLogLabelSize(lcp), SEEK_SET);

if (sts == 0) {
if (numpmid == 0) {
if (pmDebugOptions.logmeta) {
Expand Down

0 comments on commit c4bec38

Please sign in to comment.