numam-spdk/scripts/rpc/app.py
Maciej Wawryk a10d0ce79c RPC: rename context_switch_monitor to framework_monitor_context_switch
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I6de7bf824b5f57e535168afaafca55f4c758fc94
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468667
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2019-09-30 21:13:41 +00:00

38 lines
1.0 KiB
Python

from .helpers import deprecated_alias
@deprecated_alias('kill_instance')
def spdk_kill_instance(client, sig_name):
"""Send a signal to the SPDK process.
Args:
sig_name: signal to send ("SIGINT", "SIGTERM", "SIGQUIT", "SIGHUP", or "SIGKILL")
"""
params = {'sig_name': sig_name}
return client.call('spdk_kill_instance', params)
@deprecated_alias('context_switch_monitor')
def framework_monitor_context_switch(client, enabled=None):
"""Query or set state of context switch monitoring.
Args:
enabled: True to enable monitoring; False to disable monitoring; None to query (optional)
Returns:
Current context switch monitoring state (after applying enabled flag).
"""
params = {}
if enabled is not None:
params['enabled'] = enabled
return client.call('framework_monitor_context_switch', params)
def thread_get_stats(client):
"""Query threads statistics.
Returns:
Current threads statistics.
"""
return client.call('thread_get_stats')