• 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. autorandr: command not found
  2. How to Start NTP Service With Slewing Enabled in Linux
  3. Issue Opening a Firewalld Port in CentOS/RHEL 8
  4. /dev/shm permission change after node reboot
  5. How to Disable IPv6 on Ubuntu 22.04 LTS Jammy Jellyfish
  6. How to Mask or Unmask a Service in CentOS/RHEL 7 and 8
  7. How to add words to the dictionary cracklib uses for validating passwords against known dictionary words
  8. abbr Command Examples in fish-shell
  9. Beginners guide to vi editor (command line reference)
  10. How to run a cron job on specific days of the week

You May Also Like

Primary Sidebar

Recent Posts

  • nixos-rebuild Command Examples in Linux
  • nixos-option: Command Examples in Linux
  • nixos-container : Command Examples in Linux
  • nitrogen Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright