Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
litespeed_wiki:lsmcd:commands [2016/04/07 14:08]
Rob Holda [incr]
litespeed_wiki:lsmcd:commands [2016/04/07 19:36] (current)
Rob Holda
Line 8: Line 8:
 The following is a list of LSMCD commands useable in telnet, each with a brief description. For more information,​ see each command'​s page. The following is a list of LSMCD commands useable in telnet, each with a brief description. For more information,​ see each command'​s page.
  
-[[litespeed_wiki:​lsmcd:​commands:​get|get]] - Read the value tied to the user-provided key.+**[[litespeed_wiki:​lsmcd:​commands:​get|get]]** - Read the value tied to the user-provided key.
  
-[[litespeed_wiki:​lsmcd:​commands:​bget|bget]] - Read the binary value tied to the user-provided key.+**[[litespeed_wiki:​lsmcd:​commands:​bget|bget]]** - Read the binary value tied to the user-provided key.
  
-[[litespeed_wiki:​lsmcd:​commands:​gets|gets]] - Read the value tied to the user-provided key and its cas token (to be used with the [[litespeed_wiki:​lsmcd:​commands:​cas|cas]] command).+**[[litespeed_wiki:​lsmcd:​commands:​gets|gets]]** - Read the value tied to the user-provided key and its cas token (to be used with the **[[litespeed_wiki:​lsmcd:​commands:​cas|cas]]** command).
  
-[[litespeed_wiki:​lsmcd:​commands:​add|add]] - Add a key/value pair only if a pair does not already exist for the user-provided key.+**[[litespeed_wiki:​lsmcd:​commands:​add|add]]** - Add a key/value pair only if a pair does not already exist for the user-provided key.
  
-[[litespeed_wiki:​lsmcd:​commands:​set|set]] - Store a key/value pair. If a pair already exists for the user-provided key, overwrites it.+**[[litespeed_wiki:​lsmcd:​commands:​set|set]]** - Store a key/value pair. If a pair already exists for the user-provided key, overwrites it.
  
-[[litespeed_wiki:​lsmcd:​commands:​replace|replace]] - Store a key/value pair, but only if it already exists.+**[[litespeed_wiki:​lsmcd:​commands:​replace|replace]]** - Store a key/value pair, but only if it already exists.
  
-[[litespeed_wiki:​lsmcd:​commands:​append|append]] - Add data to an existing key after existing data.+**[[litespeed_wiki:​lsmcd:​commands:​append|append]]** - Add data to an existing key after existing data.
  
-[[litespeed_wiki:​lsmcd:​commands:​prepend|prepend]] - Add data to an existing key before existing data.+**[[litespeed_wiki:​lsmcd:​commands:​prepend|prepend]]** - Add data to an existing key before existing data.
  
-[[litespeed_wiki:​lsmcd:​commands:​cas|cas]] - Check-and-Set an item; store data only if no one else has updated since the last fetch, determined with the cas token from the [[litespeed_wiki:​lsmcd:​commands:​gets|gets]] command.+**[[litespeed_wiki:​lsmcd:​commands:​cas|cas]]** - Check-and-Set an item; store data only if no one else has updated since the last fetch, determined with the cas token from the **[[litespeed_wiki:​lsmcd:​commands:​gets|gets]]** command.
  
 +**[[litespeed_wiki:​lsmcd:​commands:​incr|incr]]** - Increment a numerical key’s value by the given number if the key/value pair exists.
  
-===== incr ===== +**[[litespeed_wiki:​lsmcd:​commands:​decr|decr]]** - Decrement ​numerical key's value by the given number if the key/value pair exists.
-Increment numerical key’s value by the given number if the key/value pair exists. +
-===== decr ===== +
-Decrement numerical keys value by the given number if the key/value pair exists.+
  
-**syntax:**  +**[[litespeed_wiki:lsmcd:​commands:​delete|delete]]** - Delete an existing ​key/value pair.
-<​code>​ +
-decr <key> <value> [noreply] +
-</​code>​ +
-**example:​** +
-<​code>​ +
-decr mykey 3+
  
-+**[[litespeed_wiki:lsmcd:​commands:​touch|touch]]** - Update the expiration time for key/value pair without fetching it.
-</​code>​ +
-**output notes:** +
-  * **3** → value to decrement by. +
-  * In this example, if "​mykey"​ had a value of "​5",​ after running **decr**, its value would be "​2"​.+
  
-===== delete ===== +**[[litespeed_wiki:​lsmcd:​commands:​stats|stats]]** - Print or reset general statistics.
-Delete an existing key/value pair.+
  
-**syntax:**  +**[[litespeed_wiki:lsmcd:​commands:​flush_all|flush_all]]** - Delete all key/value pairs immediately.
-<​code>​ +
-delete <key> [<​time>​] [noreply] +
-</code> +
-**example:​**  +
-<​code>​ +
-delete mykey+
  
-DELETED +**[[litespeed_wiki:​lsmcd:​commands:​version|version]]** - Print LSMCD server version.
-</​code>​+
  
-===== touch ===== +**[[litespeed_wiki:​lsmcd:​commands:​quit|quit]]** - Terminate telnet session.
-Update the expiration time for a key/value pair without fetching it.+
  
-**syntax:**  +**[[litespeed_wiki:lsmcd:commands:verbosity|verbosity]]** - Change the verbosity ​level of the output of LSMCD.
-<​code>​ +
-touch <key> <​TTL> ​[noreply] +
-</​code>​ +
-**example:​**  +
-<​code>​ +
-touch mykey 1200 +
- +
-TOUCHED +
-</​code>​ +
-**output notes:** +
-  * **1200** → new TTL in seconds +
- +
-===== stats ===== +
-Print or reset general statistics +
- +
-**syntax:**  +
-<​code>​ +
-stats [reset] +
-</​code>​ +
-**example:**  +
-<​code>​ +
-stats +
- +
-STAT pid 16825 +
-STAT version 1.0.0 +
-STAT pointer_size 64 +
-STAT rusage_user 0.300000 +
-STAT rusage_system 0.520000 +
-STAT cmd_get 10 +
-STAT cmd_set 11 +
-STAT cmd_flush 2 +
-STAT cmd_touch 2 +
-STAT get_hits 8 +
-STAT get_misses 2 +
-STAT delete_misses 0 +
-STAT delete_hits 1 +
-STAT incr_misses 0 +
-STAT incr_hits 1 +
-STAT decr_misses 1 +
-STAT decr_hits 1 +
-STAT cas_misses 0 +
-STAT cas_hits 1 +
-STAT cas_badval 0 +
-STAT touch_hits 2 +
-STAT touch_misses 0 +
-STAT auth_cmds 0 +
-STAT auth_errors 0 +
-END +
-</​code>​ +
-**example:**  +
-<​code>​ +
-stats reset +
- +
-RESET +
-</​code>​ +
- +
-===== flush_all ===== +
-Delete all key/value pairs immediately. +
- +
-**syntax:**  +
-<​code>​ +
-flush_all [<​time>​[noreply] +
-</​code>​ +
-**example:**  +
-<​code>​ +
-flush_all +
- +
-OK +
-</​code>​ +
- +
-===== version ===== +
-Print server version. +
- +
-**syntax:**  +
-<​code>​ +
-version +
-</​code>​ +
-**example:​**  +
-<​code>​ +
-version +
- +
-VERSION 1.0.0 +
-</​code>​ +
- +
-===== quit ===== +
-Terminate telnet session. +
- +
-**syntax:**  +
-<​code>​ +
-quit +
-</​code>​ +
-**example:​** +
-<​code>​ +
-quit +
- +
-Connection closed by foreign host. +
-</​code>​ +
- +
-===== verbosity ​===== +
-Increase log version. +
- +
-**syntax:**  +
-<​code>​ +
-verbosity <​level>​ [noreply] +
-</​code>​ +
-**example:​**  +
-<​code>​ +
-verbosity 1 +
- +
-OK +
-</​code>​+
  • Admin
  • Last modified: 2016/04/07 14:08
  • by Rob Holda