linux 环境下
1)top
2) f
3) 上下键 按空格选择显示的列 最后按ESC退出(例如p显示每个线程运行的当前core)
4) H 显示线程
5) s 每秒的变化都输出
taskset -pc PID
线程的affinity
#taskset -p -c 0-7 2358 线程2358 亲和cpu core 0-7
FreeBSD环境
1) top -SH
2) h 显示帮助
These single-character commands are available:
^L - redraw screen
q - quit
h or ? - help; show this text
C - toggle the displaying of weighted CPU percentage
d - change number of displays to show
e - list errors generated by last "kill" or "renice" command
H - toggle the displaying of threads
i or I - toggle the displaying of idle processes
j - toggle the displaying of jail ID
J - display processes for only one jail (+ selects all jails)
k - kill processes; send a signal to a list of processes
m - toggle the display between 'cpu' and 'io' modes
n or # - change number of processes to display
o - specify sort order (pri, size, res, cpu, time, threads, jid, pid)
P - toggle the displaying of per-CPU statistics
r - renice a process
s - change number of seconds to delay between updates
S - toggle the displaying of system processes
a - toggle the displaying of process titles
t - toggle the display of this process
u - display processes for only one user (+ selects all users)
z - toggle the displaying of the system idle process
3) 输入对应字母即可显示信息 比如C 显示运行的core
阅读(2011) | 评论(0) | 转发(0) |