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
Link:
https://dannyman.toldme.com/2005/03/28/chabot-mirrors-and-flickr/
In honor of Joe’s Birthday, we visited the Chabot Space Center in Oakland on Saturday. It is a pretty nice place, for a planetarium. They have some large telescopes set up out back, and it is really more of an observatory that has sprouted a planetarium to entertain kids and other members of the public. Yayoi wants to go back some night and peer through one of the telescopes . . .
Anyway, being an observatory, they are naturally intrested in mirrors, and have an exhibit on this topic. As you can see, we had a bit of fun with our reflections in one of the demonstrations. Another thing that was totally interesting is this video camera they have set up with a variable delay between the top of the screen and the bottom of the screen. Some sort of illustration about how images get distorted when you have to deal with how slow parts of the image may get to you. (more…)
Feedback Welcome
Link:
https://dannyman.toldme.com/2005/03/17/happy-1111111111/
<recursive> mmagin@dt ~% date +’%s’
<recursive> 1111094490
<recursive> getting very close to 1111111111
<Nimbex> 1111094473
<recursive> hmm
<Nimbex> I need to run ntpd on neb.
<SmooveB> recursive: damn, that’s in like 4 hours
<dman> I’ll be around SysAdmins this evening.
<Nimbex> And I bet you forgot to register a domain for it this time, dave!
<Ark> SmooveB: I thought it was tomorrow
<recursive> jwz’s LJ says: 1111111111 = Thu Mar 17 17:58:31 2005 PST
<Ark> wacky
<dman> 0-13:23 djh@mito ~> date -r 1111111111
<dman> Thu Mar 17 17:58:31 PST 2005
* dman sets up a blog entry for 17:58
<Ark> what a great and arbitrary number we have a boner for
Yes, children, two minutes before 6PM Pacific it will be 1111111111 seconds since the start of the Unix Epoch, which commenced at 00:00:00 UTC, January 1, 1970. A couple hours later, and I’ll be at Apple HQ in Cupertino, to hear about LDAP.
Feedback Welcome
Link:
https://dannyman.toldme.com/2005/02/27/howto-convert-streams-mp3/
I am an NPR junkie, and my new place gets awful reception. And for a long time I have admired TiVo and wondered if my life might not be better if I had a DVR for NPR programs. Add to that KQED’s obnoxious plugin/popup window and the fact that I use an older version of RealAudio to avoid Spyware, which stutters and rebuffers all the time, and I have enough motivation to rig up something different.
I have rigged up a simple system to schedule rips of programs broadcast on the KQED audio stream in to easily manageable .mp3 files. If I had one of them iPod thingies I could even listen to the radio programs on the bus. I might even get around to warezing this to interested friends via BitTorrent and CSS, which would leave us another technical explanation. (more…)
9 Comments
Link:
https://dannyman.toldme.com/2005/02/22/faq-stream-kqed-freebsd/
If you want to listen to KQED using FreeBSD, install mplayer:
mplayer mms://wmbcast.kqed.speedera.net/wmbcast.kqed/wmbcast_kqed_jan032006_0957_103495
UPDATE: I just discovered the -playlist feature. So, this works even better:
mplayer -playlist http://www.kqed.org/w/streamingfiles/kqed_wmp.asx
I have also figured out how to convert the Windows Media Player stream in to mp3 files, and may set up a system to “record” programs on a regular schedule, at which point I can listen to public radio as I would watch TV on a DVR. (Radio TiVo!)
If anyone might be interested in getting in on a non-RealAudio “NPR audio archive” via a bittorrent setup, I’d love to hear from you.
1 Comment
Link:
https://dannyman.toldme.com/2005/02/16/skype/
Skype is an Instant Messenger client with a twist — if you hook up a microphone you can CALL each other. Like a telephone, only you can see if your buddy is online before you interrupt them. The audio quality is very good, and clients are available for Windows, OS X, and Linux. The Linux client works on FreeBSD.
Even nicer, you can dial out on Skype, for exceedingly low rates. It costs us about 3c a minute to call Japan, though we’re going to get Noriko-san on Skype soon enough, and then the calls will be free.
If anyone wants to try it out, you can ring me at dannymanTM.
To answer a question you may have on your mind, Skype is not a telephone, so it is different from a VOIP service, where they send you a telephone that you hook up to your broadband. Instead, Skype is a way of making telephone calls from your computer. Unfortunately, people can not yet dial in to someone using Skype.
For me, though, it is as if the Internet has come full-circle: we used to have to find a cheap local number to dial in to the Internet on our existing telephone. Now, we are finding cheap services to make telephone calls on our existing Internet connection. Yow!
Feedback Welcome
« Newer Stuff . . . Older Stuff »
Site Archive