{
    "content": [
        {
            "type": "text",
            "text": "# SYSTEMD-SOCKET-ACTIVATE (info)\n\n## NAME\n\nsystemd-socket-activate - Test socket activation of daemons\n\n## SYNOPSIS\n\nsystemd-socket-activate [OPTIONS...] daemon [OPTIONS...]\n\n## DESCRIPTION\n\nsystemd-socket-activate may be used to launch a socket-activated\nservice program from the command line for testing purposes. It may also\nbe used to launch individual instances of the service program per\nconnection.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (6 subsections)\n- **ENVIRONMENT VARIABLES**\n- **EXAMPLES**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "SYSTEMD-SOCKET-ACTIVATE",
        "section": "",
        "mode": "info",
        "summary": "systemd-socket-activate - Test socket activation of daemons",
        "synopsis": "systemd-socket-activate [OPTIONS...] daemon [OPTIONS...]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "-a",
                "long": "--accept",
                "arg": null,
                "description": "Launch an instance of the service program for each connection and pass the connection socket."
            },
            {
                "flag": "-d",
                "long": "--datagram",
                "arg": null,
                "description": "Listen on a datagram socket (SOCKDGRAM), instead of a stream socket (SOCKSTREAM). May not be combined with --seqpacket."
            },
            {
                "flag": "",
                "long": "--seqpacket",
                "arg": null,
                "description": "Listen on a sequential packet socket (SOCKSEQPACKET), instead of a stream socket (SOCKSTREAM). May not be combined with --datagram."
            },
            {
                "flag": "",
                "long": "--inetd",
                "arg": null,
                "description": "Use the inetd protocol for passing file descriptors, i.e. as standard input and standard output, instead of the new-style protocol for passing file descriptors using $LISTENFDS (see above). -E VAR[=VALUE], --setenv=VAR[=VALUE] Add this variable to the environment of the launched process. If VAR is followed by \"=\", assume that it is a variable-value pair. Otherwise, obtain the value from the environment of systemd-socket-activate itself. --fdname=NAME[:NAME...] Specify names for the file descriptors passed. This is equivalent to setting FileDescriptorName= in socket unit files, and enables use of sdlistenfdswithnames(3). Multiple entries may be specifies using separate options or by separating names with colons (\":\") in one option. In case more names are given than descriptors, superfluous ones will be ignored. In case less names are given than descriptors, the remaining file descriptors will be unnamed."
            },
            {
                "flag": "-h",
                "long": "--help",
                "arg": null,
                "description": "Print a short help text and exit."
            },
            {
                "flag": "",
                "long": "--version",
                "arg": null,
                "description": "Print a short version string and exit."
            }
        ],
        "examples": [
            "Example 1. Run an echo server on port 2000",
            "$ systemd-socket-activate -l 2000 --inetd -a cat",
            "Example 2. Run a socket-activated instance of systemd-journal-",
            "gatewayd(8)",
            "$ systemd-socket-activate -l 19531 /lib/systemd/systemd-journal-gatewayd"
        ],
        "see_also": [
            {
                "name": "systemd",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/systemd/1/json"
            },
            {
                "name": "systemd.socket",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/systemd.socket/5/json"
            },
            {
                "name": "systemd.service",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/systemd.service/5/json"
            },
            {
                "name": "systemd-run",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/systemd-run/1/json"
            },
            {
                "name": "sdlistenfds",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/sdlistenfds/3/json"
            },
            {
                "name": "sdlistenfdswithnames",
                "section": "3",
                "url": "https://www.chedong.com/phpMan.php/man/sdlistenfdswithnames/3/json"
            },
            {
                "name": "cat",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/cat/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 19,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 4,
                "subsections": [
                    {
                        "name": "-a, --accept",
                        "lines": 3,
                        "flag": "-a",
                        "long": "--accept"
                    },
                    {
                        "name": "-d, --datagram",
                        "lines": 3,
                        "flag": "-d",
                        "long": "--datagram"
                    },
                    {
                        "name": "--seqpacket",
                        "lines": 3,
                        "long": "--seqpacket"
                    },
                    {
                        "name": "--inetd",
                        "lines": 20,
                        "long": "--inetd"
                    },
                    {
                        "name": "-h, --help",
                        "lines": 2,
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "--version",
                        "lines": 2,
                        "long": "--version"
                    }
                ]
            },
            {
                "name": "ENVIRONMENT VARIABLES",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 4,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "systemd-socket-activate - Test socket activation of daemons\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "systemd-socket-activate [OPTIONS...] daemon [OPTIONS...]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "systemd-socket-activate may be used to launch a socket-activated\nservice program from the command line for testing purposes. It may also\nbe used to launch individual instances of the service program per\nconnection.\n\nThe daemon to launch and its options should be specified after options\nintended for systemd-socket-activate.\n\nIf the --inetd option is given, the socket file descriptor will be used\nas the standard input and output of the launched process. Otherwise,\nstandard input and output will be inherited, and sockets will be passed\nthrough file descriptors 3 and higher. Sockets passed through\n$LISTENFDS to systemd-socket-activate will be passed through to the\ndaemon, in the original positions. Other sockets specified with\n--listen= will use consecutive descriptors. By default,\nsystemd-socket-activate listens on a stream socket, use --datagram and\n--seqpacket to listen on datagram or sequential packet sockets instead\n(see below).\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "-l address, --listen=address\nListen on this address. Takes a string like \"2000\" or\n\"127.0.0.1:2001\".\n",
                "subsections": [
                    {
                        "name": "-a, --accept",
                        "content": "Launch an instance of the service program for each connection and\npass the connection socket.\n",
                        "flag": "-a",
                        "long": "--accept"
                    },
                    {
                        "name": "-d, --datagram",
                        "content": "Listen on a datagram socket (SOCKDGRAM), instead of a stream\nsocket (SOCKSTREAM). May not be combined with --seqpacket.\n",
                        "flag": "-d",
                        "long": "--datagram"
                    },
                    {
                        "name": "--seqpacket",
                        "content": "Listen on a sequential packet socket (SOCKSEQPACKET), instead of a\nstream socket (SOCKSTREAM). May not be combined with --datagram.\n",
                        "long": "--seqpacket"
                    },
                    {
                        "name": "--inetd",
                        "content": "Use the inetd protocol for passing file descriptors, i.e. as\nstandard input and standard output, instead of the new-style\nprotocol for passing file descriptors using $LISTENFDS (see\nabove).\n\n-E VAR[=VALUE], --setenv=VAR[=VALUE]\nAdd this variable to the environment of the launched process. If\nVAR is followed by \"=\", assume that it is a variable-value pair.\nOtherwise, obtain the value from the environment of\nsystemd-socket-activate itself.\n\n--fdname=NAME[:NAME...]\nSpecify names for the file descriptors passed. This is equivalent\nto setting FileDescriptorName= in socket unit files, and enables\nuse of sdlistenfdswithnames(3). Multiple entries may be\nspecifies using separate options or by separating names with colons\n(\":\") in one option. In case more names are given than descriptors,\nsuperfluous ones will be ignored. In case less names are given than\ndescriptors, the remaining file descriptors will be unnamed.\n",
                        "long": "--inetd"
                    },
                    {
                        "name": "-h, --help",
                        "content": "Print a short help text and exit.\n",
                        "flag": "-h",
                        "long": "--help"
                    },
                    {
                        "name": "--version",
                        "content": "Print a short version string and exit.\n",
                        "long": "--version"
                    }
                ]
            },
            "ENVIRONMENT VARIABLES": {
                "content": "$LISTENFDS, $LISTENPID, $LISTENFDNAMES\nSee sdlistenfds(3).\n\n$SYSTEMDLOGTARGET, $SYSTEMDLOGLEVEL, $SYSTEMDLOGTIME,\n$SYSTEMDLOGCOLOR, $SYSTEMDLOGLOCATION\nSame as in systemd(1).\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "Example 1. Run an echo server on port 2000\n\n$ systemd-socket-activate -l 2000 --inetd -a cat\n\nExample 2. Run a socket-activated instance of systemd-journal-\ngatewayd(8)\n\n$ systemd-socket-activate -l 19531 /lib/systemd/systemd-journal-gatewayd\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "systemd(1), systemd.socket(5), systemd.service(5), systemd-run(1),\nsdlistenfds(3), sdlistenfdswithnames(3), cat(1)\n\nsystemd 249                                         SYSTEMD-SOCKET-ACTIVATE(1)",
                "subsections": []
            }
        }
    }
}