> Please do 'ps awx | grep oprofiled'.  Do you see an existing oprofiled process already running?
The process is not running see the ps output:

root@server1:/root # ps awx | grep oprofiled
 7509 pts/1    S+     0:00 grep oprofiled

> If the above tip doesn't work, please paste the contents of /root/.oprofile/daemonrc into your reply

Here it is:

root@server1:/root # cat /root/.oprofile/daemonrc

I also edited daemonrc and I removed SESSION_DIR setting but when I tried to restart the process then the result was the same (Device busy) and when I checked daemonrc file again I noticed SESSION_DIR was back in the file.



From: Maynard Johnson []
Sent: Thursday, December 01, 2011 6:05 PM
To: Roman Biesiada
Subject: Re: Device or resource busy

On 12/01/2011 7:03 AM, Roman Biesiada wrote:
> Hello,
> I have tried many various tricks before I created that post but
> nothing
> helped so I decided to ask for some help.
> I using SLES 9 sp4.
> uname -a gives:
> Linux server1 2.6.5-7.323-bigsmp #1 SMP Fri Aug 13 08:24:34 UTC 2010
> i686
> I have downloaded and installed oprofile package (from Novell site).
> rpm -i oprofile-0.9.3-30.3.i586.rpm
> Package was installed without complains.
> Then I tried to use it. I executed:
> server1:/root # opcontrol --init
> server1:/root # opcontrol --no-vmlinux server1:/root # opcontrol
> --start -V
> The last commands produces the following output:
> Using default event: CPU_CLK_UNHALTED:100000:0:1:1 executing oprofiled
> --session-dir=/var/lib/oprofile --separate-lib=0 --separate-kernel=0
> --separate-thread=0 --separate-cpu=0
> --events=CPU_CLK_UNHALTED:121:0:100000:0:1:1, --no-vmlinux
> --verbose=all
> Events: CPU_CLK_UNHALTED:121:0:100000:0:1:1,
> Using 2.6+ OProfile kernel interface.
> Failed to open profile device: Device or resource busy

Please do 'ps awx | grep oprofiled'.  Do you see an existing oprofiled process already running?  If so, take note of the "--session-dir" path, then run 'opcontrol --session-dir=<session_dir_path> --shutdown'.  Then you should be

able to start up oprofile as usual.  I recommend not using --session-dir unless you have a real need for storing sample data other than in the default location.
  By the way, handling of session-dir has improved since 0.9.3, so I don't think you'd run into the same scenario anymore.

If the above tip doesn't work, please paste the contents of /root/.oprofile/daemonrc into your reply.


> Couldn't start oprofiled.
> Check the log file "/var/lib/oprofile/samples/oprofiled.log" and
> kernel
> oprofiled.log does not exists
> When I check installed modules then lsmod shows oprofile
> server1:/root # lsmod | grep oprofile
> oprofile               62368  1
> Mount shows:
> root@server1:/root # mount | grep oprofile nodev on /dev/oprofile type
> oprofilefs (rw)
> I tried to unmount device, clear oprofile directories, re-installed
> couple times nothing kelped.
> I am using machine with 2 x CPU - Intel(R) Xeon(R) CPU           E5440  @
> Can somebody help me to solve the problem ? I have very limited
possibilities to
> install and re-compile the newest oprofile 9.7 and I have no guarantee
that it
> can help so I did not do it.
> thanks,
> Roman
> All the data continuously generated in your IT infrastructure contains
> a definitive record of customers, application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and
> makes sense of it. IT sense. And common sense.
> _______________________________________________
> oprofile-list mailing list