Linux Common Instruction--java programmer

Source: Internet
Author: User

 ps ax | grep java  view process Commands " Java "process information, the first column is the process number kill-9 1234  Force kill 1234th Process CD/ Xxx/xxx  Enter/xxx/xxx directory cd/data/apache-tomcat-7xxx/logs  tail localhost_access-2016-11-28.txt-f  Refresh the latest log content per second tail localhost_ Access-2016-11-28.txt-f | grep "202.106.0.20"  the log content that contains the word "202.106.0.20" in the log is updated every second grep Error localhost_ Access-2016-11-28.txt  View the contents of the log containing error words grep "2016:22:1" Localhost_ Access-2016-11.28.txt | awk ' {print '} '  view list of IP addresses accessed from 22:10 to 19 netstat-nap | grep-v UDP | grep 8080  view 8 080 port connection manifest with UDP row ignored (-v keyword) awk-f ":" ' {print $ {} ' Abc.txt  View the second column in the Abc.txt file as a colon delimiter 
 netstat-nap | grep 8080  to see if port 8080 is occupied, And the information that is occupied  
netstat-nap | grep 8080 | grep-v Unix | awk ' {print $4} ' | awk-f ': ' {print $} ' | Sort-nk1 | Uniq-c |sort-rn View all IP addresses that access port 8080 and sort the IP list by number of connections (SORT-NK1 is the IP sort, uniq-c is to merge the same content rows and sort the rows before the number of rows, sort-rn)grep " 2016:0 "Localhost_access_log.2016-11-28.txt | awk ' {print '} ' | Sort-nk1 | uniq-c | Sort-rnps-mp 2633-o thread,tid,time | sort-rn    View the PID 2633 process, the CPU occupied by the thread jstack 2633 |grep E18 - A    jstack view Java process thread work class is to view the PID 2633 Java process, thread ID E18 (16) Thread of the Java class, you can use printf "%x\n" 3626来 view 3626 16 binary

Linux common Directives--java programmers

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.