1. opcontrol --start --no-vmlinux //第一次调用opcontrol时,必须告诉它想统计内核还是用户空间数据。用--no-vmlinux选项来取消内核统计。
每次启动都会在/root/.oprofile/目录下生成一个配置文件daemonrc,如下:
cat /root/.oprofile/daemonrc
SESSION_DIR=/var/lib/oprofile
NR_CHOSEN=0
SEPARATE_LIB=0
SEPARATE_KERNEL=0
SEPARATE_THREAD=0
SEPARATE_CPU=0
VMLINUX=none
IMAGE_FILTER=
CPU_BUF_SIZE=0
CALLGRAPH=0
XENIMAGE=none
2. opcontrol --dump 输出统计量
3. opreport 查看统计结果
4. opcontrol --stop 停止搜集
5. opcontrol --reset 重置统计量
6 opcontrol --shutdown 停止后台程序