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:interaction [2016/04/06 19:11]
Rob Holda [bget]
litespeed_wiki:lsmcd:interaction [2016/04/06 20:00]
Rob Holda removed
Line 1: Line 1:
-====== ​Interacting with LSMCD ======+====== LSMCD Commands ​======
  
 In order to connect to and interact with LSMCD, you can use telnet to connect to a one of the IP addresses and port numbers set in **Cached.Addr**. For example, with the default settings, you would connect using the following command: In order to connect to and interact with LSMCD, you can use telnet to connect to a one of the IP addresses and port numbers set in **Cached.Addr**. For example, with the default settings, you would connect using the following command:
Line 6: Line 6:
 </​code>​ </​code>​
  
-====== LSMCD Commands ====== +The following is a list of LSMCD commands useable in telnet, each with a description, the command'​s syntax, an example ​of use (including user input and system output ​separated by an empty line), and an explanation of potentially confusing values. Note: in the syntax ​sectionsvalues enclosed in <> indicate a required value while values enclosed in [] indicate an optional one.
- +
-The following is a list of LSMCD commands useable in telnet, each with a description,​ an example use (including user input and system output), syntax, and an explanation of potentially confusing values. Note: for syntax, < and > indicate a required value while [ and ] indicate an optional one.+
  
 ===== get ===== ===== get =====
Line 32: Line 30:
 ===== bget ===== ===== bget =====
  
-Binary get.+Read a binary value.
  
 **syntax:** **syntax:**
Line 43: Line 41:
  
 VALUE mykey 0 10 VALUE mykey 0 10
-1011101010+abcdefghij
 END</​code>​ END</​code>​
 **output notes:** **output notes:**
Line 51: Line 49:
  
 ===== gets ===== ===== gets =====
-Read a value and its **cas token** (to be used with the **cas** command).+Read a value and its cas token (to be used with the **cas** command).
  
 **syntax:​** ​ **syntax:​** ​
Line 60: Line 58:
 <​code>​ <​code>​
 gets mykey gets mykey
-</​code>​ +
-**output:**  +
-<​code>​+
 VALUE mykey 0 10 9 VALUE mykey 0 10 9
- myvalueabc +myvalueabc 
- END+END
 </​code>​ </​code>​
 **output notes:** **output notes:**
   * **0** → no flags   * **0** → no flags
   * **10** → Size in bytes   * **10** → Size in bytes
-  * **9** → unique ​**cas token** number+  * **9** → unique cas token number
  
 ===== add ===== ===== add =====
Line 82: Line 78:
 <​code>​ <​code>​
 add newkey 0 120 10 add newkey 0 120 10
-</​code>​ 
-**output:​** ​ 
-<​code>​ 
 myvalueabc myvalueabc
- STORED+ 
 +STORED
 </​code>​ </​code>​
 **output notes:** **output notes:**
Line 101: Line 95:
 set <key> <​flags>​ <TTL> <​length>​ [noreply] \r\n <​value>​ \r\n set <key> <​flags>​ <TTL> <​length>​ [noreply] \r\n <​value>​ \r\n
 </​code>​ </​code>​
 +
 +**parameters:​**
 +  * **flags** - A 32-bit unsigned integer that the server stores with the data provided by the user, and returns along with the data when the item is retrieved.
 +  * **TTL**
 +  * **length**
 +  * **noreply**
 +  * **value**
 +
 **example:​** ​ **example:​** ​
 <​code>​ <​code>​
 set mykey 0 120 10 set mykey 0 120 10
-</​code>​ 
-**output:** 
-<​code>​ 
 myvalueabc myvalueabc
- STORED+ 
 +STORED
 </​code>​ </​code>​
-**output notes:** 
-  * **0** → no flags 
-  * **120** → TTL in seconds 
-  * **10** → Size in bytes 
-  * **myvalueabc** → value to set "​mykey"​ to 
- 
 ===== replace ===== ===== replace =====
  
Line 127: Line 121:
 <​code>​ <​code>​
 replace mykey 0 120 10 replace mykey 0 120 10
-</​code>​ 
-**output:** 
-<​code>​ 
 myvalueabc myvalueabc
- STORED+ 
 +STORED
 </​code>​ </​code>​
 **output notes:** **output notes:**
Line 149: Line 141:
 <​code>​ <​code>​
 append mykey 0 120 10 append mykey 0 120 10
-</​code>​ 
-**output:** 
-<​code>​ 
 defghijklm defghijklm
- STORED+ 
 +STORED
 </​code>​ </​code>​
 **output notes:** **output notes:**
Line 171: Line 161:
 <​code>​ <​code>​
 prepend mykey 0 120 10 prepend mykey 0 120 10
-</​code>​ 
-**output:** 
-<​code>​ 
 abcdeabcde abcdeabcde
- STORED+ 
 +STORED
 </​code>​ </​code>​
 **output notes:** **output notes:**
Line 184: Line 172:
  
 ===== 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 **gets** command.+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 **gets** command.
  
 **syntax:** **syntax:**
Line 193: Line 181:
 <​code>​ <​code>​
 cas mykey 0 120 10 2 cas mykey 0 120 10 2
-</​code>​ 
-**output:** 
-<​code>​ 
 abcdeabcde abcdeabcde
- STORED+ 
 +STORED
 </​code>​ </​code>​
 **output notes:** **output notes:**
Line 215: Line 201:
 <​code>​ <​code>​
 incr mykey 4 incr mykey 4
-</​code>​ +
-**output:​** +
-<​code>​+
 5 5
 </​code>​ </​code>​
Line 234: Line 218:
 <​code>​ <​code>​
 decr mykey 3 decr mykey 3
-</​code>​ +
-**output:**  +
-<​code>​+
 2 2
 </​code>​ </​code>​
Line 253: Line 235:
 <​code>​ <​code>​
 delete mykey delete mykey
-</​code>​ +
-**output:**  +
-<​code>​+
 DELETED DELETED
 </​code>​ </​code>​
Line 269: Line 249:
 <​code>​ <​code>​
 touch mykey 1200 touch mykey 1200
-</​code>​ +
-**output:**  +
-<​code>​+
 TOUCHED TOUCHED
 </​code>​ </​code>​
Line 287: Line 265:
 <​code>​ <​code>​
 stats stats
-</​code>​ +
-**output:​** +
-<​code>​+
 STAT pid 16825 STAT pid 16825
 STAT version 1.0.0 STAT version 1.0.0
Line 319: Line 295:
 <​code>​ <​code>​
 stats reset stats reset
-</​code>​ +
-**output:​** +
-<​code>​+
 RESET RESET
 </​code>​ </​code>​
Line 335: Line 309:
 <​code>​ <​code>​
 flush_all flush_all
-</​code>​ +
-**output:​** +
-<​code>​+
 OK OK
 </​code>​ </​code>​
Line 351: Line 323:
 <​code>​ <​code>​
 version version
-</​code>​ +
-**output:**  +
-<​code>​+
 VERSION 1.0.0 VERSION 1.0.0
 </​code>​ </​code>​
Line 367: Line 337:
 <​code>​ <​code>​
 quit quit
-</​code>​ +
-**output:​** +
-<​code>​+
 Connection closed by foreign host. Connection closed by foreign host.
 </​code>​ </​code>​
Line 383: Line 351:
 <​code>​ <​code>​
 verbosity 1 verbosity 1
-</​code>​ +
-**output:​** +
-<​code>​+
 OK OK
 </​code>​ </​code>​
  • Admin
  • Last modified: 2016/04/06 18:55
  • by Rob Holda