{
    "content": [
        {
            "type": "text",
            "text": "# pstree (man)\n\n## NAME\n\npstree - display a tree of processes\n\n## SYNOPSIS\n\npstree [-a, --arguments] [-c, --compact-not] [-C, --color attr] [-g, --show-pgids]\n[-h, --highlight-all, -H pid, --highlight-pid pid] [-l, --long] [-n, --numeric-sort]\n[-N, --ns-sort ns] [-p, --show-pids] [-s, --show-parents] [-S, --ns-changes] [-t, --thread-\nnames] [-T, --hide-threads] [-u, --uid-changes] [-Z, --security-context]\n[-A, --ascii, -G, --vt100, -U, --unicode] [pid, user]\npstree -V, --version\n\n## DESCRIPTION\n\npstree shows running processes as a tree.  The tree is rooted at either pid or init if pid is\nomitted.   If  a  user name is specified, all process trees rooted at processes owned by that\nuser are shown.\n\n## TLDR\n\n> A convenient tool to show running processes as a tree.\n\n- Display a tree of all processes (rooted at init):\n  `pstree`\n- Display a tree of processes with PIDs:\n  `pstree {{-p|--show-pids}}`\n- Display all process trees rooted at processes owned by specified user:\n  `pstree {{user}}`\n- Display command line arguments:\n  `pstree {{-a|--arguments}}`\n- Display children of a specified process:\n  `pstree {{process_id}}`\n- Display parents of a specified process:\n  `pstree {{-s|--show-parents}} {{process_id}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (20 subsections)\n- **FILES**\n- **BUGS**\n- **SEE ALSO**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "pstree",
        "section": "",
        "mode": "man",
        "summary": "pstree - display a tree of processes",
        "synopsis": "pstree [-a, --arguments] [-c, --compact-not] [-C, --color attr] [-g, --show-pgids]\n[-h, --highlight-all, -H pid, --highlight-pid pid] [-l, --long] [-n, --numeric-sort]\n[-N, --ns-sort ns] [-p, --show-pids] [-s, --show-parents] [-S, --ns-changes] [-t, --thread-\nnames] [-T, --hide-threads] [-u, --uid-changes] [-Z, --security-context]\n[-A, --ascii, -G, --vt100, -U, --unicode] [pid, user]\npstree -V, --version",
        "tldr_summary": "A convenient tool to show running processes as a tree.",
        "tldr_examples": [
            {
                "description": "Display a tree of all processes (rooted at init)",
                "command": "pstree"
            },
            {
                "description": "Display a tree of processes with PIDs",
                "command": "pstree {{-p|--show-pids}}"
            },
            {
                "description": "Display all process trees rooted at processes owned by specified user",
                "command": "pstree {{user}}"
            },
            {
                "description": "Display command line arguments",
                "command": "pstree {{-a|--arguments}}"
            },
            {
                "description": "Display children of a specified process",
                "command": "pstree {{process_id}}"
            },
            {
                "description": "Display parents of a specified process",
                "command": "pstree {{-s|--show-parents}} {{process_id}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-a",
                "long": null,
                "arg": null,
                "description": "process is shown in parentheses. -a implicitly disables compaction for processes but not threads."
            },
            {
                "flag": "-A",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-c",
                "long": null,
                "arg": null,
                "description": "possible."
            },
            {
                "flag": "-C",
                "long": null,
                "arg": null,
                "description": "which colors by process age. Processes newer than 60 seconds are green, newer than an hour yellow and the remaining red."
            },
            {
                "flag": "-g",
                "long": null,
                "arg": null,
                "description": "process name. If both PIDs and PGIDs are displayed then PIDs are shown first."
            },
            {
                "flag": "-G",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-h",
                "long": null,
                "arg": null,
                "description": "doesn't support highlighting or if neither the current process nor any of its ances‐ tors are in the subtree being shown."
            },
            {
                "flag": "-h",
                "long": null,
                "arg": null,
                "description": "when using -H if highlighting is not available."
            },
            {
                "flag": "-l",
                "long": null,
                "arg": null,
                "description": "variable or the display width. If neither of these methods work, the default of 132 columns is used."
            },
            {
                "flag": "-n",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-N",
                "long": null,
                "arg": null,
                "description": "are: ipc, mnt, net, pid, time, user, uts. Regular users don't have access to other users' processes information, so the output will be limited."
            },
            {
                "flag": "-p",
                "long": null,
                "arg": null,
                "description": "-p implicitly disables compaction."
            },
            {
                "flag": "-s",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-N",
                "long": null,
                "arg": null,
                "description": "user."
            },
            {
                "flag": "-t",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-T",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-u",
                "long": null,
                "arg": null,
                "description": "ent, the new uid is shown in parentheses after the process name."
            },
            {
                "flag": "-U",
                "long": null,
                "arg": null,
                "description": "is entered on the console with echo -e ' 33%8' and left with echo -e ' 33%@'."
            },
            {
                "flag": "-V",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-Z",
                "long": null,
                "arg": null,
                "description": "the security context."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "ps",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/ps/1/json"
            },
            {
                "name": "top",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/top/1/json"
            },
            {
                "name": "proc",
                "section": "5",
                "url": "https://www.chedong.com/phpMan.php/man/proc/5/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 7,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 32,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-a",
                        "lines": 3,
                        "flag": "-a"
                    },
                    {
                        "name": "-A",
                        "lines": 1,
                        "flag": "-A"
                    },
                    {
                        "name": "-c",
                        "lines": 2,
                        "flag": "-c"
                    },
                    {
                        "name": "-C",
                        "lines": 3,
                        "flag": "-C"
                    },
                    {
                        "name": "-g",
                        "lines": 2,
                        "flag": "-g"
                    },
                    {
                        "name": "-G",
                        "lines": 1,
                        "flag": "-G"
                    },
                    {
                        "name": "-h",
                        "lines": 3,
                        "flag": "-h"
                    },
                    {
                        "name": "-H      -h -h",
                        "lines": 2,
                        "flag": "-h"
                    },
                    {
                        "name": "-l",
                        "lines": 3,
                        "flag": "-l"
                    },
                    {
                        "name": "-n",
                        "lines": 1,
                        "flag": "-n"
                    },
                    {
                        "name": "-N",
                        "lines": 3,
                        "flag": "-N"
                    },
                    {
                        "name": "-p",
                        "lines": 2,
                        "flag": "-p"
                    },
                    {
                        "name": "-s",
                        "lines": 1,
                        "flag": "-s"
                    },
                    {
                        "name": "-S      -N",
                        "lines": 2,
                        "flag": "-N"
                    },
                    {
                        "name": "-t",
                        "lines": 1,
                        "flag": "-t"
                    },
                    {
                        "name": "-T",
                        "lines": 1,
                        "flag": "-T"
                    },
                    {
                        "name": "-u",
                        "lines": 2,
                        "flag": "-u"
                    },
                    {
                        "name": "-U",
                        "lines": 2,
                        "flag": "-U"
                    },
                    {
                        "name": "-V",
                        "lines": 1,
                        "flag": "-V"
                    },
                    {
                        "name": "-Z",
                        "lines": 2,
                        "flag": "-Z"
                    }
                ]
            },
            {
                "name": "FILES",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "BUGS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "pstree - display a tree of processes\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "pstree [-a, --arguments] [-c, --compact-not] [-C, --color attr] [-g, --show-pgids]\n[-h, --highlight-all, -H pid, --highlight-pid pid] [-l, --long] [-n, --numeric-sort]\n[-N, --ns-sort ns] [-p, --show-pids] [-s, --show-parents] [-S, --ns-changes] [-t, --thread-\nnames] [-T, --hide-threads] [-u, --uid-changes] [-Z, --security-context]\n[-A, --ascii, -G, --vt100, -U, --unicode] [pid, user]\npstree -V, --version\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "pstree shows running processes as a tree.  The tree is rooted at either pid or init if pid is\nomitted.   If  a  user name is specified, all process trees rooted at processes owned by that\nuser are shown.\n\npstree visually merges identical branches by putting them in square  brackets  and  prefixing\nthem with the repetition count, e.g.\n\ninit-+-getty\n|-getty\n|-getty\n`-getty\n\nbecomes\n\ninit---4*[getty]\n\n\nChild  threads of a process are found under the parent process and are shown with the process\nname in curly braces, e.g.\n\nicecast2---13*[{icecast2}]\n\n\nIf pstree is called as pstree.x11 then it will prompt the user at the  end  of  the  line  to\npress  return and will not return until that has happened.  This is useful for when pstree is\nrun in a xterminal.\n\nCertain kernel or mount parameters, such as the hidepid option for procfs, will hide informa‐\ntion for some processes. In these situations pstree will attempt to build  the  tree  without\nthis information, showing process names as question marks.\n\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "-a",
                        "content": "process is shown in parentheses.  -a implicitly disables compaction for processes  but\nnot threads.\n",
                        "flag": "-a"
                    },
                    {
                        "name": "-A",
                        "content": "",
                        "flag": "-A"
                    },
                    {
                        "name": "-c",
                        "content": "possible.\n",
                        "flag": "-c"
                    },
                    {
                        "name": "-C",
                        "content": "which colors by process age.  Processes newer than 60 seconds are green, newer than an\nhour yellow and the remaining red.\n",
                        "flag": "-C"
                    },
                    {
                        "name": "-g",
                        "content": "process name.  If both PIDs and PGIDs are displayed then PIDs are shown first.\n",
                        "flag": "-g"
                    },
                    {
                        "name": "-G",
                        "content": "",
                        "flag": "-G"
                    },
                    {
                        "name": "-h",
                        "content": "doesn't  support  highlighting or if neither the current process nor any of its ances‐\ntors are in the subtree being shown.\n",
                        "flag": "-h"
                    },
                    {
                        "name": "-H      -h -h",
                        "content": "when using -H if highlighting is not available.\n",
                        "flag": "-h"
                    },
                    {
                        "name": "-l",
                        "content": "variable  or  the display width.  If neither of these methods work, the default of 132\ncolumns is used.\n",
                        "flag": "-l"
                    },
                    {
                        "name": "-n",
                        "content": "",
                        "flag": "-n"
                    },
                    {
                        "name": "-N",
                        "content": "are:  ipc,  mnt,  net, pid, time, user, uts.  Regular users don't have access to other\nusers' processes information, so the output will be limited.\n",
                        "flag": "-N"
                    },
                    {
                        "name": "-p",
                        "content": "-p implicitly disables compaction.\n",
                        "flag": "-p"
                    },
                    {
                        "name": "-s",
                        "content": "",
                        "flag": "-s"
                    },
                    {
                        "name": "-S      -N",
                        "content": "user.\n",
                        "flag": "-N"
                    },
                    {
                        "name": "-t",
                        "content": "",
                        "flag": "-t"
                    },
                    {
                        "name": "-T",
                        "content": "",
                        "flag": "-T"
                    },
                    {
                        "name": "-u",
                        "content": "ent, the new uid is shown in parentheses after the process name.\n",
                        "flag": "-u"
                    },
                    {
                        "name": "-U",
                        "content": "is entered on the console with echo -e ' 33%8' and left with echo -e ' 33%@'.\n",
                        "flag": "-U"
                    },
                    {
                        "name": "-V",
                        "content": "",
                        "flag": "-V"
                    },
                    {
                        "name": "-Z",
                        "content": "the security context.\n",
                        "flag": "-Z"
                    }
                ]
            },
            "FILES": {
                "content": "/proc  location of the proc file system\n",
                "subsections": []
            },
            "BUGS": {
                "content": "Some character sets may be incompatible with the VT100 characters.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "ps(1), top(1), proc(5).\n\npsmisc                                       2021-06-21                                    PSTREE(1)",
                "subsections": []
            }
        }
    }
}