2018-05-21 20:07:12 +00:00
|
|
|
def 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}
|
2018-03-27 21:31:52 +00:00
|
|
|
return client.call('kill_instance', params)
|
2017-06-06 21:22:03 +00:00
|
|
|
|
2018-02-14 21:34:55 +00:00
|
|
|
|
2018-05-21 20:07:12 +00:00
|
|
|
def context_switch_monitor(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).
|
|
|
|
"""
|
2017-06-06 21:22:03 +00:00
|
|
|
params = {}
|
2018-05-21 20:07:12 +00:00
|
|
|
if enabled is not None:
|
|
|
|
params['enabled'] = enabled
|
2018-03-27 21:31:52 +00:00
|
|
|
return client.call('context_switch_monitor', params)
|
2019-03-02 08:32:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
def thread_get_stats(client):
|
|
|
|
"""Query threads statistics.
|
|
|
|
|
|
|
|
Returns:
|
|
|
|
Current threads statistics.
|
|
|
|
"""
|
|
|
|
return client.call('thread_get_stats')
|