File tree 3 files changed +61
-0
lines changed
3 files changed +61
-0
lines changed Original file line number Diff line number Diff line change @@ -182,6 +182,18 @@ def counters():
182
182
command = "portstat -c"
183
183
run_command (command )
184
184
185
+ @cli .command ()
186
+ def queuecounters ():
187
+ """Clear queue counters"""
188
+ command = "queuestat -c"
189
+ run_command (command )
190
+
191
+ @cli .command ()
192
+ def pfccounters ():
193
+ """Clear pfc counters"""
194
+ command = "pfcstat -c"
195
+ run_command (command )
196
+
185
197
#
186
198
# 'arp' command ####
187
199
#
Original file line number Diff line number Diff line change @@ -51,6 +51,8 @@ def get_test_suite():
51
51
'scripts/port2alias' ,
52
52
'scripts/portconfig' ,
53
53
'scripts/portstat' ,
54
+ 'scripts/pfcstat' ,
55
+ 'scripts/queuestat' ,
54
56
'scripts/reboot' ,
55
57
'scripts/teamshow'
56
58
],
Original file line number Diff line number Diff line change @@ -323,6 +323,53 @@ def portchannel():
323
323
"""Show PortChannel information"""
324
324
run_command ("teamshow" )
325
325
326
+ #
327
+ # 'pfc' group ("show pfc ...")
328
+ #
329
+
330
+ @cli .group (cls = AliasedGroup , default_if_no_args = False )
331
+ def pfc ():
332
+ """Show details of the priority-flow-control (pfc) """
333
+ pass
334
+
335
+ # 'counters' subcommand ("show interfaces pfccounters")
336
+ @pfc .command ()
337
+ @click .option ('-c' , '--clear' , is_flag = True )
338
+ def counters (clear ):
339
+ """Show pfc counters"""
340
+
341
+ cmd = "pfcstat"
342
+
343
+ if clear :
344
+ cmd += " -c"
345
+
346
+ run_command (cmd )
347
+
348
+ #
349
+ # 'queue' group ("show queue ...")
350
+ #
351
+
352
+ @cli .group (cls = AliasedGroup , default_if_no_args = False )
353
+ def queue ():
354
+ """Show details of the queues """
355
+ pass
356
+
357
+ # 'queuecounters' subcommand ("show queue counters")
358
+ @queue .command ()
359
+ @click .argument ('interfacename' , required = False )
360
+ @click .option ('-c' , '--clear' , is_flag = True )
361
+ def counters (interfacename , clear ):
362
+ """Show queue counters"""
363
+
364
+ cmd = "queuestat"
365
+
366
+ if clear :
367
+ cmd += " -c"
368
+ else :
369
+ if interfacename is not None :
370
+ cmd += " -p {}" .format (interfacename )
371
+
372
+ run_command (cmd )
326
373
327
374
#
328
375
# 'mac' command ("show mac ...")
You can’t perform that action at this time.
0 commit comments