4dc0ef6f45
rpmbuild pointed out that this is wrong to have executable files without shebang. Taking the opportunity and fix this for other files too. Change-Id: Ib21f436672150edc0aff511bff2eb6839870cf79 Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com> Reviewed-on: https://review.gerrithub.io/425382 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
24 lines
727 B
Python
24 lines
727 B
Python
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)
|