research(cli): clear counters asks before it clears - the two prompt lines, the syslog receipt, and Last clearing #2430
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge!2430
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "rev/1121-1342"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Question. When an IOS-like box is asked
clear counters(bare and with one interface named), what does it print before it acts, what must the operator answer, what does it print after, and what doesshow interfacesthen say about when the counters were last cleared?Verdict. The command prompts first and the prompt is the command's output:
Clear "show interface" counters on all interfaces [confirm]orClear "show interface" counters on this interface [confirm], accepted with Enter ory. Afterwards there is no success sentence, only%CLEAR-5-COUNTERS: Clear counter on all interfaces by console(or... on interface gigabitEthernet0/0).show interfacesthen carriesLast clearing of "show interface" counters <age>-neveruntil the first clear since reload, then00:05:52,2d22h,6w1d(older images0:00:06). The prompt is printed even when the counters are already zero; traffic is not interrupted; SNMP counters, load/reliability and the rate averages are not cleared.Sources. IOS XE 3850 interface command reference (user/privileged EXEC, syntax, the not-cleared note); Cisco T1 PRI note 8131 (byte-exact bare transcript + receipt); GGSG 15.4(3)T chapter (named form +
on interfacereceipt); IOS XR CRS/ASR9k/NCS refs (confirm semantics, Enter ory); Ansiblecisco.ios.ios_command(both prompt strings as regexes,yand\ranswers); 2960-XR EEM sample (prompt repeats on every clear); Cat9k output-drops, 4500 and 12.0show interfacescaptures for the age formats; Cisco 12027 for the field's definition.Changed.
research/clear-counters-wording.md(new, 170 lines) and a pointer fromdocs/plans/counter-reset.mdstep 2. No engine code:clear countersis% Unrecognized commandtoday and adding it is that plan's step 2 (new surface), so the note settles the words instead. The note also records that the vendor line comes before the clear and must be answered - the one thing the one-lineCliSession.run()cannot do yet.Unresolved (in the note). The 3850 book's port-channel example prints the all interfaces wording where every other source prints this interface (treated as a doc copy error, not averaged); whether the command is accepted at
>(the 3850 book says user EXEC, the switch guides' tables say privileged); what a bad interface name does; whetherLast clearingis per-interface; whetherno logging consolehides the receipt.Gates.
node scripts/syntax-check.js535 files OK;node scripts/check-control-bytes.jsclean;npm test455 suites, 15,449 assertions, 0 failed.