利用taskset命令,将某进程绑定到某个CPU上-创新互联
                                            
                                                taskset (util-linux-ng 2.17.2)
usage: taskset [options] [mask | cpu-list] [pid | cmd [args...]]
set or get the affinity of a process
  -p, --pid                  operate on existing given pid
  -c, --cpu-list             display and specify cpus in list format
  -h, --help                 display this help
  -V, --version              output version information
The default behavior is to run a new command:
  taskset 03 sshd -b 1024
You can retrieve the mask of an existing task:
  taskset -p 700
Or set it:
  taskset -p 03 700
List format uses a comma-separated list instead of a mask:
  taskset -pc 0,3,7-11 700
Ranges in list format can take a stride argument:
  e.g. 0-31:2 is equivalent to mask 0x55555555
网页名称:利用taskset命令,将某进程绑定到某个CPU上-创新互联
链接分享:http://www.cqwzjz.cn/article/disiii.html
                                            
                                        例:

将pid号为2181的进程绑定到cpu0上:
[root@Centos ~]# taskset -cp 0 2181 pid 2181's current affinity list: 0 pid 2181's new affinity list: 0将pid号为2181的进程绑定到几个cpu上:
[root@Centos ~]# taskset -cp 0,1 2181 --绑定到cpu0和cpu1上另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
网页名称:利用taskset命令,将某进程绑定到某个CPU上-创新互联
链接分享:http://www.cqwzjz.cn/article/disiii.html

 建站
建站
 咨询
咨询 售后
售后
 建站咨询
建站咨询 
 