SA1(8)

๐Ÿ’… sa1 โ€” the lil data-collector bestie (SA1(8))

okay so picture this: sa1 is the girl who shows up every ten minutes, quietly writes down everything the system is doing, and never asks for credit. she's the main character of your system activity history ngl. this is the SA1(8) page, from the Linux User's Manual โ€” let's get into it ๐ŸŽ€


โœจ SYNOPSIS โœจ

/usr/lib/sa/sa1 [ --boot | --rotate | --sleep | interval count ]

literally that's it. that's the whole vibe. ๐Ÿฆ‹


๐ŸŒธ DESCRIPTION ๐ŸŒธ

okay so sa1 is basically sadc's prettier little sister โ€” she's a shell procedure variant of the sadc command, which means she handles all of the flags and parameters of that command. icon behaviour. ๐Ÿ’…

what does she do with all that? she collects and stores binary data in the current standard system activity daily data file. that's her whole job and she ate. ๐Ÿ”ฅ

now the naming, pay attention bestie:

  • the standard system activity daily data file is called saDD
  • unless sadc's option -D is used โ€” then it's called saYYYYMMDD instead
  • where YYYY stands for the current year, MM for the current month, and DD for the current day
  • by default it lives in the /var/log/sa directory ๐Ÿ—‚๏ธ

the interval and count parameters are how you tell her: write the record count times, at interval seconds apart. and if you give sa1 no arguments at all? she still writes a single record. low maintenance queen. ๐Ÿ‘‘

and here's the key thing โ€” sa1 is designed to be started automatically by the cron command. she's not a "run me by hand every time" girlie, she's a "set it and forget it" girlie. ๐Ÿงš


๐Ÿฆ‹ OPTIONS ๐Ÿฆ‹

  • --boot โ€” this tells sa1 that the sadc command should be called without specifying the interval and count parameters, so it can insert a dummy record marking the time when the counters restart from 0. like a lil "fresh start, new me" timestamp โœจ
  • --rotate โ€” use this to tell sa1 to insert a record of statistics into the standard saDD system activity daily data file of the previous day. and you gotta do this shortly after midnight (on day DD+1), so the data file covers the whole day โ€” including that last interval of time just before midnight. no gaps, no missing tea. ๐Ÿ’€
  • --sleep โ€” this one tells sa1 that the sadc command should insert a comment indicating that the system is entering or leaving sleep mode (i.e. system suspend or hibernation). so future-you knows why the numbers went quiet ๐Ÿ˜ด

๐Ÿ“ EXAMPLE ๐Ÿ“

wanna collect data (including those from disks) every 10 minutes? drop this entry into your root crontab file:

0,10,20,30,40,50 * * * * /usr/lib/sa/sa1 1 1 -S DISK

and if you wanna rotate the current system activity daily data file and make sure it's complete? this goes in your root crontab file:

0 0 * * * /usr/lib/sa/sa1 --rotate

cron girlies stay winning ๐Ÿซถ


๐ŸŽ€ FILES ๐ŸŽ€

  • /var/log/sa/saDD
  • /var/log/sa/saYYYYMMDD

these are the standard system activity daily data files and their default location. remember: YYYY stands for the current year, MM for the current month, and DD for the current day. iykyk ๐Ÿ’–


๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

Sebastien Godard (sysstat <at> orange.fr)


๐ŸŒˆ SEE ALSO ๐ŸŒˆ

sar(1), sadc(8), sa2(8), sadf(1), sysstat(5)


and that's the whole page bestie ๐Ÿ’œ this gem is from the Linux manual, dated JULY 2026 โ€” go forth, schedule your cron jobs, and let sa1 handle the receipts. periodt ๐ŸŒŸ

๐Ÿ“ฆ where this page comes from