Giter Club home page Giter Club logo

redisctl's Introduction

redisctl

redis tools ,e.g clean redis keys

Usage

build

go mod tidy
go build -o redisctl

show commands

Usage:                                                                                   ✔ ▓▒░
  redisctl [command]

Available Commands:
  clean-key   clean key
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command

Flags:
  -h, --help   help for redisctl

clean-key

Usage:
  redisctl clean-key [flags]

Flags:
      --concurrent int        concurrent (default 10)
  -d, --db int                redis db
      --delete-batch int      delete batch (default 500)
      --delete-delay-ms int   delete delay ms (default 80)
      --dry-run               dry run
  -h, --help                  help for clean-key
  -H, --host string           redis host
      --keys strings          keys
      --only-has-expire       only has expire
      --only-no-expire        only no expire
  -p, --password string       redis password
  -P, --port int              redis port (default 6379)
      --prefix                is prefix
      --scan-batch int        scan batch (default 500)
  -u, --username string       redis username

How to control the load on the target instance?

  • --concurrent control the ttl query concurrent,effective only when --only-has-expire or --only-no-expire exists
  • --delete-delay-ms control the delay time between delete operation,This is the most effective way

Common parameters

  • --only-has-expire, only delete keys that have expiration time
  • --only-no-expire, only delete keys that have no expiration time
  • --keys, specify the key to delete,eg: --keys "quest,test22"
  • --prefix, whether to use the key as a prefix to delete

Example

./redisctl clean-key --host  -p  --keys "quest" --prefix true

redisctl's People

Contributors

xiaozhuang-a avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.