Java program various monitoring commands and troubleshooting methods

Source: Internet
Author: User

1, the monitoring process GC situation:

Jstat-gcutil PID Frequency
Example: Jstat-gcutil 3807 2s

2. Monitor Cup and Memory:
Command: Top,vmstat,nmon
Tools: JVISUALVM, Jprofile,perfnom,btrace,loadrunner

3, monitoring Io:iostat

iostat-d-x-k 1 10

4, monitoring network: Ifstat,iftop,nethogs

Monitor overall bandwidth using ――nload, Bmon, Slurm, Bwm-ng, CBM, speedometer, and netload

Monitor overall bandwidth usage (batch output) ――vnstat, Ifstat, Dstat, and Collectl

Bandwidth per socket connection using ――iftop, Iptraf, Tcptrack, Pktstat, Netwatch, and Trafshow

Bandwidth usage for each process ――nethogs

5. Memory leak: Generate dump file, use IBM parser, MAT,JPROFILE,JVISUALVM view reason.

6. Thread Blocking:

JVISUALVM can view thread blocking conditions, print thread dump

7. Database

Oracle: Print an AWR report to analyze the specific cause.

Mysql:

Redis: Monitoring Tool Redis-stat

View Redis connections, number of used memory, blocking connections, and more

./redis-cli-h 192.168.9.32 Info | Grep-e "Connected_clients"-E "blocked_clients"-E
"Used_memory_human"-E "Used_memory_peak_human"-E "rejected_connections"-E "Evicted_keys"-e "instantaneous"-e "mem_ Fragmentation_ratio "-E" used_memory "-E" Used_memory_rss "

Mongodb:

Java program various monitoring commands and troubleshooting methods

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.