{
    "content": [
        {
            "type": "text",
            "text": "# IP-MONITOR (man)\n\n## NAME\n\nip-monitor, rtmon - state monitoring\n\n## SYNOPSIS\n\nip monitor [ all | OBJECT-LIST ] [ file FILENAME ] [ label ] [ all-nsid ] [ dev DEVICE ]\n\n## DESCRIPTION\n\nThe ip utility can monitor the state of devices, addresses and routes continuously. This op‐\ntion has a slightly different format.  Namely, the monitor command is the first in the com‐\nmand line and then the object list follows:\n\n## TLDR\n\n> Monitor network for state changes.\n\n- Monitor the whole network for state changes:\n  `ip {{mo|monitor}}`\n- Specify the type to monitor:\n  `ip {{mo|monitor}} {{link|address|route|neigh|rule|maddress|...}}`\n- Replay an event file (can be generated with `rtmon`):\n  `ip {{mo|monitor}} {{f|file}} {{path/to/file}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **OPTIONS** (2 subsections)\n- **DESCRIPTION**\n- **SEE ALSO**\n- **AUTHOR**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "IP-MONITOR",
        "section": "",
        "mode": "man",
        "summary": "ip-monitor, rtmon - state monitoring",
        "synopsis": "ip monitor [ all | OBJECT-LIST ] [ file FILENAME ] [ label ] [ all-nsid ] [ dev DEVICE ]",
        "tldr_summary": "Monitor network for state changes.",
        "tldr_examples": [
            {
                "description": "Monitor the whole network for state changes",
                "command": "ip {{mo|monitor}}"
            },
            {
                "description": "Specify the type to monitor",
                "command": "ip {{mo|monitor}} {{link|address|route|neigh|rule|maddress|...}}"
            },
            {
                "description": "Replay an event file (can be generated with `rtmon`)",
                "command": "ip {{mo|monitor}} {{f|file}} {{path/to/file}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-t",
                "long": null,
                "arg": null,
                "description": "Prints timestamp before the event message on the separated line in format: Timestamp: <Day> <Month> <DD> <hh:mm:ss> <YYYY> <usecs> usec <EVENT>"
            },
            {
                "flag": "",
                "long": null,
                "arg": null,
                "description": "Prints short timestamp before the event message on the same line in format: [<YYYY>-<MM>-<DD>T<hh:mm:ss>.<ms>] <EVENT>"
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "ip",
                "section": "8",
                "url": "https://www.chedong.com/phpMan.php/man/ip/8/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-t -timestamp",
                        "lines": 5,
                        "flag": "-t"
                    },
                    {
                        "name": "-ts -tshort",
                        "lines": 4
                    }
                ]
            },
            {
                "name": "DESCRIPTION",
                "lines": 47,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 6,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "ip-monitor, rtmon - state monitoring\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "ip monitor [ all | OBJECT-LIST ] [ file FILENAME ] [ label ] [ all-nsid ] [ dev DEVICE ]\n\n\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "-t -timestamp",
                        "content": "Prints timestamp before the event message on the separated line in format:\nTimestamp: <Day> <Month> <DD> <hh:mm:ss> <YYYY> <usecs> usec\n<EVENT>\n\n",
                        "flag": "-t"
                    },
                    {
                        "name": "-ts -tshort",
                        "content": "Prints short timestamp before the event message on the same line in format:\n[<YYYY>-<MM>-<DD>T<hh:mm:ss>.<ms>] <EVENT>\n\n"
                    }
                ]
            },
            "DESCRIPTION": {
                "content": "The ip utility can monitor the state of devices, addresses and routes continuously. This op‐\ntion has a slightly different format.  Namely, the monitor command is the first in the com‐\nmand line and then the object list follows:\n\nip monitor [ all | OBJECT-LIST ] [ file FILENAME ] [ label ] [ all-nsid ] [ dev DEVICE ]\n\nOBJECT-LIST is the list of object types that we want to monitor.  It may contain link, ad‐‐\ndress, route, mroute, prefix, neigh, netconf, rule, nsid and nexthop.  If no file argument is\ngiven, ip opens RTNETLINK, listens on it and dumps state changes in the format described in\nprevious sections.\n\n\nIf the label option is set, a prefix is displayed before each message to show the family of\nthe message. For example:\n\n[NEIGH]10.16.0.112 dev eth0 lladdr 00:04:23:df:2f:d0 REACHABLE [LINK]3: eth1: <BROAD‐\nCAST,MULTICAST> mtu 1500 qdisc pfifofast state DOWN group default\nlink/ether 52:54:00:12:34:57 brd ff:ff:ff:ff:ff:ff\n\n\n\nIf the all-nsid option is set, the program listens to all network namespaces that have a nsid\nassigned into the network namespace were the program is running.  A prefix is displayed to\nshow the network namespace where the message originates. Example:\n\n[nsid 0]10.16.0.112 dev eth0 lladdr 00:04:23:df:2f:d0 REACHABLE\n\n\n\nIf the file option is given, the program does not listen on RTNETLINK, but opens the given\nfile, and dumps its contents. The file should contain RTNETLINK messages saved in binary for‐\nmat.  Such a file can be generated with the rtmon utility. This utility has a command line\nsyntax similar to ip monitor.  Ideally, rtmon should be started before the first network con‐\nfiguration command is issued. F.e. if you insert:\n\nrtmon file /var/log/rtmon.log\n\nin a startup script, you will be able to view the full history later.\n\n\nNevertheless, it is possible to start rtmon at any time.  It prepends the history with the\nstate snapshot dumped at the moment of starting.\n\n\nIf the dev option is given, the program prints only events related to this device.\n\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "ip(8)\n\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Original Manpage by Michail Litvak <mci@owl.openwall.com>\nManpage revised by Nicolas Dichtel <nicolas.dichtel@6wind.com>\n\n\n\niproute2                                     13 Dec 2012                               IP-MONITOR(8)",
                "subsections": []
            }
        }
    }
}