LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-14-2020, 08:56 PM   #1
h2-1
Member
 
Registered: Mar 2018
Distribution: Debian Testing
Posts: 562

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
Huge inxi/pinxi upgrade, new features, Logical volumes, raid rewrite, beta testers?


I've largely completed the big refactor of big chunks of pinxi/inxi. This has cleaned up a LOT of bad perl stuff I was doing, optimized the code, sped it up, and fixed some long standing issues that were not fixable before this refactor. This will become, fairly soon, unless bugs are found, inxi 3.2.00, the long awaited logical volume handling release, plus too many small and larger new features, bug fixes, improvements, to list (the changelog is currently at about 375 lines)

RAM stick reports were improved greatly thanks to a timely issue an inxi user posted, now they pick the actual speed, not the specified speed, and also look for logical absurdities in speeds and note that.

As always: pinxi -U
if you have pinxi installed already, that being the development version of inxi, and
cd /usr/local/bin && sudo wget -O pinxi smxi.org/pinxi && sudo chmod +x pinxi
to install it.

The original cause for this rewrite, besides covid boredom, were two long standing issues, one, disk used totals being wrong if raid is present, and 2, logical volume display, which is now the -L/--logical option.

Most of the block device logic had to be either refactored or rewritten to make these updates possible, but I also took the opportunity to update a lot of the codebase, last I checked, pinxi has 4500 lines different from inxi stable, ouch!! RAID required a full refactor to get this new logic working as well, since it was kind of stuck on a messy hack that only supported mdraid / zfs, and supported them badly I think.

So the potential for bugs is real. Ways bugs can manifest are for example, N/A showing instead of 0 for storage or used sizes for various features, for example.

For systems with LVM (root required, sadly), ZFS, or Mdraid, pinxi/inxi now creates two totals, raw: and usable:, the usable: comes from the actual storage space you can use on the system, which means, the raid size total minus the raid component sizes. The 'used:' disk storage now always refers to the percent of usable total. For LVM systems, pinxi will also show lvm-free: for cases when the volume groups have free space.

The examples below were made to be silly, mainly to test various scenarios to catch bugs, and make sure all the features worked, I realize/hope most people don't actually do something like that, lol, but if you do, seeing the output of pinxi -L, -Lxxy, -Lay, would be great, because I do not have enough non-me generated test systems to make sure I haven't missed anything obvious or not obvious.

Thanks for checking it out.

For regular pinxi features, the most useful options to run are pinxi alone, pinxi -b, pinxi -F, pinxi -v8, with -z to filter if you are going to post output.

Here's a sample of the short and long forms of --logical from a test system I made to create complicated luks/lvm/bcache scenarios, and to test the logic to make sure it works as intended.

Code:
# pinxi -Lxxy
Logical:
  Device-1: VG: vg1 type: LVM2 size: 15.62 GiB free: 0 KiB 
  LV-1: split1 type: linear dm: dm-0 size: 7.81 GiB 
  Components: p-1: sdb1 
  LV-2: split2 type: linear dm: dm-1 size: 7.81 GiB 
  Components: p-1: sdb2 
  Device-2: VG: vg2 type: LVM2 size: 7.79 GiB free: 0 KiB 
  LV-1: top1 type: linear dm: dm-3 size: 3.89 GiB 
  Components: c-1: dm-2 cc-1: bcache0 ccc-1: md0 cccc-1: dm-0 ppppp-1: sdb1 
  cccc-2: dm-1 ppppp-1: sdb2 ppp-1: sdb3 
  LV-2: top2 type: linear dm: dm-4 size: 3.89 GiB 
  Components: c-1: dm-2 cc-1: bcache0 ccc-1: md0 cccc-1: dm-0 ppppp-1: sdb1 
  cccc-2: dm-1 ppppp-1: sdb2 ppp-1: sdb3 
  Device-3: extreme type: LUKS dm: dm-2 size: 7.79 GiB 
  Components: c-1: bcache0 cc-1: md0 ccc-1: dm-0 pppp-1: sdb1 ccc-2: dm-1 
  pppp-1: sdb2 pp-1: sdb3 
  Device-4: bcache0 type: bcache size: 7.8 GiB 
  Components: c-1: md0 cc-1: dm-0 ppp-1: sdb1 cc-2: dm-1 ppp-1: sdb2 p-1: sdb3 


# pinxi -Ly
Logical:
  Device-1: VG: vg1 type: LVM2 size: 15.62 GiB free: 0 KiB 
  LV-1: split1 type: linear size: 7.81 GiB Components: p-1: sdb1 
  LV-2: split2 type: linear size: 7.81 GiB Components: p-1: sdb2 
  Device-2: VG: vg2 type: LVM2 size: 7.79 GiB free: 0 KiB 
  LV-1: top1 type: linear size: 3.89 GiB Components: c-1: dm-2 
  LV-2: top2 type: linear size: 3.89 GiB Components: c-1: dm-2 
  Device-3: extreme type: LUKS size: 7.79 GiB Components: c-1: bcache0 
  Device-4: bcache0 type: bcache size: 7.8 GiB Components: c-1: md0 p-1: sdb3
For more verbose output, the -y1 option sometimes is a good choice, for key: value paired lines:

Code:
pinxi -Lay1
Logical:
  Device-1: 
    VG: vg1
    type: LVM2
    size: 15.62 GiB
    free: 0 KiB
    LV-1: split1
      maj-min: 253:0
      type: linear
      dm: dm-0
      size: 7.81 GiB
      Components: 
        p-1: sdb1
          maj-min: 8:17
          size: 7.81 GiB
    LV-2: split2
      maj-min: 253:1
      type: linear
      dm: dm-1
      size: 7.81 GiB
      Components: 
        p-1: sdb2
          maj-min: 8:18
          size: 7.81 GiB
  Device-2: 
    VG: vg2
    type: LVM2
    size: 7.79 GiB
    free: 0 KiB
    LV-1: top1
      maj-min: 253:3
      type: linear
      dm: dm-3
      size: 3.89 GiB
      Components: 
        c-1: dm-2
          maj-min: 253:2
          mapped: extreme
          size: 7.79 GiB
          cc-1: bcache0
            maj-min: 252:0
            size: 7.8 GiB
            ccc-1: md0
              maj-min: 9:0
              size: 7.8 GiB
              cccc-1: dm-0
                maj-min: 253:0
                mapped: vg1-split1
                size: 7.81 GiB
                ppppp-1: sdb1
                  maj-min: 8:17
                  size: 7.81 GiB
              cccc-2: dm-1
                maj-min: 253:1
                mapped: vg1-split2
                size: 7.81 GiB
                ppppp-1: sdb2
                  maj-min: 8:18
                  size: 7.81 GiB
            ppp-1: sdb3
              maj-min: 8:19
              size: 4.39 GiB
    LV-2: top2
      maj-min: 253:4
      type: linear
      dm: dm-4
      size: 3.89 GiB
      Components: 
        c-1: dm-2
          maj-min: 253:2
          mapped: extreme
          size: 7.79 GiB
          cc-1: bcache0
            maj-min: 252:0
            size: 7.8 GiB
            ccc-1: md0
              maj-min: 9:0
              size: 7.8 GiB
              cccc-1: dm-0
                maj-min: 253:0
                mapped: vg1-split1
                size: 7.81 GiB
                ppppp-1: sdb1
                  maj-min: 8:17
                  size: 7.81 GiB
              cccc-2: dm-1
                maj-min: 253:1
                mapped: vg1-split2
                size: 7.81 GiB
                ppppp-1: sdb2
                  maj-min: 8:18
                  size: 7.81 GiB
            ppp-1: sdb3
              maj-min: 8:19
              size: 4.39 GiB
  Device-3: extreme
    maj-min: 253:2
    type: LUKS
    dm: dm-2
    size: 7.79 GiB
    Components: 
      c-1: bcache0
        maj-min: 252:0
        size: 7.8 GiB
        cc-1: md0
          maj-min: 9:0
          size: 7.8 GiB
          ccc-1: dm-0
            maj-min: 253:0
            mapped: vg1-split1
            size: 7.81 GiB
            pppp-1: sdb1
              maj-min: 8:17
              size: 7.81 GiB
          ccc-2: dm-1
            maj-min: 253:1
            mapped: vg1-split2
            size: 7.81 GiB
            pppp-1: sdb2
              maj-min: 8:18
              size: 7.81 GiB
        pp-1: sdb3
          maj-min: 8:19
          size: 4.39 GiB
  Device-4: bcache0
    maj-min: 252:0
    type: bcache
    size: 7.8 GiB
    Components: 
      c-1: md0
        maj-min: 9:0
        size: 7.8 GiB
        cc-1: dm-0
          maj-min: 253:0
          mapped: vg1-split1
          size: 7.81 GiB
          ppp-1: sdb1
            maj-min: 8:17
            size: 7.81 GiB
        cc-2: dm-1
          maj-min: 253:1
          mapped: vg1-split2
          size: 7.81 GiB
          ppp-1: sdb2
            maj-min: 8:18
            size: 7.81 GiB
      p-1: sdb3
        maj-min: 8:19
        size: 4.39 GiB

Last edited by h2-1; 12-14-2020 at 10:28 PM.
 
Old 12-15-2020, 06:35 AM   #2
FTIO
Member
 
Registered: Mar 2015
Location: Las Vegas, NV
Distribution: Slackware 15.0 x64, Slackware Live 15.0 x64
Posts: 618

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
I really like this little app. Been using it for about 5 years now. Here's what I get after I just did an
Code:
-U
of pinxi...


Code:
~# pinxi -F -x                   
System:    Host: TOSIAR Kernel: 4.4.240 x86_64 bits: 64 compiler: gcc v: 5.5.0 Console: tty 1 
           Distro: Slackware 14.2 
Machine:   Type: Desktop Mobo: ASUSTeK model: M5A97 R2.0 v: Rev 1.xx serial: 160164826500506 
           BIOS: American Megatrends v: 2603 date: 06/26/2015 
CPU:       Info: 8-Core model: AMD FX-8350 bits: 64 type: MCP arch: Bulldozer rev: 0 L2 cache: 2 MiB 
           flags: avx lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 64219 
           Speed: 4014 MHz min/max: N/A Core speeds (MHz): 1: 4014 2: 4014 3: 4014 4: 4014 5: 4014 6: 4014 
           7: 4014 8: 4014 
Graphics:  Device-1: NVIDIA GM206 [GeForce GTX 960] vendor: eVga.com. driver: nvidia v: 455.28 bus ID: 01:00.0 
           Display: server: X.org 1.18.3 driver: nvidia 
           Message: Advanced graphics data unavailable for root. 
Audio:     Device-1: NVIDIA vendor: eVga.com. driver: snd_hda_intel v: kernel bus ID: 01:00.1 
           Device-2: Creative Labs SB Audigy driver: snd_emu10k1 v: kernel bus ID: 05:06.0 
           Sound Server: ALSA v: k4.4.240 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: ASUSTeK P8 series 
           driver: r8169 v: 2.3LK-NAPI port: d000 bus ID: 02:00.0 
           IF: eth1 state: up speed: 1000 Mbps duplex: full mac: 9c:5c:8e:89:68:8a 
Drives:    Local Storage: total: 1.02 TiB used: 182.28 GiB (17.5%) 
           ID-1: /dev/sda vendor: Western Digital model: WD1003FZEX-00MK2A0 size: 931.51 GiB 
           ID-2: /dev/sdb vendor: A-Data model: SX930 size: 111.79 GiB 
Partition: ID-1: / size: 40 GiB used: 20.64 GiB (51.6%) fs: reiserfs dev: /dev/sdb1 
           ID-2: /home size: 71.79 GiB used: 49.85 GiB (69.4%) fs: reiserfs dev: /dev/sdb2 
Swap:      Alert: No Swap data was found. 
Sensors:   System Temperatures: cpu: 22.8 C mobo: N/A 
           Fan Speeds (RPM): cpu: 0 
Info:      Processes: 286 Uptime: 7d 8h 42m Memory: 11.69 GiB used: 2.36 GiB (20.2%) Init: SysVinit runlevel: 4 
           Compilers: gcc: 5.5.0 clang: 3.8.0 Packages: 1560 Shell: Bash v: 4.3.48 pinxi: 3.1.09-108
As far as I know (which isn't much), it's working as it's supposed to. Normally I do a
Code:
pinxi -F -a -S -m -W <location>
just for some more info for the heck of it. I like how the info on the drives gives how long they've been in use too with this command! My HDD has been in service for 6 and a half years (still working smoothly, by the way), and the SDD has been in use for 4 years.
 
Old 12-15-2020, 01:56 PM   #3
h2-1
Member
 
Registered: Mar 2018
Distribution: Debian Testing
Posts: 562

Original Poster
Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
Unless there's some issues observed soon, this will go live as inxi 3.2.00 later today. I didn't get the feedback I was hoping for, which is unfortunate for a set of changes this big, and the complexity of the --logical feature, so I'll have to trust that I did good enough testing on enough systems to catch most issues. I've been working on this for a few too many weeks, and it's probably time to move onto other activities, unless someone notices something off, or odd, or wrong.

Last edited by h2-1; 12-15-2020 at 01:57 PM.
 
2 members found this post helpful.
Old 12-15-2020, 05:26 PM   #4
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,221

Rep: Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943
I tested it out with my LUKS/LVM volumes, seems to work as intended, nice one.
 
1 members found this post helpful.
Old 12-15-2020, 05:46 PM   #5
h2-1
Member
 
Registered: Mar 2018
Distribution: Debian Testing
Posts: 562

Original Poster
Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
can you show the output? I'm curious, I've only been able to test on vms and one remote test system. This was a hard feature to get working because it required refactoring several other block features and tools internally to make sure they could communicate and share certain data. In particular in RAID I had to strip out the original hacks from when I added zfs support to mdraid as a sort of tacked on bit, and make raid actually handle any number of raid types, like LVM, which required removing all the old hacks and trying to do it closer to 'right'.

Last edited by h2-1; 12-15-2020 at 05:51 PM.
 
Old 12-15-2020, 05:55 PM   #6
drgibbon
Senior Member
 
Registered: Nov 2014
Distribution: Slackware64 15.0
Posts: 1,221

Rep: Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943Reputation: 943
pinxi -L
Code:
Logical:   Device-1: VG: cryptvg type: LVM2 size: 232.37 GiB free: 0 KiB 
           LV-1: root type: linear size: 224.37 GiB Components: c-1: dm-0 
           LV-2: swap type: linear size: 8 GiB Components: c-1: dm-0 
           Device-2: lukssda1 type: LUKS size: 1.72 TiB Components: p-1: sda1 
           Device-3: lukssdb2 type: LUKS size: 232.37 GiB Components: p-1: sdb2
pinxi -Lxxy
Code:
Logical:
  Device-1: VG: cryptvg type: LVM2 size: 232.37 GiB free: 0 KiB 
  LV-1: root type: linear dm: dm-2 size: 224.37 GiB 
  Components: c-1: dm-0 pp-1: sdb2 
  LV-2: swap type: linear dm: dm-1 size: 8 GiB 
  Components: c-1: dm-0 pp-1: sdb2 
  Device-2: lukssda1 type: LUKS dm: dm-3 size: 1.72 TiB 
  Components: p-1: sda1 
  Device-3: lukssdb2 type: LUKS dm: dm-0 size: 232.37 GiB 
  Components: p-1: sdb2
pinxi -Lay
Code:
Logical:
  Device-1: VG: cryptvg type: LVM2 size: 232.37 GiB free: 0 KiB 
  LV-1: root maj-min: 253:2 type: linear dm: dm-2 size: 224.37 GiB 
  Components: 
  c-1: dm-0 maj-min: 253:0 mapped: lukssdb2 size: 232.37 GiB 
  pp-1: sdb2 maj-min: 8:18 size: 232.38 GiB 
  LV-2: swap maj-min: 253:1 type: linear dm: dm-1 size: 8 GiB 
  Components: 
  c-1: dm-0 maj-min: 253:0 mapped: lukssdb2 size: 232.37 GiB 
  pp-1: sdb2 maj-min: 8:18 size: 232.38 GiB 
  Device-2: lukssda1 maj-min: 253:3 type: LUKS dm: dm-3 size: 1.72 TiB 
  Components: 
  p-1: sda1 maj-min: 8:1 size: 1.72 TiB 
  Device-3: lukssdb2 maj-min: 253:0 type: LUKS dm: dm-0 size: 232.37 GiB 
  Components: 
  p-1: sdb2 maj-min: 8:18 size: 232.38 GiB
 
Old 12-15-2020, 06:03 PM   #7
h2-1
Member
 
Registered: Mar 2018
Distribution: Debian Testing
Posts: 562

Original Poster
Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
Oh, good, that's a much more sane setup than my test stuff, I had gotten worried that the output was too long, but that's really because I was trying to create all the scenarios imaginable, most of which make no sense to do rationally, and because I just kept adding more disks and volume groups and layers. That output is much more manageable, thanks.
 
Old 12-16-2020, 12:48 PM   #8
h2-1
Member
 
Registered: Mar 2018
Distribution: Debian Testing
Posts: 562

Original Poster
Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
This is now out, inxi 3.2.00 is now inxi current master. As always, run pinxi to have the latest stuff, and to help find/fix issues, pinxi is already ahead of inxi because I decided to continue the internal code refactoring, but didn't want to delay 3.2 any longer, the refactors in this case either make no difference to users, or could potentially create bugs, so there was no point in rolling them into 3.2 since that would just delay release more.

Last edited by h2-1; 12-16-2020 at 01:04 PM.
 
3 members found this post helpful.
Old 12-16-2020, 06:19 PM   #9
babydr
Member
 
Registered: Aug 2015
Location: Fairbanks , Alaska
Distribution: Slackware-14.2 & 15.0
Posts: 233

Rep: Reputation: 45
Not sure if this is the Right place for a error/warning report from inxi-3.2.00-1

The logfile s/b attached .

Without --dmidecode there are no warnings or Errors .

I also attached a diff between the log with & without --dmidecode output , Please also note the Machine: area differences .

Hth , JimL

sudo ./inxi -FzjJxy 80 --dmidecode 2>&1 | tee inxi-3.2.00-1--dmidecode-errors.log.

Last edited by babydr; 12-16-2020 at 06:40 PM. Reason: More Missing data .
 
Old 12-16-2020, 07:17 PM   #10
h2-1
Member
 
Registered: Mar 2018
Distribution: Debian Testing
Posts: 562

Original Poster
Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
This took a minute to figure out, it's one of the unintended consequences I feared from switching to stricter array dereferencing, in the pre refactor version I'd used splice to cut out the first parts of the derived arrays that weren't needed, but with using the actual data, when inxi does that, it's actually removing the first elements of the referenced arrays, which then makes the tests fail.

I was able to reproduce a form of this failure but using a different set of dmidecode features, but I think, hope, it's the same cause. On yours, my hope/guess is it was Battery using dmidecode that stripped out the first values, not positive though.
 
Old 12-16-2020, 07:56 PM   #11
h2-1
Member
 
Registered: Mar 2018
Distribution: Debian Testing
Posts: 562

Original Poster
Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
pinxi 3.2.00-03 should have this resolved, I hope, that issue I think only happened with dmi data, and would only manifest on the second use of the dmi data array, after splice had removed the indexes, heh. I was hoping to get this type of bug caught and fixed before release, but that's fine, at least it was found.

These fixes should correct your issues I believe.

Update/install pinxi [not inxi] to confirm this is corrected now in your case.

My case triggered different sets of errors, but hopefully it's the same cause, if it didn't fix it, then post the output of:

inxi -mM --dmidecode --dbg 2

which will include the internal dmidecode data.

Last edited by h2-1; 12-16-2020 at 09:25 PM.
 
Old 12-17-2020, 02:16 PM   #12
h2-1
Member
 
Registered: Mar 2018
Distribution: Debian Testing
Posts: 562

Original Poster
Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
Code:
Use of uninitialized value in string eq at ./inxi line 11917.
This was actually an old bug, there were two failures, for dmidecode machine data, it failed to set the field board_version, and in the initial output tests, it failed to check if board_version was actually set before doing a string comparison on it. This bug has been present since inxi perl was created, and simply never manifested because only specific systems running --dmidecode for machine data would ever manifest it, and even then, most would not, or I would have seen a few years ago. This bug would never manifest on most debugger datasets because they don't use --dmidecode option to start inxi with.

In other words, a great bug find!! Since it is not always reproducible, requires specific hardware data to trigger, yet is a real bug.

This only occurs in a subset of systems, but luckily I found one where it does.

The other bug was the repeated one, that was introduced in 3.2, and is fixed now in pinxi. That one always happened if you used the right options, regardless of system.

So thanks for thinking of a test -F --dmidecode that exposed these old and new bugs, and for having a system where those bugs would trigger at all.

Last edited by h2-1; 12-17-2020 at 03:44 PM.
 
1 members found this post helpful.
Old 12-17-2020, 05:04 PM   #13
h2-1
Member
 
Registered: Mar 2018
Distribution: Debian Testing
Posts: 562

Original Poster
Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
Since I need to move on, these fixes are now in 3.2.01, rushed out the door, that also includes some further internal refactoring but that should not be visible to users, just style adjustments.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Beta testers for Perl inxi requested h2-1 Slackware 147 12-14-2020 09:00 PM
rmlint-2.0.0 - a lint/duplicate finder [rewrite of old rmlint, testers wanted] sahib_bommelig Linux - General 13 10-25-2015 09:55 AM
Failure to resize logical volumes raid mirror chiendarret Linux - Software 1 06-04-2014 08:35 PM
proper way to use testdisk to recover missing logical volumes on a raid 5 w/ LVM2 markley268 Ubuntu 1 06-21-2009 12:02 PM
openSUSE 10.3 to 11.0 Upgrade Problem - install can't see logical volumes? wmcgeorge SUSE / openSUSE 1 06-23-2008 06:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration