[HN Gopher] New Tool: lsds - List All Linux Block Devices and Se...
___________________________________________________________________
New Tool: lsds - List All Linux Block Devices and Settings in One
Place
Author : mfiguiere
Score : 54 points
Date : 2025-05-09 18:13 UTC (4 hours ago)
(HTM) web link (tanelpoder.com)
(TXT) w3m dump (tanelpoder.com)
| DonHopkins wrote:
| I always wanted the /dev/zero character device driver, which you
| can map into memory to clear it, or use as an infinite source of
| nulls, to use the minor node number as the value that got mapped
| into memory or produced, so you could make an infinite source of
| beeps with:
|
| mknod /dev/seven c 1 7
|
| I wonder what would happen if you made a /dev/seven device in
| your http servers public_html directory? Would it dutifully serve
| it up?
|
| Better yet, support for utf-8 unicode, so you can make an
| infinite source of poo emojis.
|
| The "Everything Is A File" philosophy should be taken to its
| logical conclusion.
| bitbang wrote:
| Very nice, needs option for json/jsonl output.
| tanelpoder wrote:
| Thanks! Yep I was thinking of doing that next, will be very
| easy as under the hood the data is stored in Python
| dictionaries.
| babuloseo wrote:
| can we package this for Arch? Arch Defense Taskforce where you
| at?
| tanelpoder wrote:
| I just added a little comment/errata regarding the NVME_QDEPTH
| column to the post (search for errata). I should probably
| rename that column to emphasize that (for now) it's the Linux
| nvme module level max QD and not the hardware one (it's
| complicated...)
| nerflad wrote:
| If you came to represent...
| https://wiki.archlinux.org/title/Creating_packages
|
| Maintaining an AUR package can be great fun and an instructive
| glimpse into what FLOSS maintainers go through.
| jayofdoom wrote:
| I'll note, lsblk _can_ return a heck of a lot more data than it
| does by default (and nvme drives show up there). lsblk -H will
| list for your system, and you can specify columns. You can also
| adjust output.
|
| I guess with this in mind, I'm curious how this is different?
| tanelpoder wrote:
| Hi, yep lsblk targets a wider area of functionality, like
| showing mountpoints, device UUIDs, while lsds focuses only on
| block device settings.
|
| Maybe the latest Linux versions have lsblk versions that
| support these columns, but in RHEL9 at least I don't see
| equivalents to lsds'es WBT_LAT, QDEPTH (not the same as lsblk's
| RQ-SIZE), WCACHE, FUA and some others. But these 4 are which I
| regularly need (especially when troubleshooting a yet another
| slow fsync() issue etc). I did and do use lsblk all the time
| too, but still end up catting and grepping various additional
| files and correlating the results, sometimes on systems with
| 100+ multipath block devices.
|
| The other reason was that I wanted a tool that shows me where
| it gets these values too (for myself and sometimes for
| explaining stuff to others).
|
| Edit: That being said, it shouldn't be hard at all to add the
| said extra fields to lsblk too.
___________________________________________________________________
(page generated 2025-05-09 23:00 UTC)