# AnotherMonitor
.
<img src="https://lh4.ggpht.com/gfwMh4Ih0VD0AaxI8_eh11m6CRu_zSW6-U6F25AjCdlUjCkliWHBgJMhDb3ePdl_EMoT" width="180px" />
<img src="https://lh4.ggpht.com/fugTTF9i76nsfnpWfv34xe1Xz5u4dDWOqbTYkBaPrzud4zPuYIZtQQhEyH7pX9POjYU" width="180px" />
<img src="https://lh5.ggpht.com/96BmklbBOEOgL5mmXZQkofwswLGEzY4Zf6EirtF2nOBgf_cTo86RxuzCInv7etIfNgTO" width="180px" />
AnotherMonitor monitors and records the CPU and memory usage of Android devices.
## Download ready-to-use app
The app is released on Google Play: https://play.google.com/store/apps/details?id=org.anothermonitor.
## IMPORTANT NOTICE for Android 7.0+ users
Due to undocumented changes made by Google, on Android 7.0 CPU usage information for processes others than the own AnotherMonitor one will not be available (not even with root access). Rest of the app will work normally. For devices with Android 8.0 AnotherMonitor will not even show the CPU usage of the own app process. Read the below [Retriving processes info since Android 7.0](#retrieving-processes-info-since-android-nougat-70-api-24-august-2016) for more info.
## Details
AnotherMonitor shows the device CPU and memory status in real time.
It has two main options:
- It shows a chart and several labels wherein the values of the CPU and memory usage are updated every 0.5, 1, 2 or 4 seconds.
- It can record on a CSV file the read values for a later usage on a spreadsheet program.
When AnotherMonitor is running on the background it consumes little resources. Then it can monitor and record the CPU and memory usage of other applications on the foreground.
AnotherMonitor adds a *Record* and *Close* button to the AnotherMonitor entry on the notification drawer.
#### How CPU and memory usage are obtained
In order to get the CPU usage the app does NOT make use of the [`top`](https://en.wikipedia.org/wiki/Top_(software)) command from Linux but instead it parses `/proc/stat` and rest of process folders from the [`procfs`](https://en.wikipedia.org/wiki/Procfs) file system and work out the calculations with the user and system time. This is implemented on [`ServiceReader.class`](https://github.com/AntonioRedondo/AnotherMonitor/blob/master/AnotherMonitor/src/main/java/org/anothermonitor/ServiceReader.java#L259). Find more information about this on [Calculating CPU usage of a process in Linux - Stack Overflow](http://stackoverflow.com/questions/1420426/calculating-cpu-usage-of-a-process-in-linux).
#### About multi-core devices
The app does not support showing values for a specific core in multi-core devices. It will show an average of all the device's cores.
#### Retrieving processes info since Android Lollipop 5.1 (API 22, March 2015)
For devices running Android 5.1.1 it is not possible any more to retrieve the processes list with [`ActivityManager.getRunningAppProcesses()`](http://developer.android.com/reference/android/app/ActivityManager.html#getRunningAppProcesses%28%29). This change has not been documented anywhere on the official documentation nor an alternative way to retrieve the list has been provided. Thankfully the community at Stack Overflow came out with some [satisfying solution](http://stackoverflow.com/questions/30619349/android-5-1-1-and-above-getrunningappprocesses-returns-my-application-packag). For devices with Android 5.1 AnotherMonitor now uses the unofficial [AndroidProcesses](https://github.com/jaredrummler/AndroidProcesses) library to retrieve the processes list. The drawback of this is that for some processes there is no way to retrieve the app name nor the icon and instead only the long package name is shown.
#### Retrieving processes info since Android Nougat 7.0 (API 24, August 2016)
In Android 7.0 Google once again has made undocumented changes and has significantly restricted access to the `proc` file system. This means that since this new API level it is not possible anymore to retrieve processes info. AnotherMonitor running on devices with Android 7.0 will only show total CPU usage, AnotherMonitor CPU usage and memory usage, but not CPU usage for other processes. Running the app on a rooted device does not make difference. More info on [File system changes in Android Nougat - Stack Overflow](https://stackoverflow.com/questions/38590140/file-system-changes-in-android-nougat). [Star this Android issue](https://issuetracker.google.com/issues/37091475) to push Google to implement an alternative API.
#### Retrieving processes info since Android Oreo 8.0 (API 26, August 2017)
In Android 8.0 Google has further restricted access to the `proc` file system. Until now it was possible to at least get process info of the process running AnotherMonitor and total CPU usage. This does not work any more. AnotherMonitor running on devices with Android 8.0 will only show memory usage, but not total CPU usage or CPU usage for any process, including the own app process. Running the app on a rooted device does not make difference.
## Resolving dependencies
AnotherMonitor only has one external dependency, [AndroidProcesses](https://github.com/jaredrummler/AndroidProcesses). It is used to retrieve the device processes list and populate the 'Processes' screen.
See the [Gradle](https://github.com/AntonioRedondo/AnotherMonitor/blob/master/AnotherMonitor/build.gradle) file for more details.
## Contribute!
If you have an awesome pull request no matter whether it's a big or small change, send it over! Your link to your GitHub account will be added below.
## License
AnotherMonitor makes use of the [GNU GPL v3.0](http://choosealicense.com/licenses/gpl-3.0/) license. Remember to make public your project source code when reusing AnotherMonitor code.
没有合适的资源?快使用搜索试试~ 我知道了~
Android代码-查看手机应用的CPU和内存资源的使用情况
共100个文件
xml:60个
png:18个
java:9个
需积分: 46 17 下载量 170 浏览量
2019-08-06
07:10:28
上传
评论
收藏 204KB ZIP 举报
温馨提示
AnotherMonitor . AnotherMonitor monitors and records the CPU and memory usage of Android devices. Download ready-to-use app The app is released on Google Play: https://play.google.com/store/apps/details?id=org.anothermonitor. IMPORTANT NOTICE for Android 7.0 users Due to undocumented changes made by Google, on Android 7.0 CPU usage information for processes others than the own AnotherMonitor one will not be available (not even with root access). Rest of the app will work normally. For device
资源推荐
资源详情
资源评论
收起资源包目录
Android代码-查看手机应用的CPU和内存资源的使用情况 (100个子文件)
gradlew.bat 2KB
.gitignore 305B
.gitignore 7B
build.gradle 1001B
build.gradle 436B
settings.gradle 26B
gradlew 5KB
gradle-wrapper.jar 49KB
ActivityMain.java 51KB
ServiceReader.java 22KB
ViewGraphic.java 14KB
ActivityProcesses.java 11KB
C.java 4KB
ActivityAbout.java 3KB
ActivityHelp.java 3KB
LinearLayoutCustomised.java 826B
ApplicationTest.java 349B
LICENSE.md 34KB
README.md 6KB
logo_app.png 24KB
icon.png 8KB
icon_recording.png 4KB
icon.png 4KB
icon.png 3KB
icon_recording.png 2KB
icon.png 2KB
icon_recording_bw.png 1KB
icon_bw.png 1KB
icon_recording_bw.png 993B
icon_bw.png 936B
icon_recording_bw.png 747B
icon_bw.png 700B
icon_recording_bw.png 495B
icon_bw.png 462B
bg_menu_white.9.png 395B
subtlepatterns_escheresque_ste.png 298B
transparent_pixel.png 68B
proguard-rules.pro 682B
gradle.properties 855B
gradle-wrapper.properties 230B
activity_main.xml 18KB
strings.xml 16KB
strings.xml 12KB
colors.xml 9KB
styles.xml 5KB
activity_preferences_tab1.xml 4KB
activity_about.xml 4KB
activity_processes.xml 3KB
layer_feedback.xml 3KB
layer_feedback.xml 2KB
activity_preferences_tab2.xml 2KB
activity_help.xml 2KB
activity_preferences.xml 2KB
layer_process_entry.xml 1KB
gradient_tab_selected.xml 1KB
layer_hint.xml 1KB
layer_welcome.xml 1KB
activity_processes_entry.xml 1KB
layer_menu.xml 1KB
AndroidManifest.xml 1KB
icon_question_circle.xml 599B
gradient_oval.xml 586B
icon_ellipsis_vertical.xml 472B
icon_ellipsis_vertical_pressed.xml 472B
shrink_from_topcentre_to_bottomcentre.xml 469B
grow_from_bottomcentre_to_topcentre.xml 469B
shrink_from_bottomleft_to_topright.xml 468B
grow_from_topright_to_bottomleft.xml 468B
styles.xml 448B
styles.xml 447B
styles.xml 447B
styles.xml 435B
icon_info_circle.xml 391B
icon_times_ai.xml 389B
icon_times.xml 389B
icon_pause.xml 379B
styles.xml 364B
styles.xml 364B
styles.xml 364B
icon_circle_red.xml 363B
icon_circle_pressed.xml 363B
gradient_process_top.xml 344B
icon_angle_down.xml 338B
gradient_process.xml 338B
icon_stop_pressed.xml 330B
icon_stop.xml 330B
icon_circle_sb.xml 330B
icon_play.xml 321B
button_menu.xml 320B
gradient_nb.xml 313B
gradient_bg.xml 309B
button_start_record.xml 302B
icon_stop_sb.xml 301B
bg_about.xml 300B
button_stop_record.xml 294B
button_close_settings.xml 250B
button_menu_entry.xml 225B
button_graphic.xml 220B
bg_parameter_row.xml 220B
gradient_nb.xml 204B
共 100 条
- 1
资源评论
weixin_39841882
- 粉丝: 443
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功