{
    "content": [
        {
            "type": "text",
            "text": "# xfs_spaceman(8) (man)\n\n**Summary:** xfsspaceman - show free space information about an XFS filesystem\n\n**Synopsis:** xfsspaceman [ -c cmd ] file\nxfsspaceman -V\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| -c | — | — | command line. Multiple -c arguments may be given. The commands are run in the se‐ quence given, then the program exits. |\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (3 lines)\n- **DESCRIPTION** (2 lines)\n- **OPTIONS** (1 lines) — 1 subsections\n  - -c (4 lines)\n- **COMMANDS** (1 lines) — 3 subsections\n  - freesp [ -dgrs ] [-a agno]... [ -b | -e bsize | -h bsize | - (38 lines)\n  - health [ -a agno] [ -c ] [ -f ] [ -i inum ] [ -q ] [ paths ] (15 lines)\n  - prealloc [ -u id ] [ -g id ] [ -p id ] [ -m minlen ] [ -s ] (49 lines)\n\n## Full Content\n\n### NAME\n\nxfsspaceman - show free space information about an XFS filesystem\n\n### SYNOPSIS\n\nxfsspaceman [ -c cmd ] file\nxfsspaceman -V\n\n### DESCRIPTION\n\nxfsspaceman reports and controls free space usage in an XFS filesystem.\n\n### OPTIONS\n\n#### -c\n\ncommand line. Multiple -c arguments may be given. The commands are run in  the  se‐\nquence given, then the program exits.\n\n### COMMANDS\n\n#### freesp [ -dgrs ] [-a agno]... [ -b | -e bsize | -h bsize | -m factor ]\n\nWith  no arguments, freesp shows a histogram of all free space extents in the filesys‐\ntem.  The command takes the following options:\n\n-a agno\nCollect free space information from this allocation group.  This option can  be\nspecified multiple times to collect from multiple groups.\n\n-b  This argument establishes that the histogram bin sizes are successive powers of\ntwo.  This is the default, and is mutually exclusive with the -e,  -h,  and  -m\noptions.\n\n-d  Print debugging information such as the raw free space extent information.\n\n-g  Print the free space block and extent counts for each AG.\n\n-e bsize\nSet  all  histogram bin sizes to a specific value.  This option is mutually ex‐\nclusive with the -b, -h, and -m options.\n\n-h bsize\nCreate a histogram bin with a lower bound of this value.  The  upper  bound  of\nthis  bin  will  be one less than the lower bound of the next highest histogram\nbin.  This option can be given multiple times to control the exact  bin  sizes.\nThis option is mutually exclusive with the -b, -e, and -m options.\n\n-m factor\nCreate  each  histogram bin with a size that is this many times the size of the\nprvious bin created.  This option is mutually exclusive with the -b, -e, and -h\noptions.\n\n-r  Query the realtime device for free space information.\n\n-s  Display a summary of the free space information found.\n\ninfo   Displays  selected geometry information about the filesystem.  The opened file must be\na mount point of a XFS  filesystem.   The  output  will  have  the  same  format  that\nxfsinfo(8) prints when querying a filesystem.\n\n#### health [ -a agno] [ -c ] [ -f ] [ -i inum ] [ -q ] [ paths ]\n\nReports the health of the given group of filesystem metadata.\n-a agno\nReport on the health of the given allocation group.\n-c  Scan all inodes in the filesystem and report each file's health status.  If the\n-a option is given, scan only the inodes in that AG.\n-f  Report on the health of metadata that affect the entire filesystem.\n-i inum\nReport on the health of a specific inode.\n-q  Report only unhealthy metadata.\npaths\nReport on the health of the files at the given path.\n\nhelp [ command ]\nDisplay a brief description of one or all commands.\n\n#### prealloc [ -u id ] [ -g id ] [ -p id ] [ -m minlen ] [ -s ]\n\nRemoves speculative preallocation.  If no -u, -g, or -p options are given,  this  com‐\nmand acts on all files.  The command takes the following options:\n\n-u uid\nClear  all speculative preallocations for files with this user id.  This option\ncan be given in combination with the -g  and  -p options.\n\n-g gid\nClear all speculative preallocations for files with this group id.  This option\ncan be given in combination with the -u  and  -p options.\n\n-p pid\nClear  all speculative preallocations for files with this project id.  This op‐\ntion can be given in combination with the -u  and  -g options.\n\n-m minlen\nIgnore all files smaller than this size.  Units can be supplied for this  argu‐\nment.\n\n-s  Wait for removal to complete.\n\nprint  Display a list of all open files.\n\nquit   Exit xfsspaceman.\n\ntrim ( -a agno | -f | offset length ) [ -m minlen ]\nInstructs  the  underlying  storage  device to release all storage that may be backing\nfree space in the filesystem.  The command takes the following options:  (One  of  -a,\n-f, or the offset/length pair are required.)\n\n-a agno\nTrim free space extents in the given allocation group.  This option is mutually\nexclusive with the -f option and the offset/length options.\n\n-f  Trim all free space in the filesystem.  This option is mutually exclusive  with\nthe -a option and the offset/length options.\n\noption, length\nTrim  all free space within the physical range defined by the offset and length\nfrom this filesystem.  Units can be appended to these arguments.   This  option\nis mutually exclusive with the -a and -f options.\n\n-m minlen\nDo not trim free space extents shorter than this length.  Units can be appended\nto this argument.\n\n\n\nxfsspaceman(8)\n\n"
        }
    ],
    "structuredContent": {
        "command": "xfs_spaceman",
        "section": "8",
        "mode": "man",
        "summary": "xfsspaceman - show free space information about an XFS filesystem",
        "synopsis": "xfsspaceman [ -c cmd ] file\nxfsspaceman -V",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "-c",
                "long": null,
                "arg": null,
                "description": "command line. Multiple -c arguments may be given. The commands are run in the se‐ quence given, then the program exits."
            }
        ],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-c",
                        "lines": 4,
                        "flag": "-c"
                    }
                ]
            },
            {
                "name": "COMMANDS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "freesp [ -dgrs ] [-a agno]... [ -b | -e bsize | -h bsize | -m factor ]",
                        "lines": 38
                    },
                    {
                        "name": "health [ -a agno] [ -c ] [ -f ] [ -i inum ] [ -q ] [ paths ]",
                        "lines": 15
                    },
                    {
                        "name": "prealloc [ -u id ] [ -g id ] [ -p id ] [ -m minlen ] [ -s ]",
                        "lines": 49
                    }
                ]
            }
        ]
    }
}