Skip to content

Instantly share code, notes, and snippets.

@dalehamel

dalehamel/mcsnopp.bt

Created Mar 10, 2020
Embed
What would you like to do?
bpftrace script to attach to memcached and probe connections and commands
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++;
}
@dalehamel

This comment has been minimized.

Copy link
Owner Author

@dalehamel dalehamel commented Mar 10, 2020

baseline

Selection_079

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment