4a534344ee
Also add docstrings to all app.py methods. Change-Id: Ib234014630e8b47c55f8d96bede509952fe653c5 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-on: https://review.gerrithub.io/411940 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
24 lines
727 B
Python
Executable File
24 lines
727 B
Python
Executable File
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}
|
|
return client.call('kill_instance', params)
|
|
|
|
|
|
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).
|
|
"""
|
|
params = {}
|
|
if enabled is not None:
|
|
params['enabled'] = enabled
|
|
return client.call('context_switch_monitor', params)
|