Archive for June, 2010

10 June, 2010

OSBridge 2010 Braindump

by gorthx

Conference website: http://opensourcebridge.org/ Many of the sessions have user-submitted notes; check the “session notes” link from the session info box on the upper right side of each session’s page.

Year 2 of OSBridge was almost as good as Year 1. I say almost, because I spent Monday (my first day off, completely to myself, in a loooong time) laid up with a nasty cold, and completely missed Tuesday, the first day of the conference. Bummer, because I was really looking forward to another installment of Hal Pomeranz’s Command Line Kung Fu . I’d caught this talk up at LFNW and it was truly excellent.

Wednesday

I arrived most of the way through The Rise of Hackerspaces (Leigh Honeywell), just in time to hear about chalkboard paint. How have I not known about this? More importantly, is there whiteboard paint? Oh yes, yes, there is. Leigh’s book recommendation: _Python for Software Design_: a good intro to programming concepts that just happens to use Python to illustrate.

Next, I participated in the Organizing User Groups panel. Eric Wilhelm briefly mentioned t-shirts, but I didn’t get the opportunity to thank him in public for ordering women’s versions of the pdx.pm t-shirts (twice!). Apparently there is a Drupal UG here in Portland, but they don’t advertise. We talked about ways to publicize groups, all-ages post-meeting activities, and presentation ideas. Sam Keen reports that having a few shorter talks instead of one long one is working well for PDXPHP.

The silliness of the compression algorithm and the overall entertainment value of Markus Roberts’ talk (Copyright Lawyers Can Goedel) both lived up to the high expectations I have for him.

chromatic’s Using Modern Perl made me want to try it out. You can

use Modern::Perl;

and have access to 5.10 features and (soon) 5.12 features, such as say, the ‘//’ operator, and named captures.

Best idea I got from this talk: put your module library in git, so if you upgrade something & it breaks, it’s super-easy to revert back to a working copy.

chromatic’s book is available on github, and he wants us to read it.

Schwern How to Report a Bug: I was disappointed that we didn’t get to see Schwern’s “REPENT! For the end of the UNIX Epoch is Nigh!” (I hear it’s showing at OSCON) but I will take this as a substitute. The basic premise is: it’s about empowering your users. There are a lot of gates (or filters, use your preferred terminology) in place to keep people from filing bugs. I ran into this a mere two days later, trying to file a bug report about pgadmin.

I skipped the last session so I could get dinner at the food carts & get back in time for Move Your Asana. We did this last year, and it’s a great way to do a quick decompression mid-conference.

Next up was the PostgreSQL BoF. Most of what we talked about was 9.0 – beta2 is coming out next week. (It actually came out June 4.)

Thursday

I had to work in the morning, and showed up for the afternoon sessions. I dropped in on Christof Pettus’s Introduction to PostgreSQL, because I’m planning to give a similar talk at LFNW next year. I have a pretty good idea what I want to cover, but figured I should make sure there wasn’t anything big I was missing. 45 minutes is only long enough for the briefest overview, but Christof covered it well, including some gotchas.

Next up, Jacinta Richardson’s Teach Your Class to Fish. This was geared more toward people giving multi-day intensive training sessions, but there’s good material that applies even to shorter one-day sessions. Like, be organized. I learned some new terms (eg “cognitive load”). Jacinta also stressed that it’s really important for students to take breaks – the kind where they actually leave the classroom & walk around. People who fall behind & try to catch up during lunch tend to fall even further behind. Put the most essential topics at the start of the day, because that’s when people are paying the most attention; save the easy topics for the end.

In You Shall Not Pass, Amye Scavarda and Chris Strahl talked about managing client expectations. I’m not a freelancer, but any lesson in boundary-setting is applicable to most work situations IMO. “If it’s not documented, it doesn’t exist” is a good rule of thumb to follow.

Paul “not a stalker; just a very nice man, who knows an awful lot about you” Fenwick taught us Practical Facebook Stalking. See the session notes & Paul’s blog for tips on tightening up your FB settings.

The Code-n-Splode BoF that night was basically a meet & greet and discussion of some things from the conference.

Friday

Voodoo donut truck! Woohoo! I ate too many donuts.

Went to Lance’s ShowOff presentation. I may try it…Mark Wong keep making me use Beamer for our presentations, which I guess is cool, but the layout gives me fits sometimes. I really like ShowOff’s syntax highlighting.

During the next session & into lunch (before I ran down to my favorite cart, the Whole Bowl), I worked on Maryanne’s Postgres install – got her logged in, and got her up to speed with the basic SQL to create & fill tables.

I’d intended to go home, but a couple of the after lunch sessions were just too juicy: Selena & Bart’s Advanced Trolling, followed by Audrey’s NSFW. You really Had to Be There ™ to fully experience these.

9 June, 2010

das keyboard

by gorthx

My beloved and yet much-abused Model M keyboard has been on its last legs (or springs) for a while now. I really need that esc key, and the left bracket, and the space bar, and the letter “m”, and so on…knowing my love for the clickety-clack, a friend recommended I replace it with one of these.

It is indeed very clicky, but it’s more of a light ticking sound than a deep thud like the M. You’ll wake up somebody in the next room, but not the neighbors. Unlike the M, it will not double as a personal defense device. But whooo boy, can I type fast, fast, fast on this thing. Sorta like driving a sports car for the first time, when the rear end cuts loose going around the corners.

Bonus: no markings on the keys means other people are afraid to use your computer.

Bottom line: I would definitely purchase one of these again. (But I sure hope it lasts over a decade like my M.)

8 June, 2010

Using rrdgraph’s –right-axis options

by gorthx

Update 16 Jan 2013: I just noticed this post is one of my most-viewed. Unfortunately, when I moved it to wordpress, I lost the images that go with it. I’m planning to create new ones, but will have to create some data for it, as I’m no longer working as a network admin. The examples should still work, though, and if you have access to .rrd files, you can try them out for yourself – just adjust the DSes yourself.


(Note: This is a very simplified (but real-life!) example. Usually we’ll include the “in” data on the same graph, and Errors and QueueDrops etc, but that clutters up the example.)

So, say we have an interface that’s dropping packets. Not too many, but the ideal number is zero, so we’d like to see them in the graphs in our NMS (which is based on rrdtool as all decent NMSes are). We use rrdgraph to show packets out in black and packets that should have gone out, but were discarded instead, in purple:

rrdtool graph images/router-errors-unscaled.png
--title "unscaled"
--vertical-label 'Pkts/Second'
--start end-2day
--end -1hr
--width 800
--height 250
--imgformat PNG
--interlace
DEF:ifOutUcastPkts=router.rrd:ifOutUcastPkts:AVERAGE
DEF:ifOutNUcastPkts=router.rrd:ifOutNUcastPkts:AVERAGE
DEF:ifOutDiscards=router.rrd:ifOutDiscards:AVERAGE
CDEF:ifOutPkts=ifOutUcastPkts,ifOutNUcastPkts,+
LINE1:ifOutPkts#003300:ifOutPkts/sec
LINE1:ifOutDiscards#990099:ifOutDiscards/sec\n
GPRINT:ifOutPkts:AVERAGE:"Avg ifOutPkts %1.2lf\n"
GPRINT:ifOutDiscards:MAX:"Max ifOutDiscards %1.2lf"

That produces a graph like this:

unscaled example graph

(Click on the thumbnails to get the full graphs.)

We can read the average rate of discarded packets in the graph key at the bottom, and there are tiny little blips in the purple line that represents discards , but we don’t have a strong visual cue that something is off.

One possible solution is to scale up the discard values relative to the total packets. A factor of 100 ought to do it. Then we’ll use the –right-axis options to rrdgraph to label the right-hand y-axis accordingly.

We add this CDEF to provide the scaling (the LINE1 etc commands will need to be altered accordingly; you’ll see those in the final snippet):

CDEF:scaled_ifOutDiscards=ifOutDiscards,100,*

That gives us a graph that looks like this:

scaled example graph

Note that it now looks like we’re dropping up to 70 packets/second – we still have to read the stats in the key at the bottom of the graph. So let’s get the secondary y-axis correctly labeled & scaled, with the following commands:

--right-axis-label 'Discards/Second'
--right-axis 0.01:0

–right-axis-label prints the specified text along the right-hand axis.
–right-axis [scale:shift] scales and/or shifts the tickmarks on the right axis relative to the left axis. In this case, the new values we’re displaying are 100X the original values, so we need to scale our axis accordingly: 0.01. More simply: left/right = 1/100. We don’t need to start at a value other than 0, so we set the shift value to 0.

example graph with second y-axis

Hmmm…rrdtool has automatically converted our values to milli-units. (Note the lower-case m in the labels.) Let’s fix that with the –right-axis-format command:

--right-axis-format %1.1lf

example graph with second y-axis, formatted

And that’s all there is to it!

The final rrdgraph command looks like this:
rrdtool graph images/router-right-axis-format.png
--title "right-axis-format"
--vertical-label 'Pkts/Second'
--right-axis-label 'Discards/Second'
--right-axis 0.01:0
--right-axis-format %1.1lf
--start end-2day
--end -1hr
--width 800
--height 250
--imgformat PNG
--interlace
DEF:ifOutUcastPkts=router.rrd:ifOutUcastPkts:AVERAGE
DEF:ifOutNUcastPkts=router.rrd:ifOutNUcastPkts:AVERAGE
DEF:ifOutDiscards=router.rrd:ifOutDiscards:AVERAGE
CDEF:scaled_ifOutDiscards=ifOutDiscards,100,*
CDEF:ifOutPkts=ifOutUcastPkts,ifOutNUcastPkts,+
LINE1:ifOutPkts#003300:ifOutPkts/sec
LINE1:scaled_ifOutDiscards#990099:ifOutDiscards/sec\n
GPRINT:ifOutPkts:AVERAGE:"Avg ifOutPkts %1.2lf\n"
GPRINT:ifOutDiscards:MAX:"Max ifOutDiscards %1.2lf"