[ Main ] [ Home ] [ Work ] [ Code ] [ Rants ] [ Readings ] [ Links ] |
|
|
[2024] [2023] [2022] December November October September August July June May April March February January [2021] [2020] [2019] [2018] [2017] [2016] [2015] [2014] [2013] [2012] [2011] [2010] [2009] [2008] [2007] [2006] [2005] [2004] [2003] |
A couple of good articles on shell scripting
[Mon Apr 25 14:59:44 CDT 2022]
I came across a couple of really good blog entries published by Chris Siebenmann recently (incidentally, this is a highly recommended blog). The first one provides an example on the temptation to write shell scripts to accomplish something when a different programming language should be used instead. I must say, nevertheless, that, since pretty much everything I write is for personal use, I haven't truly come across the problems he describes. As a matter of fact, if anything, taking part in a more official development team at SGI to put together a monitoring tool in bash shell taught me that shell scripting is far more capable than people give it credit for. Better yet, I learned that plenty of projects written in other languages could actually be written in shell just fine. In any case, Siebenmann does make some good points. The second article is, perhaps, more useful. In Some things that make shell scripts have performance issues, Siebenmann discusses what is it that causes shell scripts to perform poorly. It all boils down to an important consideration: the cost of starting separate programs. {link to this entry} Systemd, once again
[Wed Apr 13 06:43:16 CDT 2022]
Due to some strange screen lock-ups, I recently decided to switch my Debian 10 (buster) laptop from the free nouveau drivers to the proprietary Nvidia drivers. It's more of a manual process, but it is well documented. Also, I had to make some adjustments to the default settings here and there. But all that is normal, and to be expected. Altogether, I may have spent about an hour or two playing with things. But, in the end, it worked. However, the following day, when I finally sat down to work, and used the laptop for a full day's work, I noticed the fan was constantly spinning. Also, CPU and disk utilization was higher than usual. Since I had to work, I couldn't pay much attention to it, though. One way or another, by the end of my workday, I tried to launch an app, and it failed due to lack of free space on the root partition (?!). It took about one more hour of work to figure out what had happened: for whatever reason, the file In other words, systemd-logind was storming the logs with constant, non-stop messages. The solution is documented in this StackExchange thread:Jan 29 15:40:14 server systemd-logind[438]: Suspending... Jan 29 15:40:14 server systemd-logind[438]: Failed to execute operation: Unit suspend.target is masked.
|