-
Mt. Redoubt explodes
Posted on March 30th, 2009 No commentsI live 40 miles north of Anchorage. Lately Mt. Redoubt has been in a state of emotional turmoil. She’s been rumbling and acting all angry and scary and such since January. Every day at work I check into the Alaska Volcano Observatory website to check the status of this menace to society (or our little corner of it).
I am able to see the latest seismic activity and a 24 hour webicorder which replaces the old drums. Due to the fact that we’re a communications company for a majority of the state, but mostly for the south central region where Redoubt poses the greatest threat, we keep an eye on her status so we can dispatch appropriate personnel to deal with whatever equipment needs to be dealt with so our customers don’t lose their service. Especially when the ash flies, that stuff will get into everywhere for weeks or months afterward.
Well she blew on Sunday, March 22nd @ 10:38pm. On my shift as well. The wind blew south and northwest, keeping most of the ash away from most of civilization, with the exception of a couple small towns. Since then, she’s puffing ash clouds maybe a couple times a day.
After a few days of watching this, I decided to try out some scripting and my first cron job.
The Task
Seeing the RSAM activity on a regular basis, gave me an idea. Seeing that it was updated regularly, I thought it would be nice to capture that picture at a regular interval and save the filenames in a sequential name basis. These I could then import into Adobe After Effects to make
an animation of the seismic activity. It was successful, except the video did not turn out as good as I had hoped. The data is updated every 5 minutes and each line on the graphic is 30 minutes of data, so each updated had quite a bit of data and the video looked somewhat jumpy.The Script
#!/bin/bash/
y=`date +%Y%m%d%H%M`
wget http://volcanoes.usgs.gov/avo/webicorders/NCT24hr_heli.png
mv NCT24hr_heli.png /home/user/redoubt/$y.png
It took me a little while (being one of my first bash scripts) to figure out why I could not get the variable y to be assigned the format of YYYYMMDDhhmm (year, month, day, hour, minute). Then after some scouring the ‘net, I found that I was using regular single quotes, not the other single quotes that never get used. You know, the one with the tilde (~). Once I found that and used it, SUCCESS!!
So, from my script, we’ve got a variable assigned to the current date and time (to the minute) and then the next line downloads the graphic to the current directory. What directory? It doesn’t really matter, because we’re just going to move it to it’s own private location where it will be comforted by all it’s other friends. That’s where the last line comes in. We move it from the current directory to the new directory and give it a new name as well, one with the variable we created. So each file will be in succession and named according to whatever date & time it was when it was retrieved.
Next, I had to have this script run automatically, because I did not feel like staying up all night running this every 5 minutes. This is where the cron job comes into the scene. I had to read some documentation on crontab to get this working. Actually it was not too hard to figure out at all. I just had to create a text file that tells when to run, and what command to run. Then I get the cron job to read this file and all is well.
Right? Right!So, my text file reads as follows:
00,05,10,15,20,25,30,35,40,45,50,55 * * * * bash /home/lance/redoubt.scr
Wow, not so bad, right? Okay, the easy part is on the right. Basically it’s going to run the command there. I want BASH to execute my REDOUBT.SCR script. But what are all the numbers to the left? This diagram below helped alot.
* * * * * command to be executed
- – - - -
| | | | |
| | | | +—– day of week (0 – 6) (Sunday=0)
| | | +——- month (1 – 12)
| | +——— day of month (1 – 31)
| +———– hour (0 – 23)
+————- min (0 – 59)Starting from the left is the minute to run, the hour, day of the month, month, day of week. They are separated by spaces. Now if you see my cron job has commas separating the numbers, that’s due to the fact that I want it to run multiple times during the hour. If I could not set multiples, then I could only chose one time during the hour to run my cron job.
This is handy if you want a job to run on the 1st and 16th of each month, or maybe 3 days of the week. The possibilities are numerous. I wont say endless, because I know someone will prove me wrong on that one.
So to run this cron job, one needs to use crontab.
You can see what crons are currently running with crontab -l. You can remove crons with crontab -r. To set ours, we just used crontab cron.txt. After that I used the -l option to verify it was running. After a quick directory listing of the redoubt directory, it verified that my script was working.
Soon I had a plethora of png files and was able to create a short video. No, I’m not too proud of the video, but I am of successfully creating the script and cron job.
Next Try
Okay, so that worked. Next job was to extract the RSAM images, because they scroll from right
to left and are updated every 10 minutes and move 1 pixel for each update. This should provide a smoother video.So now I had to change my redoubt.scr file to extract a different image, so I changed:
wget http://volcanoes.usgs.gov/avo/webicorders/NCT24hr_heli.png
TO
wget http://volcanoes.usgs.gov/avo/rsam/REF_EHZ_AV_5avg.pngAnd the mv command had to reference the new saved image as well: mv REF_EHZ_AV_5avg.png /home/lance/redoubt/$y.png
Then I had to change my cron.txt file to run every 10 minutes: 00,10,20,30,40,50 * * * * bash /home/lance/redoubt.scr
After a couple of days of capturing, I was able to put it together into a much smoother video. Each peak on the graph represents an eruption. The first occurring at 10:38pm local time on the 22nd.
And so there it goes for my first set of scriptings and cron jobs. More to come as I have need, or attempt to create more advanced ones. 
-
The Goal
Posted on March 24th, 2009 No commentsHere is my goal.
Now keep in mind, if you’re working on your own network, mine is likely overkill for most, yet not enough for the more technically astute. However if your network is simple, there’s still information here that can be of benefit.
I have a Cisco 1811 router which I obtained as a used item, yet it’s still functional. This I will use to connect to the Internet via DSL and then ALL other devices will connect with it. This is a good thing because it is capable of doing a lot more than what a basic residential router can do. i.e. VLANs, GRE tunnelling, etc.
I do have the need for wireless connectivity for a Laptop, Nintendo Wii and a DS. For that I have a Linksys wireless router. Of course, be sure to enable the wireless security on your own wireless connections. A few years back I drove through a neighborhood with NetStumbler loaded on my laptop and within 10-15 minutes time had detected 80 or so wireless signals with 80% of them unsecured. The last thing you would want is someone doing something illegal on your internet connection because it will be linked back to your connection.
Also attached to my network (where the 8 switch ports on the Cisco1811 will come in handy) are 2 desktop computers, a printer and an XBOX. I have a spare computer which is going to come in handy with this project in that it will have Linux on it for running various servers. I have another old PC that will also have Linux on it as well. Your old computers can still be useful for something.
One of these Linux boxes will be an Apache server for serving up web pages from my network. I do not intend on running a domain from this, but rather just have a place for accessing files I might need remotely, or for sharing with friends and family. It will have any easy way to access the information, but will have a degree of separation from my network for security purposes.
The Linux box inside the network (VLAN 1) is going to have other services running.
Nagios is a good service for monitoring the status of the network. It can monitor the network connections of all the devices you need to keep your network operational. It could keep track of whether ALL devices are connected and on, but you would need to keep ALL devices powered on then. Otherwise it will show alot of downtime when the device is turned off, giving the impression that there’s a problem on your network. It can even e-mail you or in many instances text message you of any problems. You can also have it keep track of services running on your Linux servers, again notifying you of any trouble.
Cacti is another service that can monitor SNMP messages from your routers and servers, giving you a graphical display of things such as processor usage, memory, bandwidth of each interface, etc. (If you’re interested in that. I will be, so you can visit again at that time that I delve into it.)
Apache will need to be installed on this machine, due to the fact that both Nagios and Cacti provide details via web interface.
Squid Proxy Server is another server that hopefully I can get installed and working properly. I was successful a while back, but they have since changed things in the configuration, so I’ll be starting anew. A Proxy Server will cache web data when computers on your network visit sites on the Internet. So my more regular websites will be served faster since alot of the data won’t need to be downloaded from the Internet again but rather from my local Proxy and it’ll cut down on my bandwidth, due to the same reason. Since my ISP has a bandwidth cap, this may come in handy. We’ll see.
One more note on Squid, is the ability to setup a 3rd party service that creates a database which can be updated regularly that blocks web sites that you chose by category. Once Squid is setup and working, that will be the next task to tackle.
A Mail server is also in order for notifications.

As shown in the planned layout, the network will be divided into 2 VLANs where VLAN1 will have access to the server in VLAN 2, but VLAN 2 will not have access to VLAN 1, keeping out anyone who may try to compromise the server. This is where having a Cisco router/switch will be an asset.
If you’re curious about the device above the printer, that is a Network Attached Storage. It’s a great place to store files that you can then access from the other computers on the network. It stays on, therefore when you want to listen to an mp3 you have, you don’t have to make sure that the PC that has the mp3 file on it is turned on, you just need to access your NAS through your network. I may eventually move this service to the Linux server with an additional hard drive and create a file server on it instead.
Plans are subject to change as we go along. Every day it seems I find something else new and useful.
-
Technopotomus is born
Posted on March 17th, 2009 No commentsWhy Technopotomus?
One day I spent countless hours trying to find the right words to describe my domain name. It was a hard battle, as every time I found a word or combination of words, someone had already owned the domain name.
I was using a thesaurus to find even lesser used words. I was scouring the web for ancient artifacts or historical places that could have some relevance to what I wanted my site to be about. Places like the Walls of Babylon. As strong as those were for some time, they were breached overnight, therefore I did not want to have that associated with Network Security.
So as I was trying to work the word Tech/Techno/Compu into the name, even trying to marry one of them with an animal, I was finding that many others had the same idea over the past years and have secured them.
Although, many were taken, some were not in use. Some of these had no content, in fact were not really in existence on the web, but they were owned. Some for a later purpose, but some for profit. One of them was for sale for $7500. It wasn’t even all that great of a domain name. But I suppose if someone chose their business name first and then just HAD to have that name, they can haggle for it.
I did find another that was setup in 2002 and had not been updated since then. It actually just had links on it another domain name that had information regarding the wedding and reception of a couple.
So here we are. I did get to use one of my preferred suffixes and an animal (or part of one). Since Technopotomus rolls off the tongue as easily as Hippopotamus does I figured it was a decent choice.
You may notice it is misspelled, however the correctly spelled domain is . . . yes you guessed it. Taken!
Now regarding my mascot.
If any of you are familiar with Linux, you’ll notice resemblance to the mascot of that OS, Tux. It is no coincidence. Since I was going to be discussing a lot of Linux material here, I figured I’d give my technopotomus a familiar feel.




