1 Aug 2011 17:19
Re: Help with initial setup
William Cohen <wcohen <at> redhat.com>
2011-08-01 15:19:11 GMT
2011-08-01 15:19:11 GMT
On 07/20/2011 05:41 PM, Shay Cohen wrote: > Hi, > > Thanks for the quick reply. > > I've been doing step-by-step as mentioned in Will's tutorial, and checked the 'samples_received' and NMI values after some load. > Still all counters are 'zeroed' and the 'samples' directory is empty. Attaching an output snap. > > [root <at> new-host-5 hello-2.7]# opcontrol --setup --vmlinux=/usr/lib/debug/lib/modules/2.6.18-164.el5/vmlinux --event=CPU_CLK_UNHALTED:16000000:0:1:1 --separate=library > Jul 21 03:34:30 new-host-5 kernel: oprofile: using NMI interrupt. > [root <at> new-host-5 hello-2.7]# opcontrol --save=kuku2 > [root <at> new-host-5 hello-2.7]# opcontrol --start > Using 2.6+ OProfile kernel interface. > Reading module info. > Using log file /var/lib/oprofile/samples/oprofiled.log > Daemon started. > Profiler running. > [root <at> new-host-5 hello-2.7]# time ./configure >/dev/null ; make clean>/dev/null ;make>/dev/null > real0m34.417s > user0m7.709s > sys0m24.552s > [root <at> new-host-5 hello-2.7]# cat /dev/oprofile/stats/cpu0/sample_received > 0 > [root <at> new-host-5 hello-2.7]# grep NMI /proc/interrupts > NMI: 0 > [root <at> new-host-5 hello-2.7]# ls -l /var/lib/oprofile/samples/kuku2/ > total 0 > [root <at> new-host-5 hello-2.7]# opreport > opreport error: No sample file found: try running opcontrol --dump > or specify a session containing sample files > > [root <at> new-host-5 hello-2.7]# opcontrol --dump > [root <at> new-host-5 hello-2.7]# opreport > opreport error: No sample file found: try running opcontrol --dump > or specify a session containing sample files > > Thanks Hi, Which processor is this on? What is the output of "cat /proc/cpuinfo"? Also how many cores (processors) are on the machine? I am wondering by chance if this machine has 6 cores per socket. -Will > > On Jul 20, 2011, at 11:03 PM, William Cohen wrote: > >> On 07/20/2011 03:39 PM, shayco wrote: >>> >>> Hi, >>> >>> I'm trying to get a 'taste' of OProfile with Centos 5.x. >>> Done the following: >>> - Installed OProfile >>> - Downloaded the vmlinux for my kernel version >>> For some reason, OProfile does not generate data at all. >>> Tried running GNU's 'hello' for a few hundred times, tried running httpd and >>> ab - nothing. >>> As far as I can tell, this is not listed under the OProfile FAQ and I could >>> not find anything useful to me in the forums/mailing lists >> >> Hi, >> >> The interval of 6000 is very small for CPU_CLK_UNHALTED, that should be higher to avoid overloading the system. >> >> There are a couple OProfile tutorials at: >> >> http://people.redhat.com/wcohen/ >> >> Take a look at your /var/log/messages for messages related to oprofile see that it is setting up the oprofile module correctly. >> >> You might take a look at the /dev/oprofile/stats/cpu[0-9]*/samples_received files to see if there are any samples being recorded. >> >> When oprofile is running using the performance counters it should use the nmi interrupt. Take a look at /proc/interrupts to see if there are nmi interrupts occuring. >> >> >> -Will >> >>> >>> The best I can do to describe my problem is as following: >>> >>> >>> [root <at> new-host-2 ~]# opcontrol --status >>> Daemon running: pid 6221 >>> Event 0: CPU_CLK_UNHALTED:6000:0:1:1 >>> Separate options: library >>> vmlinux file: /usr/lib/debug/lib/modules/2.6.18-164.el5/vmlinux >>> Image filter: none >>> Call-graph depth: 0 >>> [root <at> new-host-2 ~]# opcontrol --start >>> Profiler running. >>> [root <at> new-host-2 ~]# while : ; do hello > /dev/null ; ((COUNT++)); done >>> [root <at> new-host-2 ~]# echo $COUNT >>> 1797 >>> [root <at> new-host-2 ~]# opreport >>> opreport error: No sample file found: try running opcontrol --dump >>> or specify a session containing sample files >>> [root <at> new-host-2 ~]# ls -l /var/lib/oprofile/samples/kuku/ >>> total 0 >>> [root <at> new-host-2 ~]# ls -l /var/lib/oprofile/samples/ >>> total 20 >>> drwxr-xr-x 2 root root 4096 Jul 18 15:25 kuku >>> -rw-r--r-- 1 root root 4647 Jul 19 00:20 oprofiled.log >>> [root <at> new-host-2 ~]# cat /root/.oprofile/daemonrc >>> SESSION_DIR=/var/lib/oprofile >>> CHOSEN_EVENTS_0=CPU_CLK_UNHALTED:6000:0:1:1 >>> NR_CHOSEN=1 >>> SEPARATE_LIB=1 >>> SEPARATE_KERNEL=0 >>> SEPARATE_THREAD=0 >>> SEPARATE_CPU=0 >>> VMLINUX=/usr/lib/debug/lib/modules/2.6.18-164.el5/vmlinux >>> IMAGE_FILTER= >>> CPU_BUF_SIZE=0 >>> CALLGRAPH=0 >>> KERNEL_RANGE=c0401000,c061aaa8 >>> XENIMAGE=none >>> [root <at> new-host-2 ~]# uname -a >>> Linux new-host-2 2.6.18-164.el5 #1 SMP Thu Sep 3 03:33:56 EDT 2009 i686 i686 >>> i386 GNU/Linux >>> >>> I'de appreciate any help. >>> Thanks! >>> >> > ------------------------------------------------------------------------------ Got Input? Slashdot Needs You. Take our quick survey online. Come on, we don't ask for help often. Plus, you'll get a chance to win $100 to spend on ThinkGeek. http://p.sf.net/sfu/slashdot-survey
RSS Feed