Lead Image © Levente Janos, 123RF.com

Lead Image © Levente Janos, 123RF.com

Admin as a service with sysstat for ex-post monitoring

Facts, Figures, and Data

Article from ADMIN 81/2024
By
The top, vmstat, and iotop monitoring tools for Linux show the current situation but do not provide any information about the past – which is where sysstat comes into play.

The sysstat package contains numerous tools for monitoring performance and load states on systems, including iostat, mpstat, and pidstat. In addition to tools intended for ad hoc use, sysstat comes with a collection of utilities that you schedule for periodic use as cron jobs (e.g., sar). The compiled statistics range from I/O transfer rates, CPU and memory utilization, paging and page faults, network statistics, and filesystem utilization through NFS server and client activities.

Of course, you could use top, vmstat, ss, and so on to determine the data, but bear in mind that system events are hardly likely to be restricted to the times at which you are sitting in front of the screen. Admins typically receive requests for more detailed information, like: "What exactly happened on system XY between 1:23 and 1:37am?" Many sensors in modern monitoring systems are capable of detecting these anomalies, but very few IT departments are likely to have configured comprehensive monitoring for all systems. Moreover, these metrics quite commonly are not implemented in a central monitoring setup. Sysstat gives you the perfect toolbox for these cases.

Installation

To install sysstat under Ubuntu and Debian, just run:

sudo apt install sysstat

By default, sysstat checks the system every 10 minutes with the use of a systemd timer. If you require more frequent measurements, you need to adjust the interval in the /usr/lib/systemd/system/sysstat-collect.timer file. You can set a scan every five minutes by entering *:00/05 instead of the default setting *:00/10:

[Unit]
Description=Run system activity accounting tool every -10- 5 minutes
[Timer]
OnCalendar=*:00/05
[Install]
WantedBy=sysstat.service

Next,

...
Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy ADMIN Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus