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

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

extrace Command Examples in Linux

by Deepika

extrace is a command-line tool that can be used to trace the exec() system calls made by a process. exec() is a system call that is used to execute a new program, replacing the current process. This call is often used to run other programs, scripts or commands.

extrace is used to trace the exec() system calls made by a process, it does this by monitoring the process system calls and printing a line of output to the terminal every time it detects an exec() call. The output will include the process ID of the process that made the call, the path to the program that was executed, and any command-line arguments passed to the program.

extrace can be useful for understanding how a process works and what it is doing. It can also be used to troubleshoot issues with a process, and to understand what other programs or commands are being executed by a process.

extrace Command Examples

1. Trace all program executions occurring on the system:

# sudo extrace

2. Run a command and only trace descendants of this command:

# sudo extrace command

3. Print the current working directory of each process:

# sudo extrace -d

4. Resolve the full path of each executable:

# sudo extrace -l

5. Display the user running each process:

# sudo extrace -u

Filed Under: Linux

Some more articles you might also be interested in …

  1. htop (interactive process viewer) Linux Performance Monitoring tool
  2. losetup: command not found
  3. hlint: command not found
  4. How To Identify User Deleting Files From A Given Directory in Linux
  5. “-bash: firewall: command not found” – How to resolve in CentOS/RHEL 7
  6. How to Setup SSH keys for SSH “public/private key” Login On Linux
  7. ifconfig: command not found
  8. quotacheck: command not found
  9. pulseaudio Command Examples in Linux
  10. nmcli device Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • ctags: Generates an index (or tag) file of language objects found in source files for many popular programming languages
  • csvtool: Utility to filter and extract data from CSV formatted sources
  • csvstat: Print descriptive statistics for all columns in a CSV file
  • csvsql: Generate SQL statements for a CSV file or execute those statements directly on a database

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright