Difference between revisions of "Sar installation"

From wikieduonline
Jump to navigation Jump to search
Line 1: Line 1:
 
{{lc}}
 
{{lc}}
 
One line command for installation and basic configuration for collecting :
 
One line command for installation and basic configuration for collecting :
* Debian/Ubuntu:  
+
* New Debian/Ubuntu:
 +
::<code>[[apt -y install sysstat]]; [[systemctl enable --now sysstat]] && [[sar]]</code>
 +
 
 +
* Old Debian/Ubuntu:
 
:: <code>[[apt]] -y install [[sysstat]]; [[sed -i]] 's/ENABLED="false"/ENABLED="true"/g' [[/etc/default/sysstat]] && [[service restart sysstat]] && [[sar]]</code>
 
:: <code>[[apt]] -y install [[sysstat]]; [[sed -i]] 's/ENABLED="false"/ENABLED="true"/g' [[/etc/default/sysstat]] && [[service restart sysstat]] && [[sar]]</code>
 
::Optionally modify collection interval in: <code>[[/etc/cron.d/sysstat]]</code>
 
::Optionally modify collection interval in: <code>[[/etc/cron.d/sysstat]]</code>

Revision as of 09:20, 7 February 2023

One line command for installation and basic configuration for collecting :

  • New Debian/Ubuntu:
apt -y install sysstat; systemctl enable --now sysstat && sar
  • Old Debian/Ubuntu:
apt -y install sysstat; sed -i 's/ENABLED="false"/ENABLED="true"/g' /etc/default/sysstat && service restart sysstat && sar
Optionally modify collection interval in: /etc/cron.d/sysstat
Optionally modify collection options in (SADC_OPTIONS="-S XALL"): /etc/sysstat/sysstat (man sadc)
yum -y install sysstat && service sysstat start


Installing sar Debian, you have to install sysstat package that includes sar and some other performance tools:

  • apt -y install sysstat
  • Checking installation: dpkg -l sysstat
  • Binaries installed in /usr/bin/ directory: dpkg -L sysstat | grep "/usr/bin". Sysstat package contains sar and some other utilities.

Related

See also

Advertising: