At the same time record adb logcat information has corresponding KMSG kernel related information

Source: Internet
Author: User

Use a script to record both Logcat and kmsg information in the ADB using the same scenario without using the log apk, or by choosing to log the log yourself.

This time use two scripts a background run a premise run, file path can be set

1. Background run file name: kmsg_log.sh, the content is a word

ADB logcat > $

2, the front office running files: kmsg.sh

  

#!/bin/bash#@ echo ***### #按格式获取时间信息date_ymd=$ (date +%y%m%d) Date_hm=$ (date +%y%m%d_%h_%m)###### #设置需要获取的地址if[" $"!=""]thenlogcat_dst_path="/home/putao/virtualbox/logcat/$date _ymd/$date _hm"_" $"ElseLogcat_dst_path="/home/putao/virtualbox/logcat/$date _ymd/$date _hm"fi/bin/mkdir-P$logcat _dst_pathadbwait- for-Deviceecho"Device Plugin"adb root adbwait- for-Deviceecho"Device Plugin"adb Remountecho"Kernel log"./kmsg_log.sh$logcat _dst_path/"Logcat".Log&adb shell Cat/proc/kmsg >$logcat _dst_path/"Kernel".LogEcho"Logcat"#adb logcat > $logcat _dst_path/"logcat". txt

At the same time record adb logcat information has corresponding KMSG kernel related information

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.