How To Flush Contents Of a Memcached Server Using Command Line

https://w‮uttual.ww‬ri.com
How To Flush Contents Of a Memcached Server Using Command Line

To flush the contents of a Memcached server using the command line, you can use the memflush utility.

memflush is a command-line tool for flushing the contents of a Memcached server, and is included with the Memcached software package. To use memflush, you will need to have Memcached installed on your system.

To flush the contents of a Memcached server, you will need to know the hostname and port number of the server. By default, Memcached listens on port 11211 on the localhost (127.0.0.1).

To flush the contents of a Memcached server running on the localhost on port 11211, you can use the following command:

memflush -h 127.0.0.1 -p 11211

This will flush the contents of the Memcached server running on the localhost on port 11211.

If the Memcached server is running on a different host or port, you can specify the hostname and port number using the -h and -p options, respectively. For example, to flush the contents of a Memcached server running on the host memcached.example.com on port 11212, you can use the following command:

memflush -h memcached.example.com -p 11212

Keep in mind that flushing the contents of a Memcached server will delete all of the stored data, and may have unintended consequences if the server is being used by applications or services. Use caution when flushing the contents of a Memcached server, and make sure that it is appropriate to do so. For more information about using the memflush utility, you can consult its documentation or seek assistance from a qualified Memcached administrator.

Created Time:2017-10-28 21:38:52  Author:lautturi