This article describes using PowerShell to read system logs, which can be filtered by a number of factors, such as journal name, log type, and time. A cmdlet called Get-eventlog is available in PowerShell that can be used to read system logs.
Run this Get-eventlog cmdlet and try:
Copy Code code as follows:
Linux bright red, I began to learn Linux, learning to make me happy, everyone together to learn ...1. Install the SOFTWARE commandsudo apt-get apache2 installation Apache, installed in the default path, the specified path installation, in fact, for the Linux system, there is no need to specify the path, just for good management, specify path installation also need researchReboot required after installation because you know the installation did not sta
Today test the Nginx reverse proxy function, let the Tomcat log to get the user real IP address, Google a bit, is an article content, copied the tomcat configuration file to modify the content, how can not get, magical! Helpless under, carefully read the copy of each line of content, found that the problem, it is estimated that if the search for the article, it is impossible to obtain the real IP address, a
more than 100 times in the log#cat Access_log | Cut-d '-F 7 | Sort |uniq-c | awk ' {if (>) print $} ' | LessStatistics a URL, the number of visits per day#cat access_log|grep ' 12/aug/2009 ' |grep '/images/index/e1.gif ' |wc|awk ' {print $} 'Most visited pages in the first five days#cat Access_log|awk ' {print $7} ' |uniq-c |sort-n-r|head-20See what the IP is doing in the log.#cat Access_log | grep 218.66.36.119| awk ' {print ' \ t ' $7} ' | Sort | uniq-c | Sort-nr | LessList files that have be
$7} ' | Sort | uniq-c | Sort-nr | LessView pages that have been accessed more than 100 times in the log#cat Access_log | Cut-d '-F 7 | Sort |uniq-c | awk ' {if (>) print $} ' | LessStatistics a URL, the number of visits per day#cat Access_log | grep ' 12/aug/2009 ' | grep '/images/index/e1.gif ' | WC | awk ' {print '} 'Most visited pages in the first five days#cat Access_log | awk ' {print $7} ' | uniq-c | Sort-n-R | Head-20See what the IP is doing in the log.#cat Access_log | grep 218.66.36.11
First 1, modify the Nginx configuration fileAdd in nginx.confProxy_set_header x-forwarded-for $proxy _add_x_forwarded_for;Proxy_set_header X-real-ip $remote _addr;2. Modify the Tomcat configuration fileModify in Server.xmlprefix= "Localhost_access_log" suffix= ". txt"pattern= "%{x-forwarded-for}i%l%u%t%r%s%b%d%q%{user-agent}i%t"Resolvehosts= "false"/>Back-end tomcat logs get the real IP, not the nginx serve
Recently, there is a need to compare the time of a single activity load of two versions before and afterIn the Android log we can see similar Info/activitymanager (2486): Displayed activity com.teleca/. contextmenuactivity:240 MS (total 41289 ms) log, which is the load time of the activityFirst get the log through adb logcat > xx.txt, and then analyze the log with the following code:#-*-coding:utf-8-*-#analyze Android adb logcat log extract activity d
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.