Pat, I use something such like the following awk script to parse the
data:

{
        if ((NF == 5) && ($4 != "PID")) {
                total[$4] += $1
                usr[$4] += $2
                sys[$4] += $3
                cmd[$4] = $5
        }
        if ((NF == 5) && ($4 == "PID"))
                n++
}
END {
        for (i in total)
                printf "%10.2f %10.2f %10.2f %s\n", total[i], usr[i], sys[i], 
cmd[i]
}

awk -f cpustat.awk < cpustat.log  | sort -nr | head -20

  20400.32   19276.85    1123.57 /usr/lib/upower/upowerd
   3503.49    2570.89     932.58 unity8
   3243.72     870.17    2373.55 cpustat
   2911.39    1710.02    1201.39 /lib/systemd/systemd-udevd
   2207.87     182.06    2025.80 /system/bin/mpdecision
   2133.32    2012.62     120.71 dbus-daemon
   2125.58    1751.23     374.36 messaging-app
   1280.77       0.00    1280.77 [mmcqd/0]
    675.34       0.00     675.34 [jbd2/mmcblk0p23]
    449.83     159.82     289.96 unity-system-compositor
    412.58     312.51     100.07 NetworkManager
    372.17     206.53     165.64 init
    355.62     259.23      96.40 /sbin/init
    323.53       0.00     323.53 [MC_Thread]
    315.88     278.62      37.27 /usr/bin/powerd
    310.32     268.82      41.50 
/usr/lib/arm-linux-gnueabihf/indicator-power/indicator-power-service
    267.14     237.61      29.54 maliit-server
    228.89      12.30     216.59 /sbin/healthd
    200.54     169.84      30.70 
/custom/vendor/here/location-provider/bin/arm-linux-gnueabihf/posclientd
    182.56      14.76     167.79 /init

So it does seem that upowerd is consuming the most cycles.  Attached is
a spreadsheet and a graph from the raw stats

** Attachment added: "upowerd-cpu-utilisation.ods"
   
https://bugs.launchpad.net/ubuntu/+source/powerd/+bug/1372413/+attachment/4315479/+files/upowerd-cpu-utilisation.ods

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1372413

Title:
  Extensive battery drain on RTM

To manage notifications about this bug go to:
https://bugs.launchpad.net/canonical-devices-system-image/+bug/1372413/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to