Many of us use a Keyspan Serial adapter to manage devices with serial ports on them. Those who find you need to console into devices but hate the fact that you have to either use Zterm (which is no longer maintained) or boot a Windows Virtual Machine will find an application called goSerial pretty handy. GoSerial makes a Keyspan serial to usb adaptor, connected with a null modem cable, useful. You will be in CLI heaven in moments. goSerial can be downloaded here.
You can also use the screen command. The screen command will open a virtual terminal and provide the functionality of an old DEC VT100 terminal. Screen is one of the more useful tools when dealing with several servers concurrently, or several VT sessions as the case may be.
To open a screen session into an APC:
screen /dev/tty.KeySerial1 2400
To open a screen session into a Qlogic:
screen /dev/tty.KeySerial1 9600
To open a screen session into a Promise RAID:
screen /dev/tty.KeySerial1 115200
To see your active screens:
The output will show screens similar to the following:
When you list the screens you’ll note that some can be detached. You can also start a screen detached. To do so, use the -d flag when invoking the screen (or -D if you don’t want to fork the process. To attach to a detached screen, use the -r option:
screen -r 6077.ttys001.krypted2
Or if you only have one active screen that has been detached, -R will automatically reconnect to it. It can be useful to have more friendly names when working with multiple screen sessions. To attach to an attached screen session, use -x:
screen -x 6077.ttys001.krypted2
To provide an easy-to-remember name, use the -s option. To initiate a screen called simply Qlogic, using the above Qlogic rate:
screen -s Qlogic /dev/tty.KeySerial1 9600
By creating a .screenrc file in your home directory you can also set many of the options for screen.
While the screen command is useful in connecting to external devices via the command line, that’s only a small part of what screen can do. Those using the Terminal application that comes with Mac OS X have been using an environment that acts like screen for some time. You invoke tabs and new terminal windows in order to leave, for example, a session tailing logs or editing a configuration file open, while using a separate session to read a man page or start a process. Screen takes all of this and packs it into one terminal screen for environments without such an interactive command line management tool. For example, if you ssh into a Linux host in a data center, you would have to initiate 2 sessions into hosts in order to have 2 concurrently running screens, whereas you would only need to invoke one ssh session (and you may be limited to one) and still have the flexibility you have with the Terminal screen, albeit in a single window perhaps.
For example, let’s say you ssh into a RHEL box and you want to invoke an emacs editor:
screen emacs prog.c
Now let’s say that you type a few lines of a new samba config file and you want to tail the samba logs to make sure you’re augmenting the correct options:
screen tail -f /var/log/samba/log.smbd
To then switch back to emacs:
There’s lots more you can do with screen, but this should get ya’ started!
krypted September 25th, 2013
Updating the firmware on Promise arrays is straight forward enough from the WebPAM. But what happens if a firmware update goes funky and you can’t get into the WebPAM any longer (ah, the joys of beta testing)? Well, you can always download an older firmware and reload it provided you can ssh or telnet into the host. Download from http://www.promise.com/support/download.aspx?m=93®ion=en-global for your given model.
Then, you need the firmware accessible to the Promise chassis via tftp. A simple tftp GUI tool is available at http://ww2.unime.it/flr/tftpserver. Once configured, log into the Promise array and then use the ptiflash command to update the firmware. In the following command we’ll use the -s option to identify the IP address of our tftp server and then the -f option to identify the name of the file (note that I’ve shortened the ptif file for this X30 to be just fw.ptif so I don’t fat finger the multiple hyphens in a ridiculously long file name that I can’t autocomplete):
ptiflash -t -s 192.168.69.30 -f fw.ptif
If the server can’t access the file note that you have a tftp client binary that works much like the ftp binary built into OS X to test that you can access the server and the file from the IP address the X30 is using. If the file is accessible, when prompted to update the flash, enter y and press enter.
The update process is going to take about 15 to 20 minutes. If running the latest versions of the X30 firmware I recommend using Firefox.
krypted July 8th, 2013