function-stats.3valkey - Man Page

Returns information about a function during execution.

Synopsis

FUNCTION STATS

Description

Return information about the function that’s currently running and information about the available execution engines.

The reply is map with two keys:

1.

running_script: information about the running script. If there’s no in-flight function, the server replies with a nil. Otherwise, this is a map with the following keys:

·

name: the name of the function.

·

command: the command and arguments used for invoking the function.

·

duration_ms: the function’s runtime duration in milliseconds.

2.

engines: this is a map of maps. Each entry in the map represent a single engine. Engine map contains statistics about the engine like number of functions and number of libraries.

You can use this command to inspect the invocation of a long-running function and decide whether kill it with the FUNCTION KILL command.

For more information please refer to valkey-functions-intro(7) Introduction to Valkey Functions.

Reply

Resp2

valkey-protocol(7) Array reply: information about the function that’s currently running and information about the available execution engines.

Resp3

valkey-protocol(7) Map reply: information about the function that’s currently running and information about the available execution engines.

Complexity

O(1)

Acl Categories

@scripting @slow

History

See Also

eval(3valkey), evalsha(3valkey), evalsha_ro(3valkey), eval_ro(3valkey), fcall(3valkey), fcall_ro(3valkey), function(3valkey), function-delete(3valkey), function-dump(3valkey), function-flush(3valkey), function-help(3valkey), function-kill(3valkey), function-list(3valkey), function-load(3valkey), function-restore(3valkey), script(3valkey), script-debug(3valkey), script-exists(3valkey), script-flush(3valkey), script-help(3valkey), script-kill(3valkey), script-load(3valkey), script-show(3valkey)

Info

2024-09-23 8.0.0 Valkey Command Manual