# redis

## 운영

### redis-cli

```bash
# 10 ms (default) 이상 걸리는 명령 확인
# slowlog get
127.0.0.1:6379> slowlog get
1) 1) (integer) 9                    # ID
   2) (integer) 1680993215           # 실행시간
   3) (integer) 774374               # 수행시간 (microsecond)
   4) 1) "FLUSHALL"                  # 명령
   5) "172.17.0.1:58704"             # client ip/port
   6) "redisinsight-cli-abf5a888"    # client name
   
# Redis 정보 확인
# info
127.0.0.1:6379> info
redis_version:7.2.2
...

# 레디스 통계 정보 (메모리 사용률)
# redis-cli --stat
root@6cc8a7e3f121:/data# redis-cli --stat
------- data ------ --------------------- load -------------------- - child -
keys       mem      clients blocked requests            connections
1          1.01M    1       0       6 (+0)              2
1          1022.95K 1       0       7 (+1)              2
1          1023.95K 1       0       8 (+1)              2
1          1.00M    1       0       9 (+1)              2
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://programmer-jjy.gitbook.io/second-brain/cheat-sheet/tools/redis.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
