Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to find Redis Logs on Ubuntu?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 779
    Comment on it

    This blog will let you know how to do troubleshooting in Redis. Redis logs are stored at location /var/log/redis/redis-server.log

    To view the last 10 lines:

     sudo tail /var/log/redis/redis-server.log 
    

    On Ubuntu 14.04 Redis log files are located at /var/log/redis_6379.log.

    To view the last 10 lines:

      sudo tail /var/log/redis_6379.log

     

    How to Check Archived Log Files

     

    Redis also archives older log files. See a list of the archived logs with: 

     ls /var/log/redis 

    Output

    redis-server.log  redis-server.log.1.gz
    

    You can gunzip an older file:

    sudo gunzip /var/log/redis/redis-server.log.1.gz
    

    Now to see its last 10 lines:

    sudo tail /var/log/redis/redis-server.log.1
    

    Using find to Search for Logs

    If logs are not found in any of these locations then you can find it by more general search using find in the /var/logs directory:

    find /var/log/* -name *redis*
    

    Or you can search your entire system. It will turn up a few permission warnings, which is normal.It will also turn up every file with redis in the name, which includes installation files:

    find / -path /sys -prune -o -path /proc -prune -o -name *redis*
    

    Setting the Log Location in redis.conf

    Log files of Redis is specified in Redis's configuration file, redis.conf, often located at /etc/redis/redis.conf.

    Open that file for editing:

    sudo nano /etc/redis/redis.conf 

    Locate the logfile line:

    /etc/redis/redis.conf

    logfile /var/log/redis/redis-server.log
    

     

    Thanks for reading the blog.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: