{
    "mode": "man",
    "parameter": "sadc",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/sadc/8/json",
    "generated": "2026-05-30T06:10:36Z",
    "synopsis": "/usr/lib/sysstat/sadc  [ -C comment ] [ -D ] [ -F ] [ -f ] [ -L ] [ -V ] [ -S { keyword[,...]\n| ALL | XALL } ] [ interval [ count ] ] [ outfile ]",
    "sections": {
        "NAME": {
            "content": "sadc - System activity data collector.\n\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "/usr/lib/sysstat/sadc  [ -C comment ] [ -D ] [ -F ] [ -f ] [ -L ] [ -V ] [ -S { keyword[,...]\n| ALL | XALL } ] [ interval [ count ] ] [ outfile ]\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The sadc command samples system data a specified number of times (count) at a  specified  in‐\nterval  measured  in seconds (interval).  It writes in binary format to the specified outfile\nor to standard output. If outfile is set to -, then sadc uses the  standard  system  activity\ndaily  data  file (see below).  In this case, if the file already exists, sadc will overwrite\nit if it is from a previous month. By default sadc collects most of the data  available  from\nthe  kernel.  But there are also optional metrics, for which the relevant options must be ex‐\nplicitly passed to sadc to be collected (see option -S below).\n\nThe standard system activity daily data file is named saDD unless option -D is used, in which\ncase its name is saYYYYMMDD, where YYYY stands for the current year, MM for the current month\nand DD for the current day. By default it is located in the /var/log/sysstat  directory.  Yet\nit is possible to specify an alternate location for it: If outfile is a directory (instead of\na plain file) then it will be considered as the directory where the standard system  activity\ndaily data file will be saved.\n\nWhen the count parameter is not specified, sadc writes its data endlessly. When both interval\nand count are not specified, and option -C is not used, a dummy record, which is used at sys‐\ntem startup to mark the time when the counter restarts from 0, will be written.  For example,\none of the system startup script may write the restart mark to the daily  data  file  by  the\ncommand entry:\n",
            "subsections": [
                {
                    "name": "/usr/lib/sysstat/sadc -",
                    "content": "The sadc command is intended to be used as a backend to the sar command.\n\nNote: The sadc command only reports on local activities.\n\n"
                }
            ]
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-C",
                    "content": "When  neither  the  interval nor the count parameters are specified, this option tells\nsadc to write a dummy record containing the specified comment string. This comment can\nthen be displayed with option -C of sar.\n",
                    "flag": "-C"
                },
                {
                    "name": "-D",
                    "content": "",
                    "flag": "-D"
                },
                {
                    "name": "-F",
                    "content": "unknown to sadc then it will be truncated. This may be useful  for  daily  data  files\ncreated by an older version of sadc and whose format is no longer compatible with cur‐\nrent one.\n",
                    "flag": "-F"
                },
                {
                    "name": "-f",
                    "content": "mal  operation  in  that  a  sudden  system reset is less likely to result in the saDD\ndatafiles being corrupted. However, this is at the expense of performance  within  the\nsadc  process  as forward progress will be blocked while data is written to underlying\ndisk instead of just to cache.\n",
                    "flag": "-f"
                },
                {
                    "name": "-L",
                    "content": "ing it. Failure to get the lock is fatal, except in the case of trying to write a nor‐\nmal (i.e. not a dummy and not a header) record to an existing file, in which case sadc\nwill  try again at the next interval. Usually, the only reason a lock would fail would\nbe if another sadc process were also writing to the file. This can happen when cron is\nused  to  launch  sadc.  If the system is under heavy load, an old sadc might still be\nrunning when cron starts a new one. Without locking, this situation can  result  in  a\ncorrupted system activity file.\n",
                    "flag": "-L"
                },
                {
                    "name": "-S",
                    "content": "Possible keywords are DISK, INT, IPV6, POWER, SNMP, XDISK, ALL and XALL.\nSpecify  which  optional  activities should be collected by sadc.  Some activities are\noptional to prevent data files from growing too large. The DISK keyword indicates that\nsadc should collect data for block devices. The INT keyword indicates that sadc should\ncollect data for system interrupts. The IPV6 keyword indicates  that  IPv6  statistics\nshould  be  collected  by  sadc.  The POWER keyword indicates that sadc should collect\npower management statistics. The SNMP keyword indicates that SNMP statistics should be\ncollected  by sadc. The ALL keyword is equivalent to specifying all the keywords above\nand therefore all previous activities are collected.\n\nThe XDISK keyword is an extension to the DISK one and indicates  that  partitions  and\nfilesystems  statistics  should  be  collected by sadc in addition to disk statistics.\nThis option works only with kernels 2.6.25 and later. The XALL keyword  is  equivalent\nto  specifying all the keywords above (including keyword extensions) and therefore all\npossible activities are collected.\n\nImportant note: The activities (including optional ones) saved  in  an  existing  data\nfile  prevail over those selected with option -S.  As a consequence, appending data to\nan existing data file will result in option -S being ignored.\n",
                    "flag": "-S"
                },
                {
                    "name": "-V",
                    "content": "",
                    "flag": "-V"
                }
            ]
        },
        "ENVIRONMENT": {
            "content": "The sadc command takes into account the following environment variable:\n\nSTIMEDEFTIME\nIf this variable exists and its value is UTC then sadc will save its data in UTC time.\nsadc  will also use UTC time instead of local time to determine the current daily data\nfile located in the /var/log/sysstat directory.\n\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "",
            "subsections": [
                {
                    "name": "/usr/lib/sysstat/sadc 1 10 /tmp/datafile",
                    "content": "Write 10 records of one second intervals to the /tmp/datafile binary file.\n"
                },
                {
                    "name": "/usr/lib/sysstat/sadc -C \"Backup Start\" /tmp/datafile",
                    "content": "Insert the comment \"Backup Start\" into the file /tmp/datafile.\n\n"
                }
            ]
        },
        "BUGS": {
            "content": "The /proc filesystem must be mounted for the sadc command to work.\n\nAll the statistics are not necessarily available, depending on the kernel version used.  sadc\nassumes that you are using at least a 2.6 kernel.\n\n",
            "subsections": []
        },
        "FILES": {
            "content": "/var/log/sysstat/saDD\n/var/log/sysstat/saYYYYMMDD\nThe standard system activity daily data files and their default location.  YYYY stands\nfor the current year, MM for the current month and DD for the current day.\n/proc and /sys contain various files with system statistics.\n\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Sebastien Godard (sysstat <at> orange.fr)\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "sar(1), sa1(8), sa2(8), sadf(1), sysstat(5)\n\nhttps://github.com/sysstat/sysstat\nhttp://pagesperso-orange.fr/sebastien.godard/\n\n\n\nLinux                                         JULY 2020                                      SADC(8)",
            "subsections": []
        }
    },
    "summary": "sadc - System activity data collector.",
    "flags": [
        {
            "flag": "-C",
            "long": null,
            "arg": null,
            "description": "When neither the interval nor the count parameters are specified, this option tells sadc to write a dummy record containing the specified comment string. This comment can then be displayed with option -C of sar."
        },
        {
            "flag": "-D",
            "long": null,
            "arg": null,
            "description": ""
        },
        {
            "flag": "-F",
            "long": null,
            "arg": null,
            "description": "unknown to sadc then it will be truncated. This may be useful for daily data files created by an older version of sadc and whose format is no longer compatible with cur‐ rent one."
        },
        {
            "flag": "-f",
            "long": null,
            "arg": null,
            "description": "mal operation in that a sudden system reset is less likely to result in the saDD datafiles being corrupted. However, this is at the expense of performance within the sadc process as forward progress will be blocked while data is written to underlying disk instead of just to cache."
        },
        {
            "flag": "-L",
            "long": null,
            "arg": null,
            "description": "ing it. Failure to get the lock is fatal, except in the case of trying to write a nor‐ mal (i.e. not a dummy and not a header) record to an existing file, in which case sadc will try again at the next interval. Usually, the only reason a lock would fail would be if another sadc process were also writing to the file. This can happen when cron is used to launch sadc. If the system is under heavy load, an old sadc might still be running when cron starts a new one. Without locking, this situation can result in a corrupted system activity file."
        },
        {
            "flag": "-S",
            "long": null,
            "arg": null,
            "description": "Possible keywords are DISK, INT, IPV6, POWER, SNMP, XDISK, ALL and XALL. Specify which optional activities should be collected by sadc. Some activities are optional to prevent data files from growing too large. The DISK keyword indicates that sadc should collect data for block devices. The INT keyword indicates that sadc should collect data for system interrupts. The IPV6 keyword indicates that IPv6 statistics should be collected by sadc. The POWER keyword indicates that sadc should collect power management statistics. The SNMP keyword indicates that SNMP statistics should be collected by sadc. The ALL keyword is equivalent to specifying all the keywords above and therefore all previous activities are collected. The XDISK keyword is an extension to the DISK one and indicates that partitions and filesystems statistics should be collected by sadc in addition to disk statistics. This option works only with kernels 2.6.25 and later. The XALL keyword is equivalent to specifying all the keywords above (including keyword extensions) and therefore all possible activities are collected. Important note: The activities (including optional ones) saved in an existing data file prevail over those selected with option -S. As a consequence, appending data to an existing data file will result in option -S being ignored."
        },
        {
            "flag": "-V",
            "long": null,
            "arg": null,
            "description": ""
        }
    ],
    "examples": [
        "Write 10 records of one second intervals to the /tmp/datafile binary file.",
        "Insert the comment \"Backup Start\" into the file /tmp/datafile."
    ],
    "see_also": [
        {
            "name": "sar",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/sar/1/json"
        },
        {
            "name": "sa1",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/sa1/8/json"
        },
        {
            "name": "sa2",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/sa2/8/json"
        },
        {
            "name": "sadf",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/sadf/1/json"
        },
        {
            "name": "sysstat",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/sysstat/5/json"
        }
    ]
}