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 Touch seeded packages, which is subscribed to powerd in Ubuntu. https://bugs.launchpad.net/bugs/1372413 Title: Extensive battery drain on RTM Status in the base for Ubuntu mobile products: In Progress Status in powerd package in Ubuntu: Confirmed Bug description: Mako, RTM 1 Since upgrading to RTM the battery life is really poor. What used to be a battery drain of 5-10% per hour (which is still high) is now 10-15% per hour. Sometimes the phone runs really hot, so there seem to be something going on in the background that is consuming power. I mostly have bluetooth, GPS (which isn't always working), wifi and cellular on, but that's no difference from when I was running 'devel- proposed' with MultiROM with much less battery consumption. As an example, I started with a full charge at 7am. After some web surfing (<15 mins) and watching a couple of youtube videos (on wifi) battery was down to 66% at 9:15. That's 34% in just over two hours! I recharged again before lunch and had the phone idle until coming back 1 hour and 45 mins later to find only 75% of battery left, this time without the phone running particularly hot. To manage notifications about this bug go to: https://bugs.launchpad.net/canonical-devices-system-image/+bug/1372413/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp