Skip to content

Instantly share code, notes, and snippets.

@houstondapaz
Last active March 15, 2022 19:56
Show Gist options
  • Save houstondapaz/bee176ef58f86314f8fc0ed8ea52ea27 to your computer and use it in GitHub Desktop.
Save houstondapaz/bee176ef58f86314f8fc0ed8ea52ea27 to your computer and use it in GitHub Desktop.
usefull comands
- REDIS
-- Del keys by pattern
EVAL "return redis.call('del', unpack(redis.call('keys', ARGV[1])))" 0 KEY_PATTERN*
or
EVAL "for _,k in ipairs(redis.call('keys','KEY_PATTERN*')) do redis.call('del',k) end" 0
- AWK
-- Get all node process id
netstat -ltnp | awk '$7 ~ /\/node$/ {print $7}' | awk 'gsub(/\/node/,"")'
@houstondapaz
Copy link
Author

To verify big keys on redis

redis-cli --bigkeys

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment