• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

trace-cmd: command not found

by Deepika

trace-cmd is a free and open-source utility for interacting with the Ftrace Linux kernel internal tracer. It allows users to trace and analyze system events, kernel function calls, and other performance metrics in real-time. Trace-cmd is a powerful tool for debugging and performance tuning Linux systems.

Ftrace is a kernel-level tracing framework built into the Linux kernel. It provides a way to collect detailed information about kernel events and function calls, as well as system calls and other performance metrics. Trace-cmd is a utility that provides a command-line interface for interacting with Ftrace.

Using trace-cmd, users can capture and analyze kernel events and function calls in real-time. The tool provides several options for filtering and manipulating trace data, allowing users to focus on specific areas of interest. Additionally, trace-cmd can generate trace reports in various formats, making it easy to share and analyze trace data across different platforms.

It is worth noting that trace-cmd must be run as root, as it requires access to privileged kernel functions and system resources. This is necessary to ensure that trace data is collected accurately and reliably.

If you encounter the below error while running the command trace-cmd:

trace-cmd: command not found

you may try installing the below package as per your choice of distribution:

Distribution Command
Debian apt-get install trace-cmd
Ubuntu apt-get install trace-cmd
Kali Linux apt-get install trace-cmd
CentOS yum install trace-cmd
Fedora dnf install trace-cmd
Raspbian apt-get install trace-cmd

trace-cmd Command Examples

1. Display the status of tracing system:

# trace-cmd stat

2. List available tracers:

# trace-cmd list -t

3. Start tracing with a specific plugin:

# trace-cmd start -p timerlat|osnoise|hwlat|blk|mmiotrace|function_graph|wakeup_dl|wakeup_rt|wakeup|function|nop

4. View the trace output:

# trace-cmd show

5. Stop the tracing but retain the buffers:

# trace-cmd stop

6. Clear the trace buffers:

# trace-cmd clear

7. Clear the trace buffers and stop tracing:

# trace-cmd reset

Summary

Overall, trace-cmd is a powerful tool for debugging and performance tuning Linux systems. Its ability to interact with the Ftrace Linux kernel internal tracer makes it an essential tool for developers and system administrators who need to analyze system events and performance metrics in real-time.

Filed Under: Linux

Some more articles you might also be interested in …

  1. avo: The official command-line interface for Avo (Command Examples)
  2. gpg-tui Command Examples
  3. /dev/shm permission change after node reboot
  4. gh secret: Manage GitHub secrets from the command-line
  5. helix Command Examples
  6. How to mount USB flash drive in Linux
  7. Linux OS Service ‘setroubleshoot’
  8. Backtick (`) symbol in Linux Shell Scripting
  9. matlab Command Examples
  10. bzgrep: Find patterns in bzip2 compressed files using grep

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright