Jehan Alvani
  • Home
  • Photos
  • Archive
  • About
  • Cars
  • 18 August 2022
  • BSCC Novice School Autocross

    Went out to the BSCC Novice School with the 911 last weekend. Despite the withering heat - well over 110ºF on the course - the car was up for the task. Keeping temps low all day, rising only when idling in the grid between runs.

    It’s been years since I last autocrossed, so it was good to get some instruction. Jeremy reminded me that the car can hold much more speed than I’m expecting it to, and that it can brake much harder than I’m accustomed to in street driving. It’s funny, I knew these things but it’s tough to put it into practice when I haven’t been doing it.

    My first run was just getting used to the course. Second was trying to put a little more speed in. In both first and second videos, I hadn’t learned to set the start/finish of the course appropriately so the time and finish of the course is off, but by watching just the speed you can see it makes sense.

    The third video, Jeremy’s driving and I’m just riding along, seeing how a very competent autocross driver would approach the course. The fourth video I’m applying what he demonstrated, and I had by a long-shot the fastest lap of my day. I could have done better if I’d shut up and not overthought & discussed my mistakes in the moment. At least I figured it out a third of the way through.

    Run 1

    Note the finish line isn’t in the right spot on the overlay so the time is wrong.

    Run 2

    Note the finish line isn’t in the right spot on the overlay so the time is wrong.

    Run 3 - Jeremy

    Run 4

    6 August 2022
  • Might be my favorite thing I’ve ever read in reference to a ballplayer. From a reddit thread discussing the Mariners’ thirteenth consecutive win:

    Diego [Castillo] comes out every night looking like he just ate way too much ice cream but pitches like he ate just the right amount

    16 July 2022
  • Some photos by Travis Gallatin. He got so many great shots, looking forward to sharing more!

    16 July 2022
  • New Rise Against, Broken Bells, Bloc Party, and Yeah Yeah Yeahs? So very happy.

    2 July 2022
  • 5 June 2022
  • Still using Message-ID to link to specific mail messages

    Nice little throwback. My teams are being proactive and gathering information now for projects they might like to take on in the future. In some cases, I want to make notes to include these in future budget planning sessions. Sometimes it’d be useful to link to some specific details, and often that detail is in a specific email message.

    The Message-ID header is made exactly for this, and you can view the Message-ID header in Mail.app using these instructions. There’s even an old DF post with an AppleScript snippet to make it easy to extract the Message-ID. I didn’t try that, but I suspect it’ll still work just fine.

    Elsewhere on your computer, you can use a message:// prefix followed by the message-ID to link to the specific message and macOS still manages to handle it apporpriately, fifteen years later.

    Nice when the simple & useful stuff still works.

    3 June 2022
  • Peekaboo

    19 May 2022
  • Interior, Soleil can design department

    BOB: Hey, Dave, What’s a grapefruit look like?

    DAVE: What? You’ve never seen a grapefruit?

    BOB: No, we were more of a pomelo family. What’s it look like?

    DAVE: It’s, uh. You take a shrimp? It’s like half a shrimp.

    BOB: Shrimp, Ok. Legs still on?

    DAVE: Yeah, I mean. Yeah. It’s a shrimp. Oh, but the rind is green

    BOB: Ah! Ok. Thanks! Hadn’t considered the rind. Like this?

    DAVE: Nailed it.

    11 May 2022
  • Caught a Charmander!

    17 April 2022
  • Glass Animals just killing it. So good to see live music again, and hot damn what a show.

    11 March 2022
  • It feels a little more like spring 💥⚾️

    10 March 2022
  • 10 March 2022
  • 10 March 2022
  • A month or so ago I shipped the 911’s clock off to Pelican to be rebuilt. The clock hadn’t worked in some time, but it works gorgeously now, and since it’s the ‘88, it has the quartz movement.

    I also dropped in Rennline’s Exact Fit Phone Mount and Induction Charger. I didn’t realize I wouldn’t be able to find a path from the USB port on the back of the new SQR-46 head unit to the gauge cluster without drilling, which I didn’t want to do1. I ordered this 12v to USB module from Amazon, and made a quick wiring harness to tap the 12v positive and negative from the clock. Boom, clock and MagSafe charger work. Hype.


    1. Also, the SQR-46 kept trying to read the induction charger for files to play, which was disruptive to playing FM or Bluetooth audio, so really using the USB port on the head unit was a no-go. [return]
    28 January 2022
  • Just a great first time at Crystal! Wow.

    27 January 2022
  • Help the Studebaker Museum Restore Fozzie’s Studebaker

    In a fantastic confluence of my interests, the Studebaker museum is raising funds to restore the very same car that carried the heroes of the 1979 classic “The Muppet Movie”. A good cause if I’ve ever seen one.

    25 December 2021
  • BBC: US Billionaire forced to relinquish $70M of stolen antiques, banned from antiquities trade

    Strong quote from the Manhattan DA Cy Vance Jr:

    …Mr Steinhardt “displayed a rapacious appetite for plundered artefacts without concern for the legality of his actions, the legitimacy of the pieces he bought and sold, or the grievous cultural damage he wrought across the globe”.

    7 December 2021
  • This immaculate 11k mile ‘79 930 auction is going to be a blast to watch in a few days. It’s already a blast to just look at the gorgeous photos.

    3 December 2021
  • Replacing Headlights on 911 3.2s and 964s

    911s in ‘88 and ‘89 (and at least some from earlier 3.2 years; can’t quite find an exact demarcation point) had the same headlights that made it into the 964s. I had to pull them apart to replace my bulbs last night after noticing that my low beams were out. This video was an enormous help. In a short:

    1. Unscrew the bottom bolt on the rings which holds the rings in place1.
    2. Lift and pull to remove the ring, which is held in place by a small lip on the body-side above the bucket. If the lights haven’t been opened up in a while (20+ years in my case) it might take some effort to pull the rings. I used a hook tool wrapped in a microfiber towel placed into the bottom bolt’s hole and pulled hard on the right side. Left side lifted with no issue.
    3. Remove the four bolts which hold the light assembly in place (one each at 2:00, 4:00, 8:00, 10:00)2.
    4. Unclip the harness, remove the light assembly, remove the star-shaped retaining clip and replace the bulb. Use conductive grease to prevent connector corrosion.
    5. Assembly is the reverse of the above.

    1. The video says to remove the pugs which cover access to the adjustment screws, but this seems unnecessary to me. [return]
    2. The screws at 9:00 and 12:00 are for beam adjustment; don’t mess with those. [return]
    31 October 2021
  • A Failed Alternator on the 911

    A black vintage 911 in front of a dramatic mountain vista

    The 911 just got back from Squire’s after dying on me on the way home from a gorgeous PCA tour to Artist’s Point on Mt. Baker a couple weeks ago - the pic above was from Artist’s Point. After pulling over and getting out of the car, I could hear a hissing from the trunk, and opening the luggage compartment revealed a wet, steaming battery and the smell of sulphur or rotten eggs that’s typical of an overcharging event. My hunch was that either the alternator or voltage regulator had failed, and the batter was being overcharged. I replaced the battery with a new one from Interstate (MTX-49/H8; the car still wouldn’t start. Now I suspected that the overcharging cooked the DME relay or the DME ECU itself. I was out of my depth, and got back in touch with Squire’s. Once they got the car, they confirmed that the alternator was failing (outputting 17.8v under load!) and had cooked the DME ECU. They installed a new alternator, swapped in a shop DME and sent my unit out for repair. I’ll get my DME back in a few weeks.

    In the interim, I wanted to document some obvious signs of overcharging that I saw in case anyone else runs into this.

    1. Interior bulbs getting bright and dimming or flickering, especially indicator lights
    2. Flickering seatbelt light
    3. Radio would die when I pushed the gas
    4. Moisture in the gauges when the blower was switched on1

    1. This was a surprise to me but it’s becuase the battery was overheating, boiling, and letting off steam into the luggage compartment. The steamy air was taken in by the blower and… blown into the gauges. I got some big packs of silica gel desiccant to ensure all the moisture is removed now that its no longer an issue. [return]
    7 October 2021
  • This photo really deserves its own post.

    6 September 2021
  • G50 Shift Bushing Refresh

    Spent yesterday morning cleaning up the shift assembly in my ‘88 911. The car was optioned with the G50 transaxle’s short-shifter, but a previous owner had put a knob that added a few inches of throw. It looked like at some point some water had been spilled onto the knob and down the lever, because there was some surface rust under the knob which I wanted to clean up. Most notably, though, there was a ton of play in the lever when in neutral and some slop between gears, both of which are indications of worn shift bushings. Replacing the shift bushings isn’t too tough a job - half a day on the long side, and I thought I’d tackle the rust cleanup and shift knob replacement at the same time.

    Photo from the sales listing showing the “old” aftermarket knob

    Using Brad Phillips’ G50 refresh article for Hagerty as a reference, I pulled the console, shift lever, and shift housing out of the car. Removed the surface rust on the lever with a smoothing stone on my Dremel, sandpaper, and a wire brush. Then I taped off the lever and repainted. I vacuumed the old bushing dust out the cavity in the floor revealing a little more surface rust on the floor of the car. I wire-brushed that, then used a sanding block and vacuumed until bare metal was exposed, then I used a tacky cloth to remove any remaining dust and painted the exposed surfaces.

    Comparison of the aftermarket knob (right) and the stock knob (left)

    Spraying the lever before replacing the bushings

    Reassembly was a bit of a challenge since the new bushing is much less pliable than the quite-worn original. In addition to using a heat gun to warm the bushing and housing, I found a link to some photos of this old article in “Excellence” magazine in which the author gives some tips for replacing failed G50 bushings. Relevant paragraphs excerpted below:

    Installing the bushing was simple. First, we clamped the shifter in a vice to hold it steady - applying a thin film of grease ont the bushing, we installed it in the housing. The bushing goes in from the rear of the housing with the large flared end pointing toward the rear of the car. The bushing is a very snug fit, and we worked it into the hole much like mounting a tire on a tim; first, we pushed half of the bushing into the hole and then pushed the remaining half of the bushing Into place with a heavy screwdriver, working in one direction. Once the bushing pops into the housing, it self-centers due to a recess in the bushing.

    We wiped a film of white lithium grease inside the bushing and used the shop vacuum to remove the remains of the old bushing from the floor recess. The shifter shaft was also wiped clean and a thin coat of grease was applied to the shalt. Prior to installation, we decided to take the time to remove the shifter pin, clean it, and apply a thin layer of grease. This is a simple matter of removing a lock clip, sliding out the pin, and cleaning and greasing the pin. We also applied a small amount of grease to the pivot-ball portion of the shift lever.

    At the end of the day I have a nice, tight shift feel, a shorter throw thanks to the removal of the long shift knob, and cleaned up the shift lever.

    The restored lever and stock knob back in place

    Took the car out for a drive with my neighbor and found a picturesque spot by a mill. Couldn’t ask for more.

    5 September 2021
  • Joining metrics by labels in Prometheus

    I’m using node_exporter to generate host metrics for several of the nodes in my lab. I was re-working one of my thermal graphs, today, with the goal of getting good historical temps of my Pis and my Ubuntu-based homebuilt NAS into a single readable graph. node_exporter has two relevant time series:

    1. node_thermal_zone_temp which was exported on all of the Raspberries Pi
    2. node_hwmon_temp_celsius which was exported by the NAS and the Raspberries Pi 4. The rPi3 did not export this metric.

    I liked node_hwmon_temp_celsius a lot, and opted to spend some time focusing on getting that to fit as well as I could. It’s an [instant vector][instant_vector], and it returned the following with my config:

    node_hwmon_temp_celsius{chip=“0000:00:01_1_0000:01:00_0”, class=“nas server”, environment=“storage”, hostname=“20-size”, instance=“10.0.1.217:9100”, job=“node-exporter”, sensor=“temp1”}    29.85
    node_hwmon_temp_celsius{chip=“0000:00:01_1_0000:01:00_0”, class=“nas server”, environment=“storage”, hostname=“20-size”, instance=“10.0.1.217:9100”, job=“node-exporter”, sensor=“temp2”}   29.85
    node_hwmon_temp_celsius{chip=“0000:00:01_1_0000:01:00_0”, class=“nas server”, environment=“storage”, hostname=“20-size”, instance=“10.0.1.217:9100”, job=“node-exporter”, sensor=“temp3”}   32.85
    node_hwmon_temp_celsius{chip=“0000:20:00_0_0000:21:00_0”, class=“nas server”, environment=“storage”, hostname=“20-size”, instance=“10.0.1.217:9100”, job=“node-exporter”, sensor=“temp1”}   52.85
    node_hwmon_temp_celsius{chip=“0000:20:00_0_0000:21:00_0”, class=“nas server”, environment=“storage”, hostname=“20-size”, instance=“10.0.1.217:9100”, job=“node-exporter”, sensor=“temp2”}   52.85
    node_hwmon_temp_celsius{chip=“0000:20:00_0_0000:21:00_0”, class=“nas server”, environment=“storage”, hostname=“20-size”, instance=“10.0.1.217:9100”, job=“node-exporter”, sensor=“temp3”}   58.85
    node_hwmon_temp_celsius{chip=“pci0000:00_0000:00:18_3”, class=“nas server”, environment=“storage”, hostname=“20-size”, instance=“10.0.1.217:9100”, job=“node-exporter”, sensor=“temp1”}     37.75
    node_hwmon_temp_celsius{chip=“pci0000:00_0000:00:18_3”, class=“nas server”, environment=“storage”, hostname=“20-size”, instance=“10.0.1.217:9100”, job=“node-exporter”, sensor=“temp2”}     37.75
    node_hwmon_temp_celsius{chip=“pci0000:00_0000:00:18_3”, class=“nas server”, environment=“storage”, hostname=“20-size”, instance=“10.0.1.217:9100”, job=“node-exporter”, sensor=“temp3”}     27
    node_hwmon_temp_celsius{chip=“thermal_thermal_zone0”, class=“raspberry pi”, environment=“cluster”, hostname=“cluster1”, instance=“10.0.1.201:9100”, job=“node-exporter”, sensor=“temp0”}    37.485
    node_hwmon_temp_celsius{chip=“thermal_thermal_zone0”, class=“raspberry pi”, environment=“cluster”, hostname=“cluster1”, instance=“10.0.1.201:9100”, job=“node-exporter”, sensor=“temp1”}    37.972
    node_hwmon_temp_celsius{chip=“thermal_thermal_zone0”, class=“raspberry pi”, environment=“cluster”, hostname=“cluster2”, instance=“10.0.1.252:9100”, job=“node-exporter”, sensor=“temp0”}    32.128
    node_hwmon_temp_celsius{chip=“thermal_thermal_zone0”, class=“raspberry pi”, environment=“cluster”, hostname=“cluster2”, instance=“10.0.1.252:9100”, job=“node-exporter”, sensor=“temp1”}    32.128
    

    The class, environment, and hostname labels are added when scraped.

    The chip label looked interesting, but it appears to the an identifier as opposed to a name, and I’m terrible at mentally mapping hard-to-read identifiers to something meaningful. Digging around a little more, I found node_hwmon_chip_names, which when queried returned

    node_hwmon_chip_names{chip="0000:00:01_1_0000:01:00_0", chip_name="nvme", class="nas server", environment="storage", hostname="20-size", instance="10.0.1.217:9100", job="node-exporter"}                    1
    node_hwmon_chip_names{chip="0000:20:00_0_0000:21:00_0", chip_name="nvme", class="nas server", environment="storage", hostname="20-size", instance="10.0.1.217:9100", job="node-exporter"}                   1
    node_hwmon_chip_names{chip="pci0000:00_0000:00:18_3", chip_name="k10temp", class="nas server", environment="storage", hostname="20-size", instance="10.0.1.217:9100", job="node-exporter"}                  1
    node_hwmon_chip_names{chip="platform_rpi_poe_fan_0", chip_name="rpipoefan", class="raspberry pi", environment="cluster", hostname="cluster0", instance="10.0.1.42:9100", job="node-exporter"}               1
    node_hwmon_chip_names{chip="platform_rpi_poe_fan_0", chip_name="rpipoefan", class="raspberry pi", environment="cluster", hostname="cluster1", instance="10.0.1.201:9100", job="node-exporter"}              1
    node_hwmon_chip_names{chip="platform_rpi_poe_fan_0", chip_name="rpipoefan", class="raspberry pi", environment="cluster", hostname="cluster2", instance="10.0.1.252:9100", job="node-exporter"}              1
    node_hwmon_chip_names{chip="power_supply_hidpp_battery_0", chip_name="hidpp_battery_0", class="nas server", environment="storage", hostname="20-size", instance="10.0.1.217:9100", job="node-exporter"}     1
    node_hwmon_chip_names{chip="soc:firmware_raspberrypi_hwmon", chip_name="rpi_volt", class="raspberry pi", environment="cluster", hostname="cluster0", instance="10.0.1.42:9100", job="node-exporter"}        1
    node_hwmon_chip_names{chip="soc:firmware_raspberrypi_hwmon", chip_name="rpi_volt", class="raspberry pi", environment="cluster", hostname="cluster1", instance="10.0.1.201:9100", job="node-exporter"}       1
    node_hwmon_chip_names{chip="soc:firmware_raspberrypi_hwmon", chip_name="rpi_volt", class="raspberry pi", environment="cluster", hostname="cluster2", instance="10.0.1.252:9100", job="node-exporter"}       1
    node_hwmon_chip_names{chip="thermal_thermal_zone0", chip_name="cpu_thermal", class="raspberry pi", environment="cluster", hostname="cluster1", instance="10.0.1.201:9100", job="node-exporter"}             1
    node_hwmon_chip_names{chip="thermal_thermal_zone0", chip_name="cpu_thermal", class="raspberry pi", environment="cluster", hostname="cluster2", instance="10.0.1.252:9100", job="node-exporter"}             1
    

    You might notice that the chip label matches in both vectors. Which made me think I could cross-refrence one against the other. This was way more hack-y than I expected.

    Prometheus only allows for label joining by using the group_right and group_left operations, which are very poorly documented. Fortunately, I came across these two posts by Brian Brazil, which got me started. This answer on Stack Overflow helped me get the rest of the way there.


    I’ll start with my working query and work backwards.

    avg (node_hwmon_temp_celsius) by (chip,type,hostname,instance,class,environemenet,job) *  ignoring(chip_name) group_left(chip_name) avg (node_hwmon_chip_names) by (chip,chip_name,hostname,instance,class,environemt,job)
    

    We’ll break the query above into two parts seperated by the operator:

    • the Left side: avg (node_hwmon_temp_celsius) by (chip,type,hostname,instance,class,environemenet,job)
    • the Right side: avg (node_hwmon_chip_names) by (chip,chip_name,hostname,instance,class,environemt,job)
    • the Operator: * ignoring(chip_name) group_left(chip_name)

    Let’s go through each.

    The left side averages the records for every series that has the same chip label. In this case, the output above showed that some chips had multiple series seperated by temp1…tempN labels. I don’t really care about those, so I averaged them. Averaging records with one series just returns that series value, so that’s a good solution.

    The right side returns several series with labels matching chips to chip_names, and the other requisite labels. The value for these series are all 1, effecitvely saying “this chip exists.”

    The operator is where it gets both interesting and hacky.

    1. Arithmetic operations are a type of vector match, which take series with identical labels and perform the operation on their values. I used a * (multiplication) vector match because the right-side value is always 1 and therefore safe to multiply my left-side values without changing them.
    2. The ignore() keyword allows us to list lablels to be ignored when looking for identical label sets. In this case I told the arithmetic operator to ignore(chip_name) becuase it only exists on the right side.
    3. We can use the grouping modifiers (group_left() and group_right()) to match many-to-one or one-to-many. That is, the group_left() modifier will take any labels specified and pass them along with the results of the equation. Since I used group_left(chip_name), it returned chip_name in the list of fields after matching.

    Here’s what makes this hacky: as far as I can tell, this is the only way to take matching labels and use them in reference to one-another.

    The query returns1

    {chip="0000:00:01_1_0000:01:00_0",chip_name="nvme",class="nas server",hostname="20-size",instance="10.0.1.217:9100",job="node-exporter"}         28.85
    {chip="0000:20:00_0_0000:21:00_0",chip_name="nvme",class="nas server",hostname="20-size",instance="10.0.1.217:9100",job="node-exporter"}            54.85
    {chip="pci0000:00_0000:00:18_3",chip_name="k10temp",class="nas server",hostname="20-size",instance="10.0.1.217:9100",job="node-exporter"}           30.166666666666668
    {chip="thermal_thermal_zone0",chip_name="cpu_thermal",class="raspberry pi",hostname="cluster1",instance="10.0.1.201:9100",job="node-exporter"}      36.998000000000005
    {chip="thermal_thermal_zone0",chip_name="cpu_thermal",class="raspberry pi",hostname="cluster2",instance="10.0.1.252:9100",job="node-exporter"}      32.128
    

    Pretty sweet.


    1. You’ll notice the series for chip="platform_rpi_poe_fan_0" and for hostname=cluster0 were dropped because there’s no series with matching labels on the left-side results. [return]
    3 February 2021
  • Had an ongoing issue with Mac clients constantly popping “Server Disconnected” erorrs when they’ve mounted and NFS volume. This may be specifc to NFSv4, I couldn’t find a way to test.

    Regardless, mounting the volume with mount -o nolocks,nosuid [server]:/path/to/export /local/mountpoint worked. I added this to /etc/nfs.conf as a workaround. I wonder if I could configure this for a specific NFS server, rather then globally.

    #
    # nfs.conf: the NFS configuration file
    #
    nfs.client.mount.options=nolocks,nosuid
    
    29 January 2021

Follow @jalvani on Micro.blog.