establish this key value.Set key flag Expire Leng 3 If the server does not have this key----> added Effect 4 If the server has this key----> modified effect. 5 as shown in the figure, the name is already present, The date does not exist. Set can successfully set their ? INCR,DECR command: Increase/Decrease the size of the valueSyntax: INCR/DECR key numExample:Set age 0 0 228storedget agevalue age 0 228ENDINCR age 129incr age 231decrage-decr Age 228 1 Application Scenarios------ pressure is
:
Get ID
VALUE ID 1 4
1234
End
b), reading the cache of multiple key
Copy Code code as follows:
Get ID Name
VALUE ID 1 4
3456
VALUE Name 1 3
Jim
End
Ⅲ, deleting
Command format: delete
Delete ID
Copy Code code as follows:
Delete ID
DELETED
Ⅳ, empty all caches
Command format: Flush_all
Copy Code code as follows:
Flush_all
Ok
Ⅴ, viewing cache server Status
Command: Stats
, using Telnet, you can only view a node's[[Email protected] ~]# telnet 127.0.0.1 11211 Trying 127.0.0.1 ... Connected to 127.0.0.1. Escape character is ' ^] '. Stats STAT PID 22362 The process ID of the//memcache server www.2cto.com STAT uptime 1469315//number of seconds the server has been running STAT time 1339671194//server current UNIX timestamp
[Lab7] AclAccess control lists are referred to as ACLs, which use packet filtering technology to read third and fourth headers on routerssuch as source address, destination address, source port, destination port, etc., filter packets according to pre-defined rules,So as to achieve the purpose of access control. There are many kinds of ACLs, and different kinds of ACLs
/var/run/memcached.pid '
is normal. Let's go telnet.
Shell Code telnet xxx.xxx.xxx.xxx 11211
Telnet xxx.xxx.xxx.xxx 11211
Then enter the shell code stats
Stats
Then you can see:
Reference
STAT PID 3021
STAT Uptime 3621
STAT Time 1331261509
STAT version 1.4.13
STAT libev
MySQL uses User-Defined variable simulation analysis functions
MySQL uses a user-defined variable simulation analysis function to initialize the experiment structure and data:
Create table test (Tid varchar (32) primary key,
Stat int not null,
Createtime timestamp not null
);
Insert into test (tid, stat, createtime) VALUES ('ac551ad7ba3f9067b19ac8bb20caca6d ',-1, '2017-08-20 10:01:09 ');
Insert into test (t
means to force the kill process.After the memcached is started, the data in the cache can be manipulated by the client, and we describe some common clients and how to use them.Telnet ClientThe Telnet client can use the command line to monitor how the memcached server stores data. For example, Memcached has a service address of 192.168.4.86:11211 and can telnet to the service port:Telnet 192.168.4.86 11211If the connection succeeds, you can use some of the following commands:
Stats comm
Disable the Flush_all command
-O
Specify comma-delimited options, typically used for extended or experimental properties
Stop memcached
You can query the process number of the memcached by using the following command from Linux:grep memcachedThen kill the memcached service process:pid>-9 means to force the kill process.After the memcached is started, the data in the cache can be manipulated by the client, and we describe some common clients and h
American Financial Society, and Vice-president of the North American Actuarial Association. Dr. Kessel's operations team has extensive experience in the Internet finance industry, specializes in discovering the added value and growth of investment projects, and is supported by top partners such as SOA, with unique advantages in terms of networking, industry resources, operational efficiencies, branding, and more.650) this.width=650; "src=" http://s13.sinaimg.cn/mw690/006vL52Pgy72BCtUdNaac690 "w
) # "" (Original error)
FileHandle = open (' Test.txt ')Print Filehandle.read (1) # "T"Filehandle.seek (4)Print Filehandle.read (1) # "" (Original error)
In Windows and Macintosh environments, you may sometimes need to read and write files in binary form, such as pictures and executables. At this point, just add a "B" to the way the file is opened:
1. FileHandle = open (' TestBinary.txt ', ' WB ')2. Filehandle.write (' There is no spoon. ')3. Filehandle.close ()
FileHandle = open (' TestBina
callGetsCommand, and the operation runs in a very sequential order. Now let's take a look at a series of commands in listing 7:
Listing 7. Using the old version of the indicatorCASCommand
Set userid 0 0 555555 storedgets useridvalue userid 0 5855555 endcas userid 0 0 5633333 exists
Note: I have not usedGetsAndCASCommand to return the exists value to indicate failure. In essenceGetsAndCASCommand to prevent you from using the name/value pair that has been updated sinc
MySQL uses a user-defined variable simulation analysis function to initialize the experiment structure and data: createtabletest (tidvarchar (32) primarykey, statint
MySQL uses a user-defined variable simulation analysis function to initialize the experiment structure and data: create table test (tid varchar (32) primary key, stat int
MySQL uses a user-defined variable simulation analysis function to initialize the experiment structure and data:
, obviously in order to get faster speed, sometimes we have to space to change time. That is to say, memcached will pre-allocate memory, yes, memcached allocating memory is called allocator, first of all, there are 3 concepts:1 Slab2 page3 Chunkexplain that, in general, a memcahced process will be in advance to divide themselves into several slab, each slab under a number of page, each page under a number of chunk, if we think of these 3 strokes as object, this is the two one-to-many relationshi
process will be in advance to divide themselves into several slab, each slab under a number of page, each page under a number of chunk, if we think of these 3 strokes as object, this is the two one-to-many relationship. In general, the number of slab is limited, a few, more than 10, or dozens of, which is related to the memory of the process configuration. And each slab under the page by default is 1m, that is, if a slab consumes 100m of memory, then by default this slab has the number of page
Monitor contexts (watcher context).
Prototypes of other callback functionsThere are several callback functions in Zookeeper that are used in asynchronous APIs (functions that typically start with zoo_a*), which are divided into the following types of callback functions that handle the return value type of an asynchronous function: Handling a callback function that returns a void type, handling a callback function that returns a STAT s
Brief introductionThe Shutil module provides advanced operations for a large number of files. Specifically for file copying and deletion, the main functions are directory and file operations, as well as compression operations. The operation of a single file can also be found in the OS module.Note Even a higher-level file copy function (Shutil.copy (), shutil.copy2 ()) cannot copy all of the file's metadata. This means that the owner and group of the file and the access control list are lost on t
categories: persistent node and temporary node .
Persistent Node
The so-called persistent node is that once the Znode is created, the Znode will be kept on zookeeper unless the active Znode removal operation is initiated.
Temporary Node
The lifecycle of the temporary node is bound to the client session, and once the client session is invalidated, all temporary nodes created by the client are removed.
In addition, zookeeper allows users to add a special attribute for each node: sequential. Once
following list to add a line to your/etc/apt/sources. list file as follows:
Deb http://security.ubuntu.com/ubuntu hard-security main universe
Reinstallation
Sudo apt-get update ---- update source operation
Sudo apt-get install memcache
Check whether the installation is successful.-----After the installation is successful, memcache starts itself. Check the process
Ps-aux
A record is found.
/Usr/bin/memcached-m 64-p 11211-u nobody-l 127.0.0.1
Memcached port 11211 user nobody address 127.0.0.
find the memcache installation package
Update Software SourceYou can use any source image in the following list to add a line to your/etc/APT/sources. list file as follows:
Deb http://security.ubuntu.com/ubuntu hard-security main universe
Reinstallation
Sudo apt-Get update ---- update source operation
Sudo apt-Get install memcache
Check whether the installation is successful.-----After the installation is successful, memcache starts itself. Check the process
PS-Aux
A record is found.
/Usr/b
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.