admin管理员组

文章数量:1531792

2024年6月7日发(作者:)

Shell

命令的使用

Table of contents 目录

T

ABLE OF CONTENTS

目录 .......................................................................................................................................1

1

2

SHELL简介 ......................................................................................................................................................2

SHELL的使用..................................................................................................................................................2

2.1

2.2

2.2.1

2.2.2

2.3

2.3.1

2.3.2

2.3.3

2.4

2.4.1

2.4.2

2.4.3

2.5

2.5.1

2.5.2

2.5.3

2.5.4

2.5.5

2.5.6

2.6

2.6.1

2.6.2

3

帮助命令...............................................................................................................................................2

系统基本信息获取命令 ....................................................................................................................7

版本命令

.........................................................................................................................................7

Show

命令

.......................................................................................................................................8

常用检测命令......................................................................................................................................8

端口类

..............................................................................................................................................8

收发包类

...................................................................................................................................... 10

程序调试类

.................................................................................................................................. 12

检测芯片的命令 .............................................................................................................................. 12

寄存器的访问

............................................................................................................................. 12

内存的访问

.................................................................................................................................. 16

中断等其他命令

......................................................................................................................... 20

高级配置命令................................................................................................................................... 21

Vlan

管理命令

............................................................................................................................. 21

L2

命令

......................................................................................................................................... 22

L3

命令

.......................................................................................................................................... 23

Mirroring

命令

............................................................................................................................. 25

Filtering ......................................................................................................................................... 25

Spanning Tree 25

错误检测命令................................................................................................................................... 25

Text ................................................................................................................................................ 25

26

REFERENCE DOCUMENTS 参考文献...................................................................................................... 26

1 shell简介

shell即BCM Diagnostic Shell是一个普通的命令行解释器(CLI),它可以

提供对嵌入了BCM交换芯片的嵌入式平台的一种精确控制作用。shell支持所有

Broadcom交换芯片,并提供了对所有寄存器,内存和最高层API的直接访问功

能。此外,由于shell支持交互和非交互两种模式,所以它可以嵌入到客户的设

计中,以提供额外诊断服务。

Shell命令可被分为六大类:

1. 帮助命令:??,?,help

2. 系统基本信息获取命令:Version,show

3. 常用检测命令:端口类: PORT,COMBO

收发包类: TX, PacketWatcher

程序调试类: Debug,DebugMod

4. 检测芯片的命令:寄存器的访问: Getreg,EditReg 等

内存访问:Dump, Write 等

中断管理:INTR

5. 高级配置命令: VLAN, L2, L3 等

6. 错误检测命令: Test ,CONFig,等

2 Shell的使用

以DCN DS45XX项目为例来说明shell的使用。

2.1

帮助命令

BCM.0> help //输入help命令得到shell中所有可用的命令共201条

Help: Type help "command" for detailed command usage

Help: Upper case letters signify minimal match

Commands common to all modes:

? Display list of commands

ASSert Assert

BackGround Execute a command in the background.

BCM Set shell mode to BCM.

BCMX Set shell mode to BCMX.

break place to hang a breakpoint

CASE Execute command based on string match

CD Change current working directory

cint Enter the C interpreter

CONFig Configure Management interface

CONSole Control console options

CoPy Copy a file

CPUDB Update the CPU database

CTEcho Send an echo request using CPUTRANS

本文标签: 命令芯片检测