Thursday 23 August 2012

Linux command line file editing

Use 'tr' to replace NULL characters (^@) from files:

# tr '\000' '\n' < input.txt > output.txt

Use 'sed' to remove blank lines (^$ matches a blank line, 'd' = delete line):

# sed '/^$/d' input.txt > output.txt

or use 'grep':

# grep -v '^$' input.txt > output.txt

Monday 6 August 2012

Manually add firmware updates to Procurve Manager

I've now found a simpler way of doing this but the manual method is still shown below in case the new option doesn't work/exist.

At some point PCM has been updated to allow you to import a software image via the GUI. We're running version 3 update 20 and in that you can do the following:


  1. Extact the new software image (.swi) file into the following folder on your PCM Server: "Program Files\Hewlett-Packard\PNM\server\data\download"
  2. From the PCM Client, select Tools -> Preferences -> Configuration Management -> Software Image Import
  3. Select your device type from the drop-down list, e.g. 2810-48G
  4. Click on Add
  5. Add a description under "Software Version" and under "Software Image File Name" add in the exact name of the file that you extracted into the PCM folder, e.g. H_10_111.swi
  6. That's it! You should now be able to select the new software version when using the Software Update Wizard


Old (manual) Method:

It goes a little something like this:

  1. Browse to the ProCurve site:  http://h17007.www1.hp.com/uk/en/products/switches/index.aspx
  2. Download the firmware version you need
  3. Open the following directory on the PCM server: 
    1. Program Files\Hewlett-Packard\PNM\server\data\download
  4. Backup the procurve_firmware.prp file
  5. Open the .prp file and locate the section for the switch model you are interested in (easiest to search for the start of the firmware name e.g. N_11_)
  6. Update the line that starts "Latest=" to be the new firmware version
  7. Copy the existing latest code release "block" e.g. 
        N_11_25{

                                PackageFileName=2810-Software-N1125b.zip

                                FileName=N_11_25.swi
                                ReleaseNotes=2810-RelNotes-N1125-59916273b.pdf
                                ReleaseInfo=none
                                ReleaseDate=05/11/2010
                                }

       and modify the appropriate parts to match the new firmware file names.
  1. Do the same for each revision of the switch (e.g. 2610-24, 2610-24-POE)
  2. Extract the .swi file(s) and copy them into the same folder
  3. Copy the .prp file and the zip file into the directory
  4. Stop and restart the PCM services:
    1. HP ProCurve Datastore 
    2. HP ProCurve Network Manager Server
    3. HP ProCurve Network Manager Agent
  5. Re-run the software update wizard