实时屏幕监控 linux面板,实时监控工具

66b52468c121889b900d4956032f1009.png

8种机械键盘轴体对比

本人程序员,要买一个写代码的键盘,请问红轴和茶轴怎么选?

# mytop

sudo yum -y install mytop

# 监控界面

MySQL on localhost (5.6.39-log) up 69+10:09:56 [20:50:55]

Queries: 92.1M qps: 16 Slow: 1.0M Se/In/Up/De(%): 48/13/02/00

qps now: 1 Slow qps: 0.3 Threads: 19 ( 3/ 7) 33/08/00/00

Key Efficiency: 100.0% Bps in/out: 2.4k/10.2k Now in/out: 107.4/ 1.2k

Id User Host/IP DB Time Cmd Query or State

-- ---- ------- -- ---- --- ----------

49672 root localhost db1 0 Query show full processlist

15358 zhcj_user 192.168.1.13 db1 2 Sleep

22902 zhcj_user 192.168.1.13 db1 2 Sleep

# 帮助界面

键入 ? 可以显示帮助信息

? - display this screen

# - toggle short/long numbers (not yet implemented)

c - command summary view (based on Com_* counters)

d - show only a specific database

e - explain the query that a thread is running

f - show full query info for a given thread

F - unFilter the dispaly

h - show only a specifc host's connections

H - toggle the mytop header

i - toggle the display of idle (sleeping) threads

I - show innodb status

k - kill a thread

p - pause the display

m - switch [mode] to qps (queries/sec) scrolling view

o - reverse the sort order (toggle)

q - quit

r - reset the status counters (via FLUSH STATUS on your server)

s - change the delay between screen updates

t - switch to thread view (default)

u - show only a specific user

: - enter a command (not yet implemented)

# 基本用法

mytop 与 mysql 命令相似,使用时需要制定 user password socket host port 等参数,详细参数可参考 man mytop 。使用 --prompt 选项表示使用提示输入密码,否则就需要在命令行中使用 -p'PASSWORD' 或在配置文件中明文保存密码

mytop --prompt -uroot

也可以 ~/.mytop 中建立默认的连接信息配置文件

user=root

pass=PASSWORD

host=localhost

db=test

delay=4

port=3306

socket=

# innotop

innotop 是一个监控 InnoDB 引擎数据表的监控工具,实时的显示 InnoDB 的各种状态

yum -y install innotop

# 监控界面

[RO] Dashboard (? for help) localhost, 69d, 16.10 QPS, 18/2/7 con/run/cac thds, 5.6.39-log

Uptime MaxSQL ReplLag QPS Cxns Run Miss Lock Tbls Repl SQL

69d 16.10 18 0.08 0 111

# 帮助界面

键入 ? 可以显示帮助界面

Switch to a different mode:

A Dashboard I InnoDB I/O Info Q Query List

B InnoDB Buffers K InnoDB Lock Waits R InnoDB Row Ops

C Command Summary L Locks S Variables & Status

D InnoDB Deadlocks M Replication Status T InnoDB Txns

F InnoDB FK Err O Open Tables U User Statistics

Actions:

d Change refresh interval q Quit innotop

k Kill a query's connection r Reverse sort order

n Switch to the next connection s Choose sort column

p Pause innotop x Kill a query

Other:

TAB Switch to the next server group / Quickly filter what you see

! Show license and warranty = Toggle aggregation

# Select/create server groups @ Select/create server connections

$ Edit configuration settings Clear quick-filters

Press any key to continue

# 基本用法

与 mytop 类似,可以通过 man innotop 或 innotop --help 获取详细说明,使用 --askpass 参数提示用户输入密码,而不讲密码明文显示在命令行中

innotop --askpass -uroot

# mysqladmin

mysqladmin 是 MySQL 自带的命令行工具,包含很多管理命令,详细通过 mysqladmin --help 查看,常用的例如 version status 命令

$ mysqladmin -uroot -p version

mysqladmin Ver 8.42 Distrib 5.6.39, for Linux on x86_64

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

Server version 5.6.39-log

Protocol version 10

Connection Localhost via UNIX socket

UNIX socket /home/mysql56/u01/mysql-5.6.39/run/mysql.sock

Uptime: 69 days 10 hours 49 min 4 sec

Threads: 19 Questions: 96755698 Slow queries: 1059055 Opens: 12564 Flush tables: 149 Open tables: 111 Queries per second avg: 16.124

$ mysqladmin -uroot -p status

Uptime: 6000568 Threads: 19 Questions: 96755987 Slow queries: 1059055 Opens: 12564 Flush tables: 149 Open tables: 111 Queries per second avg: 16.124

# MySQLTuner

MySQLTuner 是一个全面的 MySQL 状态检查工具,包括错误日志、慢查询日志、存储引擎、缓存、安全等方面,能够提供一些性能优化的建议。

wget http://mysqltuner.pl/ -O mysqltuner.pl

chmod 700 mysqltuner.pl

# 基本用法

使用时可能需要指定 host port user password 等参数

perl mysqltuner.pl --user root --password PASSWORD

输出结果到文件,如果指定了 --silent ,命令将静默执行,屏幕没有任何输出

perl mysqltuner.pl --user root --password PASSWORD --outputfile /home/mysql/out.txt

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值