Skip to content

Commit cbf48f9

Browse files
authored
Merge pull request #1539 from dmbaturin/op-mode-words
cli: Document top-level op mode word meanings
2 parents bb3e8db + 0a98076 commit cbf48f9

File tree

1 file changed

+109
-0
lines changed

1 file changed

+109
-0
lines changed

docs/cli.rst

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,115 @@ When viewing in page mode the following commands are available:
7171
* ``left-arrow`` and ``right-arrow`` can be used to scroll left or right
7272
in the event that the output has lines which exceed the terminal size.
7373

74+
Operational mode command families
75+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
76+
77+
Many operational mode commands in VyOS are placed in families such as
78+
``show``, ``clear``, or ``reset``. Every such family has a specific
79+
meaning to allow the user to guess how the command is going to behave —
80+
in particular, whether it will be disruptive to the system or not.
81+
82+
Note that this convention was not always followed with perfect
83+
consistency and some commands may still be in wrong families, so you
84+
should always check the command help and documentation if you are not
85+
sure what exactly it does.
86+
87+
clear
88+
'''''
89+
90+
"Clear" commands are completely non-disruptive to any system operations.
91+
Generally, they can be used freely without hesitation.
92+
93+
Most often their purpose is to remove or reset various debug and
94+
diagnostic information such as system logs and packet counters.
95+
96+
Examples:
97+
98+
- ``clear console`` — clears the screen.
99+
- ``clear interfaces ethernet eth0 counters`` — zeroes packet counters
100+
on ``eth0``.
101+
- ``clear log`` — deletes all system log entries.
102+
103+
reset
104+
'''''
105+
106+
"Reset" commands can be locally-disruptive. They may, for example,
107+
terminate a single user session or a session with a dynamic routing
108+
protocol peer.
109+
110+
They should be used with caution since they may have a significant
111+
impact on a particular users in the network.
112+
113+
- ``reset pppoe-server username jsmith`` — terminate all PPPoE sessions
114+
from user ``jsmith``.
115+
- ``reset bgp 192.0.2.54`` — terminates the BGP session with neighbor
116+
192.0.2.54.
117+
- ``reset vpn ipsec site-to-site peer vpn.example.com`` — terminates
118+
IPsec tunnels to ``vpn.example.com``.
119+
120+
restart
121+
'''''''
122+
123+
"Restart" operations may disrupt an entire subsystem. Most often they
124+
initiate a restart of a server process, which causes it to be
125+
unavailable for a brief period and resets all the process state.
126+
127+
They should be used with extreme caution.
128+
129+
- ``restart dhcp server`` — restarts the IPv4 DHCP server process (DHCP
130+
requests are not served while it is restarting).
131+
- ``restart ipsec`` — restarts the IPsec process (which forces all
132+
sessions and all IPsec process state to reset).
133+
134+
force
135+
'''''
136+
137+
"Force" commands force the system to perform an action that it might
138+
perform by itself at a later point.
139+
140+
Examples:
141+
142+
- ``force arp request interface eth1 address 10.3.0.2`` — send a
143+
gratuitious ARP request.
144+
- ``force root-partition-auto-resize`` — grow the root filesystem to
145+
the size of the system partition (this is also done on startup, but
146+
this command can do it without a reboot).
147+
148+
execute
149+
'''''''
150+
151+
"Execute" commands are for executing various diagnostic and auxilliary
152+
actions that the system would never perform by itself.
153+
154+
Examples:
155+
156+
- ``execute wake-on-lan interface <intf> host <MAC>`` — send a
157+
Wake-On-LAN packet to a host.
158+
159+
show
160+
''''
161+
162+
"Show" commands display various system information. They may
163+
occasionally use a pager for long outputs, that you can quit by pressing
164+
the Q button. Their output is always finite, however.
165+
166+
Examples:
167+
168+
- ``show system login`` — displays current system users.
169+
- ``show ip route`` — displays the IPv4 routing table.
170+
171+
monitor
172+
'''''''
173+
174+
"Monitor" commands initiate various monitoring operations that may
175+
output information continuously, until terminated with ``Ctrl-C`` or
176+
disabled.
177+
178+
Examples:
179+
180+
- ``monitor log`` — continuously outputs latest system logs.
181+
182+
74183
Configuration Mode
75184
##################
76185

0 commit comments

Comments
 (0)