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

How to install the redis performance monitoring tool redis-stat

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

Share

Shulou(Shulou.com)05/31 Report--

This article mainly shows you "redis performance monitoring tool redis-stat how to install", the content is easy to understand, clear, hope to help you solve doubts, the following let the editor lead you to study and learn "redis performance monitoring tool redis-stat how to install" this article.

Redis-stat is a tool written in Ruby to monitor the performance of Redis and can be graphically displayed in web.

Installation steps:

one。 Prepare software and requirements:

The redis-stat installation system requires that the ruby version must be greater than 1.9.2, otherwise an error will be reported. It is recommended to install the ruby2.2.7 version with source code.

Download ruby 2.2.7

# wget https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.7.tar.gz

Decompress:

# tar zxvf ruby-2.2.7.tar.gz-C / root/ruby

Compile and install:

# cd / root/ruby/ruby-2.2.7

#. / configure

# make

# make install

[root@test bin] # which ruby

/ usr/local/bin/ruby

[root@test bin] # ruby-v

Ruby 2.2.7p470 (2017-03-28 revision 58194) [x86_64-linux]

Gem version:

# gem-v

[root@test ruby-2.2.7] # gem-v

2.4.5.2

two。 Install redis-stat:

# cd / home/

The git tool needs to be installed:

# yum install git

# git clone https://github.com/junegunn/redis-stat.git

# cd / home/redis-stat/bin

#. / redis-stat-help

# there is an error, no such file to load-- redis-stat (LoadError), which needs to be installed with gem

# gem install redis-stat

After installation, the operation still reports an error:

[root@test bin] #. / redis-stat

/ usr/local/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file-- readline (LoadError)

From / usr/local/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'

From / usr/local/lib/ruby/gems/2.2.0/gems/redis-stat-0.4.14/lib/redis-stat.rb:17:in `'

From / usr/local/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `require'

From / usr/local/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'

From / usr/local/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:39:in `require'

From. / redis-stat:4:in `'

[root@test bin] #

Rb-readline needs to be installed

[root@test bin] # gem install rb-readline

Fetching: rb-readline-0.5.5.gem (100%)

Successfully installed rb-readline-0.5.5

Parsing documentation for rb-readline-0.5.5

Installing ri documentation for rb-readline-0.5.5

Done installing documentation for rb-readline after 3 seconds

1 gem installed

The command is normal after running it again:

[root@test bin] #. / redis-stat-help

Usage: redis-stat [HOST [: PORT]...] [INTERVAL [COUNT]]

-a,-- auth=PASSWORD Password

-v,-- verbose Show more info

-- style=STYLE Output style: unicode | ascii

-- no-color Suppress ANSI color codes

-- csv [= CSV_FILE] Print or save the result in CSV

-- es=ELASTICSEARCH_URL Send results to ElasticSearch: [http://]HOST[:PORT][/INDEX]

-- server [= PORT] Launch redis-stat web server (default port: 63790)

-- daemon Daemonize redis-stat. Must be used with-- server option.

-- version Show version

-- help Show this message

The help information is explained as follows:

-a,-- auth=PASSWORD sets the password

-v,-- verbose displays more information

-- style=STYLE output Encoding Type: unicode | ascii

-- no-color cancels ANSI color coding

-- csv=OUTPUT_CSV_FILE_PATH stores the results in CSV format

Es=ELASTICSEARCH_URL sends the result to ElasticSearch: [http://]HOST[:PORT][/INDEX]

-- server [= PORT] runs the web server of redis-stat (default port number: 63790). You can specify the port to start.

Daemon makes redis-stat a process. Must use the-- server option

-- version displays the version number

-- help displays help information

A running example of a monitoring instance:

[root@test bin] #. / redis-stat 10.10.13.189 6379 1 10-verbose

┌────┬─┐

│ │ 10.10.13.189 │

├────┼─┤

│ redis_version │ 4.0.2 │

│ redis_mode │ standalone │

│ process_id │ 13270 │

│ uptime_in_seconds │ 19379512 │

│ uptime_in_days │ 224 │

│ role │ master │

│ connected_slaves │ 0 │

│ aof_enabled │ 0 │

│ rdb_bgsave_in_progress │ 0 │

│ rdb_last_save_time │ 1508202924 │

└────┴─┘

┌─┬───┬─┬───┬────┬─┬────┬─ ┬────┬───┐

Time us sy cl bcl rej/s mem rss frag keys cmd/s cmd exp/s exp evt/s evt hit%/s hit/s hit mis/s mis aofcs aofbs chsv psch psp

├─┼───┼─┼───┼────┼─┼────┼─ ┼────┼───┤

16:27:16-130-1.63GB 1.79GB 1.10520-2.85G-317k-0-941m-552k 0B 0B 6.02m 10

└─┴───┴─┴───┴────┴─┴────┴─ ┴────┴───┘

Elapsed: 0.12 sec.

[root@test bin] #. / redis-stat-- verbose-- server=8090 5 10.10.13.189 server=8090 6379 10.10.13.190

[1] 29049

Note: after setting-server=8090, redis-stat will launch a web server with port number 8090 in the background.

[root@test bin] # = Sinatra/1.3.6 has taken the stage on 8090 for production with backup from Thin

> > Thin web server (v1.5.1 codename Straight Razor)

> > Maximum connections set to 1024

> > Listening on 0.0.0.0 8090, CTRL+C to stop

[root@test bin] # ┌────┬─┬─┐

│ │ 10.10.13.189 │ 6379 │ 10.10.13.1906379 │

├────┼─┼─┤

│ redis_version │ 4.0.2 │ 4.0.2 │

│ redis_mode │ standalone │ standalone │

│ process_id │ 13270 │ 13382 │

│ uptime_in_seconds │ 19380042 │ 19379995 │

│ uptime_in_days │ 224 │ 224 │

│ role │ master │ master │

│ connected_slaves │ 0 │ 1 │

│ aof_enabled │ 0 │ 0 │

│ rdb_bgsave_in_progress │ 0 │ 0 │

│ rdb_last_save_time │ 1508202924 │ 1510540281 │

└────┴─┴─┘

[root@test bin] #

┌─┬────┬─┬───┬─┬── ───┬──── >

Time us sy cl bcl rej/s mem rss frag keys cmd/s cmd exp/s exp evt/s evt hit%/s hit/s hit mis/s mis aofcs aofbs chsv psch >

├─┼────┼─┼───┼─┼── ───┼──── >

16:36:06-4960-3.66GB 4.02GB 2.20559-95.7G-317k-0-5.58G-5.89G 0B 0B 20.2G 1 >

└─┴────┴─┴───┴─┴── ───┴──── >

[root@test bin] #

[root@test bin] #

16:36:11 5 10 493 00 3.65GB 4.02GB 2.20 528 5.06k 95.7G 0317k 0 0.78 3.20 5.58G 409 5.89G 0B 0B 20.2G 1 >

16:36:16 7 15 492 00 3.65GB 4.02GB 2.20 537 5.73k 95.7G 0.40 317k 00 0.36 1.60 5.58G 437 5.89G 0B 0B 20.2G 1 >

16:36:21 5 15 492 00 3.65GB 4.02GB 2.20 528 5.22k 95.7G 0317k 0 0.70 2.80 5.58G 399 5.89G 0B 20.2G 1 >

16:36:26 6 15 509 00 3.65GB 4.02GB 2.20 527 5.28k 95.7G 0317k 00 1.00 4.00 5.58G 396 5.89G 0B 0B 20.2G 1 >

16:36:31 9 20 509 00 3.65GB 4.02GB 2.20 528 8.16k 95.7G 0317k 0 0.35 2.20 5.58G 623 5.89G 0B 0B 20.2G 1 >

16:36:36 9 20 51000 3.65GB 4.02GB 2.20 525 8.65k 95.7G 0317k 0 0.36 2.40 5.58G 660 5.89G 0B 20.2G 1 >

16:36:41 5 15 51000 3.65GB 4.02GB 2.20 533 5.70k 95.7G 0317k 0 0.63 2.80 5.58G 445 5.89G 0B 0B 20.2G 1 >

16:36:46 4 15 508 00 3.65GB 4.02GB 2.20 526 4.42k 95.7G 0317k 0 1.10 3.80 5.58G 342 5.89G 0B 0B 20.2G 1 >

16:36:51 6 10 509 00 3.65GB 4.02GB 2.20 536 5.10k 95.7G 0317k 00 1.00 4.00 5.58G 395 5.89G 0B 0B 20.2G 1 >

16:36:56 510 51000 3.65GB 4.02GB 2.20 529 4.89k 95.7G 0.20 317k 00 0.90 3.40 5.58G 374 5.89G 0B 0B 20.2G 1 >

16:37:01 5 15 51000 3.65GB 4.02GB 2.20 528 5.29k 95.7G 0317k 0 0.68 2.80 5.58G 409 5.89G 0B 0B 20.2G 1 >

16:37:06 8 20 511 00 3.65GB 4.02GB 2.20 545 7.99k 95.7G 0317k 00 0.49 3.00 5.58G 615 5.89G 0B 20.2G 1 >

16:37:11 6 15 511 00 3.65GB 4.02GB 2.20 538 5.37k 95.7G 0317k 0 0.52 2.20 5.58G 424 5.89G 0B 20.2G 1 >

16:37:16 5 15 509 00 3.66GB 4.02GB 2.20 556 5.49k 95.7G 0.20 317k 0 0.99 4.20 5.58G 421 5.89G 0B 0B 20.2G 1 >

16:37:21 8 20 508 00 3.66GB 4.02GB 2.20 545 7.72k 95.7G 0317k 0 0.57 3.40 5.58G 588 5.89G 0B 0B 20.2G 1 >

16:37:26 7 20 507 00 3.65GB 4.02GB 2.20 527 8.24k 95.7G 0 317k 0 0.70 4.40 5.58G 628 5.89G 0B 0B 20.2G 1 >

16:37:31 6 15 508 00 3.65GB 4.02GB 2.20 538 6.67k 95.7G 0317k 00 0.35 1.80 5.58G 507 5.89G 0B 0B 20.2G 1 >

16:37:36 5 15 507 00 3.65GB 4.02GB 2.20 528 5.33k 95.7G 0317k 00 1.46 6.00 5.58G 404 5.89G 0B 0B 20.2G 1 >

16:37:41 6 15 497 00 3.65GB 4.02GB 2.20 525 6.32k 95.7G 0317k 0 0.49 2.40 5.58G 483 5.89G 0B 20.2G 1 >

16:37:46 5 15 495 00 3.65GB 4.02GB 2.20 525 5.11k 95.7G 0317k 0 0.66 2.60 5.58G 391 5.89G 0B 0B 20.2G 1 >

16:37:51 8 20 486 00 3.65GB 4.02GB 2.20 525 7.67k 95.7G 0317k 0 0.38 2.20 5.58G 577 5.89G 0B 0B 20.2G 1 >

16:37:56 5 10 486 00 3.65GB 4.02GB 2.20 523 5.15k 95.7G 0317k 0 0.44 1.80 5.58G 404 5.89G 0B 0B 20.2G 1 >

16:38:01 5 10 488 00 3.65GB 4.02GB 2.20 538 4.33k 95.7G 0 317k 00 0.89 3.00 5.58G 332 5.89G 0B 20.2G 1 >

16:38:06 6 15 49 000 3.65GB 4.01GB 2.20 525 6.10k 95.7G 0317k 0 0.50 2.40 5.58G 477 5.89G 0B 0B 20.2G 1 >

16:38:11 5 15 488 00 3.65GB 4.02GB 2.20 534 5.86k 95.7G 0317k 00 0.45 2.00 5.58G 442 5.89G 0B 20.2G 1 >

16:38:16 6 15 49 000 3.65GB 4.02GB 2.20 528 5.85k 95.7G 0.20 317k 0 0.58 2.60 5.58G 447 5.89G 0B 0B 20.2G 1 >

16:38:21 6 20 487 00 3.65GB 4.02GB 2.20 530 6.65k 95.7G 0317k 0 0.56 2.80 5.58G 501 5.89G 0B 0B 20.2G 1 >

16:38:26 5 15 486 00 3.65GB 4.02GB 2.20 524 5.80k 95.7G 0 317k 00 0.66 3.00 5.58G 449 5.89G 0B 0B 20.2G 1 >

16:38:31 5 10 486 00 3.65GB 4.02GB 2.20 529 4.78k 95.7G 0317k 0 0.70 2.60 5.58G 370 5.89G 0B 0B 20.2G 1 >

16:38:36 5 15 484 00 3.65GB 4.02GB 2.20 524 6.40k 95.7G 0317k 00 0.20 1.00 5.58G 492 5.89G 0B 20.2G 1 >

16:38:41 5 15 483 00 3.65GB 4.02GB 2.20 527 4.39k 95.7G 0317k 0 0.64 2.20 5.58G 342 5.89G 0B 0B 20.2G 1 >

16:38:46 5 15 483 00 3.65GB 4.02GB 2.20 532 5.84k 95.7G 0317k 00 0.68 3.00 5.58G 439 5.89G 0B 20.2G 1 >

16:38:51 5 10 486 00 3.65GB 4.01GB 2.20 528 4.93k 95.7G 0317k 00 0.51 2.00 5.58G 388 5.89G 0B 20.2G 1 >

16:38:56 6 15 486 00 3.65GB 4.01GB 2.20 528 6.38k 95.7G 0317k 0 0.34 1.60 5.58G 470 5.89G 0B 0B 20.2G 1 >

16:39:01 4 10 488 00 3.65GB 4.01GB 2.20 524 4.31k 95.7G 0317k 0 0.51 1.80 5.58G 351 5.89G 0B 0B 20.2G 1 >

16:39:06 6 15 489 00 3.66GB 4.01GB 2.20 563 5.29k 95.7G 0317k 0 0.56 2.20 5.58G 391 5.89G 0B 0B 20.2G 1 >

16:39:11 7 20 49 000 3.65GB 4.01GB 2.20 526 7.76k 95.7G 0317k 000.40 2.40 5.58G 604 5.89G 0B 0B 20.2G 1 >

16:39:16 6 20 488 00 3.65GB 4.01GB 2.20 529 7.54k 95.7G 0.20 317k 0 0.56 3.20 5.58G 563 5.89G 0B 0B 20.2G 1 >

16:39:21 6 20 490 00 3.65GB 4.01GB 2.20 525 7.11k 95.7G 0317k 00 0.36 2.00 5.58G 546 5.89G 0B 20.2G 1 >

16:39:26 5 15 489 00 3.65GB 4.01GB 2.20 525 5.42k 95.7G 0317k 0 0.38 1.60 5.58G 419 5.89G 0B 0B 20.2G 1 >

16:39:31 8 20 498 00 3.65GB 4.01GB 2.20 526 8.05k 95.7G 0317k 0 0.47 2.80 5.58G 597 5.89G 0B 0B 20.2G 1 >

16:39:36 8 15 500 00 3.66GB 4.01GB 2.20 530 6.56k 95.7G 0317k 00 0.36 1.80 5.58G 492 5.89G 0B 20.2G 1 >

16:39:41 8 20 508 00 3.65GB 4.01GB 2.20 530 8.36k 95.7G 0317k 0 0.34 2.20 5.58G 649 5.89G 0B 0B 20.2G 1 >

16:39:46 5 15 507 00 3.65GB 4.01GB 2.20 525 4.70k 95.7G 0317k 0 0.33 1.20 5.58G 363 5.89G 0B 0B 20.2G 1 >

16:39:51 6 10 509 00 3.65GB 4.01GB 2.20 539 4.75k 95.7G 0317k 0 1.15 4.20 5.58G 361 5.89G 0B 0B 20.2G 1 >

16:39:56 6 15 509 00 3.65GB 4.01GB 2.20 526 5.83k 95.7G 0317k 0 0.69 3.20 5.58G 463 5.89G 0B 0B 20.2G 1 >

16:40:01 5 20 513 00 3.65GB 4.01GB 2.20 526 6.70k 95.7G 0317k 000.49 2.40 5.58G 483 5.89G 0B 20.2G 1 >

├─┼────┼─┼───┼─┼── ───┼──── >

Time us sy cl bcl rej/s mem rss frag keys cmd/s cmd exp/s exp evt/s evt hit%/s hit/s hit mis/s mis aofcs aofbs chsv psch >

├─┼────┼─┼───┼─┼── ───┼──── >

16:40:06 8 15 511 00 3.65GB 4.01GB 2.20 533 6.12k 95.7G 0.80 317k 0.000.30 1.40 5.58G 469 5.89G 0B 0B 20.2G 1 >

16:40:11 8 20 511 00 3.66GB 4.01GB 2.20 527 7.15k 95.7G 0.20 317k 0 0.41 2.20 5.58G 541 5.89G 0B 0B 20.2G 1 >

16:40:16 5 15 511 00 3.65GB 4.01GB 2.20 527 6.60k 95.7G 0317k 0 0.47 2.40 5.58G 503 5.89G 0B 0B 20.2G 1 >

16:40:21 6 15 51000 3.65GB 4.01GB 2.20 536 4.52k 95.7G 0317k 0 0.63 2.20 5.58G 349 5.89G 0B 0B 20.2G 1 >

└─┴────┴─┴───┴─┴── ───┴──── > ^ C

16:40:26 5 15 508 00 3.65GB 4.01GB 2.20 537 5.27k 95.7G 0317k 0 0.54 2.20 5.58G 403 5.89G 0B 0B 20.2G 1 >

└─┴────┴─┴───┴─┴── ───┴──── > ps

The web graphical interface is shown as follows:

These are all the contents of the article "how to install the redis performance Monitoring tool redis-stat". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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

Database

Wechat

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

12
Report