Created
March 10, 2020 01:47
-
-
Save dalehamel/28c51b545fed3d0b1f4451c1e57363ca to your computer and use it in GitHub Desktop.
bpftrace script to attach to memcached and probe connections and commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
usdt::memcached:command__get, | |
usdt::memcached:command__set, | |
usdt::memcached:command__add, | |
usdt::memcached:command__replace, | |
usdt::memcached:command__prepend, | |
usdt::memcached:command__append, | |
usdt::memcached:command__cas | |
{ | |
@calls[str(arg1, arg2)]++; | |
@bytes[str(arg1, arg2)]+= arg3; | |
} | |
usdt::memcached:command__incr, | |
usdt::memcached:command__decr, | |
usdt::memcached:command__delete | |
{ | |
@calls[str(arg1, arg2)]++; | |
} | |
usdt::memcached:conn__allocate | |
{ | |
@conns_allocated++; | |
} | |
usdt::memcached:conn__release | |
{ | |
@conns_released++; | |
} | |
usdt::memcached:conn__create | |
{ | |
@conns_created++; | |
} | |
usdt::memcached:conn__destroy | |
{ | |
@conns_destroyed++; | |
} | |
usdt::memcached:conn__dispatch | |
{ | |
@conns_dispatched++; | |
} |
Author
dalehamel
commented
Mar 10, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment