Skip navigation

Tag Archives: Google Apps

If you administer a Google Apps domain, for education or otherwise, you really should be using GAM, the Google Apps Manager (and you should really be using it from a *nix or *nix-like environment). GAM is a command-line tool that lets you administer virtually any aspect of a Google Apps domain.

So why should you run it from *nix? Because awk. If you’ve ever had a big csv file that you needed to work with from the command-line and ended up writing a big old bash script that you probably weren’t going to use ever again, you’re in the target audience for awk. With awk, you can fire off beautiful *nix style one-liners like it ain’t no thing. You can pipe the output of other utilities through awk, or you can write awk scripts just like you’d write bash scripts (except the hash-bang at the start would read /usr/bin/awk rather than /bin/bash).

So, an example of the power of the two together:

I need to suspend a large group of users and move them to a different OU within my domain. All these users are currently in the same OU, so I can just dump all the info for the OU, grep for email addresses, and use awk to fire gam for each user found. In bash-land, this would probably mean dumping the users into a csv, then writing a script and passing in that csv. That’s a lot of work. in awk-land, though, it’s just one line:

gam info org /name/of/ou/containing/users/to/modify | grep @domain.tld | awk '{system("python /path/to/ update user " $1 " org /name/of/new/ou suspended on")}'

That’s it.

You can learn about awk here.

We recently deployed a new cart containing 20 of Samsung’s new $250 Chromebook.  If you haven’t been able to get your hands on one of these new machines, let me just say that they’re really quite nice, especially for the price.  Yes, the build-quality is a bit, well, plastic-y, but what can you really ask of a machine that costs that little?  We’re a Google Apps campus, so Chromebooks are a great choice for a lot of things, and if we need some software that doesn’t run on them, we have other laptop carts.

A day or so after we first deployed the cart, though, we ran into a pretty major (but avoidable) hiccup–they were killing our network.  Some students were able to log in but unable to get to the site they needed, while others weren’t even able to log in.  Worse, students with their own laptops were also unable to get online, or their connection speeds were about what you would expect if you dialed into AOL with your Pentium 2 PC.

Why did this happen, and how can it be avoided in the future, you ask?

These machines shipped with Chrome OS version 23-point-something, and the current production release of Chrome OS is 25-point-something.  The machines also needed a firmware update.  This accounted for something on the order of 300MB of data that each machine needed to pull down.  That would kill just about any AP.  While our machines are enterprise-enrolled and thus had gone on the network at least once before they were first used in class in order to get them enrolled in our domain, none of them had been online for more than 30 seconds.  In our domain management dashboard, we were able to set our machines to scatter automatic updates over a period of days to prevent this problem from recurring (the available range is 1-14 days), but, as a preventative measure before we did this, we pulled out the new machines two or three at a time and forced them to update.

As of this writing, I have received reports of 16 of the 20 Chromebooks being used at the same time by a class with no abnormal slowdowns in the network.

I must acknowledge the help and advice offered by members of the Chromium OS dev team who came to our aid quickly and helped us solve this issue in an afternoon.