Commit Graph

3295 Commits

Author SHA1 Message Date
Jeff Sharkey
e4474c8bfe Remove network subtype check when building template.
Change-Id: I069d82a77d27dae6bfffe3b7e65d73b63f258ad9
2012-03-16 11:54:01 -07:00
Jeff Sharkey
8e38f3ddde Combine network subtypes by default.
Subtype controls (3G-vs-4G) aren't exposed in the UI, so tracking
data with that granularity creates unnecessary overhead. For example,
some GSM networks can regularly flap between two subtypes.

Bug: 6118868
Change-Id: Id098891dba52336d00d0f96632a7924e228b4713
2012-03-16 11:35:29 -07:00
The Android Automerger
fc661a8b12 merge in jb-release history after reset to master 2012-03-14 07:03:18 -07:00
Robert Greenwalt
69e1f3ae65 Record the trimmed cmd string for logs
The over the wire command includes a \0 that mangles log messages.
bug:6149176

Change-Id: I77d4e443f1966bff060f1b97570851f7549fee8e
2012-03-13 12:30:14 -07:00
The Android Automerger
1c083a4c4a merge in jb-release history after reset to master 2012-03-07 07:01:44 -08:00
Jeff Sharkey
d9e33ce00b Merge "Avoid updating network stats after shutdown." 2012-03-06 20:04:26 -08:00
Jeff Sharkey
0097f85348 Avoid updating network stats after shutdown.
Bug: 6109476
Change-Id: I9a3a8b182c8fa56d83ddc755d204d5b267c9bc5d
2012-03-06 19:59:57 -08:00
Robert Greenwalt
7f03e44443 Make NDC not block forever and handle restart.
Still possible for netd to get wedged but system won't die because of it.
Leads the way to having forking netd - then only individual commands would
wedge, promoting stability.

bug:5864209
bug:6019952
Change-Id: I43e4c5072863b8b812d4fe24d30d92eb1a11651a
2012-02-29 16:53:27 -08:00
The Android Automerger
fb4a0d9ea4 merge in jb-release history after reset to master 2012-02-29 07:02:28 -08:00
Jeff Sharkey
30aab0989d Disable verbose NetworkStats logging.
Bug: 6076584
Change-Id: I4efcda2b474f623f4fe70db8b43b0aa69017d749
2012-02-28 15:13:08 -08:00
The Android Automerger
dc5d59992e merge in jb-release history after reset to master 2012-02-28 07:02:11 -08:00
Jeff Sharkey
be68c7c5c7 Move NetworkStatsFactory to faster ProcFileReader.
Less GC overhead, and about 8x faster parse times.  Verified that
tests pass.

Change-Id: Iff1d374f36103395a193176a88a57eebffa93c56
2012-02-27 18:08:13 -08:00
Jeff Sharkey
00b8bb6e79 Suppress StrictMode when reading /proc/ files.
Bug: 6077051
Change-Id: If4f23e947d8b91f9f124baa0460600a6b9353732
2012-02-27 17:42:34 -08:00
The Android Automerger
78dcae3c33 merge in jb-release history after reset to master 2012-02-08 07:02:16 -08:00
Guang Zhu
8fa213f4c5 Revert "Make NDC not block forever and handle restart."
Reverting because it seems to break `adb reboot`

This reverts commit 5c7de0b4ec.

Change-Id: I75d827664a08799de15369c24c84cc3f49a8f297
2012-02-07 19:25:42 -08:00
Robert Greenwalt
47f17ffe00 Merge "Make NDC not block forever and handle restart." 2012-02-07 16:19:56 -08:00
Robert Greenwalt
5c7de0b4ec Make NDC not block forever and handle restart.
Need changes in core.

Still possible for netd to get wedged but system won't die because of it.
Leads the way to having forking netd - then only individual commands would
wedge, promoting stability.

bug:5864209
Change-Id: Ifcd37511c8239fe3df7e9070869b63a9c5649bd2
2012-02-07 15:59:49 -08:00
Jeff Sharkey
ff81c2eebc Send broadcast when changing restrict background.
When changing global restrict background status, send connectivity
change broadcast, since it radically changes DISCONNECTED/BLOCKED
status system-wide.

Also reduce verbose stats logging.

Bug: 5854466
Change-Id: I3b612c520f50cc3000a3a569b7e0ab5f691cc2bd
2012-02-07 12:08:58 -08:00
Jeff Sharkey
25e3ec70aa List rotated netstats files during --checkin dump.
Also disable verbose logging.

Change-Id: I4c51e05d695eac43f0d9c28f9699f1655c642a99
2012-02-06 17:35:11 -08:00
The Android Automerger
e7c0d8fea8 merge in jb-release history after reset to master 2012-02-06 07:01:57 -08:00
Jeff Sharkey
94a315cec5 Unify shorthand for byte-based units.
Change-Id: If990859dee3f0973e1d4c48f05312c84071b3328
2012-02-03 14:50:13 -08:00
Robert Greenwalt
43dc9a2d93 Add some logging to NDC.
We're getting some lockups of netd and this can help point us
in the right direction.

bug:5864209
Change-Id: Id8bdb0a758c5b161e0143de61b5f39c3a982e329
2012-02-02 16:38:38 -08:00
Jeff Sharkey
9a21249a6c Avoid NDC deadlock when re-arming network alert.
When NDC delivers limitReached() event, NMS re-arms the alert, which
makes another call back to NDC.  If NDC already started processing
another call, this causes deadlock.

Fix this by re-arming on a handler thread.

Bug: 5879848
Change-Id: I46fa78fe1f1122c5f31dd6020483e5ae89a9f39d
2012-02-02 13:09:52 -08:00
The Android Automerger
76684e9b9e merge in jb-release history after reset to master 2012-02-01 07:01:40 -08:00
Jeff Sharkey
2ed12477de Clear identity when updating network stats.
Bug: 5945461
Change-Id: Ie51ea3f107a705c395b65684f21bf4c28c7f4d33
2012-01-31 17:13:09 -08:00
The Android Automerger
4d99fc3a83 merge in ics-release history after reset to master 2012-01-25 07:00:17 -08:00
Jeff Sharkey
0d038b7949 Match WIFI_P2P data usage.
Bug: 5405891
Change-Id: I5b815d6fc25a2f26a86c39a43fde305fcc3fb65c
2012-01-24 15:37:07 -08:00
Jeff Sharkey
bfe82685e7 Move network stats to FileRotator pattern.
Split existing network stats into two separate classes: a recorder
which generates historical data based on periodic counter snapshots,
and a collection of historical data with persistance logic.

Recorder keeps a pending history in memory until outstanding data
crosses a specific threshold.  Persisting is handled through a given
FileRotator.  This pattern significantly reduces disk churn and
memory overhead.  Separate UID data from UID tag data, enabling a
shorter rotation cycle.  Migrate existing stats into new structure.

Remove "xt" stats until iptables hooks are ready.  Avoid consuming
Entry values when recording into NetworkStatsHistory.  Assign
operation counts to default route interface.

Introduce "Rewriter" interface in FileRotator with methods to enable
rewriteAll().  Introduce IndentingPrintWriter to handle indenting in
dump() methods.

Bug: 5386531
Change-Id: Ibe086230a17999a197206ca62d45f266225fdff1
2012-01-24 11:13:14 -08:00
The Android Automerger
0285082e32 merge in ics-release history after reset to master 2012-01-23 07:00:41 -08:00
Jean-Baptiste Queru
e32bcef8e1 am 45470559: (-s ours) am 12b7da69: am 6df477be: Merge "Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF)"
* commit '45470559cd4a499fd5d38cf708f0b531dc081fed':
  Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF)
2012-01-20 16:37:49 -08:00
Robert Greenwalt
e3a7f729ed Log netd traffic nicely.
Create a LocalLog class for logging within a service for dumping in dumps.
Use it in the NativeDaemonConnector so we can get some insight into what
is happening in these lockups.

bug:5864209
Change-Id: I68ddc58847f3c8de613be9528570f8c3157d8274
2012-01-20 10:37:11 -08:00
Steve Block
2c14cae49e Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF)
Change-Id: I1de629b4632a4b3187ca1a28d6416daccd35f924
2012-01-19 14:45:03 -08:00
The Android Automerger
797058fbcf merge in ics-release history after reset to master 2012-01-11 10:16:05 -08:00
Jeff Sharkey
f6351440e4 Merge "Move non-monotonic reporting to interface." 2012-01-10 17:41:01 -08:00
Jeff Sharkey
ef7bded347 Move non-monotonic reporting to interface.
Report non-monotonic NetworkStats through an observer interface
instead of throwing, since those events are still recoverable.

Change-Id: Ic0749f4634b0ac05dbe90e95ca490957ec8b2f23
2012-01-10 17:24:44 -08:00
The Android Automerger
ffbb970a3c merge in ics-release history after reset to master 2012-01-10 07:00:19 -08:00
Steve Block
dc3b510b35 Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/#/c/157220

Bug: 5449033
Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
2012-01-08 13:19:13 +00:00
The Android Automerger
236dd48677 merge in ics-release history after reset to master 2011-12-19 07:00:46 -08:00
Jeff Sharkey
307beecd41 Include roaming in NetworkIdentity.hashCode().
Change-Id: I148d95c8d08e3916a90fa78f7efee327d4b7de2a
2011-12-16 11:52:35 -08:00
The Android Automerger
4fba272079 merge in ics-release history after reset to master 2011-12-15 07:00:14 -08:00
Jeff Sharkey
41a1247dea Move NMS to CONNECTIVITY_INTERNAL permission.
Change-Id: I6043c1b9cb10aeeafb93d1b5c60da571d2fec5c9
2011-12-14 17:51:13 -08:00
Jeff Sharkey
47a0212ace Merge "Avoid reading network stats when disabled." 2011-12-14 10:12:17 -08:00
Jeff Sharkey
675c43125f Avoid reading network stats when disabled.
Bug: 5518868
Change-Id: Idb5c588b018bf735597ad7ff904ecc69224dd0a0
2011-12-13 15:43:47 -08:00
The Android Automerger
f22ee0cd8d merge in ics-release history after reset to master 2011-12-13 07:00:23 -08:00
The Android Open Source Project
8a29ec1b90 am e7a69408: Reconcile with ics-mr1-release
* commit 'e7a694081cdb3aa656484c68c6ac95098c52df25':
2011-12-13 05:40:57 -08:00
The Android Open Source Project
e7a694081c Reconcile with ics-mr1-release
Change-Id: I96fd9c00680c7ff0e5c9fba04f8c08a31cf1cfa8
2011-12-13 05:11:43 -08:00
The Android Automerger
c70383c5b6 merge in ics-mr1-release history after reset to ics-mr1 2011-12-12 22:08:59 -08:00
Jeff Sharkey
c431e2b9b5 am d808bd6e: am f0bbc494: Merge "Avoid NPE when missing network stats." into ics-mr1
* commit 'd808bd6e22547c144c6384c2bc6490853108ded6':
  Avoid NPE when missing network stats.
2011-12-12 20:23:47 -08:00
Jeff Sharkey
d808bd6e22 am f0bbc494: Merge "Avoid NPE when missing network stats." into ics-mr1
* commit 'f0bbc494d638f4c77e688bf9410027f453301559':
  Avoid NPE when missing network stats.
2011-12-12 20:21:34 -08:00
Jeff Sharkey
3511b086bc Avoid NPE when missing network stats.
Bug: 5750339
Change-Id: I4b739dbd076b270a5a2b2e2a1e0f6e445d8c124e
2011-12-12 18:51:26 -08:00