Staying away from Google Chrome after six months or so
Just short of six months ago, I wrote Walking away from GoogleChrome , about how I had decided to stop usingChrome and only use Firefox. Although I didn't mention it in theentry, I implicitly included Chromium in this, which was reallyeasy because I don't even have it installed on my Linux machines.
(A version of Chromium is available in Fedora, but it seems to beslightly outdated and I was always using Chrome in large part becauseof Google's bundled Flash, which
The plague of 'you've logged in to our site again' notification emails
Several years ago, Twitter picked up a pretty annoying habit; itsent you email every time you logged in in a clean browser session . Twitteris not the only site to do this, and my perception is that thisbehavior is growing steadily (this may or may not be the reality;it may be that I've just started to need to log in to more sitesthat behave like this).
As far as I've ever seen in limited experimentation, the sites doingthis are not applying any
Peculiarities about Unix's statfs() or statvfs() API
On modern Unixes, the official interface to get information abouta filesystem is statvfs() ; it's sufficiently official to be in the Single Unix Specification as seen here .On Illumos it's an actual system call, statvfs(2) . On many other Unixes (at least Linux , FreeBSD , and OpenBSD )), it's a library API on top ofa statfs(2) system call ( Linux , FreeBSD , OpenBSD ). However you call it and howeverit's implemented,
An easy optimization for restricted multi-metric queries in Prometheus
Here's something that I've repeatedly had to learn and remember thehard way when I was building Prometheus queries for our dashboards,especially for graphs. Suppose that you have a PromQL query that involves multiple metrics, for instance you want to knowthe number of inodes used on a filesystem:
node_filesystem_files - node_filesystem_files_free
(The reason that the Prometheus host agent doesn't directly exporta 'number of inodes used' metric is that statfs(2) doesn'
Testing Prometheus alert conditions through subqueries
Suppose that you're considering adding a new alert condition toyour Prometheus setup, for example alerting if a machine is using75% or more of user CPU over five minutes. You could just add thisalert in some testing mode and see if (and how often) it fires, butideally you'd like to assess the alert condition beforehand to seeif it seems like a useful alert. To start with, it'd be nice toknow if it would actually fire at all. With Prometheus
What the default query step is for Prometheus subqueries
Subqueries are a new feature in Prometheus 2.7+; they let you nest time rangequeries ( as in this example )and can also be useful to do things like use time based aggregationon expressions . As covered in theofficial documentation ,their syntax is:
'[' ':' [ ] ']' [ offset ] You always need the
:, but the resolution (the query step ) is optional. This raises the
Turning something into a script encourages improving it
I've written before (a long time before) that scripting somethingcaptures knowledge about how to do it , but recentlyI had a nice example of another advantage of turning things intoscripts, which is that scripting things can encourage you toimprove what you're doing .
We've recently started using Dovecot statistics to hunt for causes ofIMAP slowness, including people who are still part of our backwardscompatibility issue and would benefitfrom being migrated to our new way of dealing with this , both because their clients
Exploring how and why interior pointers in Go keep entire objects alive
Recently I was reading Things that surprised me in go ( via ),where one of the surprising things is that an interior pointer toa struct's field keeps the entire struct from being garbage collected.Here is a cut down and slightly changed version of the example fromthe article:
func getInteriorPointer() *int { type bigStruct struct { smallThing int someBigThing [aLot]int } b := bigStruct{smallThing: 3} return &b.smallThing}After this returns, the entire bigStruct will remain in
Our problem with Netplan and routes on Ubuntu 18.04
Today I've wound up getting back to our netplan dysfunction, so Ithink it's time to write a blog entry. Spoiler: highly specificnetwork device names and configurations that can only be attached toor specified for a named network device interact very badly at scale.
We have a bunch of internal 'sandbox' networks , which connect to our main server subnetthrough various routing firewalls. Obviously the core router on ourserver subnet knows how to route to every sandbox; however, we also
Exploring the mild oddity that Unix pipes are buffered
One of the things that blogging is good for is teaching me thatwhat I think is common knowledge actually isn't. Specifically, whenI wrote about a surprisingly arcane little Unix shell pipelineexample , I assumed that it was commonknowledge that Unix pipes are buffered by the kernel , in additionto any buffering that programs writing to pipes may do. In fact thebuffering is somewhat interesting, and in a way it's interestingthat pipes are buffered at all.
How much kernel buffering there is varies from Unix
Menu