sysstat is the package that you will need to install in order to get the sar
# apt-get install sysstat
Note: After you install the package, you will get the below error as you will need to configure sysstat to collect data.
# sar
Cannot open /var/log/sysstat/sa12: No such file or directory
Please check if data collecting is enabled in /etc/default/sysstat
Steps Configure sysstat
- Open /etc/default/sysstat configuration file and set the ENABLED flag to true.
root@ubuntu # nano /etc/default/sysstat
# # Default settings for /etc/init.d/sysstat, /etc/cron.d/sysstat # and /etc/cron.daily/sysstat files # # Should sadc collect system activity informations? Valid values # are "true" and "false". Please do not put other values, they # will be overwritten by debconf! ENABLED="true"
- Restart the sysstat service
root@ubuntu # service sysstat restart * Starting the system activity data collector sadc
Note: The default setting to collect stats in activity reports is every 10 minutes everyday, you can change it by editing the cron expression in /etc/cron.d/sysstat config file.
Facing issues? Have Questions? Post them here! I am happy to answer!
Author Info:
Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.
Follow him on: X
You can also reach out to him via e-mail: rakesh@code2care.org
More Posts related to Linux,
- Command to know the Available Memory on Linux System
- How to install curl on Alpine Linux
- How to backup a file in Linux/Unix
- Install Java Runtime Environment (Oracle or open JRE) on Ubuntu
- What is the Default Admin user and Password for Jenkins
- How to tar.gz a directory or folder Command
- Copy entire directory using Terminal Command [Linux, Mac, Bash]
- Fix: bash: ipconfig: command not found on Linux
- Command to check Last Login or Reboot History of Users and TTYs
- Linux: Create a New User and Password and Login Example
- ls command to list only directories
- bash: cls: command not found
- How to exit from nano command
- Installing and using unzip Command to unzip a zip file using Terminal
- What does apt-get update command does?
- ls command: sort files by name alphabetically A-Z or Z-A [Linux/Unix/macOS/Bash]
- How to remove or uninstall Java from Ubuntu using apt-get
- scp: ssh: connect to host xxxx port 22: Connection refused Error
- Sort ls command by last modified date and time
- Create Nested Directories using mkdir Command
- How to Exit a File in Terminal (Bash/Zsh)
- Command to know the installed Debian version?
- How to connect to SSH port other than default 22
- How to save a file in Nano Editor and Exit
- Install OpenSSL on Linux/Ubuntu
More Posts:
- How to know list of images available on your device - Docker
- [JavaScript] Remove all Newlines From String - JavaScript
- Remove Apps from Dock when Quit [Mac Ventura] - MacOS
- List of New Features in Java 11 (JEPs) - Java
- How to rename a tab in Notepad++ - NotepadPlusPlus
- How to find path of file on Mac Terminal - MacOS
- SharePoint Managed Metadata Hidden Taxonomy List - TaxonomyHiddenList - SharePoint
- Kill or force quit stuck application or process in Mac OS X - Mac-OS-X