Why is lsblk not included in base install?

I have a question. How come lsblk is not included in base install?

A follow-up question. Do not all things that have a FreeBSD man page are included in the default install of FreeBSD? Especially, under System Administration, for example, which is what lsblk is under.
 
It isn't, because it is (a) not needed, (b) everything it done can be easily done other ways. On Linux, I think it is included in many distributions (I have on on a Debian, just checked, and remember seeing it on RHEL). It's a question of tradition and style. There is some geom invocation that creates a similar listing.

I don't understand your manpage question. Is the manpage for lsblk included in the base system? I don't see it.
 
There is some geom invocation that creates a similar listing.
But that's the thing. There's no native FreeBSD way to display what lsblk compiles into one output. There's a reason Linux sees heavy use of lsblk. I use lsblk a lot on FreeBSD. It's the first thing I wanted to use when I started using FreeBSD. 🥺
 
The program author was nice enough to write a proper manpage for it.
1+

Everything should have a manpage (or at least something resembling "proper documentation").
For what it's worth: I have an app for that if you/someone notice something doesn't have a manpage. My app certainly isn't perfect, but it should get someone well down the path of creating 'proper' documentation.
 
As far as I can see it (I needed to ddg it, to know what is is; never heard of it, neither have a use for it), it's a Linux tool for getting information on block devices.
FreeBSD comes - by default - with several tools like gpart, df, du, diskinfo, camcontrol, nvmecontrol, smartctl,...and with zfs you also better deal with all the zfs commands/tools anyway - fully capable to deal with all drive issues, at least with FreeBSD's default filesystems UFS and ZFS on FreeBSD's default partition schemes MBR and GPT.

If all that suits someone's needs would come by default that would result in a completely bloated default system, with >>95% of things installed, most people neither need nor want.
The idea of FreeBSD is to give a very basic, but a complete and fully functional base system - all you want/need extra, you add extra yourself.
Example: Many "jack-of-all-trades" systems or desktop environments come by default with several texteditors: vi, vim, nvim, emacs, geany,... What for? Not that those are bad, but most users need one. So install the one you need, instead to install twenty you don't need by default, wasting storage space, wasting bandwidth, wasting time just for saving the user the "unreasonable effort" of typing pkg install myeditor?
Think that through to all other tools/progams there are somebody has a use for! Fourty window managers and desktop environments all completely installed be default? You use one. And headless servers need none at all. So you would need what 2TB and three days of install time, just to get everything by default, and then throw everything you don't need from your drive again, which afterwards results in a 6...8GB system?🤪
Better kind of an empty box and add only what you need - at least I think that's smarter.
And FreeBSD's default "vanilla" installation is by far not an empty box, even if it may look like, just because it does not come with a GUI by default. Knowing all the tools a default FreeBSD have on board you don't need no other live-system for rescue issues; all you need is there. Just explore.


Do not all things that have a FreeBSD man page are included in the default install of FreeBSD?

All things on any unix[like] system shall have a man page. Man pages are the core and main documentation on Unix.
But it's not to FreeBSD to provide man pages apart from FreeBSD's man pages, but from those who wrote a program. (FreeBSD vs third party software)
Alas especially in Linux universe there are many who think man pages are not needed, or even no documentation at all.
IMO anything that does not come with a man page should not be allowed to the system.
 
gpart show is my equivilent. Problem is it uses 'index' number for partitions. So my command is gpart show -p for a view of partition names.

history | grep "gpart show"
Code:
 40979    20:15    gpart show -p da0
 40980    20:16    gpart show -p da0s1
 40981    20:16    gpart show -p da0s2
 40990    20:44    gpart show

 41071    22:32    gpart show
 41073    22:57    gpart show
 41074    22:57    gpart show -p
 41080    23:03    gpart show
 41093    23:10    gpart show
 41191    14:40    gpart show da0
 41402    18:28    gpart show da0
 41403    18:28    gpart show -p da0
 41451    16:21    gpart show -p da0
 41541    16:36    gpart show da0
 41560    21:05    gpart show da0
 41564    21:08    gpart show da0
 41569    21:13    gpart show da0
 41570    21:15    gpart show da0
 41573    21:17    gpart show da0
 41574    21:20    gpart show da0
 41605    22:01    gpart show da0
 41617    14:28    gpart show da0
 41618    14:29    gpart show -p da0
 41622    14:30    gpart show -p da0
 41746    21:34    gpart show -p da0
 41747    21:34    gpart show -p da0
 41748    21:34    gpart show -p da0
 41749    21:34    gpart show -p da0
 41754    21:38    gpart show -p da0
 41942    12:03    gpart show
 42043    20:07    gpart show da0
 42174    19:14    gpart show da0
 42175    19:15    gpart show da0
 42176    19:15    gpart show da0
 42177    19:16    gpart show da0
 42178    19:16    gpart show -p da0
 42181    19:19    gpart show -p da0
 42192    19:36    gpart show -p da0
 42212    20:25    gpart show -p da0
 42213    20:26    gpart show da0
 42214    20:26    gpart show -p da0
 42215    20:28    gpart show -p da0
 42216    20:30    gpart show -p da0
 42217    20:32    gpart show -p da0
 42219    20:33    gpart show -p da0
 42351    21:22    gpart show -p da0
 42352    21:22    gpart show -p da0
 42356    21:23    gpart show -p da0
 42360    21:26    gpart show -p da0
 42765    23:38    gpart show -p da0
 42768    23:39    gpart show -p da0
 42878    17:50    gpart show da0
 42880    17:51    gpart show -p da0
 44848    23:44    gpart show -p da0
 46290    12:35    gpart show
 46294    12:49    gpart show
 46295    12:49    gpart show da0
 46296    12:49    gpart show -p da0
 46301    12:51    gpart show
 46302    12:51    gpart show -p da0
 46305    12:53    gpart show da0
 46306    12:53    gpart show -p da0
 46307    12:53    gpart show -p da0s2
 46308    12:54    gpart show da0
 46309    12:54    gpart show da0s2
 46311    12:54    gpart show da0
 46313    12:55    gpart show da0
 46343    22:45    gpart show da0
 46899    19:14    gpart show da0
 46900    19:14    gpart show -p da0
 46915    16:02    gpart show da0
 
Is the manpage for lsblk included in the base system? I don't see it.
Nah. If any the man page would be installed when you install the prog.
I checked FreeBSD Manual Pages, and there is no entry for it; maybe the according man page server is not up to date, or, what I believe more, there is no man page for it at all. At least non that is called man page in the default meaning of it (some also confuse online/quick help with manpages...)
man page is, when I type man xyz in the shell.
 
And if the port isn't installed, you can still view the manpage. `man ./<path>/xyz.7` (but I'm searching for a reason why 'install' would have to do with it other than a quick compile/use type situation).

mandoc(1) is very cool! Need a quick down and dirty webpage? mandoc can help.
 
In another perspective, FreeBSD does not expose block device in /dev (a decision made in FreeBSD 3 or 4 era, I remember). For example, /dev/ada0 is a character special file. So lsblk is not a suitable name here.
 
Nah. If any the man page would be installed when you install the prog.
I checked FreeBSD Manual Pages, and there is no entry for it; maybe the according man page server is not up to date, or, what I believe more, there is no man page for it at all. At least non that is called man page in the default meaning of it (some also confuse online/quick help with manpages...)
man page is, when I type man xyz in the shell.
Oh, snap, you are right. It was a man page for CentOS (link). Sorry!
 
There is no doubt I have done the same as the OP. Landed on a Netbsd mangage hosted on our manpage system online. Redhat manpages the same.
You almost need to scroll down to very bottom and confirm the right OS before reading.
Not a bad thing I would call it an error by the search engines. Directing us to the wrong manpage.
 
Note that sysutils/lsblk is a shell script that has its documentation in itself.
Of course it would be better having manpage, but not 100% sure for relatively small and human-readable shell scripts like this.

Another thing to mention is that source codes for manpages are hard to read.
Not sure already existing or not, but it would be nice if there is kinda compiler that compiles HTML and/or markdown into manpage (or its source code).
Maybe images would be replaced by its ALT contexts, though.
 
"readme's" do not make good man pages. IMO, man pages should document how to use the software whereas readme's are more of sales pitches these days. -i.e. use my product--like and subscribe--it makes popcorn--I'm 100pct, so hire me and/or give me money-.

In my above link I started down that road but choose to implement using a "simple markdown" (sorry, I don't know all the dialects off the top of my head) to decouple a projects documentation from a readme's "github markdown" for that reason alone. The documentation, for all new projects, would suffer eventually because people wouldn't spend time writing a good description of their code/project and just rely on their readme.
 
Maybe the port maintainer (vermaden ) can enlighten us?

I wrote lsblk(8) as I liked that tool on Linux and FreeBSD did not had it - importing it into the FreeBSD Base System - as much as I would love to see that - is beyond my reach.

Note that sysutils/lsblk is a shell script that has its documentation in itself.
Of course it would be better having manpage, but not 100% sure for relatively small and human-readable shell scripts like this.

While lsblk(8) does not have a man page it does have a very large --help message.

Code:
% lsblk --help
usage:

  BASIC USAGE INFORMATION
  =======================
  # lsblk [DISK]
  # lsblk --disks | -d
  # lsblk --version

example(s):

  LIST ALL BLOCK DEVICES IN SYSTEM
  --------------------------------
  # lsblk
  DEVICE         MAJ:MIN SIZE TYPE                      LABEL MOUNT
  ada0             0:92  932G GPT                           - -
    ada0p1         0:100 200M efi                    efiboot0 -
    ada0p2         0:101 512K freebsd-boot           gptboot0 -
    <FREE>         -:-   492K -                             - -
    ada0p3         0:102 931G freebsd-zfs                zfs0 <ZFS>
    ada0p3.eli     0:106 931G freebsd-zfs                   - <ZFS>

  LIST ONLY da1 BLOCK DEVICE
  --------------------------
  # lsblk da1
  DEVICE         MAJ:MIN SIZE TYPE                      LABEL MOUNT
  da1              0:80  2.0G MBR                           - -
    da1s1          0:80  2.0G freebsd                       - -
      da1s1a       0:81  1.0G freebsd-ufs                root /
      da1s1b       0:82  1.0G freebsd-swap               swap SWAP

  LIST ENTIRE DISKS
  -----------------
  # lsblk -d
  DEVICE SIZE MODEL
  ada0   1.8T Samsung SSD 860 QVO 2TB
  ada1   119G SAMSUNG SSD PM830 mSATA 128GB
  -        2T TOTAL SYSTEM STORAGE

hint(s):

  DISPLAY PHYSICAL DISKS
  ----------------------
  # sysctl kern.disks
  kern.disks: ada0 da0 da1

  DISPLAY MEMORY BACKED DISKS
  ---------------------------
  # mdconfig -l
  md0
 
While lsblk(8) does not have a man page it does have a very large --help message.
Not exemplary.
The man page is the comprehensive full core documentation, containing explanations, ideas, examples, files, links, etc.
Help is not for learning the usage but just a brief reminder for quick short reference on the syntax, the most needed primary options, and maybe additionally on subcommands, e.g. .... --help breakpoint

It's inconvenient to receive a "No manual entry for ...", but when you use --help get a non as well formatted as a man page several pages long bog roll output on the terminal, with even less information than the already brief manpage. Especially on TTY very long outputs not automatically presented with the pager are kind of a nuisance.

You, as the developer, naturally know, how your software is to be used.
Of course I neither can, nor want to speak for everybody, but when for a freshly installed package I do not find a comprehendable documentation by which I can learn its usage, but only get a list thrown at me like for example something look like this, without any explanation, not even how to read that:
-a --append [[value=]PATTERN]{;[,num=(NUM)](|[, opt=(OPTIONS)}]|;<[, file=File]>) appends 😧 ?????
- so, when I see I would have a long, hard time doing trial and error, only,
I directly do a pkg delete crappackage ⏩🗑️
And it's unlikely I give it another try. I look for other options, and once I found suitable ones, satisfying me, there is no need to change until a tool is changed in a way I don't want to or can't use it anymore.

I don't waste my time the developer saved her-/himself obviously not taking his/her own software serious enough to document it, desperately trying to comprehend what a developer may have meant - and maybe even being accused to be too stupid not being born with that knowledge, or too lazy to read the source code. 🧐

A software not properly documented is obviously not meant to be used by others.

Maybe you reconsider to make a man page for it.
 
I will speak for myself and say that I disagree completely with Maturin. If an app is useful and does its job, and there's some way (any way) that I can learn how to use it, and, to boot, it's free of charge, I'll use it happily and be very grateful through the ether to the developer. So, thank you, vermaden for programing lsblk(8) and including enough clues for the rest of the world to use it.
 
My personal scripts aren't worth the pixels they're printed on but I had played around with writing man pages for them off and on and recently did the whole enchilada just for myself[1]. It helps me remember what I was doing and how to use my own stuff which I sometimes don't use for awhile and so forget. Perhaps the most interesting thing I discovered was that, while documenting them, I would sometimes start to write 'this has this or that bug or limitation or does this stupid thing that I should improve' and then realized I shouldn't write that down, but just improve the script so that I could say "this does x'.

And, yes, as a user, I find man pages to be the essential basic documentation and really appreciate well-written ones. Typing in "man foo" is generally the first thing I do with a new or unknown program and getting "No manual for 'foo'" is a disappointing waste of time. That's one of the things I love about FreeBSD so far, is the excellent documentation and the man pages that seem to want to be read. In Linux, I hate and complain about man pages that only point to info pages or man pages written by Debian which basically are just help messages converted to man but at least Debian basically won't have a program in the system without a man page, so that's something. I agree with AlfredoLlaquet that I'm happy for any decent program and, no, the dev doesn't have to write a man page, but I absolutely agree with Maturin (though I might not express it so strongly) that the man page actually *is* part of the program and it's quality (or absence) does reflect on the program. I might not immediately remove it but I probably would look for something that, all other things being equal, broke the tie with the man page. That said, I use lsblk a lot in Linux and it's good to know it exists in FreeBSD and thanks for that. :)

[1] To be fair, though, I have a strange fascination with 'markup' and actually sort of enjoy writing it and seeing it processed into something spiffy.
 
Back
Top