Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

memcache.getserverstatus(3) [php man page]

MEMCACHE.GETSERVERSTATUS(3)						 1					       MEMCACHE.GETSERVERSTATUS(3)

Memcache::getServerStatus - Returns server status

SYNOPSIS
int Memcache::getServerStatus (string $host, [int $port = 11211]) DESCRIPTION
Memcache.getServerStatus(3) returns a the servers online/offline status. You can also use memcache_get_server_status(3) function. Note This function has been added to Memcache version 2.1.0. PARAMETERS
o $host - Point to the host where memcached is listening for connections. o $port - Point to the port where memcached is listening for connections. RETURN VALUES
Returns a the servers status. 0 if server is failed, non-zero otherwise EXAMPLES
Example #1 Memcache.getServerStatus(3) example <?php /* OO API */ $memcache = new Memcache; $memcache->addServer('memcache_host', 11211); echo $memcache->getServerStatus('memcache_host', 11211); /* procedural API */ $memcache = memcache_connect('memcache_host', 11211); echo memcache_get_server_status($memcache, 'memcache_host', 11211); ?> SEE ALSO
Memcache.addServer(3), Memcache.setServerParams(3). PHP Documentation Group MEMCACHE.GETSERVERSTATUS(3)

Check Out this Related Man Page

MEMCACHE.CONNECT(3)							 1						       MEMCACHE.CONNECT(3)

Memcache::connect - Open memcached server connection

SYNOPSIS
bool Memcache::connect (string $host, [int $port], [int $timeout]) DESCRIPTION
Memcache.connect(3) establishes a connection to the memcached server. The connection, which was opened using Memcache.connect(3) will be automatically closed at the end of script execution. Also you can close it with Memcache.close(3). Also you can use memcache_connect(3) function. PARAMETERS
o $host - Point to the host where memcached is listening for connections. This parameter may also specify other transports like unix:///path/to/memcached.sock to use UNIX domain sockets, in this case $port must also be set to 0. o $port - Point to the port where memcached is listening for connections. Set this parameter to 0 when using UNIX domain sockets. Please note: $port defaults to memcache.default_port if not specified. For this reason it is wise to specify the port explicitly in this method call. o $timeout - Value in seconds which will be used for connecting to the daemon. Think twice before changing the default value of 1 second - you can lose all the advantages of caching if your connection is too slow. NOTES
Warning When the $port is unspecified, this method defaults to the value set of the PHP ini directive memcache.default_port If this value was changed elsewhere in your application it might lead to unexpected results: for this reason it is wise to always specify the port explicitly in this method call. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 Memcache.connect(3) example <?php /* procedural API */ $memcache_obj = memcache_connect('memcache_host', 11211); /* OO API */ $memcache = new Memcache; $memcache->connect('memcache_host', 11211); ?> SEE ALSO
Memcache.pconnect(3), Memcache.close(3). PHP Documentation Group MEMCACHE.CONNECT(3)
Man Page

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

basic nc question

i'm doing this in one terminal: nc -lu 7402 and it appears to start listening properly, then in another i do this: echo "hello" | nc -u localhost 7402 and nothing happens on the listening terminal - what am i doing wrong? thanks. (7 Replies)
Discussion started by: peterworth
7 Replies

2. Shell Programming and Scripting

Find file that maps to a listening port

On my VPS server I have a port that is open and is listening for a 'status' command when you connect to it to like so... $ telnet host 1900 Trying host... Connected to host. Escape character is '^]'. status QMAIL;OK APACHE;OK HTTPD;OK CRON;OK Wondering if what command I can attempt... (2 Replies)
Discussion started by: phpfreak
2 Replies

3. UNIX for Dummies Questions & Answers

Processes listening on Ports(Solaris)

Howdy Experts, This is my first post here and I am posting because I have not been able to find an answer for this question. How do you find out what process is listening on a given port? I do not have "lsof" available and how do we find this out without logging in as Root. I know that this... (5 Replies)
Discussion started by: KingaKoopa
5 Replies

4. Web Development

Using Mediawiki API fails

I am trying to create an automated documentation feature for our servers by using a Mediawiki and its API and feeding scripts on each server, but failed so far. The idea is to collect several vital data about a server by a script, create a wiki page and feed this into a central Mediawiki instance... (2 Replies)
Discussion started by: bakunin
2 Replies

5. UNIX for Dummies Questions & Answers

Memcache in Nagios

Hello, I want to setup Nagios with service Memcache...We have Amazon Cloud..Please help me to setup this service on my Nagios Client. How to check Memcache is working or not on my server?? 1. Please provide us the command defination to set on Nagios Server for .cfg file. 2.Please provide... (1 Reply)
Discussion started by: chetan
1 Replies