pcp
[Top] [All Lists]

pcp updates: fix kernel.pernode.cpu metrics on single CPU systems

To: pcp@xxxxxxxxxxx
Subject: pcp updates: fix kernel.pernode.cpu metrics on single CPU systems
From: Mark Goodwin <mgoodwin@xxxxxxxxxx>
Date: Thu, 01 Jan 2015 17:51:11 +1100
Cc: "shirshendu@xxxxxxx >> Shirshendu Chakrabarti" <shirshendu@xxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0
Fix for the kernel.pernode.cpu problem reported by Shirshendu Chakrabarti
where kernel.pernode.cpu.user was incorrectly zero on single CPU systems.
Plus a new QA test to verify the fix.

Changes committed to git://git.performancecopilot.org/markgw/pcp/pcp.git dev

commit 4ea1e0b7758660514fcae3117112bf1db4818ba0
Author: Mark Goodwin <mgoodwin@xxxxxxxxxx>
Date:   Thu Jan 1 16:47:39 2015 +1100

    Fix kernel.pernode.cpu.* for systems with only one CPU.

    On systems with only one CPU, the Linux PMDA re-uses kernel.all.cpu values
    for the kernel.percpu.cpu values (since there is only one CPU the values are
    the same), but neglected to also do this for the kernel.pernode.cpu values.
    Hence the per-node metrics were always zero on single CPU systems.

    Also, don't use /sys/devices/system/node/node[0-9]*/cpumap to determine the
    cpu:node mapping. The cpumap bitmap has different syntax depending on the
    kernel config options, e.g. an AWS kernel exports a different cpumap syntax
    to a Fedora or RHEL kernel. Instead, just use the cpu symlinks for each node
    (/sys/devices/system/node/node[0-9]*/cpu[0-9]*) to determine the mapping.

        modified:   src/pmdas/linux/pmda.c
        modified:   src/pmdas/linux/proc_cpuinfo.c
        modified:   src/pmdas/linux/proc_stat.c

commit 76dabf032b90c794fed3323e09ca8598571b6a03
Author: Mark Goodwin <mgoodwin@xxxxxxxxxx>
Date:   Thu Jan 1 17:42:00 2015 +1100

    QA to check kernel.pernode.cpu metrics on single CPU systems.

        new file:   qa/873
        new file:   qa/873.out
        modified:   qa/group

<Prev in Thread] Current Thread [Next in Thread>