Sunday, October 30, 2016

Raspberry Pi and 1-Wire Temperature/Environmental Sensors

I've discussed 1-wire before. In this case, I needed a cheap temperature sensor to alert on environmental conditions in an server room.

I set up a Raspberry Pi with stock Raspian and install digitemp like so:

apt install digitemp

I used an iButtonlink usb master (here: and a t-sense sensor here: )

The USB device shows up as /dev/ttyUSB0 as an FTDI serial port.

I can walk the 1-wire tree like so:

sudo digitemp_DS9097U -s /dev/ttyUSB0 -w
DigiTemp v3.6.0 Copyright 1996-2007 by Brian C. Lane
GNU General Public License v2.0 -
Turning off all DS2409 Couplers
Devices on the Main LAN
2149B214090000D1 : DS18B20 Temperature Sensor
01C3235419000000 : DS2401/DS1990A Serial Number iButton

That being said, you'll want to create a dot file to use this like so:

 sudo digitemp_DS9097U -s /dev/ttyUSB0 -i
DigiTemp v3.6.0 Copyright 1996-2007 by Brian C. Lane
GNU General Public License v2.0 -
Turning off all DS2409 Couplers
Searching the 1-Wire LAN
2149B214090000D1 : DS18B20 Temperature Sensor
ROM #0 : 2149B214090000D1
Wrote .digitemprc

I have one temperature sensor at the moment. After creating the .digitemprc, I can query it:

 sudo digitemp_DS9097U -s /dev/ttyUSB0 -t 0
DigiTemp v3.6.0 Copyright 1996-2007 by Brian C. Lane
GNU General Public License v2.0 -
Oct 30 20:16:45 Sensor 0 C: 21.00 F: 69.80

Thursday, October 6, 2016

Setting Up RAID Volumes on Cisco UCS C series with Avago/LSI/MegaRAID Controllers

On a C220M4, I discovered that the controller configures the drives as JBOD. Fixing this is easy, but not quite as straightforward as one would expect... especially considering that the controller has been a mainstay of servers for a very long time.

1. Go into the controller firmware (I had to do a control-M before I saw the control-R option):

As you can see, create virtual drives is not an option. Select "Make Unconfigured Good"

Select all the drives and click OK. 

Now you have the option to create a volume.

Cisco UCS C220M4s and the Purple Screen of Death - Could not start pcpu 1: TSC sync timed out

Recently, I had to install ESXi 5.5 on a Cisco rackmount server. VMware crashed with the purple screen of death.

Here's the display:

These are relatively new servers, so there was nothing especially helpful on the web. Other people had this problem, but I couldn't find any real solutions, other than a reference to C states on the CPU.

I experimented a bit and figured that CPU power savings might be the problem (I'd seen this before on Opteron servers.)

The fix is to set CPU performance to HPC (it defaults to Enterprise) in BIOS:

That's advanced -> CPU Performance -> HPC (from Enterprise)

This solved the problem. 

Wednesday, October 5, 2016

Avocent ACS 6016/6008 Renaming Ports From CLI

These console servers are fairly easy to setup, but the CLI is segmented to facilitate differing levels of access.

If you wish to rename a serial port (i.e., with hostname) from the CLI, you need to do the following

1. Figure out which port is being renamed (i.e., port 11)
2. log in with appropriate credentials via SSH (or direct serial)

cd ports


cd serial_ports

4b. You can check out the parameters here:

--:#- [serial_ports/physical] cli-> show
port: 11
enable_cisco_rj45_pin-out = yes
status = enabled
speed = 9600
parity = none
data_bits = 8
stop_bits = 1

flow_control = none 

5. set port name

set port_name=my_new_name


--:#- [serial_ports/cas] cli-> set port_name=unused 

8. save the config


That's it, basically.

Tuesday, August 30, 2016

AnyConnect 4.x on ASA 8.4.x: AnyConnect is not enabled on the VPN server

I recently had to do a failover on a pair of ASA5520s. On failing over to the secondary, AnyConnect stopped working. I did not see a license error, but users who connected received this error:

AnyConnect is not enabled on the VPN server

There weren't any smoking guns in the logs. I did notice that the newest version of the config was missing the client image definitions in webvpn. They were in the flash drive, but not copied to the secondary. So, when the secondary took over, this portion of the config was dropped.

The solution was to re-add the images:

config t
anyconnect image disk0:/anyconnect-macosx-i386-4.3.00748-k9.pkg 1
anyconnect image disk0:/anyconnect-win-4.3.00748-k9.pkg 2

Tuesday, March 8, 2016

Cisco ASA tftp Copies and Issues with atftpd

while attempting to copy a new anyconnect pkg file from a CentOS based server running atftpd, I received the following error on a Cisco ASA 5505:

%Error reading tftp://mytftpserver/anyconnect-win-3.1.14018-k9.pkg (Undefined error code)

On the tftp server in /var/log/messages, I saw:

Mar  6 14:49:19 mytftpserver  atftpd[15147]: Serving anyconnect-win-3.1.14018-k9.pkg to
Mar  6 14:49:19 mytftpserver atftpd[15147]: Requested file to big, increase BLKSIZE

I had installed tftp a while ago... specifically atftp-server. After looking at the man page for in.tftpd, I concluded there was no good way to set BLKSIZE on this package. The fix was:

sudo yum erase atftp-server
sudo yum install tftp-server

I then edited the xinet.d/tftp file to enable it and change the target directory and restarted xinetd. After this, I was able to copy the pkg file over successfully.