HP ProCurve CLI CheatSheet

@http://blog.petrilopia.net/info/hp-procurve-cli-cheatsheet-2/

HP ProCurve CLI CheatSheet

LOG
log Display log events (most recent last)
log -r Display log events (most recent first)
log A12 Display log events of port a12
log A12 -r Display log events of port a12 (most recent first)
log 192.168.0.1 Display log events of 192.168.0.1

 

MAC
show mac A5 Show MAC-address of the device on port A5
show mac A4-A6 Show MAC-adresss of the devices on ports between A4 and A6
show mac 00112233-445566 Show which port device with MAC-address 00112233-445566 is connected

 

VLAN
show vlan Show information about vlans on this swtich
show vlan ports A19 Show VLAN ID and status of specific ports (A19)
show vlan Show ports on this vlan and port status
configure
vlan 19 Set switch to vlan 19
name SupportVLAN Name this vlan as “SupportVLAN”
tag A12 Set port a12 as tagged on vlan 19 (First do vlan <19>)
tag A12,A13 Set ports a12 and 13 tagged on vlan 19 (First do vlan <19>)
untag A12 Set port a12 as untagged on vlan 19
vlan 19 tagged A12 Set port a12 as tagged on vlan 19
vlan 19 untagged A12 Set port a12 as untagged on vlan 19
vlan 19 untagged A12-A20 Set port a12-a20 as untagged on vlan 19
no vlan 30 Remove vlan setting on port 30

 

FLASH
show flash Displays info about flash (version etc.)
copy running-config tftp filename.txt Copy your running config to file filename.txt at tftp server which IP is .
copy tftp startup 192.168.0.2 hp_2524 Copy your config (filename hp2524) from server 192.168.0.2 via tftp to switch
copy tftp flash file.swi Download and update your flash with file.swi from tftp server at

 

MISC
copy flash flash secondary Copy software from primary to secondary image is not intuitive
copy flash flash primary Updated secondary image first then You could copy from secondary to primary
hostname poro_1 Set switch hostname as poro_1
link-test 00112233-445566 Test connectivity between switches (this switch and 00112233-445566)
show run Show running config
password operator Set operator password (Normal user / read-only )
password manager Set manager password (Admin user / read-write)
password all Set operator and manager password
enable Switch to manager lever from operator level
ping 192.168.0.1 Ping IP 192.168.0.1
chassislocate Turn on/off switch locator led or blink it (30 minutes)
chassislocate blink 10 Blink switch locator led 10 minutes
ntp1 first.timeserver.net Add first.timeserver.net to NTP server list
timesync ntp Enable NTP syncronization with servers

 

PROMPT
Switch# Manager prompt
Switch>_ Operator prompt

 

Windows 7: Windows cannot connect to the printer 0x0000007e

The problem occures because HP uses a 32 bit path to a file in the printer queue. The x64 client cannot resolve this location and the printer installation fails.

printer

 

 

Log on to the print server. Make sure that the 64bit driver is installed on the server. Delete the BIDI key in the register:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\PRINTERNAME\CopyFiles\BIDI

The printer can be installed now without errors.

 

references:

http://social.technet.microsoft.com/Forums/windowsserver/en-US/6c68f4d3-fa4c-4986-9567-bbe89551652f/windows-7-windows-cannot-connect-to-the-printer-0x0000007e

http://cloudsurvivalguide.com/error-0x0000007e-adding-printer-hp-universal-print-driver/

send “show tech all” from a HP switch to a tftp server

Introduction

A ‘show tech all’ file contains a lot of information from the switch. Although it is possible to capture this output using session logging in your telnet or terminal emulator application, it is better to transfer the file via TFTP. Session logs tend to have a lot of control sequences embedded which makes it difficult for us to analyze the file.

 

If you do not have IP connectivity on the switch and the switch has a console port, it is possible to transfer the ‘show tech all’ file via the console cable, see at the end of this document.

Requirements

* You must have a TFTP server running on a PC (See ‘obtaining a TFTP server’ below)

* Your switch must have IP connectivity to the PC running a TFTP server

* You must have command line access to the switch

Obtaining a TFTP server

You can download a simple and easy to use TFTP server for free from http://www.solarwinds.com/

 

Alternatively you can download TFTPd32 from http://tftpd32.jounin.net/ which also includes simple SNTP, syslog and DHCP servers.

Obtaining the ‘show tech all’ via TFTP

Start your TFTP server:

tftp

 

Notice the ‘Current Directory’ setting; this is where the file from the switch will end up.

 

Also notice the ‘Server interfaces’ setting; this is the IP address you will specify on the switch command line when creating the ‘show tech all’ file.

 

 

Connect to the command line of the switch and log in if needed. You should NOT be in configuration mode on the switch, but you do need to be in enable (manager) mode. Issue the following command:

 

Switch# copy command-output ‘show tech all’ tftp 12.23.34.45 xxxx.txt

 

Where 12.23.34.45 is the IP address of the PC running the TFTP server, and xxxx is something to identify the switch.

 

 

The switch will now generate the required file, and transfer it to your PC via TFTP. You can pick up the file in the “Current Directory” folder and e-mail it to ProCurve support.

Obtaining the ‘show tech all’ via console cable

If there is no IP connectivity to the switch, it is still possible to obtain a ‘show tech all’ file if the switch has a console port. You can use Hyper Terminal which is typically installed with Windows, or you may choose to use a free application like Tera Term (http://en.sourceforge.jp/projects/ttssh2/releases/).

 

Connect the serial cable between your computer and the switch. Establish a connection, the parameters are 9600,8,N,1,N (9600 baud, 8 bits, no parity, 1 stop bit, no flow control).

 

***NOTE*** If the above settings don’t respond and you have a newer RJ45 looking Serial port on the switch use XON/XOFF instead of NONE at the last setting (Flow Control)***

 

 

When you have command line access via the console, issue the following command:

 

Switch# copy command ‘sh tech all’ xmodem

 

Now instruct the terminal emulator application to receive the file:

 

Hyper Terminal – In the menu select Transfer->Receive File, Set receiving protocol to XMODEM, and note the destination directory. Click Receive, name the file, and save.

 

Tera Term – In the menu select File->Transfer->XMODEM->Receive, name the file, and save.

 

Once the file transfer has completed, you can e-mail it to HPN support.

 

Note that the switch may time out before you start receiving the file. Simply press Arrow Up in the terminal session, re-execute the command, and try again.

 

Logging the output of ‘show tech all’ via a terminal emulator:

Choose Transfer -> Capture Text or the follow the examples below.

This opens a window where you can scroll down to the folder where you wish to save the logs to. In this “Browse” window you can also define a name for the log file, for instance YYYY-MM-DD-HH-MM.txt

hyperterminalputty

 

 

***If your preferred terminal emulator is Putty, ensure that you tick the option enabling “Printable output. ***

 

log

 

Choose the folder you wish to save the logs to. Your desktop is preferable.

Now your switch will send its logs to the file on your desktop, as long as it is connected via your terminal emulator.

 

download as word file: 

Monitoring Dell Servers in HP Systems Insight Manager

Monitoring Dell Servers in HP Systems Insight Manager

This post explains the details of managing Dell Servers with HP Systems Insight Manager(HPSIM) and enabling SNMP Traps support. The server MIB files “10892.mib” and “dcstorag.mib” can be used for monitoring the Dell Servers in an environment managed by HPSIM.

 

Managed Node Pre-Requisites

 

         Installing the OpenManage Server Administrator

            The Dell Server should be installed with the Server Administrator Software to enable the monitoring. The Server Administrator software comes with the installation DVD and the details for the installation and configuration of the OpenManage Server Administrator is available in support.dell.com manuals.

     Configuring the SNMP Service

            The SNMP Service needs to be configured in the Server to enable the SNMP communication between the Dell Server and HPSIM. To enable the traps to be forwarded to the HP SIM server the SNMP Trap destination needs to be configured properly with the HP SIM Server IP Address. The details for the SNMP configuration configuration is available in the Server Administrator documents in support.dell.com.

The current latest version can be downloaded from support.dell.com :
http://support.dell.com/support/edocs/software/svradmin/7.1/en/index.htm

Loading the Dell MIBs in HPSIM

            The Dell Server MIB files are available with the Server Administrator DVD and also the MIBs can be downloaded from support.dell.com.

 

  • Uploading he MIBs:

Uploading the MIBs is simply copying the MIBs from the downloaded folder to the \Program Files\HP\Systems Insight Manager\mibs folder

  1.  Copy “10892.mib” to \Program Files\HP\Systems Insight Manager\mibs
  2.  Copy “dcstorag.mib” to \Program Files\HP\Systems Insight Manager\mibs

Note – As HPSIM generates an error when a MIB has a filename that contains only    numbers, rename “10892.mib” to “new10892.mib”, and for consistency also rename to “dcstorag.mib” to “newdcstorag.mib”.

  • Compiling the MIBs:

The MIBs needs to be compiled to generate the intermediate .cfg file which can be used to register the MIBs in HP SIM.

  1. Open a command window (cmd.exe)
  2.  Change the working directory to \Program Files\HP\Systems Insight Manager\mibs.
  3. Enter the command “mcompile new10892.mib”. The MIB should compile and return the message “Mib Compilation completed successfully”.
  4. Enter the command “newdcstorag.mib”. The MIB should compile and return the message “Mib Compilation completed successfully”.
  • Registering the MIBs:

 

Register the Server MIB files as follows:

  1. Enter the command “mxmib -a new10892.cfg”. The MIB should register and return the message “COMMAND COMPLETED SUCCESSFULLY”.
  2. Enter the command “mxmib -a newdcstorag.cfg”. The MIB should register and return the message “COMMAND COMPLETED SUCCESSFULLY”.

HPSIM – System Type Manager

The System Type Manager is used to define the rules to identify the different systems in HP SIM. The steps used to configure the System Type Manager to recognize a Dell Server are as follows:

Dell Windows Server

  1. Login to HPSIM.
  2. Select Options ‐> Manage System Types.
  3. Click the New… button. The New Rule pane will open below.
  4. Beside System object identifier click the Retrieve from system… button. The Retrieve from system pane will appear below the current pane.
  5. Enter the hostname or IP address of the target Dell system in the Target hostname or IP address text box.
  6. Click Get Response. Note that the response value of “1.3.6.1.4.1.311.1.1.3.1.2” is displayed below.
      • Figure 1
  7. Click the OK button to accept this value and return to the New rule pane.
  8. Beside MIB variable object identifier enter the OID for the Server MIB Attribute “systemManagementSoftwareName” value as “.1.3.6.1.4.1.674.10892.1.100.1”.
      • Figure 2
  9. Beside Object Value click on “Retrieve from System”
  10. Click Get Response. Note that the response value of “Server Administrator” is displayed below. This is the OpenManage Server Administrator software name retrieved from the Dell Server.
      • Figure 3
  11. Click the OK button to accept this value and return to the New rule pane.
  12. Beside Compare rule select Match.
  13. Beside System Type select Server.
  14. Beside Subtype select “Dell”.
  15. Beside Product model enter “Dell Windows Server”.
  16. Leave the Custom management page field blank and click the OK button.

Dell Linux Server

  1. Login to HPSIM.
  2. Select Options ‐> Manage System Types.
  3. Click the New… button. The New Rule pane will open below.
  4. Beside System object identifier click the Retrieve from system… button. The Retrieve from system pane will appear below the current pane.
  5. Enter the hostname or IP address of the target Dell system in the Target hostname or IP address text box.
  6. Click Get Response. Note that the response value of “1.3.6.1.4.1.8072.3.2.10” is displayed below.
      • Figure 4 
  7. Click the OK button to accept this value and return to the New rule pane.
  8. Beside MIB variable object identifier enter the OID for the Server MIB Attribute “systemManagementSoftwareName” value as “.1.3.6.1.4.1.674.10892.1.100.1”.
  9. Beside Object Value click on “Retrieve from System”
  10. Click Get Response. Note that the response value of “Server Administrator” is displayed below. This is the OpenManage Server Administrator software name retrieved from the Dell Server.
  11. Click the OK button to accept this value and return to the New rule pane.
  12. Beside Compare rule select Match.
  13. Beside System Type select Server.
  14. Beside Subtype select “Dell”.
  15. Beside Product model enter “Dell Linux Server”.
  16. Leave the Custom management page field blank and click the OK button.

Discovering Dell Servers

Once the Dell Server system type has been configured in the HP SIM, the Dell Servers can be properly discovered in HP SIM.

 

  • Global Protocol Settings:

The SNMP settings can be changed as follows:

  • Click Options ‐> Protocol Settings ‐> Global Protocol Settings. The Global Protocol Settings window will appear.
      • Figure 5 
  • Scroll down to the Default SNMP settings section and click on “Global Credentials” and Verify that the required community strings is configured and click on OK button to save the changes.
    • Figure 6

 

  • Discovering Dell Servers:

 

    • Click Options ‐> Discovery. The Discovery summary page will be displayed.
      • Figure 7

 

 

    • Click on New button, the Discovery options page will be shown.
    • Select the Discovery option “Discover a Single System” and enter the name for the discovery option and enter the IPAddress of the Dell Server.     Note – Also the Group discovery can be used to discover multiple servers.
      • Figure 8

 

 

    • Click on Save button to save and accept the changes.

i.        Once the discovery rule is saved, Click on “Run Now” option to execute the discovery Rule. The Discovered Dell Server will be shown as

      • Figure 9

 

ii.        The “Tools and Links” tab contains the link to launch the OpenManage Sever Administrator Console for Dell Servers.

      • Figure 10

 

 

iii.        The Events tab will List the associated events with the corresponding Dell Server.

      • Figure 11

 

  • Testing Dell Server SNMP Traps:

 

    • Log on to Dell Server OpenManage Server Administrator console by clicking on the “openmanage” link from “Tools and Links” tab.
    • Navigate to the Temperature page in Main System under Server Module in the left-side navigation tree
      • Figure 12

 

 

    • Click on the “System Board Ambient Temperature” in the right-side navigation pane.
    • The Properties page tab will be displayed and select “Set to Values” option and set a value higher than the current Temperature reading to simulate the Warning alert for Temperature.
      • Figure 13
    • Click on Apply option to save the changes and verify that the Temperature status has been changed to Warning.
      • Figure 14

 

    • Navigate to the Events Tab in the HP SIM and the Temperature Alert should be shown in the Events page.
      • figure 15

The Server Administrator SNMP Traps details are documented in the Message Reference guide and can be downloaded from support.dell.com.

Appendix

MIB Files

#

MIB

MIB Filename

Description

1 Server Administrator Instrumentation MIB 10892.mib The Server Administrator Instrumentation MIB provides

instrumentation data that allows you to monitor the health of a system with

SNMP management applications. It provides:

• Information about the status of temperatures, power supplies, voltages,

currents, fans, and memory at key points in the system

• Rapid access to detailed fault and performance information gathered by

industry standard systems management agents

• Version information for Basic Input/Output System (BIOS), firmware, and operating system

• A detailed account of every cost of ownership (COO) detail about your system

In addition, traps are sent to report a change in status of the health of critical components.

2 Server Administrator Storage Management MIB dcstorag.mib The Server Administrator Storage Management MIB provides storage management data that allows you to monitor the health of storage resources with SNMP management applications.

 

If interested to know about Monitoring Dell Servers using HP Operations Manager for Windows, please refer to the Dell SPI white paper here

 

source: http://en.community.dell.com/techcenter/systems-management/w/wiki/3891.monitoring-dell-servers-in-hp-systems-insight-manager.aspx

Script – Get HP Serial Numbers

To get a list of HP Serial numers run the following Powershell script. Place the servernames/ipaddresses you want to check in the serverlist parameter.

 

#
# Get HP Serial Numbers from server text file
#
# Written by Bastiaan van Leeuwen
#
# Change $serverlist parameter to the right text file

$serverlist = "d:\script\servers.txt"
$username = Get-Credential domain\user

foreach($server in get-content $serverlist)
{
gwmi win32_systemenclosure -computer "$server" -credential $username –ErrorAction SilentlyContinue | 
select __SERVER,serialnumber
}