Chinaunix首页 | 论坛 | 博客
  • 博客访问: 485930
  • 博文数量: 135
  • 博客积分: 3010
  • 博客等级: 中校
  • 技术积分: 905
  • 用 户 组: 普通用户
  • 注册时间: 2010-01-24 19:31
文章分类

全部博文(135)

文章存档

2010年(135)

我的朋友

分类: LINUX

2010-02-07 11:23:14

问题:can't open '/dev/oprofile/cpu_type': No such file or directory

问题现象:

# ./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

解决方法:

Step1:重新启动target
step2:执行# ./opcontrol --init
       显示:

        # ./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


Step3: 删除/etc目录下的mtab文件
          Rm -f /etc/mtab

Step4:执行# ./opcontrol --init
       显示:
       # ./opcontrol --init
       grep: /etc/mtab: No such file or directory
       grep: /etc/mtab: No such file or directory

Step5:重新在/etc/目录下创建mtab并添加“nodev /dev/oprofile oprofilefs rw 0 0”
         touch /etc/mtab
         Vi /etc/mtab

         Insert  "nodev /dev/oprofile oprofilefs rw 0 0"   --->mtab中添加的内容

Step6:执行# ./opcontrol --init
         ok
阅读(1840) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~