概述
W/PowerUI ( 2092): unknownintent: Intent { act=android.intent.action.ACTION_POWER_CONNECTEDflg=0x10000010 }
D/dalvikvm( 2027): GC_CONCURRENTfreed 483K, 13% free 8876K/10119K, paused 2ms+3ms
F/BatteryStatsImpl( 2027):problem reading network stats
F/BatteryStatsImpl( 2027):java.lang.IllegalStateException: problem parsing idx 1
F/BatteryStatsImpl( 2027): at com.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:300)
F/BatteryStatsImpl( 2027): atcom.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:250)
F/BatteryStatsImpl( 2027): at com.android.internal.os.BatteryStatsImpl.getNetworkStatsDetailGroupedByUid(BatteryStatsImpl.java:5734)
F/BatteryStatsImpl( 2027): atcom.android.internal.os.BatteryStatsImpl.doUnplugLocked(BatteryStatsImpl.java:1418)
F/BatteryStatsImpl( 2027): atcom.android.internal.os.BatteryStatsImpl.setOnBatteryLocked(BatteryStatsImpl.java:4335)
F/BatteryStatsImpl( 2027): atcom.android.internal.os.BatteryStatsImpl.setBatteryState(BatteryStatsImpl.java:4394)
F/BatteryStatsImpl( 2027): at com.android.server.am.BatteryStatsService.setBatteryState(BatteryStatsService.java:434)
F/BatteryStatsImpl( 2027): atcom.android.server.BatteryService.processValues(BatteryService.java:252)
F/BatteryStatsImpl( 2027): at com.android.server.BatteryService.update(BatteryService.java:234)
F/BatteryStatsImpl( 2027): atcom.android.server.BatteryService.access$000(BatteryService.java:71)
F/BatteryStatsImpl( 2027): atcom.android.server.BatteryService$1.onUEvent(BatteryService.java:182)
F/BatteryStatsImpl( 2027): atandroid.os.UEventObserver$UEventThread.run(UEventObserver.java:108)
F/BatteryStatsImpl(2027): Caused by: java.io.FileNotFoundException: /proc/net/xt_qtaguid/stats:open failed: ENOENT (No such file or directory)
F/BatteryStatsImpl( 2027): atlibcore.io.IoBridge.open(IoBridge.java:406)
F/BatteryStatsImpl( 2027): atjava.io.FileInputStream.<init>(FileInputStream.java:78)
F/BatteryStatsImpl( 2027): atcom.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:269)
F/BatteryStatsImpl( 2027): ... 11 more
F/BatteryStatsImpl( 2027): Causedby: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory)
F/BatteryStatsImpl( 2027): at libcore.io.Posix.open(Native Method)
F/BatteryStatsImpl( 2027): atlibcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
F/BatteryStatsImpl( 2027): atlibcore.io.IoBridge.open(IoBridge.java:390)
F/BatteryStatsImpl( 2027): ... 13 more
^C
W/ThrottleService( 2027): unableto find stats for iface rmnet0
F/NetworkStats( 2027): problemreading network stats
F/NetworkStats( 2027):java.lang.IllegalStateException: problem parsing idx 1
F/NetworkStats( 2027): atcom.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:300)
F/NetworkStats( 2027): atcom.android.server.NetworkManagementService.getNetworkStatsUidDetail(NetworkManagementService.java:1282)
F/NetworkStats( 2027): atcom.android.server.net.NetworkStatsService.performPollLocked(NetworkStatsService.java:831)
F/NetworkStats( 2027): atcom.android.server.net.NetworkStatsService.performPoll(NetworkStatsService.java:799)
F/NetworkStats( 2027): atcom.android.server.net.NetworkStatsService.access$100(NetworkStatsService.java:128)
F/NetworkStats( 2027): atcom.android.server.net.NetworkStatsService$3.onReceive(NetworkStatsService.java:633)
F/NetworkStats( 2027): atandroid.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:728)
F/NetworkStats( 2027): at android.os.Handler.handleCallback(Handler.java:605)
F/NetworkStats( 2027): atandroid.os.Handler.dispatchMessage(Handler.java:92)
F/NetworkStats( 2027): at android.os.Looper.loop(Looper.java:137)
F/NetworkStats( 2027): atandroid.os.HandlerThread.run(HandlerThread.java:60)
F/NetworkStats(2027): Caused by: java.io.FileNotFoundException: /proc/net/xt_qtaguid/stats:open failed: ENOENT (No such file or directory)
F/NetworkStats( 2027): atlibcore.io.IoBridge.open(IoBridge.java:406)
F/NetworkStats( 2027): at java.io.FileInputStream.<init>(FileInputStream.java:78)
F/NetworkStats( 2027): atcom.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:269)
F/NetworkStats( 2027): ... 10 more
F/NetworkStats( 2027): Causedby: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory)
F/NetworkStats( 2027): at libcore.io.Posix.open(Native Method)
F/NetworkStats( 2027): atlibcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
F/NetworkStats( 2027): atlibcore.io.IoBridge.open(IoBridge.java:390)
F/NetworkStats( 2027): ... 12 more
D/SurfaceFlinger( 1954): Screenabout to return, flinger = 0x1161918
W/NetworkManagementSocketTagger(2027): setKernelCountSet(1000, 1) failed with errno -2
参考文献:
最近在Android4.1.1上调试时logcat信息里有qtaguid相关内容,不了解这个服务的功能,上网搜索了一圈,相关资料太少了,但最终还是发现了一些有价值的资料:
1、在android-3.0Linux kernel (kernel/net/netfilter/xt_qtaguid)里有相关的处理,编译时需把qtaguid和netfilter的filter配置项打开;
2、在Android里有net.qtaguid_enabled变量,设置为1。在源码的system/core/libcutils/qtaguid.c文件里有相关处理。
3、qtaguid的工作原理主要是上层应用的UID提供给kernel来建立tag,使用红黑树来处理,上层可通过/proc/net/xt_qtaguid/stats读取来获取状态,而android源码里libcutils里有qtaguid的接口,用于与kernel连接,打通整个通路,也为其他JAVA和C程序等提供相应的接口,而在上层应用则可以使用NetworkManagementSocketTagger和TrafficStats.setThreadStatsUid()等类及函数来调用处理。
所以在内核中打开:
CONFIG_NETFILTER=y
CONFIG_NETFILTER_ADVANCED=y
CONFIG_NETFILTER_TPROXY=y
CONFIG_NETFILTER_XTABLES=y
CONFIG_NETFILTER_XT_MATCH_QTAGUID=y
CONFIG_NETFILTER_XT_MATCH_QUOTA=y
CONFIG_NETFILTER_XT_MATCH_QUOTA2=y
CONFIG_NETFILTER_XT_MATCH_SOCKET=y
CONFIG_NF_DEFRAG_IPV4=y
CONFIG_IP_NF_IPTABLES=y
CONFIG_IP_NF_FILTER=y
CONFIG_IP_NF_MANGLE=y
CONFIG_IP_NF_RAW=y
CONFIG_NF_DEFRAG_IPV6=y
CONFIG_IP6_NF_QUEUE=y
CONFIG_IP6_NF_IPTABLES=y
CONFIG_IP6_NF_FILTER=y
CONFIG_IP6_NF_RAW=y
也就说打开了内核的防火墙,这个不知道会不会引起其他问题,还没有进一步深究
最后
以上就是热心凉面为你收集整理的关于 Caused by:.. /proc/net/xt_qtaguid/stats:open failed: ENOENT (No such file or directory)问题的解决的全部内容,希望文章能够帮你解决关于 Caused by:.. /proc/net/xt_qtaguid/stats:open failed: ENOENT (No such file or directory)问题的解决所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复