Archive for the 'Hardware' Category

As previously written on this blog, I have set up a display in our lobby at work to display the day’s current events and meetings using Ubuntu and a tiny PC. Since this is a display which is on all day, the screensaver and monitor blanking (and other Energy Star features) are all turned off.

Under the auspice of wanting to save energy and also extending the life of a new monitor, someone suggested that we turn off the monitor at night using an electrical timer. A lightbulb went off in my head, that there must be a better way to do this via command line and then run it in the cron.

It turns out the solution is very simple. The xset command is the X server preferences command. It has a simple command to turn off the monitor:

$ xset dpms force off

and to turn the monitor back on:

$ xset dpms force on

You can also check the status of the X server settings by using:

$ xset -q

Also, when dpms turns off the monitor, it will turn back on after a keypress or by moving the mouse. Since this is a lobby display, there is no keyboard or mouse installed in the system.

I’ve rolled this into a little bash script with on, off, and status switches:

#!/bin/bash
export DISPLAY=:0.0

if [ $# -eq 0 ]; then
  echo usage: $(basename $0) "on|off|status"
  exit 1
fi

if [ $1 = "off" ]; then
  echo -en "Turning monitor off..."
  xset dpms force off
  echo -en "done.\nCheck:"
  xset -q|grep "Monitor is"
elif [ $1 = "on" ]; then
  echo -en "Turning monitor on..."
  xset dpms force on
  echo -en "done.\nCheck:"
  xset -q|grep "Monitor is"
elif [ $1 = "status" ]; then
  xset -q|sed -ne 's/^[ ]*Monitor is //p'
else
  echo usage: $(basename $0) "on|off|status"
fi

You can then use cron to turn off the monitor at night, and back on in the morning:

0 20 0 0 0 /home/lobby/monitorControl.sh off
0 7 0 0 0 /home/lobby/monitorControl.sh on

This script will turn it off at 8pm and back on at 7am.

Note that this was written for an Ubuntu system, but the xset command is pretty generic so any system that runs Xserver like RedHat, CentOS, Debian, Fedora, etc should be able to use the script as well.

These images been around the web before, but I just rediscovered some examples of both good server room cabling, and bad datacenter cabling.

Data center cabling is really an art. It takes some time to get the network, power,and other cabling organized but worth it in the end. The benefits are more than aesthetic, good cabling improves airflow, cooling, and reduces problems with plug dropouts. Not to mention that good labeling helps in troubleshooting when an issue does arrive.

The Good

More of The Best

The Bad

more of The Worst

And The Ugly

via Pingdom


More examples of good/bad wiring:

http://www.ixibo.com/index.php/2008/09/24/is-this-your-server-room/

http://royal.pingdom.com/2008/01/24/when-data-center-cabling-becomes-art/

http://www.ixibo.com/index.php/2008/09/29/this-is-how-your-server-room-should-be/

http://royal.pingdom.com/2008/01/09/the-worst-cable-mess-ever/

http://www.darkroastedblend.com/2007/03/really-bad-wiring-jobs_20.html

http://www.vibrant.com/cable-messes.php

Before/After Photos of Bad Cabling Fixing

Datacenter Best Practices

We received this Blu-ray player along with a few Blu-Ray DVDs for an anniversary present. The BDP-S301 is the same as the BDP-S300 except it is only sold at wholesale outlets like Costco and Sam’s Club. The S301 also includes an HDMI cable.

The Pros: The image looks great. Hands down it is a clean, crisp image, and with the latest firmware updates (click here) supports most audio configurations.

The Cons: This thing is the slowest media player I have ever laid my hands on.

The instructions warn that the initial setup could take 90 seconds to start and after that, start up would be quicker. I suppose they didn’t lie – start up on an everyday basis takes around 40 seconds or more! After that, you can finally eject the tray to insert your movie, or make your way to the menu.

Forty seconds, when you have an impatient toddler wanting to watch Finding Nemo for the 50th time, is similar to taking a short detour through Dante’s 3rd circle of hell.

In addition to that, woe to the consumer who might get a relatively new, $30 Blu-ray movie to play in it. We put in Dan In Real Life (Ok movie, but slow paced) – it proceeds to play the previews, fine. Then it seemingly locks up for a few minutes on a screen with a progress bar that says “loading”. We power down, start the process again. Briefly before the “loading” screen pops up again, it mentions that on older players it could take several minutes to load the menu. Seriously, 3 to 4 minutes later, the menu loads up.

Again, we received 10,000BC (don’t waste your time) in the mail from Blockbuster. Started to play it and we wanted to stop and start it over. I pressed the stop button, and I guess I overloaded the system as it was totally frozen. I had to press the power button for 10 seconds and start the whole process over.

Are you kidding me? This is the worst consumer experience I’ve had in a long time. Maybe I am just an impatient American, but spending 5 minutes waiting for a movie to load up, after having spent that much money on top of the line technology, is a disgrace. Sony should be ashamed that they let this product go to market.

What is it doing during this loading time? Is the Java OS loading all of its unnecessary libraries? Who allowed this to pass by QA?

So my recommendation to anyone looking to buy one of these systems is keep looking! There are more and more choices out there. The PS3 is only $50-$100 more and it loads movies much faster and has many more advanced media features (like streaming audio and video right to the PS3 from other media servers), not to mention all the games you can play on it.

Sony used to be top notch in my opinion when it came to hardware of any kind. However after this incident, I will really have to think twice before getting another Sony product!

I use MediaCoder for most of my encoding/transcoding of video for playback on my PC and other devices. The N800 has a peculiar set of parameters for it’s video – if it doesn’t match up then it either won’t play back or will be very choppy.

I ended up selling the N800 but I thought I would pass this profile along to anyone who might use it.

<?xml version="1.0" encoding="UTF-8"?>
<MediaCoderPrefs>
  <node key="overall">
    <node key="generic">
      <node key="autoRevert">
        <value>Never</value>
      </node>
    </node>
    <node key="ui">
      <node key="optionTab">
        <value>3</value>
      </node>
      <node key="param">
        <value>1069,767,47,50</value>
      </node>
      <node key="noWelcome">
        <value>4068</value>
      </node>
    </node>
    <node key="task"/>
    <node key="output"/>
    <node key="tagging"/>
    <node key="subtitle"/>
    <node key="decoding"/>
    <node key="audio"/>
    <node key="video">
      <node key="format">
        <value>XviD</value>
      </node>
    </node>
    <node key="container">
      <node key="format">
        <value>AVI</value>
      </node>
    </node>
    <node key="mplayer"/>
    <node key="preview"/>
    <node key="plugin"/>
    <node key="presets"/>
    <node key="httpd"/>
    <node key="server"/>
  </node>
  <node key="audiosrc">
    <node key="mplayer"/>
    <node key="winamp"/>
    <node key="lame"/>
    <node key="wavefile"/>
  </node>
  <node key="audioenc">
    <node key="lame"/>
    <node key="vorbis"/>
    <node key="faac"/>
    <node key="aacplus"/>
    <node key="nero"/>
    <node key="helix"/>
    <node key="helixmp3"/>
    <node key="fraunhofer"/>
    <node key="speex"/>
    <node key="musepack"/>
    <node key="ffmpeg"/>
    <node key="aac3gpp"/>
    <node key="amr"/>
    <node key="wavpack"/>
    <node key="flac"/>
    <node key="ape"/>
    <node key="tta"/>
    <node key="als"/>
    <node key="ofr"/>
    <node key="pcm"/>
    <node key="cli"/>
  </node>
  <node key="videosrc">
    <node key="mplayer"/>
    <node key="avisynth"/>
  </node>
  <node key="videoenc">
    <node key="xvid"/>
    <node key="x264"/>
    <node key="mencoder"/>
    <node key="ffmpeg"/>
    <node key="theora"/>
    <node key="dirac"/>
    <node key="amv"/>
    <node key="vfw"/>
    <node key="dumper"/>
    <node key="wm"/>
    <node key="remote"/>
  </node>
  <node key="container">
    <node key="mp4box"/>
    <node key="matroska"/>
    <node key="mencoder"/>
    <node key="mp4creator"/>
    <node key="atom"/>
    <node key="pmp"/>
    <node key="vcd"/>
  </node>
  <node key="audiofilter">
    <node key="resample"/>
    <node key="equalizer"/>
    <node key="channels"/>
    <node key="volume"/>
    <node key="surround"/>
    <node key="compressor"/>
    <node key="delay"/>
    <node key="extraStereo"/>
    <node key="extra"/>
    <node key="shibatch"/>
  </node>
  <node key="videofilter">
    <node key="scale">
      <node key="enabled">
        <value>true</value>
      </node>
      <node key="width">
        <value>352</value>
      </node>
      <node key="height">
        <value>288</value>
      </node>
    </node>
    <node key="crop"/>
    <node key="expand"/>
    <node key="frame"/>
    <node key="eq"/>
    <node key="postproc"/>
    <node key="rotate"/>
    <node key="itf"/>
    <node key="denoise"/>
    <node key="unsharp"/>
    <node key="delogo"/>
    <node key="screenshot"/>
    <node key="thumb"/>
    <node key="extra"/>
  </node>
</MediaCoderPrefs>

You can also download the file here: N800.xml

Jun 17

Real Security

No comment - Post a comment

Real Security is knowing when you’re being bamboozled.

Security Scissors

  • Welcome to systemBash, a technology and system administration blog by David Drager. If you enjoy this sort of content, can can subscribe to the RSS clicking on that big icon to the right.