The *
wildcard for the tracer filter will only work at the beginning or end of a word. For example: spin_*
and *lock
will work, but spin_*lock
will not.
- Document :
#2
Source :
http://linux.die.net/man/1/ftrace
Content :
ftrace(1) - Linux man page
Name
ftrace - Runs the frysk systemcall tracing utility
Synopsis
ftrace
Description
ftrace Runs the frysk systemcall tracing utility.
ftrace is a small utility that uses the frysk engine to trace systemcalls in a similar manner to strace.
Example
ftrace command
ftrace pid
See Also
funit(8) fcatch(1) fcore(1) fstack(1) fstep(1)
Bugs
The option parser is greedy when looking for options so running ftrace on a program that uses options can be a problem, use -- to split between ftrace and the program. So change from:
~/prefix/bin/ftrace ~/prefix/lib64/frysk/funit --arch 32 frysk.proc.TestAbandon
to
~/prefix/bin/ftrace -- ~/prefix/lib64/frysk/funit --arch 32 frysk.proc.TestAbandon
Report bugs to [1] http://sources.redhat.com/ftrace/ .
References
1. http://sources.redhat.com/ftrace/
http:/sources.redhat.com/ftrace
Referenced By
fhpd(1), fltrace(1), frysk(1), frysk(7)
Document :
#3
Source :
http://www.mgriepentrog.com/2009/09/09/enable-ftrace-on-ubuntu-linux/
Content :
Introduction
I was interested in using ftrace for a potential project, but didn’t find much documentation on how to get it working. I hope to change that by providing step-by-step instructions to enable ftrace for use in Ubuntu Linux 9.10 (Karmic Koala). Overview from the kernel documentation:
Ftrace is an internal tracer designed to help out developers and designers of systems to find what is going on inside the kernel. It can be used for debugging or analyzing latencies and performance issues that take place outside of user-space.
Given that ftrace is targeted towards developers and designers of systems, I’m assuming you more or less know what you’re doing with these steps. I also recommend virtualizing an instance of linux so that if you do mess up, you aren’t left with an un-bootable machine.
Steps
Download and install Ubuntu 9.10 Alpha-3
Run the following commands to install the necessary dependencies for a custom kernel:
$ sudo apt-get install git-core fakeroot build-essential makedumpfile kernel-wedge
$ sudo apt-get build-dep linux
Get the latest version of the Ubuntu kernel:
$ cd ~/
$ git clone git://kernel.ubuntu.com/ubuntu/ubuntu-karmic.git
edit “debian/config/config.common.ubuntu” and make the following changes:
CONFIG_FTRACE_SYSCALLS=y
CONFIG_FUNCTION_TRACER=y
Next, run the following commands:
$ sudo debian/rules clean
$ CONCURRENCY_LEVEL=2 AUTOBUILD=1 NOEXTRAS=1 fakeroot debian/rules binary-386
If you are prompted about enabling other forms of tracing, see ftrace.txt for more information about each type. You will want to enable DYNAMIC_FTRACE, which allows you to only trace functions you are concerned about.
Once finished, run the following commands from the parent directory :
$ sudo dpkg -i linux-image-2.6.31-5-386_2.6.31-5.24_i386.deb
$ sudo dpkg -i linux-headers-2.6.31-5-386_2.6.31-5.24_i386.deb
$ sudo update-grub
Restart your computer, and you should now see the kernel we compiled as a boot option:
The rest is outlined in LWN’s look at ftrace, but here are a few things I noticed:
- You don’t have to mount a debugfs. There’s already one at /sys/kernel/debug (where it’s recommended to be).
- I ran into some permission errors when trying to change what the current tracer was. Changing the owner or permissions of that directory should solve this issue.
To verify that everything is working, when you cat “/sys/kernel/debug/tracing/available_tracers” you should see more options than just “nop”. Enjoy!
Resources
http://serverfault.com/questions/268037/centos-5-realtime-patch
|
While I own a few RHEL MRG licenses, I've started using the FREE realtime recompile of Red Hat MRG from Scientific Linux to convert my CentOS 5 servers to realtime. You can view the Scientific Linux MRG distribution at: http://glitesoft.cern.ch/cern/mrg/slc5X/x86_64/RPMS/
In order to install, I create a small repo file named slc5x-mrg-realtime.repo and drop it in /etc/yum.repos.d . The file contains: [slc-mrg-realtime]
name = SLC5X - MRG Realtime
baseurl = http://linuxsoft.cern.ch/cern/mrg/slc5X/$basearch/RPMS
enabled = 1
protect = 0
gpgkey = http://glitesoft.cern.ch/cern/slc44/x86_64/RPM-GPG-KEYs/RPM-GPG-KEY-cern
gpgcheck = 1
From there, I can simply run yum grouplist and see the MRG component groups: MRG Realtime
MRG Grid
MRG Management
MRG Messaging
A yum groupinstall "MRG Realtime" && yum install kernel-rt-devel gives me everything I need for realtime operation. You can also just pick and choose the files you want from the distro's rpm listing page at: http://glitesoft.cern.ch/cern/mrg/slc5X/x86_64/RPMS/
Another option is to perform a recompile of Red Hat's SRPMS available at: http://ftp.redhat.com/pub/redhat/linux/enterprise/5Server/en/RHEMRG/SRPMS/
It's the standard rpmbuild --rebuild package.srpm process. This takes more time, but I've done this successfully as well.
|
|
|