New format:
starttime1,endtime1
records
[starttime2],endtime2
records
Note starttime2 is skipped if it equals with endtime1.
Bug: 34198239
Change-Id: I8a88a3bf1d50e065510d3ab123422d564fb6159f
When UID is uninstalled and reinstalled, IO usage of the UID is
reset. This caused problem in accounting since it assumes IO usage
is always increasing for the same UID. In such case, use the current
usage instead of negative delta for accounting.
Bug: 34198239
Change-Id: I74661feccc05d19ba8a0feff8a2e38d72c7d1465
This option forces storaged to generate io usage report since last
report. This is for testing purpose so that we can run some app and
get the app's IO usage right away instead of waiting an hour for next
report.
Bug: 34198239
Bug: 34845096
Change-Id: I9cd217df37a9b6c8f383eb25d41602e8e8c8f9ba
--threshold <bytes>
This skips io usage not greater than <bytes> for current report.
--time_window <secs>
This sets uid_io collection interval to <secs> for future reports.
The new interval will be ignore if it's less than 5 minutes.
Test: adb shell dumpsys --threshold 4096 --time_window 300
Bug: 33086174
Bug: 34198239
Change-Id: I723c0850fa504a113da0a14945c4fbc64ea47659
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
It's an error to pass open O_CREAT without giving it mode bits:
https://linux.die.net/man/3/open
Bug: 32073964
Test: Compiles with clang FORTIFY.
Change-Id: Iaa78c3003ed960e1ffe7e56623dba33db4e17443
1. Add a flag to report IO usage for last N hours.
2. Change interval back to 1 hour so that we have finer usage data.
3. Don't clear events after dumpsys call. Use a max buffer limit.
4. Clear old events if they're more than 5 days old or when no room
for new events.
5. Skip uids with no IO usage to save space.
6. Replace interval with a timestamp in event entry.
Test: adb shell dumpsys storaged --hours 2
Bug: 34198239
Bug: 33086174
Change-Id: I66e8fb6ec155584115fab817c3ed2c78e637ac40
Increase reporting interval to once per day.
Report foreground and background I/O usage.
Remove threshold to report all usages.
Test: adb shell dumpsys storaged
Bug: 34198239
Bug: 33086174
Change-Id: I3b4ea8200bdb8becb5b441051f52477bbd1f3ccf
Skips event time check if failed to get start time.
Use ratelimited logging when gettime fails.
Test: adb shell setprop ro.storaged.event.perf_check 10000
Bug: 34630954
Bug: 34198239
Change-Id: I168ef3b4e4ed27257ec76373219c6214a7b7b2ed
Write alerts to an internal buffer and flush to dumpsys
when dump is called.
Test: adb shell dumpsys storaged
Bug: 33086174
Bug: 34198239
Change-Id: I39e5dfd9c4e9a5f3ec3d74356b28e9ddf77f6624
Add properties to control event intervals.
Add a property to check time spent in event loop.
Bug: 34612341
Bug: 34198239
Change-Id: I01f64c84e17153377ece7ae530be106e3f55287e
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
Don't log disk_stats and emmc_info to system buffer since they
are already uploaded to events buffer.
Use DEBUG flag to control disk perf logging.
Bug: 34331490
Change-Id: I5f628a1a46e1f72588da064523da69737bd67dcb
set default polling internal to 1 minute
set default disk stats publish to 1 hour
set default emmc info publish to 1 day
Bug: 34331490
Change-Id: Ifd86ddf9d826fb252de9dc8d6881e80ccb193e3b
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