Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

redis_scanner

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redis_scanner

  • 0.1.6
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

RedisScanner Build Status

RedisScanner is a tiny tool for scanning all redis keys and creating statistic result. The features are the followings.

  • Scans keys using scan replacing keys command.
  • Creates statistic result by key's pattern.
  • Provide key's detail information which includes type and size.
  • Provide table format output..

Installation

Install redis_scanner in shell.

gem install redis_scanner

Installation prerequirement

You should install ruby first.

Usage

  • Get started

You can run it directly after install. It will scan local redis instance when you just input redis_scanner.

redis_scanner

The Output is like this:

+------------------------------------+-------+
| Key                                | Count |
+------------------------------------+-------+
| demo:user:<id>:counter             | 10000 |
| u:<uuid>:pf                        |    52 |
| sidekiq_demo:stat:failed:<date>    |     4 |
| sidekiq_demo:stat:processed:<date> |     4 |
| _sp_one:queue:default              |     1 |
| bh:queues                          |     1 |
...
+------------------------------------+-------+
redis_scanner -d -l 10

The Output is like this:

+------------------------------------+--------+-------+--------+---------+
| Key                                | Type   | Count | Size   | AvgSize |
+------------------------------------+--------+-------+--------+---------+
| demo:user:<id>:counter             | string | 10000 | 927510 |   92.75 |
| u:<uuid>:pf                        | hash   |    52 |    108 |    2.08 |
| sidekiq_demo:stat:failed:<date>    | string |     4 |      5 |    1.25 |
| sidekiq_demo:stat:processed:<date> | string |     4 |      6 |     1.5 |
| _sp_one:queue:default              | list   |     1 |      1 |     1.0 |
| bh:queues                          | set    |     1 |      1 |     1.0 |
| bh:retry                           | zset   |     1 |      1 |     1.0 |
| bh:stat:failed                     | string |     1 |      1 |     1.0 |
| bh:stat:processed                  | string |     1 |      1 |     1.0 |
| bus_app:app_two                    | hash   |     1 |      1 |     1.0 |
+------------------------------------+--------+-------+--------+---------+
  • Scan keys with some pattern
redis_scanner -m u:*
  • Output statistic result to a file
redis_scanner -f keys_stat.txt
  • Redis options. The options are same of redis-cli.
redis_scanner -h <host> -p <port> ...

Development

You are free to modify it for your need.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/xiewenwei/redis_scanner. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

FAQs

Package last updated on 07 Dec 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc