Aug 152014
 

CGP Grey has posted a 15 minute video which gives an excellent overview of current and future automation, and the potentially brutal disruption it will have to on our societies. Technological Unemployment is not a new concept, but the prospect of blue and white collar worker replacement is becoming more real:

The Economist also has a good take on the topic as well: The onrushing wave – Previous technological innovation has always delivered more long-run employment, not less. But things can change..

… technical change is increasingly taking the form of “capital that effectively substitutes for labour”. There may be a lot more for such capital to do in the near future. A 2013 paper by Carl Benedikt Frey and Michael Osborne, of the University of Oxford, argued that jobs are at high risk of being automated in 47% of the occupational categories into which work is customarily sorted. That includes accountancy, legal work, technical writing and a lot of other white-collar occupations.

Answering the question of whether such automation could lead to prolonged pain for workers means taking a close look at past experience, theory and technological trends. The picture suggested by this evidence is a complex one. It is also more worrying than many economists and politicians have been prepared to admit.

Jul 242014
 

Looking north along the Lost Coast

Hikers on the Loast Coast Trail

Sandy dunes

Anna walking through wildflowers

Punta Gorda Lighthouse

Giant redwood

We have driven through Northern California on road trips before, but have never made the trek to what is known as the Lost Coast. The Lost Coast is a remote area of Northern California which has stayed very remote and undeveloped due to the considerable expense to bring infrastructure into the area as well as the low population (and depopulation during the 30′s, see wikipedia for more). We had the opportunity to spend a few days in the Petrolia area due to the invitation by a friend to stay at their familly cabin.

I can understand why there is a certain romance about the Lost Coast – it is gorgeous, and a glimpse into the past of what California was like many years ago. It attracts a certain type of person to live there year round, and is one of the few places in California where you will find a lot of road signs which have been used as target practice or the smell of skunky weed gardens wafting over high fences.

We hiked the beach route to the remote (and long since decommissioned) Punta Gorda Lighthouse. We had gorgeous weather and enjoyed some beautiful scenery on our hike, which was one of the more picturesque hikes I’ve ever done. A word of warning, however, the distance listed for the hike is deceiving. This is because a good portion of the hike takes place on sandy ground or dunes, which takes a significant amount of energy to walk on compared to a regular path. Rest assured, the effort is worth it.

Photos from The Lost Coast, Humboldt, California Gallery link
Photos from The Lost Coast, Humboldt, California Flickr link

Jun 122014
 

We hadn’t planned the timing of our visit to Monument Valley, but it turned out to be a perfect day. As the sun went down the valley turned a gentle pink and the full moon rose between the two mittens. The moon rise perfectly matched the sunset colors and we were treated to one of the best evening views imaginable.

Long shadows on the mittens Monument Valley sunset and moon rise between the West and East mittens

We relaxed, watched the stars, and then got up early to watch the sunrise. The sunrise was beautiful as well, and cast a different light on everything. After a quick breakfast we ventured out with a Navajo guide around the valley floor. Along the way we heard stories about the different areas, heard our guide play the flute, and saw unique sights like the Eye of the Sun petroglyph wall. I was worried it would all be a bit clichéd given the number of visitors, but it was genuine and memorable.

Sunrise over Monument Valley Cowboy photo op and Monument Valley's Three Sisters Monument Valley arch - Ear of the Wind

After exploring the valley some more we headed back to Page, AZ and signed up for one of the Antelope Canyon tours. The canyon is one of the most famous examples of a slot canyon and has been photographed countless times. The canyon is on Navajo land and as such we had a Navajo guide for our tour. The tour started with a back breaking ride through a dry creek bed to reach the entrance of the canyon, thankfully only a 15 minute drive or so. We were lucky to be the only group at that time in the canyon (it can be packed full of photographers) and were able to take our time to explore the beautiful bends and shapes.

Looking up through Antelope Canyon Antelope Canyon Horseshoe Bend

After exploring Antelope Canyon, we visited Horseshoe Bend and continued our way home via Sedona, AZ. The full photo albums for Monument Valley and Antelope Canyon can be found here:

Photos of Monument Valley and Antelope Canyon – chrisnelson.ca
Photos of Monument Valley and Antelope Canyon – flickr.com

As part of our road trip around the southwest we visited Bryce Canyon National Park and Zion National Park.

Jun 072014
 

I’ve been using Vera and Z-wave for a number of years as my home automation solution. As I previously posted, Home Automation: Motion sensors and lights with VERA scenes (micasaverde z-wave), sometimes the Vera system requires some workarounds with smart switches or timers in order to accomplish logic tasks for scenes. This can get quickly convoluted when you have complex logic involved or multiple schedules.

For Vera you typically need to learn to write Lua code for more complex actions, however there is a plugin which makes it easy to do in a mostly point and click operation – Program Logic Event Generator (PLEG) from RTS Services. This plugin is free for use up to 30 days, and a full license is a very reasonable $5.50.

InstallApps

The first step is to install the PLEG plugin in your Vera system. In this case there are actually two plugins which need to be installed, the Program Logic Event Generator Plugin and the Program Logic Core Plugin. After installing the plugins, refresh your browser window. By default, PLEG will install a new device named “Program Logic Event Generator”. Edit that device to start using an instance of the plugin (multiple instances can be added for different tasks).

Program logic event generator

PLEG first allows users to set the Inputs for a system. The inputs could be a trigger, schedule, or some element of device properties (e.g. dimmer level). One of the powerful things about PLEG is that it lets you configure a window of time for a scheduled, start and stop values. This sounds simple, but this functionality is not easily available in the default Vera interface. In my example, I have two triggers, one is a schedule from 11 PM until 30 minutes before sunrise, and the other is a tripped motion sensor which has been armed. One thing to note about names – Logic used in the next step uses the names previously saved for triggers, schedules, or properties in free text (no point and click), so it helps to use descriptive names.

PLEG triggers

PLEG schedules

After inputs come Conditions. Conditions are the logic lines which need to be followed for a specific action. Each line must evaluate to true in order to fire the Condition Name (also the Action). In my example, the LightsOn action will trigger only if ArmedSensorTripped and From2300toDawn are both true. For LightsOff, the action will fire when 20 minutes has passed since the LightsOn condition was fired. My example only has two different states, but several can be used here.

PLEG conditions

After Conditions have been defined, Actions can be associated to each. The UI behavoir here takes a little getting used to – when the Edit button is selected for a Condition, the PLEG interface will go away, and will be replaced with a devices list. After selecting the device actions (in my case turning two lights on or off) select the FINISHED button at the top of the screen to go back to the plugin.

PLEG action

PLEG actions

Once finished with Actions the new plugin logic is ready to go, after saving the settings in Vera. My example is quite simple, but there are many other ways to make use of this powerful plugin. There are some good examples on the RTS page here: PLEG Usage and a message board here with some examples & troubleshooting posts: MiCasaVerde Program Logic Plugins.

May 302014
 

I recently had a chance to catch up on some of my backlog of podcasts, including some of Dan Carlin’s Common Sense and Hardcore History. The most recent episode of Common Sense is named “Show 275 – The Specter of Dissent” and is a bit of a combination of history and current events commentary. Dan can be sensationalist, slow to get started, and slow to finish on a topic, but I think for this item the format is warranted.

He spends time going over the history of radicalization and protest in the US and how it relates to our current situation as described in some of the revelations from Edward Snowden and Glen Greenwald. In fact, but much of the podcast seems to be prompted by one of Greenwald’s stories earlier this month – “Glenn Greenwald: from Martin Luther King to Anonymous, the state targets dissenters not just “bad guys“. Policies and procedures raised from the article are throw-back to red scares and Hoover era:

Among the information collected about the individuals, at least one of whom is a “US person”, are details of their online sex activities and “online promiscuity” – the porn sites they visit and surreptitious sex chats with women who are not their wives. The agency discusses ways to exploit this information to destroy their reputations and credibility.

… Another slide describes the tactics used to “discredit a target”. These include “set up a honeytrap”, “change their photos on social networking sites”, “write a blog purporting to be one of their victims” and “email/text their colleagues, neighbours, friends, etc”. In accompanying notes, GCHQ explains that the “honeytrap” – an old cold war tactic involving using attractive women to lure male targets into compromising, discrediting situations – has been updated for the digital age: now a target is lured to a compromising site or online encounter. The comment added: “a great option. Very successful when it works.” Similarly, traditional methods of group infiltration are now accomplished online.

As Dan points out, perhaps these tactics are approved by the majority of Americans when used against our enemies. However, what is also increasing becoming apparent is that the net of “enemies” includes extremely broad definitions:

The NSA explicitly states that none of the targeted individuals is a member of a terrorist organisation or involved in any terror plots. Instead, their crime is the views they express, which are deemed “radical”, a term that warrants pervasive surveillance and destructive campaigns to “exploit vulnerabilities”.
…These incidents were not aberrations of the era. During the Bush years, for example, documents obtained by the American Civil Liberties Union (ACLU) revealed, as the group put it in 2006, “new details of Pentagon surveillance of Americans opposed to the Iraq war, including Quakers and student groups”. The Pentagon was “keeping tabs on non-violent protesters by collecting information and storing it in a military anti-terrorism database”.

This is a very disturbing revelation. The evidence seems to suggest that the net of suspicion is cast on domestic dissent – anyone who challenges the administration and status quo. This is extremely bad for the health of our system. As Greenwald puts it:

“… the implicit bargain that is offered to citizens: pose no challenge and you have nothing to worry about. Mind your own business, and support or at least tolerate what we do, and you’ll be fine. Put differently, you must refrain from provoking the authority that wields surveillance powers if you wish to be deemed free of wrongdoing.”

I highly recommend both Greenwald’s article and Dan Carlin’s podcast episode for some thought provoking content.

May 222014
 

Adobe recently released Lightroom Mobile, their tablet integration efforts for Lightroom desktops. In order to try the software for 30 days you need to be running Lightroom 5, going beyond that will require a Creative Cloud subscription (min version being Photoshop & Lightroom CC @ $10/month).

I was curious to see how well this would work, as Lightroom is a desktop heavy application focused on very large files & workflows. Thus far, only collections (and not smart collections) can be synchronized by selecting the Sync Collection icon which is available after signing in with an Adobe ID. After a collection has been set to synchronize, Lightroom begins to upload metadata and smaller versions of the images to their cloud. For my case I created three separate albums, and roughly 1k total RAW images in my Lightroom collection to synchronize. Once started the sync took about 30 minutes, which seems reasonable given the amount of data to upload.

After signing into the iPad app for Lightroom Mobile, it began to download the collections which had been uploaded. This seemed to go at about the same speed as the upload, and was completed roughly a half hour later.

Lightroom Mobile

After the collections have been synchronized, they are ready to be used. On first opening a collection you will see all photos available in a grid view.

Lightroom Mobile grid view

After selecting a photo, an initial low resolution version of the photo will be displayed, along with a spinning swirl to indicate the application is still working. After a variable amount of time (times seem to range from 3-10 seconds on my iPad 3) the image is displayed in a higher resolution format, and other details like ISO, f stop, and shutter are displayed. Adobe notes that older iPads such as mine have poor performance for this step compared with newer ones. The time to open files seemed to go down as it built an internal cache, so it may be one of those cases were opening an album and leaving it for a bit will improve overall performance.

Lightroom Mobile detail view

The photo can also be edited using some of the simple controls in Lightroom. Given the smaller screen and potentially questionable color representation (though Apple is better than most at this), this is probably more of a rough starting point for editing rather than a finishing touch.

Lightroom Mobile edit photo

Ultimately for me, the most useful feature of the app is swipe up and down to flag or un-flag photos for quick editing of a group of photos. Unfortunately there is not currently any ability to see or edit meta data elements like captions, tags, or other elements. This is sorely lacking. Updating meta data can be one of the more time consuming and bothersome parts of photography, and having the ability to add or edit when I have some downtime would be a nice addition. Until then, $10/m for mobile functionality (as I already own the desktop version of Lightroom) doesn’t quite make sense.

Apr 222014
 

What is Monit?

The simplest way of describing the value Monit is that it is a powerful monitoring tool, which can take action in the event of failures or alerts. Monit is able to keep an eye on processes, files (size, permissions, checksum), the system (CPU, RAM, Load), as well as protocols (HTTP, FTP, SMTP, SSH, etc). If any of the monitored items change in specific ways, Monit can spring into action with an alert, run separate programs, or attempt to correct the problem with a prescribed action (e.g. restart a service).

Monit web interface

How do I install Monit?

Installing Monit is fairly easy these days, as the majority of Linux repositories include the package. If you were running Ubuntu, you could issue the following command to install the package:

If you were running Redhat/CentOS, you could issue the following command to install the package:

How do I configure Monit?

After Monit has been installed, all configuration changes can be made via the monitrc file via text editor, in this case I’m using vi. Note that all of the paths for pid files and other items in my examples are for Ubuntu – you may need to do some edits if you are on a different version of Linux.

Once the file has been loaded in the text editor, you will see that there are already a number of options set (e.g. Monit is set to check every 2 minutes by default) in addition to a number of items which are commented out. For this example I’m not changing any of the default values, and you can move to the bottom of the file and begin adding new entries to be monitored by Monit.

Add email notification

First I will configure Monit to use a the local system as the default email server, set the format of the alert/status emails to be delivered, and the email address I want email alerts to go to. If you are able to, it is best to setup an alias email address to use for monitoring (e.g. monitoring@yourdomain.com), that way you can easily add additional rules or filters for your email based on the email address.

Add the Monit web interface

Monit has a nice web interface included, but is disabled by default. One important thing to note – the web interface allows the user to start, stop, and restart monitored services, as well as make monitoring changes. As such, I highly recommend using an extremely long and complex password in addition to a non standard user name for the account specified in this step to enable the web interface (format: allow accountname:password). It may also be in your best interest to limit the port used (2812 in this example) via firewall to your own IP address.

Monitor disk usage

Monit has the ability to monitor disk usage for a system, in addition to specific files. In this case, the monitor has been configured to watch the free space available on the /dev/vda drive, and send an alert if it is 95% full. The group tag seen in this example is used to organize different monitors, it doesn’t impact the usage in any way.

Monitor system load

Monit can also monitor the host system’s load – in this case sending an alert if the load average over the course of 5 minutes is larger than 3.

Monitor MySQL

In this example, Monit is monitoring MySQL in two different ways. The first way is via the specified pid file – Monit is reading that file, determining the process id, and then keeping an eye on that process on the system. The second way is via service testing – Monit is checking that MySQL has port 3306 open with the mysql specific protocol (it supports a number of options). If the process fails either of those monitoring checks, then the stop & start program scripts are run, restarting MySQL.

Monitor SSH

In this example Monit is checking the SSH daemon via pid and SSH protocol service response.

Monitor Apache2

In this example, the Apache web server is being checked four different ways. The first two have already been shown in previous examples, monitoring via pid and service protocol (in this case http). However, just because the Apache webserver is running doesn’t mean it is properly serving files. In this example, Monit is asking for a specific URL, “/monit/token” from the web server to verify it is able to serve static content. Monit is also keeping an eye of the cpu usage of this process – it is alerting when CPU usage is high, but it could also restart the service on extended CPU usage if desired.

One thing to note about the above monitor – it will fail unless the Apache web server serves back a monitor token file – we need to create that file for the web server to use first:

Monitor crashplan backup service

I’m a fan of CrashPlan and I use it on all of my machines, including my servers. However, I’ve found that the CrashPlan backup engine can be unstable on some Linux distros when on a server with limited memory, so I’ve always added it as a monitored service to keep an eye on it and restart it if it shuts down:

Implement the Monit changes

After making changes to the Monit configuration file, save it and have Monit reload to see the changes. If you are not sure if the Monit service is not already running (e.g. it is a new install), then the following command can be used:

If Monit is already running, then you can just tell it to reload the configuration file:

Hopefully this introduction is enough to get your creative monitoring juices flowing. There are lots of other examples for monitoring different things using Monit, and the platform is flexible enough that it can almost do anything you need.