Marc's Public Blog - Linux Hacking


All | Aquariums | Arduino | Btrfs | Cars | Cats | Clubbing | Dining | Diving | Electronics | Exercising | Flying | Hiking | Linux | Linuxha | Public | Rc | Sciencemuseums | Snow | Solar | Trips

This page has a few of my blog entries about linux, but my main linux page is here
Picture of Linus


Table of Content for linux:

More pages: January 2017 October 2016 August 2016 July 2016 June 2016 February 2016 January 2016 May 2015 March 2015 January 2015 October 2014 May 2014 April 2014 March 2014 January 2014 November 2013 September 2013 May 2013 March 2013 January 2013 December 2012 August 2012 May 2012 March 2012 January 2012 December 2011 August 2011 July 2011 January 2011 October 2010 August 2010 June 2010 April 2010 March 2010 January 2010 December 2009 November 2009 September 2009 August 2009 July 2009 May 2009 January 2009 December 2008 November 2008 October 2008 January 2008 November 2007 August 2007 July 2006 January 2006 August 2005 April 2005 November 2004 March 2004 February 2004



2010/06/18 3rd Upgrade for gargamel, my main home server, going for lower power
π 2010-06-18 00:00 in Linux
My first Gargamel started around year 2000, it was a dual P3 Xeon with the huge cartriges, with a Marlin Spike Intel motherboard (MS440GX) with 6 SCSI busses and 26 drives at its peak (a whopping 2TB of hard disk space back then).
I don't have watt usage numbers on it back then, but I'm sure it was quite high (>400W with all the drives).

My original gargamel server
My original gargamel server

This server worked a good 6 years or so, and I eventually replaced it in 2006 with a dual P4 Xeon server board I got from my new then work. Drives also got bigger, so I removed SCSI and the 3 external disk arrays, switched to SATA with port multipliers, and settled with 12 internal drives (2 boot drives, 5x250GB and 5x500GB) for a total usable space of 3TB with a "much lower" power usage. Typical power was now in the 280-300W range for the entire server closet.
Note that my base usage in the closet with computer off is still 70W (UPS is 23W by itself, cable modem and 24 port switch is another 30W, and the other random stuff brings it to 70W).

Gargamel V2 with Sata and PMP
Gargamel V2 with Sata and PMP

Eventually, another 5 years later, I was tired of debugging a couple of issues with the server that was sometimes low on memory that was hard/expensive to find vs bigger DDR3 dims. I also wanted to reduce the power consumption of that power hungry P4 Xeon Server board. One thing I did that helped a while ago was to write some software to make sure all the drives suspended (spun off), which explains the big spikes in power (drives spinning or spun down). See my Spinning down WD20EADS Drives and fixing load cycle page.
Thanks to help from coworkers who followed PC trends, I went for an Intel Sandy Bridge MB (it was hard to find one with a serial port for serial console booting, and onboard IDE, and 2 PCI slots, but eventually I think I got the last one available :) ). I paid a few dollars extra for an Intel i3 2100T dual core CPU, which is only 2.53Ghz, but that's more than plenty and it only uses 35W, which is awesome.

As a result, I came down to about 270W average for the computer closet (200W for the computer) to about 210W average (140W for the computer). It will now full idle at 180W (110W for the computer). Sure, one might say 110W is still a lot, but for a server with 10 drives, I/O cards, around 16 USB devices connected, dual ethernet, and dual sound (5 + 7 channels), that's not so bad. In the end, the power graph looks better, so that's good enough for me :)

The hole is where I changed the server
The hole is where I changed the server

The here Christened Gargamel V3!
The here Christened Gargamel V3!

all wired up
all wired up

2010/06/17 Dealing with many USB to Serial Port Converters on linux and device naming
π 2010-06-17 00:00 in Linux, Linuxha
So, if you have more than one USB to serial adapter, you might have issues with which order they load in, causing the serial port numbers (/dev/ttyUSB0 .. x) to change pseudo randomly at boot, it's pretty annoying.

In my case, I picked up an 8 port ftdi usb to serial converter for only $15 on Ebay (woot!) but even its ports may not come up in sequence at boot time if other modules are loaded at the same time (a race condition can cause the pl2303 port to be in between one of the 8 ports from the ftdi hub).

Turns out there is a solution to this problem with udev, iff your usb to serial adapters have serial numbers (my ftdi ones did, but my pl2303 ones did not), or if you only have one serial adapter of each brand (like ftdi, pl2303, keyspan).

In my case, I have (don't laugh), 11 serial devices on my server:

  • Server serial console
  • 1-wire serial adapter
  • Insteon PLM
  • APC ups
  • W800 X10RF and X10sec gateway
  • X10 MR26a X10RF gateway
  • First ECM 1240 power meter
  • Second ECM 1240 power meter
  • Brand One Meter serial adapter
  • HAI thermostats (2 on one line)
  • Rfxcom 433.92Mhz (433.92Mhz RF gateway for Oregon Scientific Weather Sensors)
  • This is what you do with udev:

    gargamel:~# cat /etc/udev/rules.d/50-local-usb-serial.rules 
    # /etc/udev/rules.d/50-local-usb-serial.rules
    

    # http://www.reactivated.net/writing_udev_rules.html#udevinfo # was udevinfo -a -p /class/tty/ttyUSB0 # now udevadm info --attribute-walk -p /class/tty/ttyUSB0

    SUBSYSTEMS=="usb", ATTRS{product}=="FT232R USB UART", ATTRS{serial}=="A7006gvN", SYMLINK+="usb-serial-ftdi-8_1" SUBSYSTEMS=="usb", ATTRS{product}=="FT232R USB UART", ATTRS{serial}=="A7006gvO", SYMLINK+="usb-serial-ftdi-8_2" SUBSYSTEMS=="usb", ATTRS{product}=="FT232R USB UART", ATTRS{serial}=="A7006gvP", SYMLINK+="usb-serial-ftdi-8_3" SUBSYSTEMS=="usb", ATTRS{product}=="FT232R USB UART", ATTRS{serial}=="A7006gvR", SYMLINK+="usb-serial-ftdi-8_4" SUBSYSTEMS=="usb", ATTRS{product}=="FT232R USB UART", ATTRS{serial}=="A7006gvQ", SYMLINK+="usb-serial-ftdi-8_5" SUBSYSTEMS=="usb", ATTRS{product}=="FT232R USB UART", ATTRS{serial}=="A7006gvS", SYMLINK+="usb-serial-ftdi-8_6" SUBSYSTEMS=="usb", ATTRS{product}=="FT232R USB UART", ATTRS{serial}=="A7006gvT", SYMLINK+="usb-serial-ftdi-8_7" SUBSYSTEMS=="usb", ATTRS{product}=="FT232R USB UART", ATTRS{serial}=="A7006gvU", SYMLINK+="usb-serial-ftdi-8_8"

    SUBSYSTEMS=="usb", ATTRS{product}=="FT232R USB UART", ATTRS{serial}=="A800dMFk", SYMLINK+="rfxcom"

    SUBSYSTEMS=="usb", ATTRS{product}=="USB-Serial Controller", ATTRS{manufacturer}=="Prolific Technology Inc.", SYMLINK+="usb-serial-pl2303"

    After making a change udevadm trigger will update symlinks.


    More pages: January 2017 October 2016 August 2016 July 2016 June 2016 February 2016 January 2016 May 2015 March 2015 January 2015 October 2014 May 2014 April 2014 March 2014 January 2014 November 2013 September 2013 May 2013 March 2013 January 2013 December 2012 August 2012 May 2012 March 2012 January 2012 December 2011 August 2011 July 2011 January 2011 October 2010 August 2010 June 2010 April 2010 March 2010 January 2010 December 2009 November 2009 September 2009 August 2009 July 2009 May 2009 January 2009 December 2008 November 2008 October 2008 January 2008 November 2007 August 2007 July 2006 January 2006 August 2005 April 2005 November 2004 March 2004 February 2004