免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2152 | 回复: 0
打印 上一主题 下一主题

问题:mount: mounting nodev on /dev/oprofile failed [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-08-22 09:30 |只看该作者 |倒序浏览
mount: mounting nodev on /dev/oprofile failed
问题现象:
# ./opcontrol --init
nfs: server 192.168.167.251 not responding, still trying
nfs: server 192.168.167.251 OK
grep: /etc/mtab: No such file or directory
mount: mounting nodev on /dev/oprofile failed
grep: /etc/mtab: No such file or directory
#
解决方法:
在/etc目录下创建mtab文件,并添加如下内容
nodev /dev/oprofile oprofilefs rw 0 0
具体命令
Touch
mtab
Vi mtab
添加
nodev /dev/oprofile oprofilefs rw 0 0     
注意千万别少了
no 变成 dev /dev/oprofile oprofilefs rw 0 0
不能正确挂在 oprofilefs,会出现如下提示:
# ./opcontrol --init
cat: can't open '/dev/oprofile/cpu_type': No such file or directory
Unable to open cpu_type file for reading
Make sure you have done opcontrol --init
cpu_type 'unset' is not valid
you should upgrade oprofile or force the use of timer mode

执行 ./opcontrol --init 没有问题
没有指定内核的情况下性能监测
命令如下:
# ./opcontrol --init      ---> 初始化阶段,该命令会加载oprofile.ko模块mount oprofilefs。成功后会在/dev/oprofile/目录下导出
                               一些文件和目录如: cpu_type, dump, enable, pointer_size, stats/
# ./opcontrol --setup --no-vmlinux
                        
                          ---> 配置OProfile不去检测内核, 如果要检测内核则用: ./opcontrol --setup  --vmlinux=内核所在目录

# ./opcontrol --start     ---> 启动OProfile伺服程序 oprofiled, 它周期性地把采样数据写到 /var/lib/oprofile/samples/目录。
                               log文件在/var/lib/oprofile/oprofiled.log

# ./opcontrol --dump      ---> 在分析数据前需要先把所有的数据都读到/var/lib/oprofile/samples/目录下,执行这个命令就是这个目
                               的。

# ./opreport              ---> 分析数据,制作报告。

CPU: CPU with timer interrupt, speed 0 MHz (estimated)
Profiling through timer interrupt
          TIMER:0|
  samples|      %|
------------------
   187460 99.6523 no-vmlinux
      541  0.2876 oprofiled
       54  0.0287 ld-linux.so.2
       36  0.0191 libc.so.6
       21  0.0112 busybox
        1 5.3e-04 libc-2.3.3.so
        1 5.3e-04 libcrypt-2.3.3.so


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/43047/showart_365029.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP