C's malloc() and free() APIs are reasonable APIs for C
I've written about how the free() API means that C memoryallocation needs to save some metadata , andbefore that about the effects of malloc() and free() on CAPIs . However, despite these issues I thinkthat C's malloc() and free() APIs are reasonable ones for C tohave, and probably that they've helped C remain relevant over theyears.
To start with, both malloc() and free() have what I could calla minimal
How we monitor the temperature of our machine rooms
As I mentioned recently , we have machinerooms ( many of them rather old ) and withthem a setup that monitors their temperatures, along with thetemperatures of some of our important "wiring closets". The functionaldifference between a machine room and a wiring closet is that wiringclosets are smaller and only have switches in them, not servers(and generally they have two-post aka "telco" racks instead of four-post server racks). We are what I'd consider a mid-sized organization
Grafana's problem with the order of dashboard panel legends and Prometheus
I tweeted something a bit obscure :
Although it's purely to deal with a missing Grafana feature, I do wishthat Prometheus had some way to sort the returned query results by thevalue of some label. (I could hope for Grafana to add some way to dealwith this, but good luck with that.)
It's common to build Grafana dashboards with graph panels (includingbar graphs) that have multiple things in them. Generally when youdo this, you include a legend with labels. The
What systemd timer directives seem to be used in practice
Systemd .timer units havea bunch of different On I'm not energetic enough to download every Ubuntu or Fedora packagethat has a timer and look We have a few machine rooms.These aren't high-tech, modern server rooms, which is not surprisingsince they've generally been there for decades .As part of this, our machine rooms don't really have a specific settemperature that they're supposed to stay at. They're not supposedto get too hot, but the actual temperature they're at varies overthe year and depends on a lot of things, including what we're runningin them at the moment All (Unix) processes are members of some process group . Process groups govery far back in Unix; they're present at least as far back asFourth Edition (V4) Unix. However, they aren't really "processgroups" in the modern sense, as we can see from the relevant The Unix ' A couple of weeks ago, a few days after a kernel upgrade on ourservers, we had an Ubuntu 22.04 server basically die with a constantseries of out-of-memory kills from the kernel of both vital demonsand random bystander processes. There was no obvious clue as towhy, with no program or cgroup consuming an unusual amount of memory.In the constant spew of text from the kernel as it repeatedly OOMkilled things, we did notice something: Suppose, not hypothetically, that you have a shiny new GrafanaLoki setup to store and query yourlogs (or at least the logs that come from the systemd journal onyour Linux machines, and maybe some additional log files on them).Also suppose that you have some OpenBSD machines whose logs youwould like to get into Loki. OpenBSD doesn't have the systemdjournal, or for that matter a build of Promtail , the Lokilog-shipping client. However, Promtail can receive logs via syslog,and In Go 1.18, the Go developers were careful to keep generic typesout of the standard library, to the point where they decided notto have a '
Machine room temperatures and the value of long Prometheus metrics history
The history of sending signals to Unix process groups
proc struct field being called p_ttyp .Instead they were used primarily to send signals to your terminalprocesses when various things happened (see dmr/tty.c and dmr/dc.c
Support for 'kill -SIGNAME ...' was added in 4BSD
kill ' command that we're familiar with (and that wasstandardized as POSIX kill(1) )accepts and even perhaps prefers to be invoked with a signal name,as ' kill -SIGNAME ... ' (well, POSIX would like you to use 'kill-s SIGNAME'). For reasons beyond the scope of this blog entry, Iwas curious about when and where in Unix history this was added to kill . The somewhat surprising answer turns out to be in 4BSD
Our Prometheus host metrics saved us from some painful experiences
kernel: [361
An rsyslog(d) syslog forwarding setup for Grafana Loki (via Promtail)
Go 1.19 added an atomic.Pointer type that's a generic type
constraints ' package of generics helpers in the standardlibrary , never mind generic versionsof slices and maps. As the Go 1.18 release notes say , all three packages were insteadput under golang.org/x/exp .However, Go 1.19 turns out to have somewhat quietly changed that,adding the standard library' Menu