Commit graph

6 commits

Author SHA1 Message Date
Jin Qian
9c54268dce storaged: call getNamesForUids to get uid names
Calls getNamesForUids when one of the two conditions are true.
1. entries for new uids are reported from io stats
2. previous getNamesForUids failed

Bug: 62805090
Merged-In: I120b81e1857b2aa0a90d0fb85c8d749e985df78e
Change-Id: I120b81e1857b2aa0a90d0fb85c8d749e985df78e
2017-08-08 20:59:03 +00:00
Jin Qian
4fc338e60b storaged: rewrite emmc info class
Test: adb logcat -d -b events | grep storaged_emmc_info
Bug: 36228467
Change-Id: Ib799e60ed65661a9fb99be8ad4c930f547339975
2017-03-16 16:12:55 -07:00
Jin Qian
821eb0d007 storaged: fix selinux dac_override denial
Bug: 35250057
Bug: 34198239
Change-Id: I18592d298765dc46ab05f25ae2ced0a5eddacc8b
2017-02-10 18:33:13 -08:00
Jin Qian
5b962c6dbd storaged: account on/off charger per uid io usage
Register a listener to batteryproperties service for charger stats
change.

Aggregate IO usage based on charger stats in a collection window.

Bug: 33086174
Bug: 34198239
Change-Id: Ibe306c9c3ff8b8ada6be034aa8511268cb9a9b1c
2017-02-07 21:41:15 +00:00
Jin Qian
bcd6e3b9d9 storaged: monitor per-uid IO usage
Add uid_monitor class to query /proc/uid_io/stats periodically.
Add a log tag to record any UID that exceeds IO threshold.

Test: adb shell storaged -u
Bug: 34198239
Change-Id: I53568c30dbefe2f4bdb18054d3dedb30b4133d8b
2017-01-24 14:45:35 -08:00
ynwang
62cb372279 storaged: add storaged native daemon
Storaged periodically checks the devices' disk stats and eMMC lifetime.
This information is logged to both the kernel and event log. By event
logging, the data can be aggregated by the checkin service and then
sent to Sawmill.

It also periodically traverses /proc/[pid], maintaining the I/O usage of
all tasks (all sampled tasks). The task I/O data can be reported using
the --dump option.

Storaged is booted when the device boots up and requires the permission
for reading /proc/diskstats, /proc/[pid]/io and debugfs(eMMC ext_csd).
For detailed description, please refer to go/storaged.

Bug: 28826771
Change-Id: I774b1a44cc30092bac1bfcbc08bf487295e7cfed
2016-12-15 15:56:33 -08:00