El conjunto de documentos para este producto aspira al uso de un lenguaje no discriminatorio. A los fines de esta documentación, "no discriminatorio" se refiere al lenguaje que no implica discriminación por motivos de edad, discapacidad, género, identidad de raza, identidad étnica, orientación sexual, nivel socioeconómico e interseccionalidad. Puede haber excepciones en la documentación debido al lenguaje que se encuentra ya en las interfaces de usuario del software del producto, el lenguaje utilizado en función de la documentación de la RFP o el lenguaje utilizado por un producto de terceros al que se hace referencia. Obtenga más información sobre cómo Cisco utiliza el lenguaje inclusivo.
Cisco ha traducido este documento combinando la traducción automática y los recursos humanos a fin de ofrecer a nuestros usuarios en todo el mundo contenido en su propio idioma. Tenga en cuenta que incluso la mejor traducción automática podría no ser tan precisa como la proporcionada por un traductor profesional. Cisco Systems, Inc. no asume ninguna responsabilidad por la precisión de estas traducciones y recomienda remitirse siempre al documento original escrito en inglés (insertar vínculo URL).
Este documento describe algunos consejos y trucos rápidos que pueden mejorar la experiencia de resolución de problemas con NX-OS.
Hex significa hexadecimal , dic para Decimal
NX-OS# dec 0x89
137
NX-OS# hex 137
0x89
CLI significa interfaz de línea de comandos
N7k-LabSW# show clock ; show switchname ; show license host-id
19:10:59.016 UTC Mon Apr 04 2016
N7k-LabSW
License hostid: VDH=TBM14354170
# Funciona también para la configuración:
N7k-LabSW# conf t ; hostname N7k-LabSW-DEFAULT ; end
Enter configuration commands, one per line. End with CNTL/Z.
N7k-LabSW-DEFAULT#
# Tiempo que tardó una CLI en completarse:
N7k-LabSW# show clock ; show run | ex .* ; show clock
07:56:08.709 UTC Tue Apr 05 2016
07:56:08.834 UTC Tue Apr 05 2016
N7k-LabSW# show cli variables
VSH Variable List (* = session vars)
-----------------
SWITCHNAME="N7k-LabSW"
TIMESTAMP="2016-04-05-08.34.18"
N7k-LabSW# tac-pac bootflash:$(SWITCHNAME)-$(TIMESTAMP)-show-tech-all.gz
N7k-LabSW# dir bootflash: | i show-tech-all
15091722 Apr 05 08:41:27 2016 N7k-LabSW-2016-04-05-08.35.57-show-tech-all.gz
También puede crear sus propias variables:
1) Evite los tiempos de espera de la sesión de terminal:
N7k-LabSW# show terminal | i Timeout
Session Timeout: 30 minutes
N7k-LabSW# terminal session-timeout ?
<0-525600> Enter timeout in minutes, 0 to disable
N7k-LabSW# terminal session-timeout 0
N7k-LabSW# show terminal | i Timeout
Session Timeout: 0 minutes
2) Establecer la anchura/longitud del terminal de visualización:
Resulta práctico cuando no desea que la salida se divida en una nueva línea para salidas de ancho largo
N7k-LabSW# show terminal | i Width
Length: 25 lines, Width: 98 columns
N7k-LabSW# terminal width 300
N7k-LabSW# show terminal | i Width
Length: 25 lines, Width: 300 columns
N7k-LabSW# show clock ; sleep 10 ; show clock
19:27:07.435 UTC Mon Apr 04 2016
19:27:17.445 UTC Mon Apr 04 2016
VRF significa Virtual Routing and Forwarding
Ejecute CLI para un VRF específico sin agregar VRF <> siempre al comando:
N7k-LabSW# routing-context vrf management
N7k-LabSW%management# sh ip route
IP Route Table for VRF "management"
'*' denotes best ucast next-hop
'**' denotes best mcast next-hop
'[x/y]' denotes [preference/metric]
'%<string>' in via output denotes VRF <string>
0.0.0.0/0, ubest/mbest: 1/0
*via 10.48.61.129, [1/0], 1w4d, static
10.48.61.128/26, ubest/mbest: 1/0, attached
*via 10.48.61.150, mgmt0, [0/0], 1w4d, direct
10.48.61.150/32, ubest/mbest: 1/0, attached
*via 10.48.61.150, mgmt0, [0/0], 1w4d, local
N7k-LabSW%management#
N7k-LabSW%management# routing-context vrf default
N7k-LabSW# sh ip route
IP Route Table for VRF "default"
'*' denotes best ucast next-hop
'**' denotes best mcast next-hop
'[x/y]' denotes [preference/metric]
'%<string>' in via output denotes VRF <string>
VDC significa contexto de dispositivo virtual
LC significa tarjeta de línea
N7K significa Nexus 7000
Una vez que se conectan a LC, las CLI se ejecutan con respecto al VDC predeterminado, o necesita especificar VDC # para el comando relacionado.
En su lugar, puede ejecutar la CLI en el espacio VDC # igual que el contexto de ruteo.
Ejemplo:
N7k-LabSW# attach module 4
Attaching to module 4 ...
To exit type 'exit', to abort type '$.'
module-4# show hardware mac address-table
FE | Valid| PI| BD | MAC | Index| Stat| SW | Modi| Age| Tmr| GM| Sec| TR| NT| RM| RMA| Cap| Fld|Always| PV | RD| NN| UC|PI_E8| VIF | SWID| SSWID| LID
| | | | | | ic | | fied|Byte| Sel| | ure| AP| FY| | |TURE| | Learn| | | | | | | | |
---+------+---+------+---------------+-------+-----+-----+-----+----+----+---+----+---+---+---+----+----+----+------|----|---|---|---|-----|-----|-----|------|-------
4 1 1 2 0023.ac66.1dc1 0x010c7 1 0x000 0 0 0 1 0 0 0 0 0 0 0 0 0x00 0 0 0 0 0x000 0x000 0x000 0x010c7
5 1 1 2 0023.ac66.1dc1 0x010c7 1 0x000 0 0 0 1 0 0 0 0 0 0 0 0 0x00 0 0 0 0 0x000 0x000 0x000 0x010c7
Command outputs from Default VDC are pulled here
module-4# vdc 6 >>>>>>> switches LC to pull this VDC specific outputs only
module-4# show hardware mac address-table
FE | Valid| PI| BD | MAC | Index| Stat| SW | Modi| Age| Tmr| GM| Sec| TR| NT| RM| RMA| Cap| Fld|Always| PV | RD| NN| UC|PI_E8| VIF | SWID| SSWID| LID
| | | | | | ic | | fied|Byte| Sel| | ure| AP| FY| | |TURE| | Learn| | | | | | | | |
---+------+---+------+---------------+-------+-----+-----+-----+----+----+---+----+---+---+---+----+----+----+------|----|---|---|---|-----|-----|-----|------|-------
0 1 1 92 0023.ac66.1dc6 0x010c7 1 0x000 0 0 0 1 0 0 0 0 0 0 0 0 0x00 0 0 0 0 0x000 0x000 0x000 0x010c7
0 1 0 91 0019.3074.9c02 0x00414 0 0x009 0 118 2 0 0 0 0 0 0 0 0 0 0x00 1 0 1 0 0x000 0x000 0x000 0x00414
N5600-Lab# load dplugg
Loading plugin version 7.1(1)N1(1)
###############################################################
Warning: debug-plugin is for engineering internal use only!
For security reason, plugin image has been deleted.
###############################################################
Successfully loaded debug-plugin!!!
Linux(debug)# vsh >>>>> Moves back to NX-OS prompt
Cisco Nexus Operating System (NX-OS) Software
TAC support: http://www.cisco.com/tac
Copyright (c) 2002-2015, Cisco Systems, Inc. All rights reserved.
The copyrights to certain works contained in this software are
owned by other third parties and used and distributed under
license. Certain components of this software are licensed under
the GNU General Public License (GPL) version 2.0 or the GNU
Lesser General Public License (LGPL) Version 2.1. A copy of each
such license is available at
http://www.opensource.org/licenses/gpl-2.0.php and
http://www.opensource.org/licenses/lgpl-2.1.php
N5600-Lab# show clock
20:20:07.468 UTC Mon Apr 04 2016
N5600-Lab# exit >>>>> Moves back to Linux prompt
Linux(debug)#
Linux(debug)# clock
Mon Apr 4 20:20:13 2016 -0.282195 seconds UTC
NOTE: "Debug Plugin" should only be used in presence of Cisco TAC and is not available for customer use.
Please do not modify any setting unless guided by Cisco TAC.
Alternativamente, las CLI de NX-OS se pueden ejecutar directamente desde el complemento de depuración:
Linux(debug)# vsh -c "show switchname"
N5600-Lab
Linux(debug)# vsh -c "show module"
Mod Ports Module-Type Model Status
--- ----- ----------------------------------- ---------------------- -----------
1 52 Nexus 56128P Supervisor N5K-C56128P-SUP active *
Mod Sw Hw World-Wide-Name(s) (WWN)
--- -------------- ------ ---------------------------------------------------
1 7.1(1)N1(1) 1.1 --
<snipped>
VSH significa shell virtual
NEXUS-LABSWICTH# echo "hostname LAB" | vsh
LAB#
Mon Apr 4 20:51:14 2016:type=update:id=10.61.236.97@pts/1:user=admin:cmd=echo "hostname LAB" | vsh (SUCCESS)
Mon Apr 4 20:51:14 2016:type=start:id=vsh.9326:user=admin:cmd=
Mon Apr 4 20:51:14 2016:type=update:id=vsh.9326:user=admin:cmd=configure terminal ; hostname LAB (SUCCESS)
LAB# echo "hostname NEXUS-LABSWITCH" | vsh
NEXUS-LABSWITCH#
Mon Apr 4 20:51:23 2016:type=update:id=10.61.236.97@pts/1:user=admin:cmd=echo "hostname NEXUS-LABSWITCH" | vsh (SUCCESS)
Mon Apr 4 20:51:23 2016:type=start:id=vsh.9390:user=admin:cmd=
Mon Apr 4 20:51:23 2016:type=update:id=vsh.9390:user=admin:cmd=configure terminal ; hostname NEXUS-LABSWITCH (SUCCESS)
N5600-Lab# show run | i hostname | sed "s/N5600-Lab/N56128/" | vsh
N56128#
N56128# show accounting log | last 3
Mon Apr 4 21:23:23 2016:type=start:id=vsh.6762:user=admin:cmd=
Mon Apr 4 21:23:23 2016:type=update:id=vsh.6762:user=admin:cmd=configure terminal ; hostname N56128 (SUCCESS)
Mon Apr 4 21:23:23 2016:type=stop:id=vsh.6762:user=admin:cmd=
N5600-Lab# echo "hostname N56128" > bootflash:CLI
N5600-Lab#
N5600-Lab# show file CLI
hostname N56128
N5600-Lab# show file CLI | vsh
N56128#
Diff significa Diferencia
N5600-Lab# show int mgmt0 | diff
N5600-Lab# show int mgmt0 | diff
11,12c11,12
< 9393 input packets 829764 bytes
< 141 unicast packets 3715 multicast packets
---
> 9395 input packets 830217 bytes
> 142 unicast packets 3716 multicast packets
15,16c15,16
< 214 output packets 47396 bytes
< 27 unicast packets 181 multicast packets
---
> 215 output packets 47640 bytes
> 27 unicast packets 182 multicast packets
N9K significa Nexus 9000
BRU-N9K3-1# watch differences interval 1 show int mgmt0 counter
Every 1.0s: vsh -c "show int mgmt0 counter" Mon Apr 4 23:42:27 2016
CCO reference
CPU significa Unidad de Procesamiento Central
Este comando proporciona un resultado cada 5 segundos (se puede cambiar) del proceso que consume la CPU. Es el mismo resultado que el comando top linux:
NEXUS# show system internal processes cpu 5 | no-more
top - 12:41:55 up 117 days, 17:00, 5 users, load average: 0.44, 0.50, 0.55 Tasks: 2883 total, 2 running, 1022 sleeping, 0 stopped, 1859 zombie Cpu(s): 1.0%us, 0.9%sy, 0.0%ni, 98.0%id, 0.0%wa, 0.0%hi, 0.1%si, 0.0%st Mem: 32744992k total, 14563132k used, 18181860k free, 61308k buffers Swap: 0k total, 0k used, 0k free, 4091160k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 18465 admin 20 0 5200 3108 1148 R 16.6 0.0 0:00.17 top 6389 root 20 0 699m 53m 14m S 3.3 0.2 113:49.07 netstack 18473 root 20 0 97940 3804 2796 R 3.3 0.0 0:00.02 vsh 10 root 15 -5 0 0 0 S 1.7 0.0 9:10.85 ksoftirqd/2 4876 root 15 -5 369m 27m 6564 S 1.7 0.1 67:33.91 sysmgr 9581 svc-isan 20 0 446m 41m 11m S 1.7 0.1 21:16.15 isis_l2mp 1 root 20 0 1980 652 572 S 0.0 0.0 3:02.73 init 2 root 15 -5 0 0 0 S 0.0 0.0 0:00.03 kthreadd 3 root RT -5 0 0 0 S 0.0 0.0 0:00.49 migration/0 4 root 15 -5 0 0 0 S 0.0 0.0 22:48.66 ksoftirqd/0 5 root -2 -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/0 6 root RT -5 0 0 0 S 0.0 0.0 0:00.65 migration/1 7 root 15 -5 0 0 0 S 0.0 0.0 2:27.70 ksoftirqd/1 top - 12:42:01 up 117 days, 17:00, 5 users, load average: 0.37, 0.48, 0.54 Tasks: 2887 total, 1 running, 1027 sleeping, 0 stopped, 1859 zombie Cpu(s): 1.0%us, 0.9%sy, 0.0%ni, 98.0%id, 0.0%wa, 0.0%hi, 0.1%si, 0.0%st Mem: 32744992k total, 14562360k used, 18182632k free, 61308k buffers Swap: 0k total, 0k used, 0k free, 4091160k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 18502 admin 20 0 5200 3112 1148 R 18.5 0.0 0:00.17 top 6389 root 20 0 699m 53m 14m S 1.7 0.2 113:49.08 netstack 6402 root -2 0 366m 13m 8660 S 1.7 0.0 1032:41 clx 9015 root 20 0 482m 21m 11m S 1.7 0.1 225:45.72 pm 10066 svc-isan 20 0 403m 22m 9.9m S 1.7 0.1 268:31.28 ospf 10487 svc-isan 20 0 354m 9992 6596 S 1.7 0.0 194:52.11 ecp 1 root 20 0 1980 652 572 S 0.0 0.0 3:02.73 init 2 root 15 -5 0 0 0 S 0.0 0.0 0:00.03 kthreadd 3 root RT -5 0 0 0 S 0.0 0.0 0:00.49 migration/0 4 root 15 -5 0 0 0 S 0.0 0.0 22:48.66 ksoftirqd/0 5 root -2 -5 0 0 0 S 0.0 0.0 0:00.00 watchdog/0 6 root RT -5 0 0 0 S 0.0 0.0 0:00.65 migration/1 7 root 15 -5 0 0 0 S 0.0 0.0 2:27.70 ksoftirqd/1
N7k/N9k
N7k-LabSW# show version internal build-identifier
Kickstart image file: bootflash:///n7000-s2-kickstart.6.2.10.bin : S102
System image file: bootflash:///n7000-s2-dk9.6.2.10.bin : S102
BRU-N9K3-1# show version internal build-identifier
nxos image file: bootflash:///nxos.7.0.3.I2.2a.bin : S30
N5k/6k:
N5600-Lab# show platform fwm info global | i FwM
FwM build Details: Built at Sat Apr 18 11:11:18 PDT 2015 on nuo-sw-build40 in directory /auto/n5kiluka/daily_build/iplus/nexus/522/src/build by buildsa)