{
    "content": [
        {
            "type": "text",
            "text": "# qsrotate (man)\n\n## NAME\n\nqsrotate - a log rotation tool (similar to Apache's rotatelogs).\n\n## SYNOPSIS\n\nqsrotate  -o <file> [-s <sec> [-t <hours>]] [-b <bytes>] [-f] [-z] [-g <num>] [-u <name>] [-m\n<mask>] [-p] [-d]\n\n## DESCRIPTION\n\nqsrotate reads from stdin (piped log) and writes the data to the provided file  rotating  the\nfile after the specified time.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (6 subsections)\n- **EXAMPLE**\n- **NOTE**\n- **SEE ALSO**\n- **AUTHOR**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "qsrotate",
        "section": "",
        "mode": "man",
        "summary": "qsrotate - a log rotation tool (similar to Apache's rotatelogs).",
        "synopsis": "qsrotate  -o <file> [-s <sec> [-t <hours>]] [-b <bytes>] [-f] [-z] [-g <num>] [-u <name>] [-m\n<mask>] [-p] [-d]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "-o",
                "long": null,
                "arg": "<file>",
                "description": "Output log file to write the data to (use an absolute path)."
            },
            {
                "flag": "-s",
                "long": null,
                "arg": "<sec>",
                "description": "Rotation interval in seconds, default are 86400 seconds."
            },
            {
                "flag": "-t",
                "long": null,
                "arg": "<hours>",
                "description": "Offset to UTC (enables also DST support), default is 0."
            },
            {
                "flag": "-b",
                "long": null,
                "arg": "<bytes>",
                "description": "File size limitation (default/max. are 2147352576 bytes, min. are 1048576 bytes). -f Forced log rotation at the specified interval even no data is written. -z Compress (gzip) the rotated file."
            },
            {
                "flag": "-g",
                "long": null,
                "arg": "<num>",
                "description": "Generations (number of files to keep)."
            },
            {
                "flag": "-u",
                "long": null,
                "arg": "<name>",
                "description": "Become another user, e.g. www-data. -m <mask> File permission which is either 600, 640, 660 (default) or 664. -p Writes data also to stdout (for piped logging). -d Line-by-line data reading prefixing every line with a timestamp."
            }
        ],
        "examples": [
            "TransferLog \"|/usr/bin/qsrotate -f -z -g 3 -o /var/log/apache/access.log -s 86400\"",
            "The  name  of the rotated file will be /dest/filee.YYYYmmddHHMMSS where YYYYmmddHHMMSS is the",
            "system time at which the data has been rotated."
        ],
        "see_also": [
            {
                "name": "qsdt",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/qsdt/1/json"
            },
            {
                "name": "qsexec",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/qsexec/1/json"
            },
            {
                "name": "qsfilter2",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/qsfilter2/1/json"
            },
            {
                "name": "qsgeo",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/qsgeo/1/json"
            },
            {
                "name": "qsgrep",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/qsgrep/1/json"
            },
            {
                "name": "qshead",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/qshead/1/json"
            },
            {
                "name": "qslog",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/qslog/1/json"
            },
            {
                "name": "qslogger",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/qslogger/1/json"
            },
            {
                "name": "qsre",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/qsre/1/json"
            },
            {
                "name": "qsrespeed",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/qsrespeed/1/json"
            },
            {
                "name": "qspng",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/qspng/1/json"
            },
            {
                "name": "qssign",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/qssign/1/json"
            },
            {
                "name": "qstail",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/qstail/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-o <file>",
                        "lines": 2,
                        "flag": "-o",
                        "arg": "<file>"
                    },
                    {
                        "name": "-s <sec>",
                        "lines": 2,
                        "flag": "-s",
                        "arg": "<sec>"
                    },
                    {
                        "name": "-t <hours>",
                        "lines": 2,
                        "flag": "-t",
                        "arg": "<hours>"
                    },
                    {
                        "name": "-b <bytes>",
                        "lines": 6,
                        "flag": "-b",
                        "arg": "<bytes>"
                    },
                    {
                        "name": "-g <num>",
                        "lines": 2,
                        "flag": "-g",
                        "arg": "<num>"
                    },
                    {
                        "name": "-u <name>",
                        "lines": 6,
                        "flag": "-u",
                        "arg": "<name>"
                    }
                ]
            },
            {
                "name": "EXAMPLE",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "NOTE",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "qsrotate - a log rotation tool (similar to Apache's rotatelogs).\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "qsrotate  -o <file> [-s <sec> [-t <hours>]] [-b <bytes>] [-f] [-z] [-g <num>] [-u <name>] [-m\n<mask>] [-p] [-d]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "qsrotate reads from stdin (piped log) and writes the data to the provided file  rotating  the\nfile after the specified time.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "-o <file>",
                        "content": "Output log file to write the data to (use an absolute path).\n",
                        "flag": "-o",
                        "arg": "<file>"
                    },
                    {
                        "name": "-s <sec>",
                        "content": "Rotation interval in seconds, default are 86400 seconds.\n",
                        "flag": "-s",
                        "arg": "<sec>"
                    },
                    {
                        "name": "-t <hours>",
                        "content": "Offset to UTC (enables also DST support), default is 0.\n",
                        "flag": "-t",
                        "arg": "<hours>"
                    },
                    {
                        "name": "-b <bytes>",
                        "content": "File size limitation (default/max. are 2147352576 bytes, min. are 1048576 bytes).\n\n-f     Forced log rotation at the specified interval even no data is written.\n\n-z     Compress (gzip) the rotated file.\n",
                        "flag": "-b",
                        "arg": "<bytes>"
                    },
                    {
                        "name": "-g <num>",
                        "content": "Generations (number of files to keep).\n",
                        "flag": "-g",
                        "arg": "<num>"
                    },
                    {
                        "name": "-u <name>",
                        "content": "Become  another  user,  e.g.  www-data. -m <mask> File permission which is either 600,\n640, 660 (default) or 664.\n\n-p     Writes data also to stdout (for piped logging). -d Line-by-line data reading prefixing\nevery line with a timestamp.\n",
                        "flag": "-u",
                        "arg": "<name>"
                    }
                ]
            },
            "EXAMPLE": {
                "content": "TransferLog \"|/usr/bin/qsrotate -f -z -g 3 -o /var/log/apache/access.log -s 86400\"\n\nThe  name  of the rotated file will be /dest/filee.YYYYmmddHHMMSS where YYYYmmddHHMMSS is the\nsystem time at which the data has been rotated.\n",
                "subsections": []
            },
            "NOTE": {
                "content": "- Each qsrotate instance must use an individual file.\n- You may trigger a file rotation manually by sending the signal USR1 to the process.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "qsdt(1), qsexec(1), qsfilter2(1),  qsgeo(1),  qsgrep(1),  qshead(1),  qslog(1),  qslogger(1),\nqsre(1), qsrespeed(1), qspng(1), qssign(1), qstail(1)\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Pascal Buchbinder, http://mod-qos.sourceforge.net/\n\n\n\nmodqos utilities 11.63                       May 2019                                   QSROTATE(1)",
                "subsections": []
            }
        }
    }
}