快速绑定ceph osd 到CPU 核上
import os,sys,time
import commands
count=0
pids = commands.getoutput(""" ps -ef |grep ceph-osd|grep -v grep|awk '{print $2}' """)
for i in pids.split("\n"):
count += 1
os.system("taskset -cp %s %s" %(count,i))
print "taskset -cp %s %s" %(count,i)
import os,sys,time
import commands
count=0
pids = commands.getoutput(""" ps -ef |grep ceph-osd|grep -v grep|awk '{print $2}' """)
for i in pids.split("\n"):
count += 1
os.system("taskset -cp %s %s" %(count,i))
print "taskset -cp %s %s" %(count,i) import os,sys,time
import commands
count=0
pids = commands.getoutput(""" ps -ef |grep ceph-osd|grep -v grep|awk '{print $2}' """)
for i in pids.split("\n"):
count += 1
os.system("taskset -cp %s %s" %(count,i))
print "taskset -cp %s %s" %(count,i) import os,sys,time
import commands
count=0
pids = commands.getoutput(""" ps -ef |grep ceph-osd|grep -v grep|awk '{print $2}' """)
for i in pids.split("\n"):
count += 1
os.system("taskset -cp %s %s" %(count,i))
print "taskset -cp %s %s" %(count,i)