Q. How do I install Strace utility under FreeBSD operating system so that I can trace and debug my applications and report 3rd party software bugs?
A. Strace is a process tracer, i.e. a debugging tool that prints out a trace of all the system calls made and signals received by a process itself or a process and its descendants.
Strace is similar to the native BSD truss utility, but it's output style is more convenient in most cases.
For strace to work, procfs has to be mounted. FreeBSD does not mount it by default.
WARNING! These examples only work for i386 32 bit FreeBSD computer (strace is not ported to amd64 arch [64 bit]).Install strace
First update FreeBSD ports collection and install strace from /usr/ports/devel/strace:
# portsnap fetch update
# cd /usr/ports/devel/strace
# make install clean
Mount /proc file system
You need to mount /proc filesystem to use trace command under FreeBSD, enter:
# mount -t procfs proc /proc
How do I use Strace tool?
Please see our previous FAQ / tutorials about strace command:
- Debugging Tip: Trace the Process and See What It is Doing with strace
- Truss like command under Linux to monitor and diagnostic the system calls
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop













{ 0 comments… add one now }