Code Monkey home page Code Monkey logo

Comments (10)

joelcox avatar joelcox commented on May 23, 2024

The real question is, why does the Redis protocol reply with a bulk reply instead of a nice multi line bulk?!

from codeigniter-redis.

tinkertim avatar tinkertim commented on May 23, 2024

I'm .. rather .. scratching my head on that too. Presumably, even shell scripts should be able to parse the INFO output, which also explains the way it's commented, and someone did come up with a collection of BASH functions to use Redis.

from codeigniter-redis.

joelcox avatar joelcox commented on May 23, 2024

Ah well. What about this?

a7776b4

from codeigniter-redis.

tinkertim avatar tinkertim commented on May 23, 2024

Almost identical to what I was about to push. That works, please merge it into develop.

from codeigniter-redis.

joelcox avatar joelcox commented on May 23, 2024

Done.

from codeigniter-redis.

tinkertim avatar tinkertim commented on May 23, 2024

Ey, note that $parts[1] does not exist if the returned line is a comment. Need to check if $parts[1] is set before using it. Sorry I missed that, I just wasn't used to responses returning comments :)

from codeigniter-redis.

joelcox avatar joelcox commented on May 23, 2024

Ah, a comment in info? How would this be set? My INFO returned a nice clean list, so I didn't consider this.

On May 16, 2012, at 7:06 PM, Tim Post [email protected] wrote:

Ey, note that $parts[0] does not exist if the returned line is a comment. Need to check if explode() returned an empty array before using $parts as an index.


Reply to this email directly or view it on GitHub:
#15 (comment)

from codeigniter-redis.

tinkertim avatar tinkertim commented on May 23, 2024

This is a partial dump of my output on my dev box (running the latest redis RC):

redis 127.0.0.1:6379> INFO
# Server
redis_version:2.5.9
redis_git_sha1:00000000
redis_git_dirty:0
os:Linux 2.6.18-274.12.1.el5xen x86_64
arch_bits:64
multiplexing_api:epoll
gcc_version:4.1.2
process_id:25360
run_id:0348359726b6a68fcf5ac070db7bcce7f520aa85
tcp_port:6379
uptime_in_seconds:896604
uptime_in_days:10
lru_clock:1601421

# Clients
connected_clients:1
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0

# Memory

Somehow I remember them being in 2.4.13, but I could definitely be incorrect - I don't pay much attention to what changed except for the major changes that Salvatore tweets. Anyway, they're definitely in 2.6.0-rc3 ... so that simple check future proofs things a bit.

from codeigniter-redis.

joelcox avatar joelcox commented on May 23, 2024

No sign of these comments in 2.4.13.

from codeigniter-redis.

joelcox avatar joelcox commented on May 23, 2024

6f78c1e

from codeigniter-redis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.