6973634ce61ab7d4c1d51c70be6d51725b89e7b9 |
|
08-Dec-2014 |
Jeff Sharkey <jsharkey@android.com> |
Direct notification of network interface changes. Connectivity broadcasts recently changed and are no longer sent for certain types of network changes. For example, when stacked network interfaces change for a mobile network. To ensure that we pick up all these details, directly wire the two services together. Also remove some unused code for split network types. Bug: 18666753 Change-Id: I0467bd5b330c0e0cb51af2306d821b41ad16337a
/frameworks/base/core/java/android/net/INetworkStatsService.aidl
|
24d19fb6ab94cc5fd23f1c9a1d7916948a7fd571 |
|
01-Aug-2012 |
Jeff Sharkey <jsharkey@android.com> |
Revert "API to adjust network stats."
/frameworks/base/core/java/android/net/INetworkStatsService.aidl
|
e7ed1ce4c84fe92caafc97b1f9044c6647aa3f7f |
|
28-Jul-2012 |
Jeff Sharkey <jsharkey@android.com> |
API to adjust network stats. DO NOT MERGE. Enables system apps to correctly account network usage performed on behalf of another application. Bug: 6695246 Change-Id: I39e243afd57936b6b30157a6ca511a17b6c55c39
/frameworks/base/core/java/android/net/INetworkStatsService.aidl
|
ac3fcb1590e1da21324c13ce237ec48f2bf488bf |
|
03-May-2012 |
Jeff Sharkey <jsharkey@android.com> |
Reduce persist threshold for lower warning/limit. Default is 2MB persist threshold, but even that can be substantial for devices on 100MB/month plans. This change gradually reduces the persist threshold up to 8x lower (256kb outstanding) based on lowest active policy. Bug: 5382676 Change-Id: Ief4e8cdb169bfb151a3d1b45722a8eaa01926508
/frameworks/base/core/java/android/net/INetworkStatsService.aidl
|
234766a36af6214644fa8205202287084ca9cf93 |
|
11-Apr-2012 |
Jeff Sharkey <jsharkey@android.com> |
Move TrafficStats iface counters to xt_qtaguid. Use xt_qtaguid iface_stat_all counters, which are monotonic during a single boot. Track all ifaces associated with mobile networks since boot, and move TrafficStats to using these ifaces. This will include usage of networks omitted from config_data_usage_network_types, specifically on devices that recycle network interfaces across APNs. Split wildcard template matching, and move NetworkStatsService to use mobile wildcard when logging stats. Bug: 5324515 Change-Id: I2211c374c05d1b598cc647f2f873630538955ffe
/frameworks/base/core/java/android/net/INetworkStatsService.aidl
|
b52e3e55098c4a6e3dbfe19885895411cfb38911 |
|
06-Apr-2012 |
Jeff Sharkey <jsharkey@android.com> |
INetworkStatsSession with lifecycle for caching. Users outside system_server now explicitly communicate their lifecycle, which keeps a strong-reference chain to any fully loaded NetworkStatsCollection histories. Bug: 6236498 Change-Id: I8e22739b6e89a626b676967a736d7117fd000778
/frameworks/base/core/java/android/net/INetworkStatsService.aidl
|
b5d55e302d2253e4bfb233ea705caf258cdc4cb9 |
|
11-Aug-2011 |
Jeff Sharkey <jsharkey@android.com> |
Foreground/background network stats using sets. Teach NetworkStats about "counter sets" coming from kernel, and use them to track usage in foreground/background. Add AID_NET_BW_ACCT to system_server so it can control counter sets. Move to composite key of NetworkIdentitySet, UID, set, and tag when recording historical usage. Persisting still clusters by identity, since that is heaviest object. Request async stats poll during systemReady() to bootstrap later delta calculations. Reset kernel counters when UID removed. Update various tests. Bug: 5105592, 5146067 Change-Id: Idabec9e3ffcaf212879821515602ecde0a03de8c
/frameworks/base/core/java/android/net/INetworkStatsService.aidl
|
63d27a9233fed934340231f438493746084a681d |
|
04-Aug-2011 |
Jeff Sharkey <jsharkey@android.com> |
Network stats with varint, omit parcel fields. Persist NetworkStatsHistory using variable-length encoding; since most buckets have small numbers, we can encode them tighter. Initial test showed 44% space savings. Also persist packet and operation counters. Let NetworkStatsHistory consumers request which fields they actually need to reduce parcel overhead. Tests for verify varint and history field requests, also verify end- to-end by persisting history into byte[] and restoring. Expose bandwidth control enabled state. Extend random generation to create packet and operation counts. Moved operation counts to long. Fix bug that miscalculated bytes since last persist, which would cause partial stats loss when battery pulled. Bug: 4581977, 5023706, 5023635, 5096903 Change-Id: If61e89f681ffa11fe5711471fd9f7c238d3d37b0
/frameworks/base/core/java/android/net/INetworkStatsService.aidl
|
a63ba59260cd1bb3f5c16e395ace45a61f1d4461 |
|
20-Jul-2011 |
Jeff Sharkey <jsharkey@android.com> |
Add operation counts to network statistics. Provide API to increment "operation counts" for a UID and tag, used to eventually derive bytes/operation stats. Internally is stored at network layer, but should belong at data layer. Switch profiling to use data layer stats, which are emulated by summarizing network layer details. Read packet counts from new /proc/ columns and collect them into NetworkStatsHistory. Prevent double-counting by ignoring values from first snapshot. Watch for duplicate /proc/ entries. Update tests to verify packet and operation counters. Bug: 5052136, 5097392 Change-Id: I1832f65a2b8a9188f8088f253474a667c21a2f09
/frameworks/base/core/java/android/net/INetworkStatsService.aidl
|
350083e36b9db6062e165954403ef921ff3dfdad |
|
29-Jun-2011 |
Jeff Sharkey <jsharkey@android.com> |
Migrate bandwidth control to NMS, omit history. Both stats and policy make NMS calls that depend on bandwidth control being enabled, so move enable/disable into NMS and drop calls when disabled. This avoids throwing heavy ISE exceptions when disabled. Only include recent data when writing NetworkStatsHistory as part of dumpsys call. Introduce manual poll event for Settings UI. Bug: 4982115, 4770435, 4515856 Change-Id: I257820b057af2f0f99c736fb4f61e55b9fdc3e66
/frameworks/base/core/java/android/net/INetworkStatsService.aidl
|
d03fd3f004e3ba8aaa1692ee0e92e8ae171d2a04 |
|
20-Jun-2011 |
Jeff Sharkey <jsharkey@android.com> |
Persist "tagged" network stats along with UIDs. Now stores tags other than TAG_NONE (0x0), which are useful for app debugging. Combine UID and tag together into single long key, and expose tag data through AIDL when requested. Change NMS to track TAG_NONE as total UID traffic, matching the kernel definition. Added TAG_MAX_HISTORY to control how long tag-granularity statistics are stored; overall UID usage is still kept for UID_MAX_HISTORY. Fix bug to trim NetworkStatsHistory outside normal polling loops to catch non-active networks and UIDs. Test to verify UID and tag packing, and to verify that UID traffic on two networks are combined to match MOBILE_ALL template. Change-Id: If0e039416d9e7f63b1a39e04cddfb1133b5a78ee
/frameworks/base/core/java/android/net/INetworkStatsService.aidl
|
1b5a2a96f793211bfbd39aa29cc41031dfa23950 |
|
19-Jun-2011 |
Jeff Sharkey <jsharkey@android.com> |
Read "qtaguid" network stats, refactor templates. Teach NMS to read qtaguid stats from kernel, but fall back to older stats when kernel doesn't support. Add "tags" to NetworkStats entries to support qtaguid. To work around double-reporting bug, subtract tagged stats from TAG_NONE entry. Flesh out stronger NetworkTemplate. All NetworkStatsService requests now require a template, and moved matching logic into template. Record UID stats keyed on complete NetworkIdentitySet definition, similar to how interface stats are stored. Since previous UID stats didn't have iface breakdown, discard during file format upgrade. Change-Id: I0447b5e7d205d73d28e71c889c568e536e91b8e4
/frameworks/base/core/java/android/net/INetworkStatsService.aidl
|
21c9c45e5caf62b935354b74392fb40c4bf18529 |
|
07-Jun-2011 |
Jeff Sharkey <jsharkey@android.com> |
Interface-level network policy, persist policies. Define NetworkPolicy as cycle-reset day and warning/limit values, and set/get through NetworkPolicyManager. Watch ConnectivityManager for network connection events, and apply quota rules based on matching interfaces. Policy service matches based on strong identity to support IMSI-specific policy values. Calculates remaining quota based on current stats recorded since the last reset cycle day. Tests to verify edge cases around February. Persist network and UID policies in XML, and restore on boot. Change-Id: Id40ba7d6eed6094fbd5e18e6331286c606880d80
/frameworks/base/core/java/android/net/INetworkStatsService.aidl
|
3f3913550c10792edb8aecf66cc83c3db5c8b311 |
|
06-Jun-2011 |
Jeff Sharkey <jsharkey@android.com> |
Persist network stats using AtomicFile. Implements read/write of network stats using AtomicFile, along with magic number and versioning. Stores in "/data/system/netstats.bin" for now. Tests to verify that stats are persisted across a simulated reboot, and to verify that TEMPLATE_WIFI is working. Fixed bug where kernel counters rolling backwards would cause negative stats to be recorded; now we clamp deltas at 0. Change-Id: I53bce26fc8fd3f4ab1e34ce135d302edfa34db34
/frameworks/base/core/java/android/net/INetworkStatsService.aidl
|
d2a458750e5a3d490af09cecb5c28370baf0a913 |
|
29-May-2011 |
Jeff Sharkey <jsharkey@android.com> |
Map network identity using ConnectivityService. Instead of deriving network identity based on raw subsystem broadcasts, listen for updates from ConnectivityService. Added atomic view of all active NetworkState, and build map from "iface" to NetworkIdentity set for stats tracking. To avoid exposing internal complexity, INetworkStatsService calls use general templates. Added TelephonyManager mapping to classify network types using broad labels like "3G" or "4G", used to drive templates. Cleaned up Objects and Preconditions. Change-Id: I1d4c1403f0503bc3635a59bb378841ba42239a91
/frameworks/base/core/java/android/net/INetworkStatsService.aidl
|
75279904202357565cf5a1cb11148d01f42b4569 |
|
25-May-2011 |
Jeff Sharkey <jsharkey@android.com> |
Collect historical network stats. Periodically records delta network traffic into historical buckets to support other services, such NetworkPolicyManager and Settings UI. Introduces NetworkStatsHistory structure which contains sparse, uniform buckets of data usage defined by timestamps. Service periodically polls NetworkStats and records changes into buckets. It only persists to disk when substantial changes have occured. Current parameters create 4 buckets each day, and persist for 90 days, resulting in about 8kB of data per network. Only records stats for "well known" network interfaces that have been claimed by Telephony or Wi-Fi subsystems. Historical stats are also keyed off identity (such as IMSI) to support SIM swapping. Change-Id: Ia27d1289556a2bf9545fbc4f3b789425a01be53a
/frameworks/base/core/java/android/net/INetworkStatsService.aidl
|