jubatus/jubatus — pull request #612 by rimms (2014-01-14 11:25:22+00:00)
Title: Add get_status to proxy

I implemented `get_status` method to proxy.

### Interface

* RPC method name: `get_proxy_status`
* Parameter: None
* Return value: `map>` (same as `get_status`)

### Details of return values
* Key: Host and Port (e.g. `127.0.0.1_9199`), Value:
* Key: PROGNAME, Value: Program name (e.g. `jubaclassifier_proxy`)
* Key: RSS, Value: Total amount of physical memory used by process (same as `get_status`)
* Key: SHR, Value: Amount of shared memory used by process (same as `get_status`)
* Key: VIRT, Value: Total amount of virtual memory used by process (same as `get_status`)
* Key: clock_time, Value: System clock time when receiving a request
* Key: uptime, Value: How long the process has been running (sec)
* Key: start_time, Value: System clock time when process started
* Key: connected_zookeeper, Value: Host and Port of zookeeer that process connected (e.g. `127.0.0.1_2181`)
* Key: forward_count, Value: Number of forwarding request
* Key: request_count, Value: Number of request
* Key: pid, Value: Process ID
* Key: user, Value: User ID who started process
* Key: timeout, Value: Command-line argument or default value
* Key: interconnect_timeout, Value: Command-line argument or default value
* Key: zookeeper_timeout, Value: Command-line argument or default value
* Key: zookeeper, Value: Command-line argument or default value
* Key: session_pool_expire, Value: Command-line argument or default value
* Key: session_pool_size, Value: Command-line argument or default value
* Key: threadnum, Value: Command-line argument or default value
* Key: loglevel, Value: Command-line argument or default value (Converted to string like `INFO`, `FATAL` ...)
* Key: loglevel, Value: Command-line argument or `/dev/stderr` (It's default value)

### example

In python, output of `pprint` is followings:

```
{'xx.x.xxx.xxx_9199': {'PROGNAME': 'jubaclassifier_proxy',
'RSS': '3668',
'SHR': '3056',
'VERSION': '0.5.0',
'VIRT': '734692',
'clock_time': '1389698052',
'connected_zookeeper': '127.0.0.1:2181',
'forward_count': '0',
'interconnect_timeout': '10',
'logdir': '/dev/stderr',
'loglevel': 'INFO',
'pid': '13987',
'request_count': '3',
'session_pool_expire': '60',
'session_pool_size': '0',
'start_time': '1389695688',
'threadnum': '16',
'timeout': '10',
'uptime': '2364.48',
'user': 'rimms',
'zookeeper': 'localhost:2181',
'zookeeper_timeout': '10'}}
```

### Note

* We should add `get_proxy_status` method to Ruby, Python, Java client.
* We should write tests of client.