Some notes on understanding how to use flock(1)
The flock(1) command has rather complicated usage, with a bunch of options, whichmakes it not entirely clear how to use it for shell script locking in various different circumstances. Hereare some notes on this, starting with understanding what it's doingand the implications of that.
The key to understanding all of flock(1) 's weird options is toknow that flock(2) automatically releases your lock when the last copy of the filedescriptor you locked is closed, and that file descriptors
Link: ASCII table and history (Or, why does Ctrl+i insert a Tab in my terminal?)
This ASCII table page ( via )answers the question it poses in its title, and the answer is quiteinteresting. I have a long standing interest in this area , and this page's table explains thingslike why Ctrl-@ is a common way to generate a 0 byte. The tablealso makes it clear that at least one case is handled specially,that of Ctrl-? often being DEL. So now that I look at it, the tableis interesting reading, not just the history.
(
Sharing file descriptors with child processes is a clever Unix decision
One of the things that happens when a Unix process clones itselfand executes another program is that the first process's open filedescriptors are shared across into the child (well, apart from theones that are marked 'close on exec'). This is not just sharingthat the new process has the same files or IO streams open, the waythat it would have if it open() 'd them independently; this sharesthe actual kernel level file descriptors. This full sharing meansthat if one process
If you can, you should use flock(1) for shell script locking
I have in the past worked out and used complicated but portableapproaches for doing locking in shell scripts .These approaches get much more complicated if processes can dieabruptly without undoing theirlock. You can generally arrange things so that your locks are clearedif the entire machine reboots, but that's about it as far as simpleapproaches go. Sometimes this is what you want, but often it isn't.
As a result of a series of issues with our traditional shell scriptlocking, I have been more and
Getting NetworkManager to probably verify TLS certificates for 802.1x networks
I'll start with my tweets :
We have an 802.1.X WPA2 Enterprise university-wide wireless network,using PEAPv0 authentication, which involves a TLS certificate. Ido not appear to be able to get NetworkManager to verify the TLScertificate in a way that will let me actually connect.
The only way I can connect to our university wifi is by setting 'No CAcertificate is required'. I cannot supply a CA certificate that works(I've tried), and
How not to set up your DNS (part 24)
I'll start with the traditional illustration of DNS results:
; dig +short mx officedepot.se.50 odmailgate.officedepot.com.40 officedepot.com.s10b2.psmtp.com.30 officedepot.com.s10b1.psmtp.com.20 officedepot.com.s10a2.psmtp.com.10 officedepot.com.s10a1.psmtp.com.
What I can't easily illustrate
Link: A program to read AMD Ryzen RAPL information on Linux
In my entry illustrating the practical difference between CPU TDPand actual power draw , I used a Mozillaprogram to read Intel's RAPL (Running Average Power Limit) CPU information.In that entry I regretted that as far as I knew there was no AMDequivalent, so I couldn't get similar measurements on my AMD Ryzenbased office machine . Well, it turns outI'm wrong about that. Courtesy of @thurloat@mastodon.club comes this information :
@cks WRT
this
How mountd and exportfs handle NFS export permissions on Linux
While the Linux kernel NFS server maintains an authenticationcache , the final authority on whatwhat filesystems are exported to who and with what permissions is
rpc.mountd. Mountdgets this information from/var/lib/nfs/etab, which convenientlyis a plain text file. However, mountd reads the information frometabinto an internal data structure and only re-does this whenetab's inode number changes. As far as I can tell there'snothing else to it, which means that you can create
I think it's time to explicitly set Go's $GO111MODULE environment variable
Go is in the process of transitioning fromthe old traditional
$GOPATHapproach to organizing Go code to Go modules . I have my opinionsabout the fairly rapid speed of this change, but it's clear that the Go team wants to push this forward , and as we know , what the team wants they usually get (tryexcepted ). Givenboth this ongoing change and my habit of sometimes using thedevelopment version of Go, I think it's time for me to explicitlyset the$GO11
The practical difference between CPU TDP and observed power draw illustrated
Last year, in the wake of doing power measurements on my workmachine and my home machine , I wrote about how TDP is misleading . Recently I was re-reading this Anandtech articleon the subject ( via ),and realized that I actually have a good illustration of thedifference between TDP and power draw, and on top of that it turnsout that I can generate some interesting numbers on the officialpower draw of my home machine's i7-8700K under load.
I'
Menu