How to check Redis version
How to check Redis version

How To Find out Redis Version

In this tutorial, we will learn how to check Redis Server Version in various ways. There are several ways to find the Redis Version that is already installed on the system, at least there are 4 ways to find it. The following will explain how to check the Redis version.

Finding Redis Version (In Ubuntu Linux System)

Here are some ways to find the redis version installed on our system.

  1. redis-server –version
  2. redis-cli INFO server
  3. The INFO Command
  4. Start Redis in Standalone Mode

The detail explation will be provided below.

1. redis-server –version

From operating system shell prompt, we shoul execute command line :

$ redis-server --version 

Output :

ramans@infodiginet:~$ redis-server --version
Redis server v=6.0.16 sha=00000000:0 malloc=jemalloc-5.2.1 bits=64 build=a3fdef44459b3ad6

2. redis-cli INFO server

From operating system shell prompt, we should execute command line :

$ redis-cli INFO server

Output :

ramans@infodiginet:~$ redis-cli INFO server
# Server
redis_version:6.0.16
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:a3fdef44459b3ad6
redis_mode:standalone
os:Linux 6.0.0-060000-generic x86_64
arch_bits:64
multiplexing_api:epoll
atomicvar_api:atomic-builtin
gcc_version:11.2.0
process_id:6388
run_id:2c618a0a1fc1648e70737195d242cec87dd5d8e2
tcp_port:6379
uptime_in_seconds:1234
uptime_in_days:0
hz:10
configured_hz:10
lru_clock:11108203
executable:/usr/bin/redis-server
config_file:/etc/redis/redis.conf
io_threads_active:0

3. The INFO command

We will execute the INFO command, from redis-cli console. As shown below :

ramans@infodiginet:~$ redis-cli
127.0.0.1:6379> INFO server
# Server
redis_version:6.0.16
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:a3fdef44459b3ad6
redis_mode:standalone
os:Linux 6.0.0-060000-generic x86_64
arch_bits:64
multiplexing_api:epoll
atomicvar_api:atomic-builtin
gcc_version:11.2.0
process_id:6388
run_id:2c618a0a1fc1648e70737195d242cec87dd5d8e2
tcp_port:6379
uptime_in_seconds:948
uptime_in_days:0
hz:10
configured_hz:10
lru_clock:11107918
executable:/usr/bin/redis-server
config_file:/etc/redis/redis.conf
io_threads_active:0
127.0.0.1:6379>

4. Starting Standalone Server

In this option, we will startup Redis as standalone server by executing command line :

$ redis-server

Output :

ramans@infodiginet:~$ redis-server
9511:C 26 Dec 2022 18:07:45.998 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
9511:C 26 Dec 2022 18:07:45.998 # Redis version=6.0.16, bits=64, commit=00000000, modified=0, pid=9511, just started
9511:C 26 Dec 2022 18:07:45.998 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
9511:M 26 Dec 2022 18:07:46.000 * Increased maximum number of open files to 10032 (it was originally set to 1024).
                _._                                                  
           _.-``__ ''-._                                             
      _.-``    `.  `_.  ''-._           Redis 6.0.16 (00000000/0) 64 bit
  .-`` .-```.  ```\/    _.,_ ''-._                                   
 (    '      ,       .-`  | `,    )     Running in standalone mode
 |`-._`-...-` __...-.``-._|'` _.-'|     Port: 6379
 |    `-._   `._    /     _.-'    |     PID: 9511
  `-._    `-._  `-./  _.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |           http://redis.io        
  `-._    `-._`-.__.-'_.-'    _.-'                                   
 |`-._`-._    `-.__.-'    _.-'_.-'|                                  
 |    `-._`-._        _.-'_.-'    |                                  
  `-._    `-._`-.__.-'_.-'    _.-'                                   
      `-._    `-.__.-'    _.-'                                       
          `-._        _.-'                                           
              `-.__.-'                                               

9511:M 26 Dec 2022 18:07:46.001 # Server initialized
9511:M 26 Dec 2022 18:07:46.001 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
9511:M 26 Dec 2022 18:07:46.002 * Ready to accept connections

Conclusion

In this short tutorial we have learned how to check Redis version on Linux (Ubuntu) environment. I hope this turotial will be helpful.

(Visited 193 times, 1 visits today)

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *