From: Yaroslav Brustinov Date: Thu, 15 Dec 2016 22:06:14 +0000 (+0200) Subject: master_daemon: taskset to 0 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F09%2F5309%2F1;p=trex.git master_daemon: taskset to 0 Change-Id: I74ef8bdf8b0be9f29e0dfc2bae68c1cb451e1a7a Signed-off-by: Yaroslav Brustinov --- diff --git a/scripts/master_daemon.py b/scripts/master_daemon.py index c3c9c2d8..855358ff 100755 --- a/scripts/master_daemon.py +++ b/scripts/master_daemon.py @@ -162,6 +162,11 @@ def _check_path_under_current_or_temp(path): if getpass.getuser() != 'root': fail('Please run this program as root/with sudo') +pid = os.getpid() +ret = os.system('taskset -pc 0 %s' % pid) +if ret: + fail('Could not set self affinity to core zero.') + daemon_actions = OrderedDict([('start', 'start the daemon'), ('stop', 'exit the daemon process'), ('show', 'prompt the status of daemon process (running / not running)'),