]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: cache: "show cache" on the cli
authorWilliam Lallemand <wlallemand@haproxy.com>
Tue, 21 Nov 2017 19:01:26 +0000 (20:01 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 21 Nov 2017 20:35:04 +0000 (21:35 +0100)
commit1f49a366fd94f4c9f68c942c66e27ac4279d6370
tree95277a722cd9808b3fbc859bc12c32ec4d55a58f
parent111bfef33c97cf40dc9c136f51b9f670e92d6145
MEDIUM: cache: "show cache" on the cli

The cli command "show cache" displays the status of the cache, the first
displayed line is the shctx informations with how much blocks available
blocks it contains (blocks are 1k by default).

The next lines are the objects stored in the cache tree, the pointer,
the size of the object and how much blocks it uses, a refcount for the
number of users of the object, and the remaining expiration time (which
can be negative if expired)

Example:

    $ echo "show cache" | socat - /run/haproxy.sock
    0x7fa54e9ab03a: foobar (shctx:0x7fa54e9ab000, available blocks:3921)
    0x7fa54ed65b8c (size: 43190 (43 blocks), refcount:2, expire: 2)
    0x7fa54ecf1b4c (size: 45238 (45 blocks), refcount:0, expire: 2)
    0x7fa54ed70cec (size: 61622 (61 blocks), refcount:0, expire: 2)
    0x7fa54ecdbcac (size: 42166 (42 blocks), refcount:1, expire: 2)
    0x7fa54ec9736c (size: 44214 (44 blocks), refcount:2, expire: 2)
    0x7fa54eca28ec (size: 46262 (46 blocks), refcount:2, expire: -2)
src/cache.c