Autrace - Tool to check, count and monitor Linux processes
Many people still do not know what Autrace is? The information you need to know about Autrace will be shared by TipsMake in the article below.
What is Autrace?
Autrace is a utility that allows running a process and saving the process's audit information in the file /var/www/audit/audit.log by adding audit rules.
To work, you first need to delete all existing audit rules.
Syntax for using autrace
# autrace -r program program-args
If you have any audit rules, autrace will show errors, for example:
On CentOS
# autrace /usr/bin/df
On Debian:
# autrace /bin/df
First you need to delete all audit rules using the following command:
# auditctl –D
The system will then run autrace with the program you want. In the example here, we are watching how the df command executes, showing the filesystem usage status.
On CentOS :
# autrace /usr/bin/df -h
On Debian :
# autrace /bin/df -h
From the screenshot above, you can find all the log entries to play around with, explore from the log file using the ausearch function as follows.
On Centos:
# ausearch -i -p 2658
In there:
-i : Enables interpretation of numeric values into text
-p : Enter the process ID to search
On Debian:
# ausearch -i -p 6796
To output a detailed report, you can build a command that combines ausearch and aureport as follows
On Centos
# ausearch -p 2678 --raw | aureport -i –f
In there:
--raw : Tell ausearch to send all raw input to aureport
-f : Allows reporting on files as well as af_unix sockets
-i : Enables interpretation of numeric values into text
On Debian
# ausearch -p 6796 --raw | aureport -i –f
And you can also use the following command to limit the syscalls to be grouped together, which is necessary for analyzing the resource usage of the df process.
On Centos
# autrace -r /usr/bin/df -h
On Debian
# autrace -r /bin/df -h
If you've ausearched a program in the past week, that means there's a lot of information going into the audit logs. To generate a report that only records events that happened today, you can use ausearch's -ts flag to specify the exact time to start searching for information:
On Centos
# ausearch -ts today -p 2768 --raw | aureport -i –f
On Debian
# ausearch -ts today -p 6796 --raw | aureport -i -f
That's all the basics you can use to control, monitor and track a Linux process using autrace. For more details, you can read the man pages.
According to TipsMake share
You should read it
- 20 impressive ads where creators can read our thoughts
- All the errors on Youtube and how to fix it
- Top 5 free game development software tools
- Lenovo's smallest laptop for consumers
- SEO tips for your Website
- Summary of driver error codes on Windows and how to fix (Last part)
- How to use flash drive on Windows 10
- Beautiful and simple modern kitchen design template
May be interested
- Count function in excel, formula, how to use count function in most detailin excel, the count function is a powerful tool that helps you quickly count numeric values in a spreadsheet. whether you are new or familiar with excel, mastering the syntax and usage will make calculations easier. let's explore the details in the article below.
- How to monitor, clean and optimize Linux with Stacerlooking for ways to optimize your linux system and make it run faster? there are tons of ways and tools for you to do this, and stacer includes everything you need to monitor, clean, and optimize your linux installation.
- How to check the status of using laptop battery running Linuxpreviously, battery management on laptops running linux was quite complicated. for years, linux has been 'famous' for managing inefficient battery life. part of it is due to the amount of work going into linux through the server space. partly because it can't guess the user configuration setting.
- How to check iPhone's charge counthave you ever wondered how many times your iphone has been charged? let's check it out in the following extremely simple way.
- COUNT function in SQL Serverthis article will show you in detail how to use functions that handle count () numbers in sql server with specific syntax and examples to better visualize and capture functions.
- Use the Top command to see the processes running in Linuxthe top command in linux is used to display all processes running in the linux environment. this tutorial shows you how to use the top command through explaining the various parameters available and the content they display.
- How to use Raspberry Pi to monitor network with Nagiosthe best way to monitor networks with a raspberry pi is to use a software called nagios. nagios is like an error detection tool, it checks something as often as possible (like every 5 minutes) and warns you when this check doesn't work as expected.
- New Symbiote malware is capable of infecting all processes running on Linux computerssymbiote has the ability to infect all processes running on the compromised system to steal account credentials and other data.
- How to check whether a Linux PC is 64-bit or 32-bit by command linehow to check if your linux system is 32-bit or 64-bit? in this article, tipsmake.com will show you how to define it using the gui and the command line.
- 10 best Ping monitoring software and toolsping monitoring is a common practice used to check the availability and status of network devices and computers using the icmp protocol.