aboutsummaryrefslogtreecommitdiff
path: root/zh-cn/devices/tech/datausage/tags-explained.html
diff options
context:
space:
mode:
Diffstat (limited to 'zh-cn/devices/tech/datausage/tags-explained.html')
-rw-r--r--zh-cn/devices/tech/datausage/tags-explained.html34
1 files changed, 34 insertions, 0 deletions
diff --git a/zh-cn/devices/tech/datausage/tags-explained.html b/zh-cn/devices/tech/datausage/tags-explained.html
new file mode 100644
index 00000000..2f25b965
--- /dev/null
+++ b/zh-cn/devices/tech/datausage/tags-explained.html
@@ -0,0 +1,34 @@
+<html devsite><head>
+ <title>已说明的流量使用情况标签</title>
+ <meta name="project_path" value="/_project.yaml"/>
+ <meta name="book_path" value="/_book.yaml"/>
+ </head>
+ <body>
+ <!--
+ Copyright 2017 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ -->
+
+<p>标签是跟踪流量消耗计数器的指标之一。默认情况下,标签仅以隐性方式基于 UID。UID 被用作监管的基础,不容忽视。因此,标签始终至少代表一个 UID (uid_tag)。可以通过与 UID 关联的“帐号标签”明确增强某个标签。用户空间可以使用 <code>TrafficStats.setThreadStatsTag()</code> 设置标签的 acct_tag 部分,然后将标签与套接字配合使用:属于相应套接字的所有数据都将被计入该标签。之后,监管基于该标签的 uid_tag 部分,并单独收集 acct_tag 部分的统计信息。</p>
+<p>如果没有显式标记,则 qtaguid 模块将假设 <code>default_tag:  {acct_tag=0, uid_tag=10003}</code></p>
+<pre><code> a:  {acct_tag=1, uid_tag=10003}
+ b:  {acct_tag=2, uid_tag=10003}
+ c:  {acct_tag=3, uid_tag=10003}
+</code></pre>
+<p><code>a, b, c…</code> 表示与特定套接字关联的显式标签。</p>
+<p><code>default_tag (acct_tag=0)</code> 是包含相应 uid 的总流量(包括所有未标记的流量)的默认帐号标签,通常用于强制执行监管/配额规则。</p>
+<p>这些标签可用于将应用的网络流量划分到独立的逻辑类别中(在网络套接字级别)。可在运行时移除、重新应用或修改这些标签。</p>
+<p>qtaguid 模块已在 <a href="https://android-review.googlesource.com/#/q/project:kernel/common+branch:android-3.0,n,z">kernel/common branch of android-3.0</a> 上实现</p>
+
+</body></html> \ No newline at end of file