---
title: "memcached.run"
author: "floydd"
date: "2009-06-05T14:26:00Z"
tags: []
slug: "memcached-run"
draft: false
lastmod: "2011-12-26T12:02:46Z"
id: 1326361
url: "https://floydd.iteye.com/blog/1326361"
---

#!/bin/sh

ps -e -o pid -o cmd |grep memcached|awk '{print $1}'|xargs kill $$1 -9

echo 'shutdown all memcache...'  
sleep 2

for L in 12000 12001 12002 12003 ; do  
memcached -d -m 25 -u root -l 192.168.1.190 -p $L  
echo 'memcache start at port:' $L  
done