-------------- Original message --------------
From: William Cohen <wcohen@redhat.com>

> safkhan@comcast.net wrote:
> > I have a AMD opteron linux (RHEL4 2.6.9-22.0.2.EL) system and am unable
> > to initialize oprofile. I get the following message.
> > ----
> > opcontrol --init
> > cat: /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
> > ----
> >
> > Following information maybe helpful.
> >
> > uname -a
> > Linux wauwinet 2.6.9-22.0.2.ELsmp #1 SMP Thu Jan 5 17:11:56 EST 2006
> > x86_64 x86_64 x86_64 GNU/Linux
> > opcontrol --version
> > opcontrol: oprofile 0.9.1 compiled on Aug 1 2006 16:41:22
> > rpm -qi oprofile
> > Name : oprofile Relocations: ( not relocatable)
> > Version : 0.8.1 Vendor: Red Hat, Inc.
> > Release : 11 Build Date: Fri 15 Oct 2004
> > 03:24:41 PM EDT
> > Install Date: Sat 22 Jul 2006 12:31:01 AM EDT Build Host:
> > thor.perf.redhat.com
> > Group : Development/System Source RPM:
> > oprofile-0.8.1-11.src .rpm*Size :
> > 6106218 License: GPL
> > Signature : DSA/SHA1, Wed 20 Oct 2004 01:19:02 PM EDT, Key ID
> > b44269d04f2a6fd2
> > Packager : Red Hat, Inc.
> > URL : http://oprofile.sf.net
> > Summary : System wide profiler for ix86 processors.
> > Description :
> > oprofile is a profiling system for x86 systems running Linux 2.2/2.4.
> > Profiling runs transparently during the background, and profile data
> > can be collected at any time. oprofile makes use of the hardware performance
> > counters provided on Intel P6, and AMD Athlon family processors, and can use
> > the RTC for p rofili ng on othe x86 processor types.
> > *
> > * *
> > *Please let me know if you need any more information. Any help would be
> > greatly appreciated.*
> > * *
> > *Thanks*
> > * *
> > *-Safder*
> > * *
> > * *
>
> Hi Safder,
>
> Generally, one should use the OProfile version included with the
> distribution.
>
> Are you running an SMP kernel and does that kernel have a oprofile
> module (ls /lib/modules/`uname -r`/kernel/arch/`uname -m`/oprofile)? Is
> the oprofile module being loaded (check with /sbin/lsmod)? Are there any
> messages in /var/log/messages that give more information about what is
> going on.
>
> When compiling oprofile on your own oprofile you should use the
> "--with-kern el-support" option to use the driver built into the 2.6 kernels.
>
> -Will

Hi Will

I used the oprofile version included with the distribution also and get the same message. I also checked and oprofile module is available and loaded. While compiling oprofile 0.91 I did use the --with-kernel-support option. However, since I get the same error with the distribution oprofile also I guess that is probably not the issue. There was no oprofile related error message in /var/adm/messages

 

Output of suggested commands listed below.

---

 /usr/bin/opcontrol --version
opcontrol: oprofile 0.8.1 compiled on Oct 15 2004 15:23:20

---

/usr/bin/opcontrol --init
cat: /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 '(null)' is not valid

---

ls /lib/modules/`uname -r`/kernel/arch/`uname -m`/oprofile
oprofile.ko
---

[root@wauwinet ~]# /sbin/lsmod
Module                  Size  Used by
oprofile               40241  1
nfs                   229993  52
lockd                  77809  2 nfs
md5                     5697  1
:

:

---

Please advise..

-Safder