Last active
June 3, 2022 05:49
-
-
Save flavono123/cf20f646ed9777fd3359106a93fc4565 to your computer and use it in GitHub Desktop.
Memcached dump all exptimes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Include infinite | |
| echo 'lru_crawler metadump all' | nc 127.0.0.1 11211 | awk '{print $2}' | awk -F'=' '{if ($2==-1) {print "infinite"} else {system("date -d@"$2)}}' | |
| # Exclue infinite | |
| echo 'lru_crawler metadump all' | nc 127.0.0.1 11211 | awk '{print $2}' | awk -F'=' '$2 ~ !/-1/{system("date -d@"$2)}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment