Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Observe the status of MySQL process

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

1. Test script

[root@mysql5 ~] # cat proce.sh

While true

Do

Mysql-uroot-pmysql-e'show processlist\ G' | grep State > > / root/mysql.log

Sleep 1

Done

2. Tail-f

[root@mysql5] # tail-f mysql.log

State:

State: starting

State:

State: starting

State:

State: starting

State:

State: starting

State:

State: starting

State:

State: starting

State:

State: starting

State:

State: starting

State:

State: starting

3. Sort, remove duplicates and count mysql.log by row

[root@mysql5 ~] # sort mysql.log | uniq-c

24 State:

24 State: starting

4. Analyze the database according to the information of state.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report