|
|
97e5ec |
diff -Naurp pcp-4.3.2.wip/qa/1393 pcp-4.3.2/qa/1393
|
|
|
97e5ec |
--- pcp-4.3.2.wip/qa/1393 1970-01-01 10:00:00.000000000 +1000
|
|
|
97e5ec |
+++ pcp-4.3.2/qa/1393 2020-02-17 17:29:39.572489770 +1100
|
|
|
97e5ec |
@@ -0,0 +1,64 @@
|
|
|
97e5ec |
+#!/bin/sh
|
|
|
97e5ec |
+# PCP QA Test No. 1393
|
|
|
97e5ec |
+# Test sparse and non-contiguous numa-nodes and CPUs
|
|
|
97e5ec |
+# RHBZ#1730492 - Some numa nodes have no instances.
|
|
|
97e5ec |
+#
|
|
|
97e5ec |
+# Copyright (c) 2019 Red Hat. All Rights Reserved.
|
|
|
97e5ec |
+#
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+seq=`basename $0`
|
|
|
97e5ec |
+echo "QA output created by $seq"
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+# get standard environment, filters and checks
|
|
|
97e5ec |
+. ./common.product
|
|
|
97e5ec |
+. ./common.filter
|
|
|
97e5ec |
+. ./common.check
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+[ $PCP_PLATFORM = linux ] || _notrun "Linux-specific PMDA testing"
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+_cleanup()
|
|
|
97e5ec |
+{
|
|
|
97e5ec |
+ cd $here
|
|
|
97e5ec |
+ $sudo rm -rf $tmp $tmp.*
|
|
|
97e5ec |
+}
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+status=1 # failure is the default!
|
|
|
97e5ec |
+$sudo rm -rf $tmp $tmp.* $seq.full
|
|
|
97e5ec |
+trap "_cleanup; exit \$status" 0 1 2 3 15
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+_sort_instname()
|
|
|
97e5ec |
+{
|
|
|
97e5ec |
+ tee $tmp.sort | sed -n 2p
|
|
|
97e5ec |
+ awk '/inst / {print " ", $4, $6}' $tmp.sort | sed -e 's/\]//' | LC_COLLATE=POSIX sort
|
|
|
97e5ec |
+}
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+# real QA test starts here
|
|
|
97e5ec |
+mkdir -p $tmp
|
|
|
97e5ec |
+tar -C $tmp -xf linux/sysfs-numa-001.tgz
|
|
|
97e5ec |
+pmda=$PCP_PMDAS_DIR/linux/pmda_linux.$DSO_SUFFIX,linux_init
|
|
|
97e5ec |
+export LINUX_STATSPATH="$tmp"
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+metrics="hinv.map.cpu_node hinv.node.online \
|
|
|
97e5ec |
+ kernel.percpu.cpu.idle kernel.percpu.cpu.user kernel.pernode.cpu.idle \
|
|
|
97e5ec |
+ kernel.pernode.cpu.user mem.numa.alloc.local_node mem.numa.util.total \
|
|
|
97e5ec |
+ mem.numa.util.free mem.numa.util.used"
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+echo == check basic numa metrics 4 nodes, 8 CPUs
|
|
|
97e5ec |
+pminfo -L -K clear -K add,60,$pmda -f hinv.nnode hinv.ncpu
|
|
|
97e5ec |
+for m in $metrics; do pminfo -L -K clear -K add,60,$pmda -f $m| _sort_instname; done
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+echo;echo ==;echo == delete node2, leaving node0, node1 and node3;echo ==
|
|
|
97e5ec |
+rm -rf $LINUX_STATSPATH/sys/devices/system/node/node2
|
|
|
97e5ec |
+rm -rf $LINUX_STATSPATH/sys/devices/system/memory/memory*/node2
|
|
|
97e5ec |
+echo '0,1,3' >$LINUX_STATSPATH/sys/devices/system/node/online
|
|
|
97e5ec |
+echo '0,1,3' >$LINUX_STATSPATH/sys/devices/system/node/possible
|
|
|
97e5ec |
+rm -rf $LINUX_STATSPATH/sys/devices/system/cpu/cpu{4,5}
|
|
|
97e5ec |
+sed -i '/^cpu[45]$/d' $LINUX_STATSPATH/proc/stat
|
|
|
97e5ec |
+echo '0,1,2,3,6,7' >$LINUX_STATSPATH/sys/devices/system/cpu/online
|
|
|
97e5ec |
+echo '0,1,2,3,6,7' >$LINUX_STATSPATH/sys/devices/system/cpu/present
|
|
|
97e5ec |
+pminfo -L -K clear -K add,60,$pmda -f hinv.nnode hinv.ncpu
|
|
|
97e5ec |
+for m in $metrics; do pminfo -L -K clear -K add,60,$pmda -f $m| _sort_instname; done
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+# success, all done
|
|
|
97e5ec |
+status=0
|
|
|
97e5ec |
+exit
|
|
|
97e5ec |
diff -Naurp pcp-4.3.2.wip/qa/1393.out pcp-4.3.2/qa/1393.out
|
|
|
97e5ec |
--- pcp-4.3.2.wip/qa/1393.out 1970-01-01 10:00:00.000000000 +1000
|
|
|
97e5ec |
+++ pcp-4.3.2/qa/1393.out 2020-02-17 17:28:43.162140076 +1100
|
|
|
97e5ec |
@@ -0,0 +1,129 @@
|
|
|
97e5ec |
+QA output created by 1393
|
|
|
97e5ec |
+== check basic numa metrics 4 nodes, 8 CPUs
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+hinv.nnode
|
|
|
97e5ec |
+ value 4
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+hinv.ncpu
|
|
|
97e5ec |
+ value 8
|
|
|
97e5ec |
+hinv.map.cpu_node
|
|
|
97e5ec |
+ "cpu0" 0
|
|
|
97e5ec |
+ "cpu1" 0
|
|
|
97e5ec |
+ "cpu2" 1
|
|
|
97e5ec |
+ "cpu3" 1
|
|
|
97e5ec |
+ "cpu4" 2
|
|
|
97e5ec |
+ "cpu5" 2
|
|
|
97e5ec |
+ "cpu6" 3
|
|
|
97e5ec |
+ "cpu7" 3
|
|
|
97e5ec |
+hinv.node.online
|
|
|
97e5ec |
+ "node0" 1
|
|
|
97e5ec |
+ "node1" 1
|
|
|
97e5ec |
+ "node2" 1
|
|
|
97e5ec |
+ "node3" 1
|
|
|
97e5ec |
+kernel.percpu.cpu.idle
|
|
|
97e5ec |
+ "cpu0" 82176250
|
|
|
97e5ec |
+ "cpu1" 82246600
|
|
|
97e5ec |
+ "cpu2" 82152810
|
|
|
97e5ec |
+ "cpu3" 82283820
|
|
|
97e5ec |
+ "cpu4" 82098120
|
|
|
97e5ec |
+ "cpu5" 82009220
|
|
|
97e5ec |
+ "cpu6" 82276330
|
|
|
97e5ec |
+ "cpu7" 82191150
|
|
|
97e5ec |
+kernel.percpu.cpu.user
|
|
|
97e5ec |
+ "cpu0" 373300
|
|
|
97e5ec |
+ "cpu1" 349760
|
|
|
97e5ec |
+ "cpu2" 363240
|
|
|
97e5ec |
+ "cpu3" 369770
|
|
|
97e5ec |
+ "cpu4" 412040
|
|
|
97e5ec |
+ "cpu5" 419270
|
|
|
97e5ec |
+ "cpu6" 344030
|
|
|
97e5ec |
+ "cpu7" 433650
|
|
|
97e5ec |
+kernel.pernode.cpu.idle
|
|
|
97e5ec |
+ "node0" 164422850
|
|
|
97e5ec |
+ "node1" 164436630
|
|
|
97e5ec |
+ "node2" 164107340
|
|
|
97e5ec |
+ "node3" 164467480
|
|
|
97e5ec |
+kernel.pernode.cpu.user
|
|
|
97e5ec |
+ "node0" 723060
|
|
|
97e5ec |
+ "node1" 733010
|
|
|
97e5ec |
+ "node2" 831310
|
|
|
97e5ec |
+ "node3" 777680
|
|
|
97e5ec |
+mem.numa.alloc.local_node
|
|
|
97e5ec |
+ "node0" 32241822
|
|
|
97e5ec |
+ "node1" 32048777
|
|
|
97e5ec |
+ "node2" 35574473
|
|
|
97e5ec |
+ "node3" 32921660
|
|
|
97e5ec |
+mem.numa.util.total
|
|
|
97e5ec |
+ "node0" 1030924
|
|
|
97e5ec |
+ "node1" 1031416
|
|
|
97e5ec |
+ "node2" 965616
|
|
|
97e5ec |
+ "node3" 1006408
|
|
|
97e5ec |
+mem.numa.util.free
|
|
|
97e5ec |
+ "node0" 354088
|
|
|
97e5ec |
+ "node1" 557252
|
|
|
97e5ec |
+ "node2" 229456
|
|
|
97e5ec |
+ "node3" 271916
|
|
|
97e5ec |
+mem.numa.util.used
|
|
|
97e5ec |
+ "node0" 676836
|
|
|
97e5ec |
+ "node1" 474164
|
|
|
97e5ec |
+ "node2" 736160
|
|
|
97e5ec |
+ "node3" 734492
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+==
|
|
|
97e5ec |
+== delete node2, leaving node0, node1 and node3
|
|
|
97e5ec |
+==
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+hinv.nnode
|
|
|
97e5ec |
+ value 3
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+hinv.ncpu
|
|
|
97e5ec |
+ value 6
|
|
|
97e5ec |
+hinv.map.cpu_node
|
|
|
97e5ec |
+ "cpu0" 0
|
|
|
97e5ec |
+ "cpu1" 0
|
|
|
97e5ec |
+ "cpu2" 1
|
|
|
97e5ec |
+ "cpu3" 1
|
|
|
97e5ec |
+ "cpu6" 3
|
|
|
97e5ec |
+ "cpu7" 3
|
|
|
97e5ec |
+hinv.node.online
|
|
|
97e5ec |
+ "node0" 1
|
|
|
97e5ec |
+ "node1" 1
|
|
|
97e5ec |
+ "node3" 1
|
|
|
97e5ec |
+kernel.percpu.cpu.idle
|
|
|
97e5ec |
+ "cpu0" 82176250
|
|
|
97e5ec |
+ "cpu1" 82246600
|
|
|
97e5ec |
+ "cpu2" 82152810
|
|
|
97e5ec |
+ "cpu3" 82283820
|
|
|
97e5ec |
+ "cpu6" 82276330
|
|
|
97e5ec |
+ "cpu7" 82191150
|
|
|
97e5ec |
+kernel.percpu.cpu.user
|
|
|
97e5ec |
+ "cpu0" 373300
|
|
|
97e5ec |
+ "cpu1" 349760
|
|
|
97e5ec |
+ "cpu2" 363240
|
|
|
97e5ec |
+ "cpu3" 369770
|
|
|
97e5ec |
+ "cpu6" 344030
|
|
|
97e5ec |
+ "cpu7" 433650
|
|
|
97e5ec |
+kernel.pernode.cpu.idle
|
|
|
97e5ec |
+ "node0" 164422850
|
|
|
97e5ec |
+ "node1" 164436630
|
|
|
97e5ec |
+ "node3" 164467480
|
|
|
97e5ec |
+kernel.pernode.cpu.user
|
|
|
97e5ec |
+ "node0" 723060
|
|
|
97e5ec |
+ "node1" 733010
|
|
|
97e5ec |
+ "node3" 777680
|
|
|
97e5ec |
+mem.numa.alloc.local_node
|
|
|
97e5ec |
+ "node0" 32241822
|
|
|
97e5ec |
+ "node1" 32048777
|
|
|
97e5ec |
+ "node3" 32921660
|
|
|
97e5ec |
+mem.numa.util.total
|
|
|
97e5ec |
+ "node0" 1030924
|
|
|
97e5ec |
+ "node1" 1031416
|
|
|
97e5ec |
+ "node3" 1006408
|
|
|
97e5ec |
+mem.numa.util.free
|
|
|
97e5ec |
+ "node0" 354088
|
|
|
97e5ec |
+ "node1" 557252
|
|
|
97e5ec |
+ "node3" 271916
|
|
|
97e5ec |
+mem.numa.util.used
|
|
|
97e5ec |
+ "node0" 676836
|
|
|
97e5ec |
+ "node1" 474164
|
|
|
97e5ec |
+ "node3" 734492
|
|
|
97e5ec |
diff -Naurp pcp-4.3.2.wip/qa/747 pcp-4.3.2/qa/747
|
|
|
97e5ec |
--- pcp-4.3.2.wip/qa/747 2017-11-30 12:48:48.000000000 +1100
|
|
|
97e5ec |
+++ pcp-4.3.2/qa/747 2020-02-17 17:28:43.161140088 +1100
|
|
|
97e5ec |
@@ -19,27 +19,10 @@ status=1 # failure is the default!
|
|
|
97e5ec |
$sudo rm -rf $tmp.* $seq.full
|
|
|
97e5ec |
trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15
|
|
|
97e5ec |
|
|
|
97e5ec |
-# deal with non-determinism in the order in which the per cpu indom
|
|
|
97e5ec |
-# is populated
|
|
|
97e5ec |
-# input is assumed to be in the format ...
|
|
|
97e5ec |
-# head ...
|
|
|
97e5ec |
-# stuff to fix ...
|
|
|
97e5ec |
-# tail ...
|
|
|
97e5ec |
-#
|
|
|
97e5ec |
-_fix_percpu_indom()
|
|
|
97e5ec |
+_sort_instname()
|
|
|
97e5ec |
{
|
|
|
97e5ec |
- rm -f $tmp.head $tmp.percpu $tmp.tail
|
|
|
97e5ec |
- $PCP_AWK_PROG '
|
|
|
97e5ec |
-/^hinv\.cpu\.online/ { state = 1 }
|
|
|
97e5ec |
-/^kernel\.percpu\./ { state = 1 }
|
|
|
97e5ec |
-state == 0 { print >"'"$tmp.head"'"; next }
|
|
|
97e5ec |
-state == 1 { print >"'"$tmp.percpu"'" }
|
|
|
97e5ec |
-state == 2 { print >"'"$tmp.tail"'"; next }
|
|
|
97e5ec |
-state == 1 && NF == 0 { state = 2 }'
|
|
|
97e5ec |
- [ -f $tmp.head ] && cat $tmp.head
|
|
|
97e5ec |
- [ -f $tmp.percpu ] && $here/src/sortinst -i <$tmp.percpu \
|
|
|
97e5ec |
- | sed -e 's/cpu[0-9][0-9]*/cpuN/'
|
|
|
97e5ec |
- [ -f $tmp.tail ] && cat $tmp.tail
|
|
|
97e5ec |
+ tee $tmp.sort | sed -n 2p
|
|
|
97e5ec |
+ awk '/inst / {print " ", $4, $6}' $tmp.sort | sed -e 's/\]//' | LC_COLLATE=POSIX sort
|
|
|
97e5ec |
}
|
|
|
97e5ec |
|
|
|
97e5ec |
# real QA test starts here
|
|
|
97e5ec |
@@ -54,7 +37,7 @@ allcpu_metrics=`pminfo $local kernel.all
|
|
|
97e5ec |
percpu_metrics=`pminfo $local kernel.percpu.cpu | LC_COLLATE=POSIX sort`
|
|
|
97e5ec |
pernode_metrics=`pminfo $local kernel.pernode.cpu | LC_COLLATE=POSIX sort`
|
|
|
97e5ec |
|
|
|
97e5ec |
-for tgz in $here/linux/sysdev-*.tgz
|
|
|
97e5ec |
+for tgz in $here/linux/sysdev-*.tgz $here/linux/sysfs-numa-001.tgz
|
|
|
97e5ec |
do
|
|
|
97e5ec |
rm -fr $root
|
|
|
97e5ec |
mkdir $root || _fail "root in use when processing $tgz"
|
|
|
97e5ec |
@@ -65,7 +48,7 @@ do
|
|
|
97e5ec |
echo "== Checking hinv metric values - $base"
|
|
|
97e5ec |
for m in $hinv_metrics
|
|
|
97e5ec |
do
|
|
|
97e5ec |
- pminfo $local -f $m | _fix_percpu_indom
|
|
|
97e5ec |
+ pminfo $local -f $m | _sort_instname
|
|
|
97e5ec |
done
|
|
|
97e5ec |
echo && echo "== done" && echo
|
|
|
97e5ec |
|
|
|
97e5ec |
@@ -76,12 +59,15 @@ do
|
|
|
97e5ec |
echo "== Checking per-CPU metric values - $base"
|
|
|
97e5ec |
for m in $percpu_metrics
|
|
|
97e5ec |
do
|
|
|
97e5ec |
- pminfo $local -f $m | _fix_percpu_indom
|
|
|
97e5ec |
+ pminfo $local -f $m | _sort_instname
|
|
|
97e5ec |
done
|
|
|
97e5ec |
echo && echo "== done" && echo
|
|
|
97e5ec |
|
|
|
97e5ec |
echo "== Checking per-node CPU metric values - $base"
|
|
|
97e5ec |
- pminfo $local -f $pernode_metrics
|
|
|
97e5ec |
+ for m in $pernode_metrics
|
|
|
97e5ec |
+ do
|
|
|
97e5ec |
+ pminfo $local -f $m | _sort_instname
|
|
|
97e5ec |
+ done
|
|
|
97e5ec |
echo && echo "== done" && echo
|
|
|
97e5ec |
|
|
|
97e5ec |
cd $here
|
|
|
97e5ec |
diff -Naurp pcp-4.3.2.wip/qa/747.out pcp-4.3.2/qa/747.out
|
|
|
97e5ec |
--- pcp-4.3.2.wip/qa/747.out 2017-11-30 12:48:48.000000000 +1100
|
|
|
97e5ec |
+++ pcp-4.3.2/qa/747.out 2020-02-17 17:28:43.161140088 +1100
|
|
|
97e5ec |
@@ -1,14 +1,12 @@
|
|
|
97e5ec |
QA output created by 747
|
|
|
97e5ec |
== Checking hinv metric values - sysdev-root-001.tgz
|
|
|
97e5ec |
-
|
|
|
97e5ec |
hinv.cpu.online
|
|
|
97e5ec |
- inst [0 or "cpuN"] value 1
|
|
|
97e5ec |
- inst [1 or "cpuN"] value 1
|
|
|
97e5ec |
- inst [2 or "cpuN"] value 0
|
|
|
97e5ec |
- inst [3 or "cpuN"] value 1
|
|
|
97e5ec |
-
|
|
|
97e5ec |
+ "cpu0" 1
|
|
|
97e5ec |
+ "cpu1" 1
|
|
|
97e5ec |
+ "cpu2" 0
|
|
|
97e5ec |
+ "cpu3" 1
|
|
|
97e5ec |
hinv.node.online
|
|
|
97e5ec |
- inst [0 or "node0"] value 1
|
|
|
97e5ec |
+ "node0" 1
|
|
|
97e5ec |
|
|
|
97e5ec |
== done
|
|
|
97e5ec |
|
|
|
97e5ec |
@@ -56,127 +54,352 @@ kernel.all.cpu.wait.total
|
|
|
97e5ec |
== done
|
|
|
97e5ec |
|
|
|
97e5ec |
== Checking per-CPU metric values - sysdev-root-001.tgz
|
|
|
97e5ec |
-
|
|
|
97e5ec |
kernel.percpu.cpu.guest
|
|
|
97e5ec |
- inst [0 or "cpuN"] value 20
|
|
|
97e5ec |
- inst [1 or "cpuN"] value 0
|
|
|
97e5ec |
- inst [2 or "cpuN"] value 0
|
|
|
97e5ec |
- inst [3 or "cpuN"] value 0
|
|
|
97e5ec |
-
|
|
|
97e5ec |
+ "cpu0" 20
|
|
|
97e5ec |
+ "cpu1" 0
|
|
|
97e5ec |
+ "cpu2" 0
|
|
|
97e5ec |
+ "cpu3" 0
|
|
|
97e5ec |
kernel.percpu.cpu.guest_nice
|
|
|
97e5ec |
- inst [0 or "cpuN"] value 30
|
|
|
97e5ec |
- inst [1 or "cpuN"] value 0
|
|
|
97e5ec |
- inst [2 or "cpuN"] value 0
|
|
|
97e5ec |
- inst [3 or "cpuN"] value 0
|
|
|
97e5ec |
-
|
|
|
97e5ec |
+ "cpu0" 30
|
|
|
97e5ec |
+ "cpu1" 0
|
|
|
97e5ec |
+ "cpu2" 0
|
|
|
97e5ec |
+ "cpu3" 0
|
|
|
97e5ec |
kernel.percpu.cpu.idle
|
|
|
97e5ec |
- inst [0 or "cpuN"] value 286728520
|
|
|
97e5ec |
- inst [1 or "cpuN"] value 286695100
|
|
|
97e5ec |
- inst [2 or "cpuN"] value 286198490
|
|
|
97e5ec |
- inst [3 or "cpuN"] value 287003820
|
|
|
97e5ec |
-
|
|
|
97e5ec |
+ "cpu0" 286728520
|
|
|
97e5ec |
+ "cpu1" 286695100
|
|
|
97e5ec |
+ "cpu2" 286198490
|
|
|
97e5ec |
+ "cpu3" 287003820
|
|
|
97e5ec |
kernel.percpu.cpu.intr
|
|
|
97e5ec |
- inst [0 or "cpuN"] value 36540
|
|
|
97e5ec |
- inst [1 or "cpuN"] value 25500
|
|
|
97e5ec |
- inst [2 or "cpuN"] value 51900
|
|
|
97e5ec |
- inst [3 or "cpuN"] value 31930
|
|
|
97e5ec |
-
|
|
|
97e5ec |
+ "cpu0" 36540
|
|
|
97e5ec |
+ "cpu1" 25500
|
|
|
97e5ec |
+ "cpu2" 51900
|
|
|
97e5ec |
+ "cpu3" 31930
|
|
|
97e5ec |
kernel.percpu.cpu.irq.hard
|
|
|
97e5ec |
- inst [0 or "cpuN"] value 13940
|
|
|
97e5ec |
- inst [1 or "cpuN"] value 10830
|
|
|
97e5ec |
- inst [2 or "cpuN"] value 18940
|
|
|
97e5ec |
- inst [3 or "cpuN"] value 12030
|
|
|
97e5ec |
-
|
|
|
97e5ec |
+ "cpu0" 13940
|
|
|
97e5ec |
+ "cpu1" 10830
|
|
|
97e5ec |
+ "cpu2" 18940
|
|
|
97e5ec |
+ "cpu3" 12030
|
|
|
97e5ec |
kernel.percpu.cpu.irq.soft
|
|
|
97e5ec |
- inst [0 or "cpuN"] value 22600
|
|
|
97e5ec |
- inst [1 or "cpuN"] value 14670
|
|
|
97e5ec |
- inst [2 or "cpuN"] value 32960
|
|
|
97e5ec |
- inst [3 or "cpuN"] value 19900
|
|
|
97e5ec |
-
|
|
|
97e5ec |
+ "cpu0" 22600
|
|
|
97e5ec |
+ "cpu1" 14670
|
|
|
97e5ec |
+ "cpu2" 32960
|
|
|
97e5ec |
+ "cpu3" 19900
|
|
|
97e5ec |
kernel.percpu.cpu.nice
|
|
|
97e5ec |
- inst [0 or "cpuN"] value 4620
|
|
|
97e5ec |
- inst [1 or "cpuN"] value 1380
|
|
|
97e5ec |
- inst [2 or "cpuN"] value 630
|
|
|
97e5ec |
- inst [3 or "cpuN"] value 550
|
|
|
97e5ec |
-
|
|
|
97e5ec |
+ "cpu0" 4620
|
|
|
97e5ec |
+ "cpu1" 1380
|
|
|
97e5ec |
+ "cpu2" 630
|
|
|
97e5ec |
+ "cpu3" 550
|
|
|
97e5ec |
kernel.percpu.cpu.steal
|
|
|
97e5ec |
- inst [0 or "cpuN"] value 10
|
|
|
97e5ec |
- inst [1 or "cpuN"] value 0
|
|
|
97e5ec |
- inst [2 or "cpuN"] value 0
|
|
|
97e5ec |
- inst [3 or "cpuN"] value 0
|
|
|
97e5ec |
-
|
|
|
97e5ec |
+ "cpu0" 10
|
|
|
97e5ec |
+ "cpu1" 0
|
|
|
97e5ec |
+ "cpu2" 0
|
|
|
97e5ec |
+ "cpu3" 0
|
|
|
97e5ec |
kernel.percpu.cpu.sys
|
|
|
97e5ec |
- inst [0 or "cpuN"] value 105050
|
|
|
97e5ec |
- inst [1 or "cpuN"] value 146320
|
|
|
97e5ec |
- inst [2 or "cpuN"] value 109360
|
|
|
97e5ec |
- inst [3 or "cpuN"] value 146920
|
|
|
97e5ec |
-
|
|
|
97e5ec |
+ "cpu0" 105050
|
|
|
97e5ec |
+ "cpu1" 146320
|
|
|
97e5ec |
+ "cpu2" 109360
|
|
|
97e5ec |
+ "cpu3" 146920
|
|
|
97e5ec |
kernel.percpu.cpu.user
|
|
|
97e5ec |
- inst [0 or "cpuN"] value 101190
|
|
|
97e5ec |
- inst [1 or "cpuN"] value 359270
|
|
|
97e5ec |
- inst [2 or "cpuN"] value 113190
|
|
|
97e5ec |
- inst [3 or "cpuN"] value 275520
|
|
|
97e5ec |
-
|
|
|
97e5ec |
+ "cpu0" 101190
|
|
|
97e5ec |
+ "cpu1" 359270
|
|
|
97e5ec |
+ "cpu2" 113190
|
|
|
97e5ec |
+ "cpu3" 275520
|
|
|
97e5ec |
kernel.percpu.cpu.vnice
|
|
|
97e5ec |
- inst [0 or "cpuN"] value 4590
|
|
|
97e5ec |
- inst [1 or "cpuN"] value 1380
|
|
|
97e5ec |
- inst [2 or "cpuN"] value 630
|
|
|
97e5ec |
- inst [3 or "cpuN"] value 550
|
|
|
97e5ec |
-
|
|
|
97e5ec |
+ "cpu0" 4590
|
|
|
97e5ec |
+ "cpu1" 1380
|
|
|
97e5ec |
+ "cpu2" 630
|
|
|
97e5ec |
+ "cpu3" 550
|
|
|
97e5ec |
kernel.percpu.cpu.vuser
|
|
|
97e5ec |
- inst [0 or "cpuN"] value 101170
|
|
|
97e5ec |
- inst [1 or "cpuN"] value 359270
|
|
|
97e5ec |
- inst [2 or "cpuN"] value 113190
|
|
|
97e5ec |
- inst [3 or "cpuN"] value 275520
|
|
|
97e5ec |
-
|
|
|
97e5ec |
+ "cpu0" 101170
|
|
|
97e5ec |
+ "cpu1" 359270
|
|
|
97e5ec |
+ "cpu2" 113190
|
|
|
97e5ec |
+ "cpu3" 275520
|
|
|
97e5ec |
kernel.percpu.cpu.wait.total
|
|
|
97e5ec |
- inst [0 or "cpuN"] value 877160
|
|
|
97e5ec |
- inst [1 or "cpuN"] value 649420
|
|
|
97e5ec |
- inst [2 or "cpuN"] value 1373400
|
|
|
97e5ec |
- inst [3 or "cpuN"] value 420180
|
|
|
97e5ec |
+ "cpu0" 877160
|
|
|
97e5ec |
+ "cpu1" 649420
|
|
|
97e5ec |
+ "cpu2" 1373400
|
|
|
97e5ec |
+ "cpu3" 420180
|
|
|
97e5ec |
|
|
|
97e5ec |
== done
|
|
|
97e5ec |
|
|
|
97e5ec |
== Checking per-node CPU metric values - sysdev-root-001.tgz
|
|
|
97e5ec |
-
|
|
|
97e5ec |
kernel.pernode.cpu.guest
|
|
|
97e5ec |
- inst [0 or "node0"] value 20
|
|
|
97e5ec |
-
|
|
|
97e5ec |
+ "node0" 20
|
|
|
97e5ec |
kernel.pernode.cpu.guest_nice
|
|
|
97e5ec |
- inst [0 or "node0"] value 30
|
|
|
97e5ec |
-
|
|
|
97e5ec |
+ "node0" 30
|
|
|
97e5ec |
kernel.pernode.cpu.idle
|
|
|
97e5ec |
- inst [0 or "node0"] value 1146625930
|
|
|
97e5ec |
-
|
|
|
97e5ec |
+ "node0" 1146625930
|
|
|
97e5ec |
kernel.pernode.cpu.intr
|
|
|
97e5ec |
- inst [0 or "node0"] value 145870
|
|
|
97e5ec |
-
|
|
|
97e5ec |
+ "node0" 145870
|
|
|
97e5ec |
kernel.pernode.cpu.irq.hard
|
|
|
97e5ec |
- inst [0 or "node0"] value 55740
|
|
|
97e5ec |
-
|
|
|
97e5ec |
+ "node0" 55740
|
|
|
97e5ec |
kernel.pernode.cpu.irq.soft
|
|
|
97e5ec |
- inst [0 or "node0"] value 90130
|
|
|
97e5ec |
-
|
|
|
97e5ec |
+ "node0" 90130
|
|
|
97e5ec |
kernel.pernode.cpu.nice
|
|
|
97e5ec |
- inst [0 or "node0"] value 7180
|
|
|
97e5ec |
-
|
|
|
97e5ec |
+ "node0" 7180
|
|
|
97e5ec |
kernel.pernode.cpu.steal
|
|
|
97e5ec |
- inst [0 or "node0"] value 10
|
|
|
97e5ec |
-
|
|
|
97e5ec |
+ "node0" 10
|
|
|
97e5ec |
kernel.pernode.cpu.sys
|
|
|
97e5ec |
- inst [0 or "node0"] value 507650
|
|
|
97e5ec |
-
|
|
|
97e5ec |
+ "node0" 507650
|
|
|
97e5ec |
kernel.pernode.cpu.user
|
|
|
97e5ec |
- inst [0 or "node0"] value 849170
|
|
|
97e5ec |
-
|
|
|
97e5ec |
+ "node0" 849170
|
|
|
97e5ec |
kernel.pernode.cpu.vnice
|
|
|
97e5ec |
- inst [0 or "node0"] value 7150
|
|
|
97e5ec |
-
|
|
|
97e5ec |
+ "node0" 7150
|
|
|
97e5ec |
kernel.pernode.cpu.vuser
|
|
|
97e5ec |
- inst [0 or "node0"] value 849150
|
|
|
97e5ec |
+ "node0" 849150
|
|
|
97e5ec |
+kernel.pernode.cpu.wait.total
|
|
|
97e5ec |
+ "node0" 3320160
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+== done
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+== Checking hinv metric values - sysfs-numa-001.tgz
|
|
|
97e5ec |
+hinv.cpu.online
|
|
|
97e5ec |
+ "cpu0" 1
|
|
|
97e5ec |
+ "cpu1" 1
|
|
|
97e5ec |
+ "cpu2" 1
|
|
|
97e5ec |
+ "cpu3" 1
|
|
|
97e5ec |
+ "cpu4" 1
|
|
|
97e5ec |
+ "cpu5" 1
|
|
|
97e5ec |
+ "cpu6" 1
|
|
|
97e5ec |
+ "cpu7" 1
|
|
|
97e5ec |
+hinv.node.online
|
|
|
97e5ec |
+ "node0" 1
|
|
|
97e5ec |
+ "node1" 1
|
|
|
97e5ec |
+ "node2" 1
|
|
|
97e5ec |
+ "node3" 1
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+== done
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+== Checking aggregate CPU metric values - sysfs-numa-001.tgz
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+kernel.all.cpu.guest
|
|
|
97e5ec |
+ value 0
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+kernel.all.cpu.guest_nice
|
|
|
97e5ec |
+ value 0
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+kernel.all.cpu.idle
|
|
|
97e5ec |
+ value 657434330
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+kernel.all.cpu.intr
|
|
|
97e5ec |
+ value 368500
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+kernel.all.cpu.irq.hard
|
|
|
97e5ec |
+ value 252590
|
|
|
97e5ec |
|
|
|
97e5ec |
+kernel.all.cpu.irq.soft
|
|
|
97e5ec |
+ value 115910
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+kernel.all.cpu.nice
|
|
|
97e5ec |
+ value 41160
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+kernel.all.cpu.steal
|
|
|
97e5ec |
+ value 143770
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+kernel.all.cpu.sys
|
|
|
97e5ec |
+ value 1200190
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+kernel.all.cpu.user
|
|
|
97e5ec |
+ value 3065100
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+kernel.all.cpu.vnice
|
|
|
97e5ec |
+ value 41160
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+kernel.all.cpu.vuser
|
|
|
97e5ec |
+ value 3065100
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+kernel.all.cpu.wait.total
|
|
|
97e5ec |
+ value 979420
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+== done
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+== Checking per-CPU metric values - sysfs-numa-001.tgz
|
|
|
97e5ec |
+kernel.percpu.cpu.guest
|
|
|
97e5ec |
+ "cpu0" 0
|
|
|
97e5ec |
+ "cpu1" 0
|
|
|
97e5ec |
+ "cpu2" 0
|
|
|
97e5ec |
+ "cpu3" 0
|
|
|
97e5ec |
+ "cpu4" 0
|
|
|
97e5ec |
+ "cpu5" 0
|
|
|
97e5ec |
+ "cpu6" 0
|
|
|
97e5ec |
+ "cpu7" 0
|
|
|
97e5ec |
+kernel.percpu.cpu.guest_nice
|
|
|
97e5ec |
+ "cpu0" 0
|
|
|
97e5ec |
+ "cpu1" 0
|
|
|
97e5ec |
+ "cpu2" 0
|
|
|
97e5ec |
+ "cpu3" 0
|
|
|
97e5ec |
+ "cpu4" 0
|
|
|
97e5ec |
+ "cpu5" 0
|
|
|
97e5ec |
+ "cpu6" 0
|
|
|
97e5ec |
+ "cpu7" 0
|
|
|
97e5ec |
+kernel.percpu.cpu.idle
|
|
|
97e5ec |
+ "cpu0" 82176250
|
|
|
97e5ec |
+ "cpu1" 82246600
|
|
|
97e5ec |
+ "cpu2" 82152810
|
|
|
97e5ec |
+ "cpu3" 82283820
|
|
|
97e5ec |
+ "cpu4" 82098120
|
|
|
97e5ec |
+ "cpu5" 82009220
|
|
|
97e5ec |
+ "cpu6" 82276330
|
|
|
97e5ec |
+ "cpu7" 82191150
|
|
|
97e5ec |
+kernel.percpu.cpu.intr
|
|
|
97e5ec |
+ "cpu0" 31120
|
|
|
97e5ec |
+ "cpu1" 27570
|
|
|
97e5ec |
+ "cpu2" 65310
|
|
|
97e5ec |
+ "cpu3" 32900
|
|
|
97e5ec |
+ "cpu4" 30160
|
|
|
97e5ec |
+ "cpu5" 74500
|
|
|
97e5ec |
+ "cpu6" 69300
|
|
|
97e5ec |
+ "cpu7" 37570
|
|
|
97e5ec |
+kernel.percpu.cpu.irq.hard
|
|
|
97e5ec |
+ "cpu0" 18700
|
|
|
97e5ec |
+ "cpu1" 18690
|
|
|
97e5ec |
+ "cpu2" 42080
|
|
|
97e5ec |
+ "cpu3" 22020
|
|
|
97e5ec |
+ "cpu4" 19450
|
|
|
97e5ec |
+ "cpu5" 49820
|
|
|
97e5ec |
+ "cpu6" 57240
|
|
|
97e5ec |
+ "cpu7" 24550
|
|
|
97e5ec |
+kernel.percpu.cpu.irq.soft
|
|
|
97e5ec |
+ "cpu0" 12420
|
|
|
97e5ec |
+ "cpu1" 8880
|
|
|
97e5ec |
+ "cpu2" 23230
|
|
|
97e5ec |
+ "cpu3" 10880
|
|
|
97e5ec |
+ "cpu4" 10710
|
|
|
97e5ec |
+ "cpu5" 24680
|
|
|
97e5ec |
+ "cpu6" 12060
|
|
|
97e5ec |
+ "cpu7" 13020
|
|
|
97e5ec |
+kernel.percpu.cpu.nice
|
|
|
97e5ec |
+ "cpu0" 2920
|
|
|
97e5ec |
+ "cpu1" 3150
|
|
|
97e5ec |
+ "cpu2" 2220
|
|
|
97e5ec |
+ "cpu3" 4210
|
|
|
97e5ec |
+ "cpu4" 7660
|
|
|
97e5ec |
+ "cpu5" 9690
|
|
|
97e5ec |
+ "cpu6" 2090
|
|
|
97e5ec |
+ "cpu7" 9170
|
|
|
97e5ec |
+kernel.percpu.cpu.steal
|
|
|
97e5ec |
+ "cpu0" 16870
|
|
|
97e5ec |
+ "cpu1" 13990
|
|
|
97e5ec |
+ "cpu2" 26210
|
|
|
97e5ec |
+ "cpu3" 17510
|
|
|
97e5ec |
+ "cpu4" 15000
|
|
|
97e5ec |
+ "cpu5" 16110
|
|
|
97e5ec |
+ "cpu6" 18960
|
|
|
97e5ec |
+ "cpu7" 19090
|
|
|
97e5ec |
+kernel.percpu.cpu.sys
|
|
|
97e5ec |
+ "cpu0" 124510
|
|
|
97e5ec |
+ "cpu1" 156270
|
|
|
97e5ec |
+ "cpu2" 125800
|
|
|
97e5ec |
+ "cpu3" 133860
|
|
|
97e5ec |
+ "cpu4" 189540
|
|
|
97e5ec |
+ "cpu5" 192970
|
|
|
97e5ec |
+ "cpu6" 133390
|
|
|
97e5ec |
+ "cpu7" 143810
|
|
|
97e5ec |
+kernel.percpu.cpu.user
|
|
|
97e5ec |
+ "cpu0" 373300
|
|
|
97e5ec |
+ "cpu1" 349760
|
|
|
97e5ec |
+ "cpu2" 363240
|
|
|
97e5ec |
+ "cpu3" 369770
|
|
|
97e5ec |
+ "cpu4" 412040
|
|
|
97e5ec |
+ "cpu5" 419270
|
|
|
97e5ec |
+ "cpu6" 344030
|
|
|
97e5ec |
+ "cpu7" 433650
|
|
|
97e5ec |
+kernel.percpu.cpu.vnice
|
|
|
97e5ec |
+ "cpu0" 2920
|
|
|
97e5ec |
+ "cpu1" 3150
|
|
|
97e5ec |
+ "cpu2" 2220
|
|
|
97e5ec |
+ "cpu3" 4210
|
|
|
97e5ec |
+ "cpu4" 7660
|
|
|
97e5ec |
+ "cpu5" 9690
|
|
|
97e5ec |
+ "cpu6" 2090
|
|
|
97e5ec |
+ "cpu7" 9170
|
|
|
97e5ec |
+kernel.percpu.cpu.vuser
|
|
|
97e5ec |
+ "cpu0" 373300
|
|
|
97e5ec |
+ "cpu1" 349760
|
|
|
97e5ec |
+ "cpu2" 363240
|
|
|
97e5ec |
+ "cpu3" 369770
|
|
|
97e5ec |
+ "cpu4" 412040
|
|
|
97e5ec |
+ "cpu5" 419270
|
|
|
97e5ec |
+ "cpu6" 344030
|
|
|
97e5ec |
+ "cpu7" 433650
|
|
|
97e5ec |
+kernel.percpu.cpu.wait.total
|
|
|
97e5ec |
+ "cpu0" 179200
|
|
|
97e5ec |
+ "cpu1" 105950
|
|
|
97e5ec |
+ "cpu2" 88480
|
|
|
97e5ec |
+ "cpu3" 79880
|
|
|
97e5ec |
+ "cpu4" 166720
|
|
|
97e5ec |
+ "cpu5" 196030
|
|
|
97e5ec |
+ "cpu6" 78000
|
|
|
97e5ec |
+ "cpu7" 85130
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+== done
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+== Checking per-node CPU metric values - sysfs-numa-001.tgz
|
|
|
97e5ec |
+kernel.pernode.cpu.guest
|
|
|
97e5ec |
+ "node0" 0
|
|
|
97e5ec |
+ "node1" 0
|
|
|
97e5ec |
+ "node2" 0
|
|
|
97e5ec |
+ "node3" 0
|
|
|
97e5ec |
+kernel.pernode.cpu.guest_nice
|
|
|
97e5ec |
+ "node0" 0
|
|
|
97e5ec |
+ "node1" 0
|
|
|
97e5ec |
+ "node2" 0
|
|
|
97e5ec |
+ "node3" 0
|
|
|
97e5ec |
+kernel.pernode.cpu.idle
|
|
|
97e5ec |
+ "node0" 164422850
|
|
|
97e5ec |
+ "node1" 164436630
|
|
|
97e5ec |
+ "node2" 164107340
|
|
|
97e5ec |
+ "node3" 164467480
|
|
|
97e5ec |
+kernel.pernode.cpu.intr
|
|
|
97e5ec |
+ "node0" 58690
|
|
|
97e5ec |
+ "node1" 98210
|
|
|
97e5ec |
+ "node2" 104660
|
|
|
97e5ec |
+ "node3" 106870
|
|
|
97e5ec |
+kernel.pernode.cpu.irq.hard
|
|
|
97e5ec |
+ "node0" 37390
|
|
|
97e5ec |
+ "node1" 64100
|
|
|
97e5ec |
+ "node2" 69270
|
|
|
97e5ec |
+ "node3" 81790
|
|
|
97e5ec |
+kernel.pernode.cpu.irq.soft
|
|
|
97e5ec |
+ "node0" 21300
|
|
|
97e5ec |
+ "node1" 34110
|
|
|
97e5ec |
+ "node2" 35390
|
|
|
97e5ec |
+ "node3" 25080
|
|
|
97e5ec |
+kernel.pernode.cpu.nice
|
|
|
97e5ec |
+ "node0" 6070
|
|
|
97e5ec |
+ "node1" 6430
|
|
|
97e5ec |
+ "node2" 17350
|
|
|
97e5ec |
+ "node3" 11260
|
|
|
97e5ec |
+kernel.pernode.cpu.steal
|
|
|
97e5ec |
+ "node0" 30860
|
|
|
97e5ec |
+ "node1" 43720
|
|
|
97e5ec |
+ "node2" 31110
|
|
|
97e5ec |
+ "node3" 38050
|
|
|
97e5ec |
+kernel.pernode.cpu.sys
|
|
|
97e5ec |
+ "node0" 280780
|
|
|
97e5ec |
+ "node1" 259660
|
|
|
97e5ec |
+ "node2" 382510
|
|
|
97e5ec |
+ "node3" 277200
|
|
|
97e5ec |
+kernel.pernode.cpu.user
|
|
|
97e5ec |
+ "node0" 723060
|
|
|
97e5ec |
+ "node1" 733010
|
|
|
97e5ec |
+ "node2" 831310
|
|
|
97e5ec |
+ "node3" 777680
|
|
|
97e5ec |
+kernel.pernode.cpu.vnice
|
|
|
97e5ec |
+ "node0" 6070
|
|
|
97e5ec |
+ "node1" 6430
|
|
|
97e5ec |
+ "node2" 17350
|
|
|
97e5ec |
+ "node3" 11260
|
|
|
97e5ec |
+kernel.pernode.cpu.vuser
|
|
|
97e5ec |
+ "node0" 723060
|
|
|
97e5ec |
+ "node1" 733010
|
|
|
97e5ec |
+ "node2" 831310
|
|
|
97e5ec |
+ "node3" 777680
|
|
|
97e5ec |
kernel.pernode.cpu.wait.total
|
|
|
97e5ec |
- inst [0 or "node0"] value 3320160
|
|
|
97e5ec |
+ "node0" 285150
|
|
|
97e5ec |
+ "node1" 168360
|
|
|
97e5ec |
+ "node2" 362750
|
|
|
97e5ec |
+ "node3" 163130
|
|
|
97e5ec |
|
|
|
97e5ec |
== done
|
|
|
97e5ec |
|
|
|
97e5ec |
diff -Naurp pcp-4.3.2.wip/qa/group pcp-4.3.2/qa/group
|
|
|
97e5ec |
--- pcp-4.3.2.wip/qa/group 2020-02-17 12:19:02.743341620 +1100
|
|
|
97e5ec |
+++ pcp-4.3.2/qa/group 2020-02-17 17:28:43.161140088 +1100
|
|
|
97e5ec |
@@ -1651,6 +1651,7 @@ BAD
|
|
|
97e5ec |
1388 pmwebd local
|
|
|
97e5ec |
1389 pmwebd local
|
|
|
97e5ec |
1390 atop local
|
|
|
97e5ec |
+1393 pmda.linux local
|
|
|
97e5ec |
1395 pmda.prometheus local python
|
|
|
97e5ec |
1396 pcp python pidstat local BAD @vm34
|
|
|
97e5ec |
1397 pmda.smart local valgrind
|
|
|
97e5ec |
diff -Naurp pcp-4.3.2.wip/src/pmdas/linux/linux.h pcp-4.3.2/src/pmdas/linux/linux.h
|
|
|
97e5ec |
--- pcp-4.3.2.wip/src/pmdas/linux/linux.h 2019-01-25 11:25:19.000000000 +1100
|
|
|
97e5ec |
+++ pcp-4.3.2/src/pmdas/linux/linux.h 2020-02-17 17:28:43.155140157 +1100
|
|
|
97e5ec |
@@ -277,20 +277,23 @@ typedef struct {
|
|
|
97e5ec |
} softnet_t;
|
|
|
97e5ec |
|
|
|
97e5ec |
typedef struct {
|
|
|
97e5ec |
- unsigned int cpuid;
|
|
|
97e5ec |
- unsigned int nodeid;
|
|
|
97e5ec |
+ unsigned int nodeid; /* node%d instance name */
|
|
|
97e5ec |
+ unsigned int instid; /* internal instance id */
|
|
|
97e5ec |
+ cpuacct_t stat;
|
|
|
97e5ec |
+ struct linux_table *meminfo;
|
|
|
97e5ec |
+ struct linux_table *memstat;
|
|
|
97e5ec |
+ double bandwidth;
|
|
|
97e5ec |
+} pernode_t;
|
|
|
97e5ec |
+
|
|
|
97e5ec |
+typedef struct {
|
|
|
97e5ec |
+ unsigned int cpuid; /* cpu%d instance name */
|
|
|
97e5ec |
+ unsigned int instid; /* internal instance id */
|
|
|
97e5ec |
+ pernode_t *node;
|
|
|
97e5ec |
char *name;
|
|
|
97e5ec |
cpuacct_t stat;
|
|
|
97e5ec |
cpuinfo_t info;
|
|
|
97e5ec |
softnet_t *softnet;
|
|
|
97e5ec |
} percpu_t;
|
|
|
97e5ec |
|
|
|
97e5ec |
-typedef struct {
|
|
|
97e5ec |
- unsigned int nodeid;
|
|
|
97e5ec |
- cpuacct_t stat;
|
|
|
97e5ec |
- struct linux_table *meminfo;
|
|
|
97e5ec |
- struct linux_table *memstat;
|
|
|
97e5ec |
- double bandwidth;
|
|
|
97e5ec |
-} pernode_t;
|
|
|
97e5ec |
|
|
|
97e5ec |
#endif /* LINUX_PMDA_H */
|
|
|
97e5ec |
diff -Naurp pcp-4.3.2.wip/src/pmdas/linux/numa_meminfo.c pcp-4.3.2/src/pmdas/linux/numa_meminfo.c
|
|
|
97e5ec |
--- pcp-4.3.2.wip/src/pmdas/linux/numa_meminfo.c 2018-03-05 18:14:58.000000000 +1100
|
|
|
97e5ec |
+++ pcp-4.3.2/src/pmdas/linux/numa_meminfo.c 2020-02-17 17:28:43.152140192 +1100
|
|
|
97e5ec |
@@ -113,14 +113,14 @@ refresh_numa_meminfo(void)
|
|
|
97e5ec |
continue;
|
|
|
97e5ec |
|
|
|
97e5ec |
pmsprintf(buf, sizeof(buf), "%s/sys/devices/system/node/node%d/meminfo",
|
|
|
97e5ec |
- linux_statspath, i);
|
|
|
97e5ec |
+ linux_statspath, np->nodeid);
|
|
|
97e5ec |
if ((fp = fopen(buf, "r")) != NULL) {
|
|
|
97e5ec |
linux_table_scan(fp, np->meminfo);
|
|
|
97e5ec |
fclose(fp);
|
|
|
97e5ec |
}
|
|
|
97e5ec |
|
|
|
97e5ec |
pmsprintf(buf, sizeof(buf), "%s/sys/devices/system/node/node%d/numastat",
|
|
|
97e5ec |
- linux_statspath, i);
|
|
|
97e5ec |
+ linux_statspath, np->nodeid);
|
|
|
97e5ec |
if ((fp = fopen(buf, "r")) != NULL) {
|
|
|
97e5ec |
linux_table_scan(fp, np->memstat);
|
|
|
97e5ec |
fclose(fp);
|
|
|
97e5ec |
diff -Naurp pcp-4.3.2.wip/src/pmdas/linux/pmda.c pcp-4.3.2/src/pmdas/linux/pmda.c
|
|
|
97e5ec |
--- pcp-4.3.2.wip/src/pmdas/linux/pmda.c 2020-02-17 12:19:15.146197738 +1100
|
|
|
97e5ec |
+++ pcp-4.3.2/src/pmdas/linux/pmda.c 2020-02-17 17:28:43.156140146 +1100
|
|
|
97e5ec |
@@ -6098,6 +6098,7 @@ linux_fetchCallBack(pmdaMetric *mdesc, u
|
|
|
97e5ec |
net_addr_t *addrp;
|
|
|
97e5ec |
net_interface_t *netip;
|
|
|
97e5ec |
scsi_entry_t *scsi_entry;
|
|
|
97e5ec |
+ char *name;
|
|
|
97e5ec |
|
|
|
97e5ec |
if (mdesc->m_user != NULL) {
|
|
|
97e5ec |
/*
|
|
|
97e5ec |
@@ -7306,7 +7307,7 @@ linux_fetchCallBack(pmdaMetric *mdesc, u
|
|
|
97e5ec |
atom->cp = get_machine_info(kernel_uname.machine);
|
|
|
97e5ec |
break;
|
|
|
97e5ec |
case 8: /* hinv.map.cpu_node */
|
|
|
97e5ec |
- atom->ul = cp->nodeid;
|
|
|
97e5ec |
+ atom->ul = cp->node->nodeid;
|
|
|
97e5ec |
break;
|
|
|
97e5ec |
case 9: /* hinv.cpu.model_name */
|
|
|
97e5ec |
if ((i = cp->info.model_name) < 0)
|
|
|
97e5ec |
@@ -7333,14 +7334,14 @@ linux_fetchCallBack(pmdaMetric *mdesc, u
|
|
|
97e5ec |
case CLUSTER_SYSFS_DEVICES:
|
|
|
97e5ec |
switch (item) {
|
|
|
97e5ec |
case 0: /* hinv.cpu.online */
|
|
|
97e5ec |
- if (pmdaCacheLookup(INDOM(CPU_INDOM), inst, NULL, NULL) < 0)
|
|
|
97e5ec |
+ if (pmdaCacheLookup(INDOM(CPU_INDOM), inst, &name, NULL) < 0)
|
|
|
97e5ec |
return PM_ERR_INST;
|
|
|
97e5ec |
- atom->ul = refresh_sysfs_online(inst, "cpu");
|
|
|
97e5ec |
+ atom->ul = refresh_sysfs_online(name, "cpu");
|
|
|
97e5ec |
break;
|
|
|
97e5ec |
case 1: /* hinv.node.online */
|
|
|
97e5ec |
- if (pmdaCacheLookup(INDOM(NODE_INDOM), inst, NULL, NULL) < 0)
|
|
|
97e5ec |
+ if (pmdaCacheLookup(INDOM(NODE_INDOM), inst, &name, NULL) < 0)
|
|
|
97e5ec |
return PM_ERR_INST;
|
|
|
97e5ec |
- atom->ul = refresh_sysfs_online(inst, "node");
|
|
|
97e5ec |
+ atom->ul = refresh_sysfs_online(name, "node");
|
|
|
97e5ec |
break;
|
|
|
97e5ec |
|
|
|
97e5ec |
default:
|
|
|
97e5ec |
diff -Naurp pcp-4.3.2.wip/src/pmdas/linux/proc_cpuinfo.c pcp-4.3.2/src/pmdas/linux/proc_cpuinfo.c
|
|
|
97e5ec |
--- pcp-4.3.2.wip/src/pmdas/linux/proc_cpuinfo.c 2018-03-05 18:14:58.000000000 +1100
|
|
|
97e5ec |
+++ pcp-4.3.2/src/pmdas/linux/proc_cpuinfo.c 2020-02-17 17:28:43.156140146 +1100
|
|
|
97e5ec |
@@ -28,7 +28,7 @@
|
|
|
97e5ec |
* CPU or NUMA node ("node" parameter).
|
|
|
97e5ec |
*/
|
|
|
97e5ec |
int
|
|
|
97e5ec |
-refresh_sysfs_online(unsigned int node_num, const char *node)
|
|
|
97e5ec |
+refresh_sysfs_online(char *instname, const char *node_or_cpu)
|
|
|
97e5ec |
{
|
|
|
97e5ec |
const char *sysfs_path = "sys/devices/system";
|
|
|
97e5ec |
char path[MAXPATHLEN];
|
|
|
97e5ec |
@@ -36,8 +36,8 @@ refresh_sysfs_online(unsigned int node_n
|
|
|
97e5ec |
FILE *fp;
|
|
|
97e5ec |
int n;
|
|
|
97e5ec |
|
|
|
97e5ec |
- pmsprintf(path, sizeof(path), "%s/%s/%s/%s%u/online",
|
|
|
97e5ec |
- linux_statspath, sysfs_path, node, node, node_num);
|
|
|
97e5ec |
+ pmsprintf(path, sizeof(path), "%s/%s/%s/%s/online",
|
|
|
97e5ec |
+ linux_statspath, sysfs_path, node_or_cpu, instname);
|
|
|
97e5ec |
if ((fp = fopen(path, "r")) == NULL)
|
|
|
97e5ec |
return 1;
|
|
|
97e5ec |
n = fscanf(fp, "%u", &online);
|
|
|
97e5ec |
diff -Naurp pcp-4.3.2.wip/src/pmdas/linux/proc_cpuinfo.h pcp-4.3.2/src/pmdas/linux/proc_cpuinfo.h
|
|
|
97e5ec |
--- pcp-4.3.2.wip/src/pmdas/linux/proc_cpuinfo.h 2017-11-30 12:48:48.000000000 +1100
|
|
|
97e5ec |
+++ pcp-4.3.2/src/pmdas/linux/proc_cpuinfo.h 2020-02-17 17:28:43.156140146 +1100
|
|
|
97e5ec |
@@ -19,4 +19,4 @@
|
|
|
97e5ec |
*/
|
|
|
97e5ec |
|
|
|
97e5ec |
extern int refresh_proc_cpuinfo(void);
|
|
|
97e5ec |
-extern int refresh_sysfs_online(unsigned int, const char *);
|
|
|
97e5ec |
+extern int refresh_sysfs_online(char *, const char *);
|
|
|
97e5ec |
diff -Naurp pcp-4.3.2.wip/src/pmdas/linux/proc_stat.c pcp-4.3.2/src/pmdas/linux/proc_stat.c
|
|
|
97e5ec |
--- pcp-4.3.2.wip/src/pmdas/linux/proc_stat.c 2018-09-18 16:41:15.000000000 +1000
|
|
|
97e5ec |
+++ pcp-4.3.2/src/pmdas/linux/proc_stat.c 2020-02-17 17:28:43.157140134 +1100
|
|
|
97e5ec |
@@ -60,7 +60,7 @@ setup_cpu_info(cpuinfo_t *cip)
|
|
|
97e5ec |
}
|
|
|
97e5ec |
|
|
|
97e5ec |
static void
|
|
|
97e5ec |
-cpu_add(pmInDom cpus, unsigned int cpuid, unsigned int nodeid)
|
|
|
97e5ec |
+cpu_add(pmInDom cpus, unsigned int cpuid, pernode_t *np)
|
|
|
97e5ec |
{
|
|
|
97e5ec |
percpu_t *cpu;
|
|
|
97e5ec |
char name[64];
|
|
|
97e5ec |
@@ -68,23 +68,24 @@ cpu_add(pmInDom cpus, unsigned int cpuid
|
|
|
97e5ec |
if ((cpu = (percpu_t *)calloc(1, sizeof(percpu_t))) == NULL)
|
|
|
97e5ec |
return;
|
|
|
97e5ec |
cpu->cpuid = cpuid;
|
|
|
97e5ec |
- cpu->nodeid = nodeid;
|
|
|
97e5ec |
+ cpu->node = np;
|
|
|
97e5ec |
setup_cpu_info(&cpu->info);
|
|
|
97e5ec |
pmsprintf(name, sizeof(name)-1, "cpu%u", cpuid);
|
|
|
97e5ec |
- pmdaCacheStore(cpus, PMDA_CACHE_ADD, name, (void*)cpu);
|
|
|
97e5ec |
+ cpu->instid = pmdaCacheStore(cpus, PMDA_CACHE_ADD, name, (void*)cpu);
|
|
|
97e5ec |
}
|
|
|
97e5ec |
|
|
|
97e5ec |
-static void
|
|
|
97e5ec |
+static pernode_t *
|
|
|
97e5ec |
node_add(pmInDom nodes, unsigned int nodeid)
|
|
|
97e5ec |
{
|
|
|
97e5ec |
pernode_t *node;
|
|
|
97e5ec |
char name[64];
|
|
|
97e5ec |
|
|
|
97e5ec |
if ((node = (pernode_t *)calloc(1, sizeof(pernode_t))) == NULL)
|
|
|
97e5ec |
- return;
|
|
|
97e5ec |
+ return NULL;
|
|
|
97e5ec |
node->nodeid = nodeid;
|
|
|
97e5ec |
pmsprintf(name, sizeof(name)-1, "node%u", nodeid);
|
|
|
97e5ec |
- pmdaCacheStore(nodes, PMDA_CACHE_ADD, name, (void*)node);
|
|
|
97e5ec |
+ node->instid = pmdaCacheStore(nodes, PMDA_CACHE_ADD, name, (void*)node);
|
|
|
97e5ec |
+ return node;
|
|
|
97e5ec |
}
|
|
|
97e5ec |
|
|
|
97e5ec |
void
|
|
|
97e5ec |
@@ -98,6 +99,7 @@ cpu_node_setup(void)
|
|
|
97e5ec |
DIR *cpu_dir;
|
|
|
97e5ec |
int i, count;
|
|
|
97e5ec |
char path[MAXPATHLEN];
|
|
|
97e5ec |
+ pernode_t *np;
|
|
|
97e5ec |
static int setup;
|
|
|
97e5ec |
|
|
|
97e5ec |
if (setup)
|
|
|
97e5ec |
@@ -112,16 +114,16 @@ cpu_node_setup(void)
|
|
|
97e5ec |
count = scandir(path, &node_files, NULL, versionsort);
|
|
|
97e5ec |
if (!node_files || (linux_test_mode & LINUX_TEST_NCPUS)) {
|
|
|
97e5ec |
/* QA mode or no sysfs support, assume single NUMA node */
|
|
|
97e5ec |
- node_add(nodes, 0); /* default to just node zero */
|
|
|
97e5ec |
+ np = node_add(nodes, 0); /* default to just node zero */
|
|
|
97e5ec |
for (cpu = 0; cpu < _pm_ncpus; cpu++)
|
|
|
97e5ec |
- cpu_add(cpus, cpu, 0); /* all in node zero */
|
|
|
97e5ec |
+ cpu_add(cpus, cpu, np); /* all in node zero */
|
|
|
97e5ec |
goto done;
|
|
|
97e5ec |
}
|
|
|
97e5ec |
|
|
|
97e5ec |
for (i = 0; i < count; i++) {
|
|
|
97e5ec |
if (sscanf(node_files[i]->d_name, "node%u", &node) != 1)
|
|
|
97e5ec |
continue;
|
|
|
97e5ec |
- node_add(nodes, node);
|
|
|
97e5ec |
+ np = node_add(nodes, node);
|
|
|
97e5ec |
pmsprintf(path, sizeof(path), "%s/%s/%s",
|
|
|
97e5ec |
linux_statspath, node_path, node_files[i]->d_name);
|
|
|
97e5ec |
if ((cpu_dir = opendir(path)) == NULL)
|
|
|
97e5ec |
@@ -129,7 +131,7 @@ cpu_node_setup(void)
|
|
|
97e5ec |
while ((cpu_entry = readdir(cpu_dir)) != NULL) {
|
|
|
97e5ec |
if (sscanf(cpu_entry->d_name, "cpu%u", &cpu) != 1)
|
|
|
97e5ec |
continue;
|
|
|
97e5ec |
- cpu_add(cpus, cpu, node);
|
|
|
97e5ec |
+ cpu_add(cpus, cpu, np);
|
|
|
97e5ec |
}
|
|
|
97e5ec |
closedir(cpu_dir);
|
|
|
97e5ec |
}
|
|
|
97e5ec |
@@ -172,6 +174,7 @@ refresh_proc_stat(proc_stat_t *proc_stat
|
|
|
97e5ec |
percpu_t *cp;
|
|
|
97e5ec |
pmInDom cpus, nodes;
|
|
|
97e5ec |
char buf[MAXPATHLEN], *name, *sp, **bp;
|
|
|
97e5ec |
+ char cpuname[32];
|
|
|
97e5ec |
int n = 0, i, size;
|
|
|
97e5ec |
|
|
|
97e5ec |
static int fd = -1; /* kept open until exit(), unless testing */
|
|
|
97e5ec |
@@ -282,7 +285,8 @@ refresh_proc_stat(proc_stat_t *proc_stat
|
|
|
97e5ec |
cp = NULL;
|
|
|
97e5ec |
np = NULL;
|
|
|
97e5ec |
i = atoi(&bufindex[n][3]); /* extract CPU identifier */
|
|
|
97e5ec |
- if (pmdaCacheLookup(cpus, i, &name, (void **)&cp) < 0 || !cp)
|
|
|
97e5ec |
+ pmsprintf(cpuname, sizeof(cpuname), "cpu%u", i); /* instance name */
|
|
|
97e5ec |
+ if (pmdaCacheLookupName(cpus, cpuname, &i, (void **)&cp) < 0 || !cp)
|
|
|
97e5ec |
continue;
|
|
|
97e5ec |
memset(&cp->stat, 0, sizeof(cp->stat));
|
|
|
97e5ec |
sscanf(bufindex[n], PERCPU_FMT, &i,
|
|
|
97e5ec |
@@ -290,10 +294,10 @@ refresh_proc_stat(proc_stat_t *proc_stat
|
|
|
97e5ec |
&cp->stat.idle, &cp->stat.wait, &cp->stat.irq,
|
|
|
97e5ec |
&cp->stat.sirq, &cp->stat.steal, &cp->stat.guest,
|
|
|
97e5ec |
&cp->stat.guest_nice);
|
|
|
97e5ec |
- pmdaCacheStore(cpus, PMDA_CACHE_ADD, name, (void *)cp);
|
|
|
97e5ec |
+ pmdaCacheStore(cpus, PMDA_CACHE_ADD, cpuname, (void *)cp);
|
|
|
97e5ec |
|
|
|
97e5ec |
/* update per-node aggregate CPU utilisation stats as well */
|
|
|
97e5ec |
- if (pmdaCacheLookup(nodes, cp->nodeid, NULL, (void **)&np) < 0)
|
|
|
97e5ec |
+ if (pmdaCacheLookup(nodes, cp->node->instid, NULL, (void **)&np) < 0 || !np)
|
|
|
97e5ec |
continue;
|
|
|
97e5ec |
np->stat.user += cp->stat.user;
|
|
|
97e5ec |
np->stat.nice += cp->stat.nice;
|