{
    "mode": "man",
    "parameter": "runsvdir",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/runsvdir/8/json",
    "generated": "2026-06-15T18:51:52Z",
    "synopsis": "runsvdir [-P] dir [ log ]",
    "sections": {
        "NAME": {
            "content": "runsvdir - starts and monitors a collection of runsv(8) processes\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "runsvdir [-P] dir [ log ]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "dir must be a directory.  log is a space holder for a readproctitle log, and must be at least\nseven characters long or absent.\n\nrunsvdir starts a runsv(8) process for each subdirectory, or symlink to a directory,  in  the\nservices directory dir, up to a limit of 1000 subdirectories, and restarts a runsv(8) process\nif it terminates.  runsvdir skips subdirectory names starting with dots.  runsv(8) must be in\nrunsvdir's PATH.\n\nAt least every five seconds runsvdir checks whether the time of last modification, the inode,\nor the device, of the services directory dir has changed.  If so, it re-scans the service di‐\nrectory,  and if it sees a new subdirectory, or new symlink to a directory, in dir, it starts\na new runsv(8) process; if runsvdir sees a subdirectory being  removed  that  was  previously\nthere,  it  sends  the  corresponding  runsv(8)  process a TERM signal, stops monitoring this\nprocess, and so does not restart the runsv(8) process if it exits.\n\nIf the log argument is given to runsvdir, all output to standard error is redirected to  this\nlog,  which  is  similar to the daemontools' readproctitle log.  To see the most recent error\nmessages, use a process-listing tool such as ps(1).  runsvdir writes a dot to the readprocti‐\ntle log every 15 minutes so that old error messages expire.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "-P",
                    "content": "group.\n",
                    "flag": "-P"
                }
            ]
        },
        "SIGNALS": {
            "content": "If runsvdir receives a TERM signal, it exits with 0 immediately.\n\nIf runsvdir receives a HUP signal, it sends a TERM signal to each runsv(8) process it is mon‐\nitoring and then exits with 111.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "sv(8),  runsv(8),  runsvchdir(8),  runit(8),  runit-init(8), chpst(8), svlogd(8), utmpset(8),\nsetsid(2)\n\nhttp://smarden.org/runit/\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "Gerrit Pape <pape@smarden.org>\n\n\n\nrunsvdir(8)",
            "subsections": []
        }
    },
    "summary": "runsvdir - starts and monitors a collection of runsv(8) processes",
    "flags": [
        {
            "flag": "-P",
            "long": null,
            "arg": null,
            "description": "group."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "sv",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/sv/8/json"
        },
        {
            "name": "runsv",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/runsv/8/json"
        },
        {
            "name": "runsvchdir",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/runsvchdir/8/json"
        },
        {
            "name": "runit",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/runit/8/json"
        },
        {
            "name": "runit-init",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/runit-init/8/json"
        },
        {
            "name": "chpst",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/chpst/8/json"
        },
        {
            "name": "svlogd",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/svlogd/8/json"
        },
        {
            "name": "utmpset",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/utmpset/8/json"
        },
        {
            "name": "setsid",
            "section": "2",
            "url": "https://www.chedong.com/phpMan.php/man/setsid/2/json"
        }
    ]
}