linux - taskset wrapped has a "?" mark, not sure how its introduced -


i'm running commands python via popen. on multi-core system, have function return string "/usr/bin/taskset -c <>" based on system's utilization. append string system command prior sending popen.

from observation, taskset wrapper functioning correctly, system command being observed wrapped in taskset command "ps -elf"

4 s root     18986 18978  0  80   0 - 15016 poll_s 10:54 pts/3    00:00:00 sudo /usr/bin/taskset -c 0?sudo /usr/sbin/tcpdump -s 0 -nei lo  

i'm not sure "?" means, don't observed while executing command manually linux console

i'm issuing command via popen

i have function decides whether system multi-core or not, if multicore, return string "sudo /usr/bin/taskset -c"

if multicore():     taskstring="sudo /usr/bin/taskset -c %s" % cpu  else:     taskstring="" 

the susbsequent command tpcdump, be

command = taskstring+" sudo /usr/sbin/tcpdump -s 0 -nei lo" cmd=command.split(" ") subprocess.popen(cmd,stdout=open('%s' % fileout,'w'),stderr=subprocess.stdout) 

i'm running on ubuntu 14.04, if means anything....


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -