uftrace command not found

In this troubleshooting guide we learn how to fix uftrace command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

uftrace: command not found

or when using sudo you get the following error message

sudo: uftrace: command not found

Solutions to uftrace: command not found

How To Fix uftrace: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu uftrace is provided by uftrace package.

uftrace is:

The uftrace tool is intended for tracing and analyzing the execution of programs written in C or C++. It was heavily inspired by the ftrace framework of the Linux kernel (especially the function graph tracer) and supports userspace programs. It supports various kinds of commands and filters to help analysis of the program’s execution and performance.

It traces each function in the executable and shows time durations. It can also trace external library calls - but usually only entry and exit are supported. It is also possible to trace other (nested) external library calls and/or internal function calls in the library call.

It can show detailed execution flow at function level, and report which function has the highest overhead. It also shows various information related to the execution environment.

You can setup filters to exclude or include specific functions when tracing. In addition, function arguments and return values can be saved and shown later.

The uftrace tool supports multi-process and/or multi-threaded applications. It can also trace kernel functions as well, with root privileges and if the system enables the function graph tracer in the kernel (CONFIG_FUNCTION_GRAPH_TRACER=y).

To fix this problem, we can install more using the command below.

sudo apt-get -y install uftrace

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install uftrace.

sudo apt -y install uftrace

Or if you have aptitude installed you can use the following command.

sudo aptitude install uftrace

Summary

In this tutorial we learn how to fix uftrace command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.