Link:
https://dannyman.toldme.com/2005/09/01/new-orleans-livejournal/
Pointed to a fascinating blog from someone who is manning a Data Center in New Orleans. I haven’t been preoccupied with the disaster, and pretty good about focusing on work, but this is really interesting stuff.
Highlights:
- They’re still online. But are down to one carrier at the moment.
- Bell South is working on bringing lines back up.
- Looting is completely out of hand. Civilians and police.
- Civilians are firing at Police and Fire workers.
- New Orleans PD has no command and control.
- The Data Center has taken on diesel fuel to keep generators running.
- “Dead bodies everywhere: convention center, down camp street, all over.”
- Building management is still functioning, and has requested supplies from tenants, including ammunition.
Why are these people so uptight about staying online? Well, apparently the guy works for “Directnic” and the “NIC” implies that they control WHOIS and DNS information for a lot of domains that may have nothing to do with New Orleans. So, it is pretty critical that they stay online, if possible.
I saw some other chatter on IRC that national fuel rationing may come within a month due to the refining capacity that we have lost in the Gulf of Mexico. I take that with a grain of salt, but it is an interesting possibility. It sounds as if a lot of the nation’s oil is offloaded and then refined down there, and then transported throughout the Midwest and East . . . so, that doesn’t trouble me so much in California, but that doesn’t sound so great as you move East.
Update: “THE REAL MILITARY IS NOW FLOWING IN. National Guard is being replaced before our eyes. Watch the feed. Word is that the Marines are at 1515 Poydras where our OC4s are. I think we’re coming back online in force shortly.”
Also, BBC has some excellent coverage, particularly pictures. I find this one especially moving, whereas this guy ought to be target practice.
Feedback Welcome
Link:
https://dannyman.toldme.com/2005/08/05/blog-to-nntp/
So, I’m not alone in this crazy fantasy . . .
I have been thinking that I’d like a web-based aggregator that doesn’t suck. Bloglines is all about the frames, Rojo is all about not actually working right, and Yahoo! and Google “ig” are just little sticky-notes-in-a-portal . . .
And I was thinking about back-end storage of data. Multi-master replication? BAH! And then I said, well, there’s always NNTP. NNTP is a system of multi-master replication for the ancestors of blog posts . . .
So, you’d need: (more…)
1 Comment
Link:
https://dannyman.toldme.com/2005/07/23/wordpress-comment-spam/
If you have a blog, you will get comment spam. Comment spam is like fax spam or e-mail spam except its people trying to sell stuff by posting advertising in comments to your blog.
There’s all sorts of crazy solutions you can try. A version or so back I put in one nice little plugin that simply required the web browser to do some math in JavaScript, and comments would only be posted if the math was done right.
A lot of the more complicated solutions sound a little half-baked, annoying, too much work, or just plain insane. I absolutely hate some of the “type in the word that appears in this image” because half the time I can barely make it out with my feeble HUMAN eyes … argh!
Well, I just read an even simpler solution, and since I was working on my comments.php I thought I’d give it a shot. It basically boils down to: (more…)
2 Comments
Link:
https://dannyman.toldme.com/2005/07/22/wordpress-backslash-literal-entities/
WordPress rocks. It is blog software that drives much of this web site. WordPress rocks, it does, except for a few things it sucks at, like printing backslashes.
They’re taken care of the BR-in-PRE stuff, but I still have trouble with backslashes. They don’t get displayed unless you type two backslashes, but there seems to be another preprocessor that sucks out backslashes when you edit the post, and typing \\ into the web just seems so wrong.
But you can use HTML entity references. These are HTML escape codes for character literals. Here are a few potentially handy ones: (more…)
8 Comments
Link:
https://dannyman.toldme.com/2005/07/21/shell-variable-unique-elements/
If you are a seasoned Unix admin, you’ve been doing stuff like this for years:
cat $file | sort | uniq
Which is a handy way to eliminate duplicate lines in a file, or a collection of files. The uniq -c will even tell you how many duplicated lines there are, and you might even do:
cat $file | sort | uniq -c | sort -n
For example, you could run a command like this to see who is receiving the most mail on your system:
awk ’{print $7}’ < /var/log/maillog | grep ^to= | sort | uniq -c | sort -rn
Anyway, even if you are a seasoned Unix admin, you probably aren’t a big expert on shell scripting. (more…)
Feedback Welcome
Link:
https://dannyman.toldme.com/2005/07/09/reboot/
There’s nothing like a downed remote machine at 7AM on a Saturday morning that will get you up to speed with the workings of your terminal server, and your datacenter operations staff.
Thank you, Cyclades!
Thank you, Nick at Abovenet!
Fortunately, it was a backup component that failed in a very scary the-harddrive-has-crashed way, but a reboot cleared that up. Now, if I can just figure out how this other thing I set up on the machine gets restarted, I can go back to being lazy. :)
The weirdest thing, and I am not bullshitting, the weirdest thing is that right before the pager went off for the first time, I was dreaming that my manager said “bad news” and started to explain that a disk failure on far more important machine had been detected. As I started to mull that over, my Sidekick started to beep. Is there such a thing as SysAdmin ESP, or do I dream of such things all the time, I just don’t remember them? Weird, man, weird!
1 Comment
Link:
https://dannyman.toldme.com/2005/07/01/adsense/
So, I’ve been playing with AdSense for a few months now. It seems I earn about $5.00 per month. June was a mere $4.80.
But Google gives me plenty of stats, and I have calculated that I could earn my current salary through AdSense if I can boost my page views to 642 million per day.
I think ratchet would melt under the strain of 7,500 hits per second. (more…)
Feedback Welcome
Link:
https://dannyman.toldme.com/2005/06/24/bug-density/
<Adam> pickle.dump((self.dsId, dict((key, self.index[key].tolist()) for key in self.index)), open(path, ‘w’))
<Adam> Wow. Just when I was beginning to think that Guido’s plan to use structure-as-syntax was going to force nice readable structure on everyone, my hopes are dashed.
<meekay> People are still writing sh_tty code.
<Adam> And I deal with it!
<dman> That’s python?
<dman> I thought the whole point of Python was to make code like that impossible.
<Adam> Well, it’s the traditional “one in n lines of code contains a bug, so I’m going to reduce the number of lines in order to keep bugs out” thinking.
<Adam> Ironically, the kid who wrote that is my coworker who apparently had an offer from google and turned it down last year.
<meekay> I actually espouse that belief.
<meekay> Of course, if you get to the point where you’re writing obfuscated Perl in Java, you’re being counter-productive.
<Adam> I think, however, that a distinction needs to be made between “one in n operations contains a bug” and “one in n lines of code”.
<Adam> Packing more operations into one line just means that you’re making the bugs harder to untangle.
<Adam> And the code harder to parse for my poor little brain.
* Adam dumbass. Likes to stay that way.
<meekay> The pattern is not typically x bugs per n lines of code across the industry.
<meekay> It is typically a solid average x bugs per n lines of code per developer.
<meekay> And some developers have a lower x than others.
<dman> Adam: Greater bug density!
<meekay> I, for example, try to keep x very low.
<meekay> And by doing so, I am more productive.
<meekay> Because my coworkers bug queues typically have size five or six, and I typically have size two.
<dman> I think if the operation is a no-brainer, that stuff is okay, but you should reuse one of the lines you “saved” to drop a comment that will give the next sucker who has to maintain your code a friggin clue.
<meekay> Where “the next sucker” may in fact be you.
<meekay> =)
<meekay> I love it when my coworkers come and ask me about code that they wrote.
<dman> especially me, because i’m the SysAdmin, and when I start looking at the code, we’re already in trouble.
Feedback Welcome
Link:
https://dannyman.toldme.com/2005/06/22/sh-bash-getopts/
So, say you are writing a shell script (sh or bash) that needs to take arguments like so:
./script.sh start
./script.sh -v start
./script.sh -c foo.conf start
./script.sh -vc foo.conf start
This took me a bit of doing. (more…)
7 Comments
Link:
https://dannyman.toldme.com/2005/06/16/google-interview-advice/
Although I have not succeeded with the getting-hired-at-Google thing I have had my crack at it a few times and have survived to write about it. I occasionally hear from others about to try it, and they want to know if I have any advice. Here’s my modest wisdom on the subject of interviewing well at Google. (more…)
63 Comments
Link:
https://dannyman.toldme.com/2005/06/11/perl-convert-celsius-and-fahrenheit/
I recently had a need for two quick temperature conversion algorithms in a Perl script. I asked Google, but did not immediately get a great answer, so here’s my answer:
# Two quick helper functions: CtoF and FtoC
sub CtoF { my $c = shift; $c =~ s/[^\d\.]//g; return (9/5)*($c+32); }
sub FtoC { my $f = shift; $f =~ s/[^\d\.]//g; return (5/9)*($f-32); }
The regex is to untaint the input datum, and could be eliminated if you know that your variable is clean. This code has been incorporated into a systems health and data trend monitoring script for FreeBSD. For the vaguely interested, here’s today’s perldoc: (more…)
5 Comments
Link:
https://dannyman.toldme.com/2005/05/10/cisco-sucks-zebra-rules/
So . . . this is an old rant.
I was working on a project to multi-home our upstream Internet connectivity. When I started, I was inheriting something where the telco providing us with the new circuit would also give us a router, and configure it, and take care of all the BGP configuration, and we wouldn’t have to renumber. (more…)
1 Comment
Link:
https://dannyman.toldme.com/2005/05/02/email-att-mobile/
Last week, some of my users stopped receiving e-mail on their cell phones.
We had the aliases set up for:
<ten digits>@mobile.att.net
mobile.att.net no longer exists.
So, after some research, I got an answer from USENET:
<ten digits>@mmode.com
This is also accepting messages:
<ten digits>@mobile.mycingular.com
(But they do not seem to be delivered. Except to one user who recently switched phones.)
A very smart person reports that if your mobile is GSM you might want:
<ten digits>@cingularme.com
Update–July, 2007: For John and Bertrand, who is on Cingular’s “Pay as You Go” plan:
<ten digits>@txt.att.net
I did this to my aliases file:
:%s/mobile.att.net/mmode.com/
(I only bother to blog about this because simply typing my problem in to Google got me nada.)
14 Comments
Link:
https://dannyman.toldme.com/2005/04/21/graffiti-train/

[
Flickr]
A graffiti covered train, in Lyon.
I have been uploading a lot of photos via Flickr lately. I purchased a “pro” account for $42/year (now $25/year) in part because they have a “blogging” interface with which one can post photographs to one’s blog.
They’ll also retain my original image files, and promise to get around to a “bulk download” facility so I can use them as a “disaster recovery” mechanism as well. On top of that, the site has nice features and is definitely zippy.
Anyway, I like this photograph. It is a train, covered in beautiful graffiti, in France. I like all that stuff. And I like that Flickr will store the image for me and provide an interface for re-posting it here.
I will be uploading many more photos over the next few months. All images taken in 2005 are online, and I’m making my way through the 2002 “World Tour” in alphabetical order right now. Flickr only allows me to upload 1GB/month, (actually, they just changed it to 2GB,) even with a Pro account. This is fine, because I have so many photos, I ought to take my time sorting through them.
Feedback Welcome
Link:
https://dannyman.toldme.com/2005/04/05/freebsd-faq-measure-swap/
Q: How do you measure swap utilization in FreeBSD? (Assuming you are writing a script to gather performance metrics.)
A: If you are writing a C program, check kvm_getswapinfo(3) and maybe take a gander at the bottom of /usr/src/usr.bin/top/machine.c.
A: If you are writing a Perl script:
Measure swap activity:
sysctl vm.stats.vm.v_swapin vm.stats.vm.v_swapout vm.stats.vm.v_swappgsin vm.stats.vm.v_swappgsout
(I believe these results are COUNTER type values, like you get from netstat -inb. You could establish “swap activity” by plotting changes in this value.)
Measure swap size:
0-13:38 djh@mito ~> swapinfo
Device 1K-blocks Used Avail Capacity
/dev/ad0s1b 1022224 0 1022224 0%
0-13:38 djh@mito ~> swapctl -l
Device: 1024-blocks Used:
/dev/ad0s1b 1022224 0
If you are trying to accomodate n+1 swap devices, try this:
0-13:44 djh@mito ~> swapctl -lsk
Device: 1024-blocks Used:
/dev/ad0s1b 1022224 0
Total: 1022224 0
Feedback Welcome
« Newer Stuff . . . Older Stuff »
Site Archive