this is how I’m getting the stats now:
echo -e “stats\nquit” | nc 127.0.0.1 11211
I can’t use expect as it’s not part of a default installation.
Is there a way to get memcached stats without nc?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your question doesn’t specify why you’re looking for an alternative to netcat, so it’s hard to to tell what you’re looking for. You could do it in
bashlike this:You could do it using
telnet:The
sleepis to precenttelnetfrom exiting before receiving a response frommemcached.You could also write something simple in
pythonorperlor some other high level scripting language. Or brush up on yourc. There are lots of options.