The lurk is an open-source command line tool developed in Rust programming language, designed as a simpler and more user-friendly alternative to strace. It enables users to trace and log system calls made by processes on Linux systems. This tutorial explains how to install lurk system calls tracing tool on Ubuntu 24.04.
Install lurk
Download tar.gz
file from releases page:
wget -qO lurk.tar.gz https://github.com/JakWai01/lurk/releases/latest/download/lurk-x86_64-unknown-linux-gnu.tar.gz
Extract the executable from the archive to the /usr/local/bin
directory:
sudo tar xf lurk.tar.gz -C /usr/local/bin lurk
We can check the version of lurk using the following command:
lurk --version
We can remove the unnecessary tar.gz
file:
rm -rf lurk.tar.gz
Testing lurk
To use the lurk
command, just place it before the command you wish to trace:
lurk myprog arg1 arg2
Change myprog arg1 arg2
with the actual command. For instance:
lurk echo "Hello world"
This will display the system calls made by the echo
command. The output may look like the following:
[1777] execve("", "", "") = 0
[1777] brk(0x0) = 0x55555555E000
[1777] mmap(0x0, 8192, 3, 34, 4294967295, 0) = 0x7FFFF7FBD000
[1777] access("/etc/ld.so.preload", 4) = -2
[1777] openat(4294967196, "/etc/ld.so.cache", 524288) = 3
[1777] fstat(3, 0x7FFFFFFFD400) = 0
...
[1777] close(3) = 0
[1777] fstat(1, 0x7FFFFFFFE080) = 0
[1777] ioctl(1, 21505, 0x7FFFFFFFDFE0) = -25
[1777] write(1, "Hello world\n", 12) = 12
[1777] close(1) = 0
[1777] close(2) = 0
[1777] exit_group(0) = ?
Uninstall lurk
To completely remove lurk, delete the associated file:
sudo rm -rf /usr/local/bin/lurk
Leave a Comment
Cancel reply