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!
More Posts related to Linux,
- Rename a directory using Linux/Unix command
- ls command to list only directories
- How to Restart or Reload Nginx Server Service on Linux
- 3 ways to clear screen on Linux Terminal
- ls command: sort files by name alphabetically A-Z or Z-A [Linux/Unix/macOS/Bash]
- Copy entire directory using Terminal Command [Linux, Mac, Bash]
- Fix: sudo: unable to open Read-only file system
- Create Hidden File or Directory using Shell Command
- Command to know the installed Debian version?
- The Date Command and its usage [Linux - Unix - macOS]
- Fix - bash: man: command not found
- How to tar.gz a directory or folder Command
- How to Display content of a file in Terminal Screen?
- How to change bash terminal prompt string and color
- Sort ls command by last modified date and time
- Execute .bin and .run file Ubuntu Linux
- zsh hello world example
- How to check uptime of Linux/Unix/macOS system/server using console command?
- [Fix] Linux - bash: useradd: command not found
- Command to check Last Login or Reboot History of Users and TTYs
- How to install and Configure sar sysstat tools in Ubuntu Linux
- How to use SCP Command to Copy Directory
- Linux Remove or Delete Files and Directories using Terminal Commands
- How to connect to SSH port other than default 22
- Install OpenSSL on Linux/Ubuntu
More Posts:
- MySQL 1005 Error : SQLSTATE: HY000 (ER_CANT_CREATE_TABLE) Message: Can't create table '%s' (errno: 150) - MySQL
- How to enable disable SharePoint Developer Dashboard for tracing troubleshooting - SharePoint
- How to reload Zsh .zshrc Profile - zsh
- Set Environment Variable in PowerShell for Mac - Powershell
- Fix java.net.ProtocolException: Invalid HTTP method - Java
- Read Java JDBC Connection Details from Properties File - Java
- How to Check AWS SNS Permissions using CLI - AWS
- Google Celebrates Rosa Bonheur 200th birthday with a Google Doodle - Google