Snow Storm Effect On Traffic

Tuesday afternoon a bit of snow hit Georgia. We get them occasionally even down here in the southern United States. Usually they hit the mountains. Everywhere else, we just shut down for a few days. Unfortunately, we do not have all of our Atlanta schools on one system or all of our south Georgia schools on one system. Each system has some of each.

These graphs for current connections (application servers to database so an inference to end users) to Desire2Learn do tell these stories:

  1. Some Atlanta universities shut down around noon. Just before noon and moving quickly down, we had fewer and fewer users.
  2. While campuses were closed, some faculty kept their due dates and had students turn in work via Desire2Learn.
  3. Wednesday was a delayed opening for several campuses, so the first peak of the day was around 4pm instead of the normal 11am.
  4. Based on Twitter rumblings a bit of our traffic were students checking to see whether or not class was canceled.

My conclusion is we kept 60-70% of our normal traffic while around 75% of our campus user base was closed.

We will have fully made it when these closing cause our numbers to go higher than normal because when they get home they come into our system to keep working.

Snowstorm Q Site
Snowstorm Q Site
Snowstorm X Site
Snowstorm X Site

P.S. If we had gone with the desired technical architecture of a database/application stack dedicated to each school, then I could show these numbers per school not just per site.

Leading Zeros In A Batch Timestamp

As “plumbers” for 17 databases and over a hundred application servers, we really do not have the time to sit there and watch them all. We design things so problems are pushed up to our attention. We are still getting point of predictive alerts to failures like we were on RHEL/Weblogic/Oracle, so usually we only get an alert after the failure.

The lack of a log for a component means when it fails, we know nothing of why. In this case the vendor setup the component and wants to know why it failed even though they did not set it up to collect any information. Playing with this component manually I noticed it sends information to the screen, so I wrote my own wrapper script to capture this information.

First stab at it used the vendor’s timestamp method:

SET mydate=%date:~10%_%date:~4,2%_%date:~7,2%
SET mytime=%time:~0,2%_%time:~3,2%

These values were plugged into other variables for the log names so I get a log for each run. (standard out log and standard error log)

The afternoon I worked on this script appeared to have no problems. The script was scheduled for the morning which is when the vendor had it run. Review of those logs showed instead of being “name_2014_01_23_04_51.log,” I got “name_2014_01_23_.” It was clear it broke on the hour. So I ran:

echo %time%

This returned a time with a leading space instead of a leading zero. That seemed strange. So I started Googling. Turns out this is a very common problem. The solution I chose came from Need leading zero for batch script using %time% variable.

:prepare time stamp
set year=%date:~10,4%
set month=%date:~4,2%
set day=%date:~7,2%
set hour=%time:~0,2%
:replace leading space with 0 for hours < 10
if “%hour:~0,1%” == ” ” set hour=0%hour:~1,1%
set minute=%time:~3,2%
set second=%time:~6,2%
set timeStamp=%year%_%month%_%day%_%hour%_%minute%_%second%

Uglier. Though, it did remind me to use the call command to put this logic into a another script file so I can easily re-use it for another script I will inevitably need to write.

And how I much prefer Powershell or batch scripts.

P.S. I left out the first solution was to put the log file names in double quotes. This is a common way to deal spaces in Windows file names. That was in no way satisfactory to me. It more just confirmed the problem. So I went Googling.

Review: Starship Troopers

Starship Troopers
Starship Troopers by Robert A. Heinlein
My rating: 4 of 5 stars

The movie was satire of the book, right? The movie was campy (and as a woman told me just a reason to show boobs). The book reveals nuggets of insights about human nature within organizations. While I enjoyed both, I appreciate the book more than I thought I would. And I will enjoy future viewings of the movie less.

View all my reviews

Review: An Army of Davids: How Markets and Technology Empower Ordinary People to Beat Big Media, Big Government, and Other Goliaths

An Army of Davids: How Markets and Technology Empower Ordinary People to Beat Big Media, Big Government, and Other Goliaths
An Army of Davids: How Markets and Technology Empower Ordinary People to Beat Big Media, Big Government, and Other Goliaths by Glenn Reynolds
My rating: 2 of 5 stars

On page 36 there is a quote about Athens, GA where I live about a wireless network downtown anyone can use. When I first moved here, there was something like this, but I had to have a university account to make use of it. Also, I did not recognize Blue Sky Coffee, the coffee shop mentioned. So I looked up the article quoted, “Urban Renewal: The Wireless Way” and the coffee shop. Blue Sky Coffee closed less than a month after the article mentioned it. The wireless network four years later.

The Blue Sky Coffee closure should have been pretty obvious to the author or editor. Except that I lived in the city mentioned, I would have not stumbled on it. Because I did, everything else suffered a more skeptical analysis. And there was plenty of cherry picked examples with just dismissive mentions of counter evidence. So even though for the most part I agree with the conclusions, I was disappointed with how we arrived there.

The worst part is the predictions. Authors really should stay away from them unless they can ensure the writing will not be read after the predicted event.

View all my reviews

Review: I Am Malala: The Girl Who Stood Up for Education and Was Shot by the Taliban

I Am Malala: The Girl Who Stood Up for Education and Was Shot by the Taliban
I Am Malala: The Girl Who Stood Up for Education and Was Shot by the Taliban by Malala Yousafzai
My rating: 4 of 5 stars

A memoir about growing up as a young girl in Swat of Pakistan. She explains life there both before and during Taliban involvement.

I vaguely recall the news about her getting shot. Hillary Clinton was Secretary of State and commented on the importance of education for girls. Baha’is emphasize such, so those quotes circulated. Malala was involved in this education for girls work a long time prior to the attack. She could have become a martyr, but instead she survived and only increased in global popularity.

Several people saw the title on the hardcover book without the dust jacket and from just her name recognized it. They wanted to know more about the book and her story. I was happy to talk to them.

View all my reviews

SQL Server Alias Naming Breaks Convert Function

The vendor installs the application which includes creating the database and schema (SQL Server 2008 R2). The schema defined a certain column as varchar(128) that the application code expects to return an integer. If one of the entries for a client is a non-integer value, then HTTP 500 Internal Server Error failures prevent users from being able to login to the web site. The fix is relatively easy: update the problem value to an integer that is not already in use. This SQL returns “9999” even though the highest value is “12467” because the rules for sorting varchar are different than the int data type.

SELECT TOP 1 IdNum FROM table1 ORDER BY IdNum desc

No biggie, just convert it to an int.

SELECT TOP 1 CONVERT(int, IdNum) as IdNum FROM table1 ORDER BY IdNum desc

This works fine. The strangeness comes into play when the aliasing “as IdNum” uses anything other than the actual name of the column. I originally tried to rename it to compare to the first query so in my output I could compare both. If the alias is different from the column name, then the CONVERT gives in the varchar sorting result not the int as specified. These all fail.

SELECT TOP 1 CONVERT(int, IdNum) as IdNumConverted FROM table1 ORDER BY IdNum desc

SELECT TOP 1 CONVERT(int, IdNum) “IdNum2” FROM table1 ORDER BY IdNum desc

The CAST function behaves the same way. Something about the alias name appears able to break these conversions.

Removing “TOP 1” does not fix the behavior.

Lost Weight

I suspect people are just being nice when they ask if I have lost weight. A normal person wants to and feels pleased when others notice. So it is a safe thing to ask.

Except I do the mental calculations of when was the last time I saw the person, where I was on the belts last seeing them, where I was on the belts next seeing them, and want intensely to call them out for being wrong. Even a small loss I want to count as not having lost weight. From 2007 to 2012, my typical pattern was to hit a peak weight around October and bottom out in March. Basically, in the Georgia summer heat I say inside for the air conditioning and do more walking around in the winter. But people assume the opposite since normal people are more active in the summer.

Since 2013 was cooler, I ended up being a little more active. So I fell out of the normal pattern and did not gain as much as normal. As a result, I have tried to be more accepting of these compliments. Still, it is tough.

Last night I bought a scale. So maybe I can have a more accurate measure than holes in my belts.

Resolutions 2014

Good resolutions are useless attempts to interfere with scientific laws. Their origin is pure vanity. Their result is absolutely nil. — Lord Henry in The Picture of Dorian Gray by Oscar Wilde

  1. Read 52 books. Yeah, I know. In 2011, 2012, and 2013, I read more than this. I like the number because it is a book a week. And ends up being about 20,000 pages each year.
    • Think another stipulation is at least 30 need to be physical books I already own. Not to knock the Kindle, but I have been on a buying spree of public domain (aka free) books because of it. I have at least ten maybe fifteen linear feet of unread books, so I need to make a significant dent in that.
  2. Ride 10 miles a week April to October. I do not even own a bike at this point, so this means figuring out some things. I’m figuring buy a bike by March and averaging 10 miles a week for half a year is a reasonable start.
  3. Declutter. Maybe take this a month at a time. Bedroom1, bedroom closet 1, living room, bedroom2, bedroom closet 2, dining room, kitchen, laptop, 1TB external drive, 1.5TB ext drive.
  4. Take a trip 300 miles away from home. Work conference does not count. It might be to visit family, but the distance ensures my home town does not count.

As usual, I am going to shy away from things like dieting, cooking, or joining a gym which I know are so counter to my habits they are pointless. Gives me an idea for tomorrow’s post.

Old resolutions: 2013, 2012201120102009.