HowTo: Flush Contents Of a Memcached Server Using Command Line
2014-04-13 23:55
681 查看
You can invalidate all existing cache items using the flush_all command. This command does not pause the server, as
it returns immediately. It does not free up or flush memory at all, it just causes all items to expire. You can send flush_all command
using any one of the following method:
nc command - The nc (also know as netcat) utility is used for just about anything under the sun involving TCP or UDP.
telnet command - The telnet command is used to communicate with another host using the TELNET protocol.
The nc (netcat) command is a simple unix utility which reads and writes data across network connections, using TCP or UDP protocol. It can simply connect to the memcached instance and and invalidate all existing cache:
OR
OR
Where,
192.168.1.10 - memcached server instance
localhost - memcached server instance
11211 - memcached server port.
Telnet Command Example To Flush Contents Of Memcached Server
Type the following command:
In this example connect to 192.168.1.10 11211 and issue the flush_all command as follows:
Sample outputs:
原文地址:http://www.cyberciti.biz/faq/linux-unix-flush-contents-of-memcached-instance/
it returns immediately. It does not free up or flush memory at all, it just causes all items to expire. You can send flush_all command
using any one of the following method:
nc command - The nc (also know as netcat) utility is used for just about anything under the sun involving TCP or UDP.
telnet command - The telnet command is used to communicate with another host using the TELNET protocol.
netcat (nc) Command Example To Flush Contents Of Memcached Server
The nc (netcat) command is a simple unix utility which reads and writes data across network connections, using TCP or UDP protocol. It can simply connect to the memcached instance and and invalidate all existing cache:echo 'flush_all' | nc localhost 11211
OR
echo 'flush_all' | netcat localhost 11211
OR
nc 192.168.1.10 11211<<<"flush_all"
Where,
192.168.1.10 - memcached server instance
localhost - memcached server instance
11211 - memcached server port.
Telnet Command Example To Flush Contents Of Memcached Server
Type the following command:
telnet your-memcached-server-ip PORT
In this example connect to 192.168.1.10 11211 and issue the flush_all command as follows:
$ telnet 192.168.1.10 11211
Sample outputs:
Trying 192.168.1.10... Connected to cache01.nixcraft.net.in. Escape character is ‘^]’. flush_all OK quit Connection to cache01.nixcraft.net.in closed by foreign host.
原文地址:http://www.cyberciti.biz/faq/linux-unix-flush-contents-of-memcached-instance/
相关文章推荐
- How to Take Ownership of a File/Folder Using Command-Line in Windows 7 or newer version System
- use xlight's command line to install windows service of xlight ftp server
- HOWTO: Get the command line of a process(转)
- ORACLE EBS:Can't connect to X11 window server using '**' as the value of the DISPLAY variable.
- Error: mysql error: mysql: [Warning] Using a password on the command line interface can be insecure
- 命令行的艺术(The Art of Command Line 中文翻译)
- The Web server is configured to not list the contents of this directory
- List of chrome's command line switch
- Using the SetEnv.bat Command Line
- Adding an existing project to GitHub using the command line
- How to Cheat at Windows System Administration Using Command Line Scripts
- Starting Cache Servers Using Node Manager of WebLogic Server 10.3.4
- stopManagedWebLogic.sh - Stopping a managed server from the command line
- Using CURL to exploit LFI to RCE from command line
- using tail recursion to reverse words of line ( just for fun)
- mysqldump Warning: Using a password on the command line interface can be insecure.
- List of FTP commands for the Microsoft command-line FTP client
- MySQL 解决数据导出问题:Using a password on the command line interface can be insecure.
- Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
- SP2-0042: unknown command--rest of line ignored.