LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 06-12-2023, 02:15 PM   #1
h2-1
Member
 
Registered: Mar 2018
Distribution: Debian Testing
Posts: 562

Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
inxi/pinxi - RAM/Memory + partitions, file systems, and drive use


A few more things came around based on some random user observations, and things I've noticed but ignored. This gets fairly arcane, but I have here hit issues that I'm not solid on, and have added debuggers etc to make figuring some of these things easier.

All these are running now in pinxi:
Code:
pinxi -U
# or, if not  installed:
wget -O /usr/local/bin/pinxi smxi.org/pinxi && chmod +x /usr/local/bin/pinxi
The System RAM/Memory: it appears in -m, -tm (if not -m), and -I (if not -tm or -m).

Code:
# Thinkpad T400 laptop:
Memory:    System RAM: total: 4 GiB available: 2.43 GiB used: 325.7 MiB (13.1%) igpu: 128 KiB
           Array-1: capacity: 8 GiB slots: 2 modules: 2 EC: None max-module-size: 4 GiB
           Device-1: DIMM 1 type: DDR3 detail: synchronous size: 2 GiB speed: 2132 MT/s (1066 MHz)
           Device-2: DIMM 2 type: DDR3 detail: synchronous size: 2 GiB speed: 2132 MT/s (1066 MHz)
System RAM true total
Starting with the change to show Memory available:, that being the technical term, the RAM the system has available to it on boot, as I understand it, I started wondering if there was some way to get the actual physical total, and ended up with 3, one is solid, based on dmidecode data, the second requires superuser, and is a slight hack, and the third can be run as user assuming you have a kernel compiled with CONFIG_MEMORY_HOTPLUG enabled.
  1. I believe Slackware kernels are compiled with this, mine has it. Easy to see if you have this directory: /sys/devices/system/memory your kernel supports that. That's for allowing hot swapping ram, which is nowadays mostly useful from what I gather in virtual machine use, but also on big hardware.

    This lets this rough one liner run:
    Code:
    cd /sys/devices/system && echo $(( $(grep -x online memory/memory[0-9]*/state|wc -l) * 0x$(cat memory/block_size_bytes) / 1024**3 ))
    block_size_bytes is a file that has a hex number of bytes per block, which are memoryX. These can be online: memoryX/state == online or memoryX/online == 1 (inxi uses that method because it's more efficient).

    I have seen block sizes of 8000000 (128 MMiB) and 80000000 (2 GiB) so far.

    In ideal cases, this returns the amound of physical RAM, but, sadly, this being the real world, I almost immediately found corner cases that broke the logic, which is my first question:

    Why do some systems have 1 or 2 extra blocks is a total mystery to me, I'm not sure what they would reference since there is no physical RAM that can correspond.

    So that was method one, it's usually right, unless it's wrong, and when it's wrong, it's wrong by 1 or 2 blocks so far, which results in 256 MiB to 2 TiB oversize.

    To resolve this, pinxi shows note: check when the source is /sys/devices/system/memory.

    --dbg 54 will show the actual sizes of what was found in /sys. --dbg 53,54 will show the raw KiB/block counts and the actual sizes.
  2. This brought me to method 2, /proc/iomem, which I only recently became aware of as a possible data source.

    This file requires superuser to read with real data, if read as user, its values all become 0 ranges.

    I thought this would be a usable source, but of course immediatly hit exceptions and oddities.

    Code:
    00000000-00000fff : Reserved
    00001000-0009d3ff : System RAM
    0009d400-0009ffff : Reserved
    00000000-00000000 : PCI Bus 0000:00
    000a0000-000dffff : PCI Bus 0000:00
      000c0000-000cffff : Video ROM
    000e0000-000fffff : Reserved
      000f0000-000fffff : System ROM
    00100000-09c3efff : System RAM
      01000000-021fffff : Kernel code
      02200000-02bf8fff : Kernel rodata
      02c00000-02dc11bf : Kernel data
      0358b000-039fffff : Kernel bss
    09c3f000-09ffffff : Reserved
      ...
    The docs say that System RAM conform to the actual Physical RAM ranges, minus some reserved stuff, in particular vram / iGPU, internal gpus that is, not standalone devices with their own RAM. So the method there is to just add up the system ram ranges, then add in any gpu ram found, and that should in theory be close to the total. Only it isn't always, so I've used a hack, which is not lovely, of taking the result, after adding in detected gpu ram, and rounding it up to the nearest integer if it's >~ 2 GiB. My first version had it without the gpu ram added back in, but someone had a system with 1 GiB gpu ram reserved, but oddly, showing only a total of 544 MiB (512 + 32 we assume), which then dropped the total down by 1 GiB, so I then added the iGPU ram back in and it worked again, though in that case, it's rounding say, 31.3 GiB ram up to 32.

    As the engineers say, not ideal. As with the /sys method, I am finding that this second method 'usually' works quite well, now it shows igpu ram if it's present (I think with apu/igpu stuff mostly), and it seems to be accurate.

    To resolve this uncertainty, inxi uses note: est. to let the user know this isn't certainly right, but probably is.

    To see what that data really is: sudo pinxi -S --dbg 54

    Code:
    # trimmed
    ...
    fedd4000-fedd5fff : Reserved
          size: 8 KiB
    fee00000-ffffffff : PCI Bus 0000:00
          size: 18 MiB
      fee00000-fee00fff : Local APIC
          size: 4 KiB
        fee00000-fee00fff : pnp 00:03
          size: 4 KiB
      ff000000-ffffffff : Reserved
          size: 16 MiB
        ff000000-ffffffff : pnp 00:03
          size: 16 MiB
    100000000-83f37ffff : System RAM
          size: 28.99 GiB
    83f380000-83fffffff : Reserved
          size: 12.5 MiB
    
    iomem:
    System: 31.92 GiB
    Sytem+iGPU: 31.92 GiB
    Reserved: 70 MiB
    Reserved-iGPU: 70 MiB
    iGPU: 0 KiB
    
    Info:
      Processes: 522 Uptime: 5d 22h 59m Memory: total: 32 GiB note: est.
      available: 31.27 GiB used: 10.3 GiB (32.9%) Shell: Bash pinxi: 3.3.27-12
    I'm hoping this --dbg 54 will make it more obvious where the hidden RAM lives, or if it's as simple as adding back in the reserved ram, though pci and other devices also have such space, kernel memory is confusing and I won't pretend I understand it.
  3. This led me to a final absolute override, one that is right, but required some refactoring to let the memory class get data from the ram class, which is that it now just counts up all the ram it finds with dmidecode, as root and dmidecode installed of course, and believes that number. This won't always work because some systems, particularly ones with embedded RAM, won't show this info, but on systems with normal ram sticks, I believe it's always right. Hopefully.

    Because this is 'real' data, no 'note:' item appears after the total:.

Obviously, the ideal is to get the amount of physical ram present as user, not superuser, but this is a significant improvement because first, I hadn't ever really paid attention to the question of reserved on boot ram (you can see this in dmesg I believe, unless your dmesg is filled with error messages, with: dmesg | grep RAM. I think.

I don't however use dmesg as a data source in inxi because it's too unreliable in Linux.

To debug the /sys and /proc methods, you can use: --dbg 53 which will show you the KiB totals for the data in each section, and for /sys, how many online blocks were found.

This is a Liquorix/zen kernel, which is not compiled with that option, so only /proc/iomem is used.
Code:
# desktop, no igpu present, the 3rd 0 item is igpu if found
sudo pinxi -I --dbg 53
proc/iomem: $VAR1 = \[
            '33475437',
            '71719',
            '0'
          ];
Info:
  Processes: 519 Uptime: 5d 22h 38m Memory: total: 32 GiB note: est.
  available: 31.27 GiB used: 10.25 GiB (32.8%) Shell: Bash pinxi: 3.3.27-12
You'll note that: perl -E 'say 33475437/1024**2'

returns: 31.9246644973755 which is just a hair under 32 GiB.

One question I have is, can I find all the ram found by adding in some other line values from /proc/iomem besides reserved igpu ram? Perfect would be to end up with the math working correctly, and giving the actual physical ram. _Most_ systems are working fine, but some don't.

File systems, partitions, total disk used

I also did a big upgrade, which I'm not sure about the specifics yet, for how partitions exclude or include what to show for various file system types, that is a full refactor of those items, so I'm still not solid on what to show and what not to show, although what to exclude from local disk used totals is obvious, that's anything that is either an overlay type file system, an iso/archive type file system, or a distributed/remote type file system.

i hit this issue while testing some mtp stuff, aka, android phone mounting, and realized inxi did not know about mtp as a possible type, so I did a full redo of that, including the docs/inxi-partitions.txt file.

I basically here just have a question: do you think showing things like distributed file systems along with stuff like nfs or smb / cifs is worth it? inxi/pinxi already shows anything that uses a recognizable remote syntax, like machine:/data/dir but there's many corner cases where the system won't get that syntax, at least I think there are, but I have no access to clustered, distributed, etc, file systems.

Overlay or stackable file systems are excluded from everything because they are just confusing.

But other things I decided might be worth revisiting, for example, inxi has never shown iso type file system, like iso9660 since the notion was, it's not a partition, but as I thought of it, I realized, well, inxi does show stuff like smb/cifs/nfs mounts, and I believe sshfs etc, so why should it not show all remote / iso / archive type file systems too?

This logic is largely fine and working, my only question there is what inxi should or not show under the 'Partitions: ' section, it's always excluded kernel type file systems, and ram file systems, but the rest has always been slightly inconsistent.

Last edited by h2-1; 06-12-2023 at 03:49 PM.
 
Old 06-12-2023, 04:35 PM   #2
h2-1
Member
 
Registered: Mar 2018
Distribution: Debian Testing
Posts: 562

Original Poster
Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
The debuggers helped, I am getting correct totals from /proc/iomem when I use System RAM + Reserved (including any video ram used) + RAM buffer and tweaking for some legacy syntaxes.

So I may be able to get rid of the note: est. once I can confirm this is correct on more hardware.

Code:
iomem:
System: 7.89 GiB
Buffer: 26 MiB
Sytem+iGPU: 7.95 GiB
Sytem+reserved: 7.97 GiB
Sytem+reserved+buffer: 8 GiB
Reserved: 82.1 MiB
Reserved-iGPU: 18.1 MiB
iGPU: 64 MiB
PCI Bus: 498.2 MiB

proc/iomem: $VAR1 = \[
            '8383808',
            '18510',
            '65536'
          ];
Info:
  Processes: 521 Uptime: 6d 1h 32m Memory: total: 8 GiB note: est.
  available: 31.27 GiB used: 10.5 GiB (33.6%) igpu: 64 MiB Shell: Bash
  pinxi: 3.3.27-13
It's still coming in a few hundredths of a GiB under, but with System ROM

Last edited by h2-1; 06-12-2023 at 06:22 PM.
 
Old 06-12-2023, 06:01 PM   #3
babydr
Member
 
Registered: Aug 2015
Location: Fairbanks , Alaska
Distribution: Slackware-14.2 & 15.0
Posts: 233

Rep: Reputation: 45
@h2-1 , Where should we place our finding of the output from 'pinxi -I --dbg 53' and the hardware info that it was run on ?
Tia , JimL
the HW info can be a bit verbose .
 
Old 06-12-2023, 06:29 PM   #4
h2-1
Member
 
Registered: Mar 2018
Distribution: Debian Testing
Posts: 562

Original Poster
Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
After updating pinxi to latest, just put it here, that's easiest.

I improved the debugger, so:

sudo or root, whichever:
Code:
sudo pinxi -I --dbg 53,54
will show the data.

I've gotten it so it's within a few thousands of the actual number now. With a few legacy exceptions, but I grabbed those old /proc/iomem samples from redhat website, and I don't even know if they are real values or just sample/examples. Sadly the inxi debugger did not collect /proc/iomem data until this current pinxi so I don't have any old data to check and test against that is real, which is usually how I figure these questions out.

There is one newer system someone gave me data for that unfortunately is hitting a few thousands OVER the real physical ram amount, but because of how sprintf does rounding, it's getting rounded down. I'm not sure which value is tripping it to go over the physical ram amount.

It's really hard to get this stuff figured out because the documenation is opaque, but so far I have found these variants:

Older /proc/iomem did not use indentation as consistently, and did not always place video ram or system rom in reserved blocks, that's now handled in latest pinxi.

Reading up:
  • ACPI Tables are in RAM
  • System RAM is ram, of course
  • Video RAM/iGPU on modern systems is in Reserved block, but not always on legacy systems. Legacy should also be handled in pinxi now. That's for built in gpus/apus, of course.
  • System ROM, like video RAM, on modern is in Reserved block, but on legacy, not consistently, also handled.

I realized that since this goes through sprintf that was doing some rounding, so I added a raw GiB ram debugger:

Code:
... # left out the line by line iomem debugger
iomem:
System: 31.92 GiB
Buffer: 0 KiB
System+iGPU: 31.92 GiB
System+reserved: 31.99 GiB
System+reserved+buffer: 31.99 GiB
System+reserved+buffer raw GiB: 31.9932899475098
Reserved: 70.3 MiB
Reserved-iGPU: 70.3 MiB
iGPU: 0 KiB
PCI Bus: 1022.4 MiB

proc/iomem: $VAR1 = \[
            '33547396',
            '71959',
            '0'
          ];
Info:
  Processes: 523 Uptime: 6d 3h 21m Memory: total: 32 GiB note: est.
  available: 31.27 GiB used: 10.61 GiB (33.9%) Shell: Bash pinxi: 3.3.27-13

## server
iomem:
System: 127.91 GiB
Buffer: 0 KiB
System+iGPU: 127.91 GiB
System+reserved: 128 GiB
System+reserved+buffer: 128 GiB
System+reserved+buffer raw GiB: 127.996788024902
Reserved: 92.8 MiB
Reserved-iGPU: 92.8 MiB
iGPU: 0 KiB
PCI Bus: 1.72 TiB

proc/iomem: $VAR1 = \[
            '134214360',
            '95040',
            '0'
          ];
Info:
  Processes: 823 Uptime: 12d 15h 8m Memory: total: 128 GiB note: est.
  available: 125.79 GiB used: 10.94 GiB (8.7%) Init: systemd
  target: graphical (5) Shell: Bash pinxi: 3.3.27-13
This helping since it let me find what is probably also reserved ram.

Last edited by h2-1; 06-12-2023 at 06:43 PM.
 
Old 06-12-2023, 07:01 PM   #5
babydr
Member
 
Registered: Aug 2015
Location: Fairbanks , Alaska
Distribution: Slackware-14.2 & 15.0
Posts: 233

Rep: Reputation: 45
For h2-1 , Have to split into two sections of less than 30000 Chars ...

Code:
# Dell Precision T1650
# Slackware-14.2 
#

# free
              total        used        free      shared     buffers       cache   available
Mem:       32834152    15389868     1047340     2491760     1376240    15020704    14257292
Low:       32834152    31786812     1047340
High:             0           0           0
Swap:      37223420         268    37223152
Total:     70057572    15390136    38270492

# pinxi -I --dbg 53,54

/sys:
Total: 32 GiB
Blocks: 256
Block-size: 128 MiB

sys memory: $VAR1 = \[
            33554432,
            256,
            131072
          ];
00000000-00000fff : Reserved
        size: 4 KiB
00001000-0009efff : System RAM
        size: 632 KiB
0009f000-0009ffff : Reserved
        size: 4 KiB
000a0000-000bffff : PCI Bus 0000:00
        size: 128 KiB
000c0000-000cebff : Video ROM
        size: 59 KiB
000cf000-000d6bff : Adapter ROM
        size: 31 KiB
000d7000-000d7fff : Adapter ROM
        size: 4 KiB
000dc000-000dffff : PCI Bus 0000:00
        size: 16 KiB
000f0000-000fffff : System ROM
        size: 64 KiB
00100000-d4b69fff : System RAM
        size: 3.32 GiB
d4b6a000-d4b6afff : Reserved
        size: 4 KiB
d4b6b000-d5b6efff : System RAM
        size: 16 MiB
d5b6f000-d5bb1fff : ACPI Non-volatile Storage
        size: 268 KiB
d5bb2000-db709fff : System RAM
        size: 91.3 MiB
db70a000-db7fffff : Reserved
        size: 984 KiB
db800000-dbf4dfff : System RAM
        size: 7.3 MiB
dbf4e000-dbffffff : Unusable memory
        size: 712 KiB
dc000000-dc7b3fff : System RAM
        size: 7.7 MiB
dc7b4000-dc7fffff : ACPI Tables
        size: 304 KiB
dc800000-ddf0dfff : System RAM
        size: 23.1 MiB
ddf0e000-ddffffff : ACPI Non-volatile Storage
        size: 968 KiB
de000000-df600fff : System RAM
        size: 22 MiB
df601000-df7fffff : Reserved
        size: 2 MiB
df800000-dfffffff : RAM buffer
        size: 8 MiB
e0000000-feafffff : PCI Bus 0000:00
        size: 491 MiB
  e0000000-f01fffff : PCI Bus 0000:01
        size: 258 MiB
    e0000000-efffffff : 0000:01:00.0
        size: 256 MiB
    f0000000-f01fffff : 0000:01:00.0
        size: 2 MiB
  f0200000-f0200fff : pnp 00:07
        size: 4 KiB
  f7a00000-f7cfffff : PCI Bus 0000:03
        size: 3 MiB
    f7a00000-f7afffff : 0000:03:00.0
        size: 1024 KiB
    f7b00000-f7bfffff : 0000:03:00.0
        size: 1024 KiB
    f7c00000-f7c0ffff : 0000:03:00.0
        size: 64 KiB
      f7c00000-f7c0ffff : megasas: LSI
        size: 64 KiB
  f7d00000-f7dfffff : PCI Bus 0000:04
        size: 1024 KiB
    f7d00000-f7d1ffff : 0000:04:02.0
        size: 128 KiB
    f7d20000-f7d3ffff : 0000:04:02.0
        size: 128 KiB
      f7d20000-f7d3ffff : e1000
        size: 128 KiB
    f7d40000-f7d5ffff : 0000:04:02.0
        size: 128 KiB
      f7d40000-f7d5ffff : e1000
        size: 128 KiB
  f7e00000-f7efffff : PCI Bus 0000:01
        size: 1024 KiB
    f7e00000-f7e3ffff : 0000:01:00.0
        size: 256 KiB
    f7e60000-f7e63fff : 0000:01:00.1
        size: 16 KiB
      f7e60000-f7e63fff : ICH HD audio
        size: 16 KiB
  f7f00000-f7f1ffff : 0000:00:19.0
        size: 128 KiB
    f7f00000-f7f1ffff : e1000e
        size: 128 KiB
  f7f20000-f7f2ffff : 0000:00:14.0
        size: 64 KiB
    f7f20000-f7f2ffff : xhci-hcd
        size: 64 KiB
  f7f30000-f7f33fff : 0000:00:1b.0
        size: 16 KiB
    f7f30000-f7f33fff : ICH HD audio
        size: 16 KiB
  f7f35000-f7f350ff : 0000:00:1f.3
        size: 0 KiB
  f7f36000-f7f367ff : 0000:00:1f.2
        size: 2 KiB
    f7f36000-f7f367ff : ahci
        size: 2 KiB
  f7f37000-f7f373ff : 0000:00:1d.0
        size: 1 KiB
    f7f37000-f7f373ff : ehci_hcd
        size: 1 KiB
  f7f38000-f7f383ff : 0000:00:1a.0
        size: 1 KiB
    f7f38000-f7f383ff : ehci_hcd
        size: 1 KiB
  f7f39000-f7f39fff : 0000:00:19.0
        size: 4 KiB
    f7f39000-f7f39fff : e1000e
        size: 4 KiB
  f7f3c000-f7f3c00f : 0000:00:16.0
        size: 0 KiB
    f7f3c000-f7f3c00f : mei_me
        size: 0 KiB
  f8000000-fbffffff : PCI MMCONFIG 0000 [bus 00-3f]
        size: 64 MiB
    f8000000-fbffffff : Reserved
        size: 64 MiB
      f8000000-fbffffff : pnp 00:07
        size: 64 MiB
fec00000-fec00fff : Reserved
        size: 4 KiB
  fec00000-fec003ff : IOAPIC 0
        size: 1 KiB
fed00000-fed03fff : Reserved
        size: 16 KiB
  fed00000-fed003ff : HPET 0
        size: 1 KiB
    fed00000-fed003ff : PNP0103:00
        size: 1 KiB
fed10000-fed17fff : pnp 00:07
        size: 32 KiB
fed18000-fed18fff : pnp 00:07
        size: 4 KiB
fed19000-fed19fff : pnp 00:07
        size: 4 KiB
fed1c000-fed1ffff : Reserved
        size: 16 KiB
  fed1c000-fed1ffff : pnp 00:07
        size: 16 KiB
    fed1f410-fed1f414 : iTCO_wdt.1.auto
        size: 0 KiB
fed20000-fed3ffff : pnp 00:07
        size: 128 KiB
fed40000-fed44fff : pnp 00:00
        size: 20 KiB
fed45000-fed8ffff : pnp 00:07
        size: 300 KiB
fed90000-fed90fff : dmar0
        size: 4 KiB
fee00000-fee00fff : Local APIC
        size: 4 KiB
  fee00000-fee00fff : Reserved
        size: 4 KiB
ff000000-ffffffff : Reserved
        size: 16 MiB
  ff000000-ffffffff : INT0800:00
        size: 16 MiB
    ff000000-ffffffff : pnp 00:07
        size: 16 MiB
100000000-81dffffff : System RAM
        size: 28.47 GiB
  344000000-345201160 : Kernel code
        size: 18 MiB
  345201161-345bb2dff : Kernel data
        size: 9.7 MiB
  3462c6000-3463fffff : Kernel bss
        size: 1.2 MiB
81e000000-81fffffff : RAM buffer
        size: 32 MiB

iomem:
System: 31.96 GiB
Buffer: 40 MiB
System+iGPU: 31.96 GiB
System+reserved: 31.97 GiB
System+reserved+buffer: 32.01 GiB
System+reserved+buffer raw GiB: 32.0134963989258
Reserved: 19.4 MiB
Reserved-iGPU: 19.4 MiB
iGPU: 0 KiB
PCI Bus: 491.1 MiB

proc/iomem: $VAR1 = \[
            '33527624',
            '19828',
            '0'
          ];
Info:
  Processes: 347 Uptime: 9d 6h 33m Memory: total: 32 GiB note: est.
  available: 31.31 GiB used: 17.58 GiB (56.1%) Shell: Bash pinxi: 3.3.27-13
Code:
# A virtual machine (at a providers site) .
# Slackware-15.0
#

# free
               total        used        free      shared  buff/cache   available
Mem:         8138244      489860      177148        2496     7471236     7340504
Swap:        4194300         524     4193776

# pinxi -I --dbg 53,54

/sys:
Total: 8 GiB
Blocks: 64
Block-size: 128 MiB

sys memory: $VAR1 = \[
            8388608,
            64,
            131072
          ];
00000000-00000fff : Reserved
        size: 4 KiB
00001000-0009fbff : System RAM
        size: 635 KiB
0009fc00-0009ffff : Reserved
        size: 1 KiB
000a0000-000bffff : PCI Bus 0000:00
        size: 128 KiB
000c0000-000c93ff : Video ROM
        size: 37 KiB
000c9800-000ca5ff : Adapter ROM
        size: 4 KiB
000ca800-000ccbff : Adapter ROM
        size: 9 KiB
000f0000-000fffff : Reserved
        size: 64 KiB
  000f0000-000fffff : System ROM
        size: 64 KiB
00100000-bffdbfff : System RAM
        size: 3 GiB
  20000000-21404ec7 : Kernel code
        size: 20 MiB
  21600000-21c1efff : Kernel rodata
        size: 6.1 MiB
  21e00000-2213d1ff : Kernel data
        size: 3.2 MiB
  22993000-22dfffff : Kernel bss
        size: 4.4 MiB
bffdc000-bfffffff : Reserved
        size: 144 KiB
c0000000-febfffff : PCI Bus 0000:00
        size: 1004 MiB
  fc000000-fdffffff : 0000:00:02.0
        size: 32 MiB
    fc000000-fdffffff : cirrus
        size: 32 MiB
  fe000000-fe003fff : 0000:00:04.0
        size: 16 KiB
    fe000000-fe003fff : virtio-pci-modern
        size: 16 KiB
  fe004000-fe007fff : 0000:00:05.0
        size: 16 KiB
    fe004000-fe007fff : virtio-pci-modern
        size: 16 KiB
  feb80000-febbffff : 0000:00:03.0
        size: 256 KiB
  febc0000-febdffff : 0000:00:03.0
        size: 128 KiB
    febc0000-febdffff : e1000
        size: 128 KiB
  febf0000-febf0fff : 0000:00:02.0
        size: 4 KiB
    febf0000-febf0fff : cirrus
        size: 4 KiB
  febf1000-febf1fff : 0000:00:04.0
        size: 4 KiB
fec00000-fec003ff : IOAPIC 0
        size: 1 KiB
fee00000-fee00fff : Local APIC
        size: 4 KiB
feffc000-feffffff : Reserved
        size: 16 KiB
fffc0000-ffffffff : Reserved
        size: 256 KiB
100000000-23fffffff : System RAM
        size: 5 GiB
240000000-2bfffffff : PCI Bus 0000:00
        size: 2 GiB

iomem:
System: 8 GiB
Buffer: 0 KiB
System+iGPU: 8 GiB
System+reserved: 8 GiB
System+reserved+buffer: 8 GiB
System+reserved+buffer raw GiB: 7.99995422363281
Reserved: 485 KiB
Reserved-iGPU: 485 KiB
iGPU: 0 KiB
PCI Bus: 2.98 GiB

proc/iomem: $VAR1 = \[
            '8388560',
            '485',
            '0'
          ];
Info:
  Processes: 113 Uptime: 78d 5h 51m Memory: total: 8 GiB note: est. available: 7.76 GiB
  used: 802.5 MiB (10.1%) Init: SysVinit runlevel: 3 Shell: Bash pinxi: 3.3.27-13
 
1 members found this post helpful.
Old 06-12-2023, 07:02 PM   #6
babydr
Member
 
Registered: Aug 2015
Location: Fairbanks , Alaska
Distribution: Slackware-14.2 & 15.0
Posts: 233

Rep: Reputation: 45
For h2-1 , Part 2 of 2


Code:
# A MultiProcessor system I am build ...
# Slackware-current as of yesterday .
#

# free
               total        used        free      shared     buffers       cache   available
Mem:       263974468     2055228   261500824        2564       75304      343112   260570600
Low:       263974468     2473644   261500824
High:              0           0           0
Swap:      134217724           0   134217724
Total:     398192192     2055228   395718548

# pinxi -I --dbg 53,54    

/sys:
Total: 258 GiB
Blocks: 129
Block-size: 2 GiB

sys memory: $VAR1 = \[
            270532608,
            129,
            2097152
          ];
00000000-00000fff : Reserved
        size: 4 KiB
00001000-0009ffff : System RAM
        size: 636 KiB
000a0000-000fffff : Reserved
        size: 384 KiB
  000a0000-000bffff : PCI Bus 0000:60
        size: 128 KiB
  000c0000-000dffff : PCI Bus 0000:00
        size: 128 KiB
  000f0000-000fffff : System ROM
        size: 64 KiB
00100000-2fffffff : System RAM
        size: 767 MiB
30000000-30042fff : ACPI Non-volatile Storage
        size: 268 KiB
30043000-75daffff : System RAM
        size: 1.09 GiB
75db0000-75ffffff : Reserved
        size: 2.3 MiB
76000000-9f531fff : System RAM
        size: 661.2 MiB
9f532000-9f532fff : Reserved
        size: 4 KiB
9f533000-a595afff : System RAM
        size: 100.2 MiB
a595b000-a7b93fff : Reserved
        size: 34.2 MiB
  a7b58018-a7b58019 : APEI ERST
        size: 0 KiB
  a7b5801c-a7b58021 : APEI ERST
        size: 0 KiB
  a7b58028-a7b58039 : APEI ERST
        size: 0 KiB
  a7b58040-a7b5804c : APEI ERST
        size: 0 KiB
  a7b58050-a7b5a04f : APEI ERST
        size: 8 KiB
a7b94000-a7c85fff : ACPI Tables
        size: 968 KiB
a7c86000-a8140fff : ACPI Non-volatile Storage
        size: 4.7 MiB
a8141000-a8ef1fff : Reserved
        size: 13.7 MiB
a8ef2000-a8ff0fff : Unusable memory
        size: 1020 KiB
a8ff1000-abffffff : System RAM
        size: 48.1 MiB
ac000000-afffffff : Reserved
        size: 64 MiB
b0000000-b26fffff : PCI Bus 0000:80
        size: 39 MiB
  b2000000-b24fffff : PCI Bus 0000:81
        size: 5 MiB
    b2000000-b23fffff : PCI Bus 0000:82
        size: 4 MiB
      b2000000-b20fffff : PCI Bus 0000:8a
        size: 1024 KiB
        b2000000-b2003fff : 0000:8a:00.0
        size: 16 KiB
          b2000000-b2003fff : nvme
        size: 16 KiB
      b2100000-b21fffff : PCI Bus 0000:89
        size: 1024 KiB
        b2100000-b2103fff : 0000:89:00.0
        size: 16 KiB
          b2100000-b2103fff : nvme
        size: 16 KiB
      b2200000-b22fffff : PCI Bus 0000:88
        size: 1024 KiB
        b2200000-b2203fff : 0000:88:00.0
        size: 16 KiB
          b2200000-b2203fff : nvme
        size: 16 KiB
      b2300000-b23fffff : PCI Bus 0000:87
        size: 1024 KiB
        b2300000-b2303fff : 0000:87:00.0
        size: 16 KiB
          b2300000-b2303fff : nvme
        size: 16 KiB
    b2400000-b243ffff : 0000:81:00.0
        size: 256 KiB
  b2500000-b25fffff : PCI Bus 0000:8c
        size: 1024 KiB
    b2500000-b257ffff : 0000:8c:00.2
        size: 512 KiB
      b2500000-b257ffff : ptdma
        size: 512 KiB
    b2580000-b2581fff : 0000:8c:00.2
        size: 8 KiB
      b2580000-b2581fff : ptdma
        size: 8 KiB
  b2600000-b26fffff : PCI Bus 0000:8b
        size: 1024 KiB
    b2600000-b267ffff : 0000:8b:00.2
        size: 512 KiB
      b2600000-b267ffff : ptdma
        size: 512 KiB
    b2680000-b2681fff : 0000:8b:00.2
        size: 8 KiB
      b2680000-b2681fff : ptdma
        size: 8 KiB
b4000000-b5ffffff : Reserved
        size: 32 MiB
  b4200000-b427ffff : amd_iommu
        size: 512 KiB
  b4280000-b42803ff : IOAPIC 8
        size: 1 KiB
  b5100000-b517ffff : amd_iommu
        size: 512 KiB
  b5180000-b51803ff : IOAPIC 7
        size: 1 KiB
b6000000-b85fffff : PCI Bus 0000:a0
        size: 38 MiB
  b8000000-b81fffff : PCI Bus 0000:a3
        size: 2 MiB
    b8000000-b80fffff : 0000:a3:00.1
        size: 1024 KiB
      b8000000-b80fffff : ccp
        size: 1024 KiB
    b8100000-b817ffff : 0000:a3:00.2
        size: 512 KiB
      b8100000-b817ffff : ptdma
        size: 512 KiB
    b8180000-b8181fff : 0000:a3:00.2
        size: 8 KiB
      b8180000-b8181fff : ptdma
        size: 8 KiB
    b8182000-b8183fff : 0000:a3:00.1
        size: 8 KiB
      b8182000-b8183fff : ccp
        size: 8 KiB
  b8200000-b82fffff : PCI Bus 0000:a5
        size: 1024 KiB
    b8200000-b82007ff : 0000:a5:00.0
        size: 2 KiB
      b8200000-b82007ff : ahci
        size: 2 KiB
  b8300000-b83fffff : PCI Bus 0000:a4
        size: 1024 KiB
    b8300000-b83007ff : 0000:a4:00.0
        size: 2 KiB
      b8300000-b83007ff : ahci
        size: 2 KiB
  b8400000-b84fffff : PCI Bus 0000:a2
        size: 1024 KiB
    b8400000-b847ffff : 0000:a2:00.2
        size: 512 KiB
      b8400000-b847ffff : ptdma
        size: 512 KiB
    b8480000-b8481fff : 0000:a2:00.2
        size: 8 KiB
      b8480000-b8481fff : ptdma
        size: 8 KiB
  b8500000-b85fffff : PCI Bus 0000:a1
        size: 1024 KiB
    b8500000-b853ffff : 0000:a1:00.0
        size: 256 KiB
    b8540000-b855ffff : 0000:a1:00.0
        size: 128 KiB
    b8560000-b8563fff : 0000:a1:00.1
        size: 16 KiB
      b8560000-b8563fff : ICH HD audio
        size: 16 KiB
ba000000-bc3fffff : PCI Bus 0000:c0
        size: 36 MiB
  ba000000-ba1fffff : PCI Bus 0000:c1
        size: 2 MiB
  ba200000-ba3fffff : PCI Bus 0000:c2
        size: 2 MiB
  bc000000-bc0fffff : PCI Bus 0000:c6
        size: 1024 KiB
    bc000000-bc0007ff : 0000:c6:00.0
        size: 2 KiB
      bc000000-bc0007ff : ahci
        size: 2 KiB
  bc100000-bc1fffff : PCI Bus 0000:c5
        size: 1024 KiB
    bc100000-bc1007ff : 0000:c5:00.0
        size: 2 KiB
      bc100000-bc1007ff : ahci
        size: 2 KiB
  bc200000-bc2fffff : PCI Bus 0000:c4
        size: 1024 KiB
    bc200000-bc27ffff : 0000:c4:00.2
        size: 512 KiB
      bc200000-bc27ffff : ptdma
        size: 512 KiB
    bc280000-bc281fff : 0000:c4:00.2
        size: 8 KiB
      bc280000-bc281fff : ptdma
        size: 8 KiB
  bc300000-bc3fffff : PCI Bus 0000:c3
        size: 1024 KiB
    bc300000-bc37ffff : 0000:c3:00.2
        size: 512 KiB
      bc300000-bc37ffff : ptdma
        size: 512 KiB
    bc380000-bc381fff : 0000:c3:00.2
        size: 8 KiB
      bc380000-bc381fff : ptdma
        size: 8 KiB
be000000-bfffffff : Reserved
        size: 32 MiB
  be100000-be17ffff : amd_iommu
        size: 512 KiB
  be180000-be1803ff : IOAPIC 6
        size: 1 KiB
  bf200000-bf27ffff : amd_iommu
        size: 512 KiB
  bf280000-bf2803ff : IOAPIC 5
        size: 1 KiB
c0000000-c23fffff : PCI Bus 0000:e0
        size: 36 MiB
  c0000000-c01fffff : PCI Bus 0000:e1
        size: 2 MiB
  c2000000-c21fffff : PCI Bus 0000:e2
        size: 2 MiB
    c2000000-c20fffff : 0000:e2:00.0
        size: 1024 KiB
    c2100000-c21fffff : 0000:e2:00.0
        size: 1024 KiB
  c2200000-c22fffff : PCI Bus 0000:e4
        size: 1024 KiB
    c2200000-c227ffff : 0000:e4:00.2
        size: 512 KiB
      c2200000-c227ffff : ptdma
        size: 512 KiB
    c2280000-c2281fff : 0000:e4:00.2
        size: 8 KiB
      c2280000-c2281fff : ptdma
        size: 8 KiB
  c2300000-c23fffff : PCI Bus 0000:e3
        size: 1024 KiB
    c2300000-c237ffff : 0000:e3:00.2
        size: 512 KiB
      c2300000-c237ffff : ptdma
        size: 512 KiB
    c2380000-c2381fff : 0000:e3:00.2
        size: 8 KiB
      c2380000-c2381fff : ptdma
        size: 8 KiB
c4000000-c6dfffff : PCI Bus 0000:20
        size: 46 MiB
  c4000000-c41fffff : PCI Bus 0000:21
        size: 2 MiB
  c4200000-c43fffff : PCI Bus 0000:22
        size: 2 MiB
  c6000000-c67fffff : PCI Bus 0000:23
        size: 8 MiB
    c6000000-c67fffff : PCI Bus 0000:24
        size: 8 MiB
      c6000000-c60fffff : PCI Bus 0000:2c
        size: 1024 KiB
        c6000000-c6003fff : 0000:2c:00.0
        size: 16 KiB
          c6000000-c6003fff : nvme
        size: 16 KiB
      c6100000-c61fffff : PCI Bus 0000:2b
        size: 1024 KiB
        c6100000-c6103fff : 0000:2b:00.0
        size: 16 KiB
          c6100000-c6103fff : nvme
        size: 16 KiB
      c6200000-c62fffff : PCI Bus 0000:2a
        size: 1024 KiB
        c6200000-c6203fff : 0000:2a:00.0
        size: 16 KiB
          c6200000-c6203fff : nvme
        size: 16 KiB
      c6300000-c63fffff : PCI Bus 0000:29
        size: 1024 KiB
        c6300000-c6303fff : 0000:29:00.0
        size: 16 KiB
          c6300000-c6303fff : nvme
        size: 16 KiB
      c6400000-c64fffff : PCI Bus 0000:28
        size: 1024 KiB
        c6400000-c6403fff : 0000:28:00.0
        size: 16 KiB
          c6400000-c6403fff : nvme
        size: 16 KiB
      c6500000-c65fffff : PCI Bus 0000:27
        size: 1024 KiB
        c6500000-c6503fff : 0000:27:00.0
        size: 16 KiB
          c6500000-c6503fff : nvme
        size: 16 KiB
      c6600000-c66fffff : PCI Bus 0000:26
        size: 1024 KiB
        c6600000-c6603fff : 0000:26:00.0
        size: 16 KiB
          c6600000-c6603fff : nvme
        size: 16 KiB
      c6700000-c67fffff : PCI Bus 0000:25
        size: 1024 KiB
        c6700000-c6703fff : 0000:25:00.0
        size: 16 KiB
          c6700000-c6703fff : nvme
        size: 16 KiB
  c6800000-c6afffff : PCI Bus 0000:2f
        size: 3 MiB
    c6800000-c68fffff : 0000:2f:00.3
        size: 1024 KiB
      c6800000-c68fffff : xhci-hcd
        size: 1024 KiB
    c6900000-c69fffff : 0000:2f:00.1
        size: 1024 KiB
      c6900000-c69fffff : ccp
        size: 1024 KiB
    c6a00000-c6a7ffff : 0000:2f:00.2
        size: 512 KiB
      c6a00000-c6a7ffff : ptdma
        size: 512 KiB
    c6a80000-c6a81fff : 0000:2f:00.2
        size: 8 KiB
      c6a80000-c6a81fff : ptdma
        size: 8 KiB
    c6a82000-c6a83fff : 0000:2f:00.1
        size: 8 KiB
      c6a82000-c6a83fff : ccp
        size: 8 KiB
  c6b00000-c6bfffff : PCI Bus 0000:31
        size: 1024 KiB
    c6b00000-c6b007ff : 0000:31:00.0
        size: 2 KiB
      c6b00000-c6b007ff : ahci
        size: 2 KiB
  c6c00000-c6cfffff : PCI Bus 0000:30
        size: 1024 KiB
    c6c00000-c6c007ff : 0000:30:00.0
        size: 2 KiB
      c6c00000-c6c007ff : ahci
        size: 2 KiB
  c6d00000-c6dfffff : PCI Bus 0000:2e
        size: 1024 KiB
    c6d00000-c6d7ffff : 0000:2e:00.2
        size: 512 KiB
      c6d00000-c6d7ffff : ptdma
        size: 512 KiB
    c6d80000-c6d81fff : 0000:2e:00.2
        size: 8 KiB
      c6d80000-c6d81fff : ptdma
        size: 8 KiB
c8000000-c9ffffff : Reserved
        size: 32 MiB
  c8100000-c817ffff : amd_iommu
        size: 512 KiB
  c8180000-c81803ff : IOAPIC 3
        size: 1 KiB
  c9200000-c927ffff : amd_iommu
        size: 512 KiB
  c9280000-c92803ff : IOAPIC 1
        size: 1 KiB
ca000000-cdafffff : PCI Bus 0000:60
        size: 59 MiB
  ca000000-ca1fffff : PCI Bus 0000:61
        size: 2 MiB
  cc000000-cd0fffff : PCI Bus 0000:66
        size: 17 MiB
    cc000000-cd0fffff : PCI Bus 0000:67
        size: 17 MiB
      cc000000-ccffffff : 0000:67:00.0
        size: 16 MiB
      cd000000-cd01ffff : 0000:67:00.0
        size: 128 KiB
  cd200000-cd6fffff : PCI Bus 0000:64
        size: 5 MiB
    cd200000-cd27ffff : 0000:64:00.1
        size: 512 KiB
    cd280000-cd2fffff : 0000:64:00.0
        size: 512 KiB
    cd300000-cd3fffff : 0000:64:00.1
        size: 1024 KiB
    cd400000-cd4fffff : 0000:64:00.1
        size: 1024 KiB
    cd500000-cd5fffff : 0000:64:00.0
        size: 1024 KiB
    cd600000-cd6fffff : 0000:64:00.0
        size: 1024 KiB
  cd700000-cd7fffff : PCI Bus 0000:69
        size: 1024 KiB
    cd700000-cd77ffff : 0000:69:00.2
        size: 512 KiB
      cd700000-cd77ffff : ptdma
        size: 512 KiB
    cd780000-cd781fff : 0000:69:00.2
        size: 8 KiB
      cd780000-cd781fff : ptdma
        size: 8 KiB
  cd800000-cd8fffff : PCI Bus 0000:68
        size: 1024 KiB
    cd800000-cd87ffff : 0000:68:00.2
        size: 512 KiB
      cd800000-cd87ffff : ptdma
        size: 512 KiB
    cd880000-cd881fff : 0000:68:00.2
        size: 8 KiB
      cd880000-cd881fff : ptdma
        size: 8 KiB
  cd900000-cd9fffff : PCI Bus 0000:63
        size: 1024 KiB
    cd900000-cd903fff : 0000:63:00.0
        size: 16 KiB
      cd900000-cd903fff : nvme
        size: 16 KiB
  cda00000-cdafffff : PCI Bus 0000:62
        size: 1024 KiB
    cda00000-cda03fff : 0000:62:00.0
        size: 16 KiB
      cda00000-cda03fff : nvme
        size: 16 KiB
e0000000-efffffff : PCI MMCONFIG 0000 [bus 00-ff]
        size: 256 MiB
  e0000000-efffffff : pnp 00:00
        size: 256 MiB
f0000000-f23fffff : PCI Bus 0000:40
        size: 36 MiB
  f0000000-f01fffff : PCI Bus 0000:41
        size: 2 MiB
  f2000000-f20fffff : PCI Bus 0000:45
        size: 1024 KiB
    f2000000-f20007ff : 0000:45:00.0
        size: 2 KiB
      f2000000-f20007ff : ahci
        size: 2 KiB
  f2100000-f21fffff : PCI Bus 0000:44
        size: 1024 KiB
    f2100000-f21007ff : 0000:44:00.0
        size: 2 KiB
      f2100000-f21007ff : ahci
        size: 2 KiB
  f2200000-f22fffff : PCI Bus 0000:43
        size: 1024 KiB
    f2200000-f227ffff : 0000:43:00.2
        size: 512 KiB
      f2200000-f227ffff : ptdma
        size: 512 KiB
    f2280000-f2281fff : 0000:43:00.2
        size: 8 KiB
      f2280000-f2281fff : ptdma
        size: 8 KiB
  f2300000-f23fffff : PCI Bus 0000:42
        size: 1024 KiB
    f2300000-f237ffff : 0000:42:00.2
        size: 512 KiB
      f2300000-f237ffff : ptdma
        size: 512 KiB
    f2380000-f2381fff : 0000:42:00.2
        size: 8 KiB
      f2380000-f2381fff : ptdma
        size: 8 KiB
f4000000-f5ffffff : Reserved
        size: 32 MiB
  f4100000-f417ffff : amd_iommu
        size: 512 KiB
  f4180000-f41803ff : IOAPIC 2
        size: 1 KiB
  f5100000-f517ffff : amd_iommu
        size: 512 KiB
  f5180000-f51803ff : IOAPIC 4
        size: 1 KiB
f6000000-f82fffff : PCI Bus 0000:00
        size: 35 MiB
  f6000000-f61fffff : PCI Bus 0000:01
        size: 2 MiB
  f8000000-f81fffff : PCI Bus 0000:03
        size: 2 MiB
    f8000000-f80fffff : 0000:03:00.3
        size: 1024 KiB
      f8000000-f80fffff : xhci-hcd
        size: 1024 KiB
    f8100000-f817ffff : 0000:03:00.2
        size: 512 KiB
      f8100000-f817ffff : ptdma
        size: 512 KiB
    f8180000-f8181fff : 0000:03:00.2
        size: 8 KiB
      f8180000-f8181fff : ptdma
        size: 8 KiB
  f8200000-f82fffff : PCI Bus 0000:02
        size: 1024 KiB
    f8200000-f827ffff : 0000:02:00.2
        size: 512 KiB
      f8200000-f827ffff : ptdma
        size: 512 KiB
    f8280000-f8281fff : 0000:02:00.2
        size: 8 KiB
      f8280000-f8281fff : ptdma
        size: 8 KiB
fe000000-ffffffff : Reserved
        size: 32 MiB
  fec00000-fec003ff : IOAPIC 0
        size: 1 KiB
  fec10000-fec10fff : pnp 00:05
        size: 4 KiB
  fed00000-fed003ff : HPET 0
        size: 1 KiB
  fed80000-fed814ff : pnp 00:05
        size: 5 KiB
  fed81500-fed817ff : AMDI0030:00
        size: 1 KiB
    fed81500-fed817ff : AMDI0030:00 AMDI0030:00
        size: 1 KiB
  fed81900-fed8ffff : pnp 00:05
        size: 58 KiB
  fedc0000-fedc0fff : pnp 00:05
        size: 4 KiB
  fee00000-fee00fff : Local APIC
        size: 4 KiB
    fee00000-fee00fff : pnp 00:05
        size: 4 KiB
  ff000000-ffffffff : pnp 00:05
        size: 16 MiB
100000000-84ff7ffff : System RAM
        size: 29.25 GiB
84ff80000-84fffffff : Reserved
        size: 512 KiB
850000000-104ff7ffff : System RAM
        size: 32 GiB
104ff80000-104fffffff : Reserved
        size: 512 KiB
1050000000-184ff7ffff : System RAM
        size: 32 GiB
184ff80000-184fffffff : Reserved
        size: 512 KiB
1850000000-204f37ffff : System RAM
        size: 31.99 GiB
204f380000-204fffffff : Reserved
        size: 12.5 MiB
2050000000-284ff7ffff : System RAM
        size: 32 GiB
  236a000000-236b605007 : Kernel code
        size: 22 MiB
  236b800000-236be16fff : Kernel rodata
        size: 6.1 MiB
  236c000000-236c37c7ff : Kernel data
        size: 3.5 MiB
  236cc2d000-236cffffff : Kernel bss
        size: 3.8 MiB
284ff80000-284fffffff : Reserved
        size: 512 KiB
2850000000-304ff7ffff : System RAM
        size: 32 GiB
304ff80000-304fffffff : Reserved
        size: 512 KiB
3050000000-384ff7ffff : System RAM
        size: 32 GiB
384ff80000-384fffffff : Reserved
        size: 512 KiB
3850000000-404ff7ffff : System RAM
        size: 32 GiB
404ff80000-404fffffff : Reserved
        size: 512 KiB
10000000000-100201fffff : Reserved
        size: 514 MiB
10021000000-18020ffffff : PCI Bus 0000:60
        size: 512 GiB
  10021000000-100211fffff : PCI Bus 0000:61
        size: 2 MiB
  10021200000-100213fffff : PCI Bus 0000:62
        size: 2 MiB
  10021400000-100215fffff : PCI Bus 0000:63
        size: 2 MiB
  18020400000-18020cfffff : PCI Bus 0000:64
        size: 9 MiB
    18020400000-180207fffff : 0000:64:00.1
        size: 4 MiB
      18020400000-180207fffff : ixgbe
        size: 4 MiB
    18020800000-18020bfffff : 0000:64:00.0
        size: 4 MiB
      18020800000-18020bfffff : ixgbe
        size: 4 MiB
    18020c00000-18020c03fff : 0000:64:00.1
        size: 16 KiB
      18020c00000-18020c03fff : ixgbe
        size: 16 KiB
    18020c04000-18020c07fff : 0000:64:00.0
        size: 16 KiB
      18020c04000-18020c07fff : ixgbe
        size: 16 KiB
18021000000-20020ffffff : PCI Bus 0000:40
        size: 512 GiB
  18021000000-180211fffff : PCI Bus 0000:41
        size: 2 MiB
20030000000-200403fffff : Reserved
        size: 260 MiB
20060000000-200801fffff : Reserved
        size: 514 MiB
20081000000-28080ffffff : PCI Bus 0000:20
        size: 512 GiB
  20081000000-200811fffff : PCI Bus 0000:21
        size: 2 MiB
  20081200000-200813fffff : PCI Bus 0000:22
        size: 2 MiB
  28080f00000-28080ffffff : PCI Bus 0000:23
        size: 1024 KiB
    28080f00000-28080ffffff : PCI Bus 0000:24
        size: 1024 KiB
      28080f00000-28080ffffff : PCI Bus 0000:2d
        size: 1024 KiB
        28080f00000-28080f03fff : 0000:2d:00.0
        size: 16 KiB
          28080f00000-28080f03fff : mpt3sas
        size: 16 KiB
28081000000-38080ffffff : PCI Bus 0000:00
        size: 1024 GiB
  28081000000-280811fffff : PCI Bus 0000:01
        size: 2 MiB
38090000000-380a03fffff : Reserved
        size: 260 MiB
380c0000000-380e01fffff : Reserved
        size: 514 MiB
380e1000000-400e0ffffff : PCI Bus 0000:e0
        size: 512 GiB
  380e1000000-380e11fffff : PCI Bus 0000:e1
        size: 2 MiB
  400e0e00000-400e0ffffff : PCI Bus 0000:e2
        size: 2 MiB
    400e0e00000-400e0efffff : 0000:e2:00.0
        size: 1024 KiB
    400e0f00000-400e0ffffff : 0000:e2:00.0
        size: 1024 KiB
      400e0f00000-400e0ffffff : megasas: LSI
        size: 1024 KiB
400e1000000-480e0ffffff : PCI Bus 0000:c0
        size: 512 GiB
  400e1000000-400e11fffff : PCI Bus 0000:c1
        size: 2 MiB
  400e1200000-400e13fffff : PCI Bus 0000:c2
        size: 2 MiB
480f0000000-481003fffff : Reserved
        size: 260 MiB
48120000000-481401fffff : Reserved
        size: 514 MiB
48141000000-50140ffffff : PCI Bus 0000:a0
        size: 512 GiB
  50120000000-501307fffff : PCI Bus 0000:a1
        size: 264 MiB
    50120000000-5012fffffff : 0000:a1:00.0
        size: 256 MiB
    50130000000-501307fffff : 0000:a1:00.0
        size: 8 MiB
50141000000-58140ffffff : PCI Bus 0000:80
        size: 512 GiB
  50141000000-501427fffff : PCI Bus 0000:81
        size: 24 MiB
    50141000000-501427fffff : PCI Bus 0000:82
        size: 24 MiB
      50141000000-501411fffff : PCI Bus 0000:83
        size: 2 MiB
      50141200000-501413fffff : PCI Bus 0000:84
        size: 2 MiB
      50141400000-501415fffff : PCI Bus 0000:85
        size: 2 MiB
      50141600000-501417fffff : PCI Bus 0000:86
        size: 2 MiB
      50141800000-501419fffff : PCI Bus 0000:87
        size: 2 MiB
      50141a00000-50141bfffff : PCI Bus 0000:88
        size: 2 MiB
      50141c00000-50141dfffff : PCI Bus 0000:89
        size: 2 MiB
      50141e00000-50141ffffff : PCI Bus 0000:8a
        size: 2 MiB
58150000000-581603fffff : Reserved
        size: 260 MiB
7fc00000000-7fc03ffffff : Reserved
        size: 64 MiB

iomem:
System: 255.87 GiB
Buffer: 0 KiB
System+iGPU: 255.87 GiB
System+reserved: 259.24 GiB
System+reserved+buffer: 259.24 GiB
System+reserved+buffer raw GiB: 259.236339569092
Reserved: 3.37 GiB
Reserved-iGPU: 3.37 GiB
iGPU: 0 KiB
PCI Bus: 4.5 TiB

proc/iomem: $VAR1 = \[
            '271829004',
            '3534392',
            '0'
          ];
Info:
  Processes: 762 Uptime: 9m Memory: total: 260 GiB note: est. available: 251.75 GiB
  used: 3.27 GiB (1.3%) Init: SysVinit runlevel: 3 Shell: Bash pinxi: 3.3.27-13
Code:
# My zotac router ... a mini-pc .
# slackware-15.0
#

# free
               total        used        free      shared     buffers       cache   available
Mem:         8045808      165684     5990624       33900      716404     1173096     7536928
Low:         8045808     2055184     5990624
High:              0           0           0
Swap:       34603004           0    34603004
Total:      42648812      165684    40593628

# pinxi  -I --dbg 53,54     

/sys:
Total: 8 GiB
Blocks: 64
Block-size: 128 MiB

sys memory: $VAR1 = \[
            8388608,
            64,
            131072
          ];
00000000-00000fff : Reserved
        size: 4 KiB
00001000-0003efff : System RAM
        size: 248 KiB
0003f000-0003ffff : ACPI Non-volatile Storage
        size: 4 KiB
00040000-0009ffff : System RAM
        size: 384 KiB
000a0000-000bffff : PCI Bus 0000:00
        size: 128 KiB
000c0000-000dffff : PCI Bus 0000:00
        size: 128 KiB
  000c0000-000dffff : 0000:00:02.0
        size: 128 KiB
000e0000-000fffff : PCI Bus 0000:00
        size: 128 KiB
  000f0000-000fffff : System ROM
        size: 64 KiB
00100000-1effffff : System RAM
        size: 495 MiB
1f000000-201fffff : Reserved
        size: 18 MiB
20200000-7b217fff : System RAM
        size: 1.42 GiB
7b218000-7b292fff : Reserved
        size: 492 KiB
7b293000-7b3bafff : System RAM
        size: 1.2 MiB
7b3bb000-7b81ffff : ACPI Non-volatile Storage
        size: 4.4 MiB
7b820000-7badcfff : Reserved
        size: 2.7 MiB
7badd000-7bb2ffff : Unusable memory
        size: 332 KiB
7bb30000-7bffffff : System RAM
        size: 4.8 MiB
7cf00000-7eefffff : Reserved
        size: 32 MiB
  7cf00000-7eefffff : Graphics Stolen Memory
        size: 32 MiB
80000000-dfffffff : PCI Bus 0000:00
        size: 1.5 GiB
  80000000-80ffffff : 0000:00:02.0
        size: 16 MiB
  81000000-810fffff : 0000:00:1a.0
        size: 1024 KiB
    81000000-810fffff : mei_txe
        size: 1024 KiB
  81100000-811fffff : 0000:00:1a.0
        size: 1024 KiB
    81100000-811fffff : mei_txe
        size: 1024 KiB
  81200000-812fffff : PCI Bus 0000:04
        size: 1024 KiB
    81200000-81201fff : 0000:04:00.0
        size: 8 KiB
      81200000-81201fff : iwlwifi
        size: 8 KiB
  81300000-813fffff : PCI Bus 0000:03
        size: 1024 KiB
    81300000-81300fff : 0000:03:00.0
        size: 4 KiB
      81300000-81300fff : r8169
        size: 4 KiB
  81400000-814fffff : PCI Bus 0000:02
        size: 1024 KiB
    81400000-81400fff : 0000:02:00.0
        size: 4 KiB
      81400000-81400fff : r8169
        size: 4 KiB
  81500000-8150ffff : 0000:00:14.0
        size: 64 KiB
    81500000-8150ffff : xhci-hcd
        size: 64 KiB
      81508070-8150846f : intel_xhci_usb_sw
        size: 1 KiB
  81510000-81513fff : 0000:00:1b.0
        size: 16 KiB
    81510000-81513fff : ICH HD audio
        size: 16 KiB
  81514000-8151401f : 0000:00:1f.3
        size: 0 KiB
  81515000-815157ff : 0000:00:13.0
        size: 2 KiB
    81515000-815157ff : ahci
        size: 2 KiB
  81516000-81516fff : pnp 00:05
        size: 4 KiB
  81517000-81517fff : 80860F14:01
        size: 4 KiB
    81517000-81517fff : 80860F14:01
        size: 4 KiB
  81600000-817fffff : PCI Bus 0000:01
        size: 2 MiB
  81800000-819fffff : PCI Bus 0000:01
        size: 2 MiB
  90000000-9fffffff : 0000:00:02.0
        size: 256 MiB
  a0000000-a00fffff : PCI Bus 0000:03
        size: 1024 KiB
    a0000000-a0003fff : 0000:03:00.0
        size: 16 KiB
  a0100000-a01fffff : PCI Bus 0000:02
        size: 1024 KiB
    a0100000-a0103fff : 0000:02:00.0
        size: 16 KiB
e0000000-efffffff : PCI MMCONFIG 0000 [bus 00-ff]
        size: 256 MiB
  e0000000-efffffff : Reserved
        size: 256 MiB
    e0000000-efffffff : pnp 00:06
        size: 256 MiB
fea00000-feafffff : Reserved
        size: 1024 KiB
  fea00000-feafffff : pnp 00:06
        size: 1024 KiB
fec00000-fec00fff : Reserved
        size: 4 KiB
  fec00000-fec003ff : IOAPIC 0
        size: 1 KiB
fed01000-fed01fff : Reserved
        size: 4 KiB
  fed01000-fed01fff : pnp 00:06
        size: 4 KiB
    fed01000-fed011ff : intel-spi
        size: 0 KiB
fed03000-fed03fff : Reserved
        size: 4 KiB
  fed03000-fed03fff : pnp 00:06
        size: 4 KiB
    fed03008-fed0300c : iTCO_wdt.1.auto
        size: 0 KiB
fed06000-fed06fff : Reserved
        size: 4 KiB
  fed06000-fed06fff : pnp 00:06
        size: 4 KiB
fed08000-fed09fff : Reserved
        size: 8 KiB
  fed08000-fed09fff : pnp 00:06
        size: 8 KiB
fed1c000-fed1cfff : Reserved
        size: 4 KiB
  fed1c000-fed1cfff : pnp 00:06
        size: 4 KiB
fed80000-fedbffff : Reserved
        size: 256 KiB
  fed80000-fedbffff : pnp 00:06
        size: 256 KiB
fee00000-fee00fff : Local APIC
        size: 4 KiB
  fee00000-fee00fff : Reserved
        size: 4 KiB
ff000000-ffffffff : INT0800:00
        size: 16 MiB
  ffb00000-ffffffff : Reserved
        size: 5 MiB
100000000-27fffffff : System RAM
        size: 6 GiB
  1f5000000-1f6404ec7 : Kernel code
        size: 20 MiB
  1f6600000-1f6c1efff : Kernel rodata
        size: 6.1 MiB
  1f6e00000-1f713d1ff : Kernel data
        size: 3.2 MiB
  1f7993000-1f7dfffff : Kernel bss
        size: 4.4 MiB

iomem:
System: 7.91 GiB
Buffer: 0 KiB
System+iGPU: 7.94 GiB
System+reserved: 7.97 GiB
System+reserved+buffer: 7.97 GiB
System+reserved+buffer raw GiB: 7.96501922607422
Reserved: 54.5 MiB
Reserved-iGPU: 22.5 MiB
iGPU: 32 MiB
PCI Bus: 1.75 GiB

proc/iomem: $VAR1 = \[
            '8351928',
            '55808',
            '32768'
          ];
Info:
  Processes: 137 Uptime: 33d 7h 31m Memory: total: 8 GiB available: 7.67 GiB
  used: 526.5 MiB (6.7%) igpu: 32 MiB Init: SysVinit runlevel: 3 Shell: Bash pinxi: 3.3.27-13
 
1 members found this post helpful.
Old 06-12-2023, 07:07 PM   #7
babydr
Member
 
Registered: Aug 2015
Location: Fairbanks , Alaska
Distribution: Slackware-14.2 & 15.0
Posts: 233

Rep: Reputation: 45
@h2-1 , Hope the data helps . JimL
 
Old 06-12-2023, 07:27 PM   #8
JayByrd
Member
 
Registered: Aug 2021
Location: Seattle, WA
Distribution: Slackware
Posts: 302

Rep: Reputation: 310Reputation: 310Reputation: 310Reputation: 310
Code:
$./pinxi --version
pinxi 3.3.27-14 (2023-06-12)


$./pinxi -I --dbg 53,54

/sys:
Total: 12 GiB
Blocks: 96
Block-size: 128 MiB

sys memory: $VAR1 = \[
            12582912,
            96,
            131072
          ];
Info:
  Processes: 209 Uptime: 54d 9h 2m Memory: total: 12 GiB note: check
  available: 11.71 GiB used: 2.61 GiB (22.3%) Shell: Bash pinxi: 3.3.27-14
...and for the record,
Code:
$./pinxi -Ma 
Machine:
  Type: Desktop System: Dell product: Precision WorkStation 490 v: N/A
    serial: <superuser required> Chassis: type: 7 serial: <superuser required>
  Mobo: Dell model: 0GU083 v: A00 serial: <superuser required> BIOS: Dell
    v: A08 date: 04/25/2008
 
1 members found this post helpful.
Old 06-12-2023, 07:45 PM   #9
h2-1
Member
 
Registered: Mar 2018
Distribution: Debian Testing
Posts: 562

Original Poster
Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
babydr, yes, it helps. That's a good cross section, including one that reproduces the extra memory block issue from /sys. The vm is interesting too, I hadn't thought to check them, those are different, note the almost total lack of Reserved RAM there.

I now have a somewhat ok rounding running, first, anything that has less than 0.1 between the ceil and the sprintf rounded value will show note: est. In other words, if it's too far away from the rounded result, we have to be skeptical of the result. It rounds if it's above 1.8 GiB, or if it's under 1 GiB and the ceil rounding is divisible by 64, which means it's using sticks of memory of those sizes, like 64, 128, 256, 512.

This leaves 1 GiB to 1.75 GiB unhandled, which is not very common anymore so I'm not going to worry about that, it will just show the raw value, which if it was a few thousands off, will get rounded by sprintf anyway. There's probably some way to handle that, I'll test it.

I'm glad/sad to see your multiprocessor system manifests the issue I saw on another server, which is also multiprocessor now that I think about it:

/sys:
Total: 258 GiB
Blocks: 129
Block-size: 2 GiB

Note the extra block found, that is the same as my test case had, except it showed 130 GiB instead of 128.

Do you have any idea what can create this extra memoryx block? I've checked other servers, with a lot of RAM, and they did not have this extra block or blocks in /sys/devices/system/memory/ so I don't know where they come from or what creates them, but your example shows that I was right not to trust that data, and to replace it with the /proc/iomem totals.

I've now upped the accuracy if /proc/iomem total ram slightly, and it also rounds better.

Getting within a few KiB/MiB of the real total is decent, so far none of my test cases, or sample files, are returning wrong results.

So far this gives me the confidence to remove the note: est. in cases where the difference between the rounded and the raw sprintf number is less than 0.1.

I also tested this on some old /proc/iomem samples, and it's now working I think on all of them, I have one that does not add up right, it comes to 5.87 GiB so it shows note: est. but only that one.

I even got the sample with 128 MiB to work right:

Code:
iomem:
System: 127.6 MiB
Buffer: 0 KiB
System+iGPU: 127.7 MiB
System+reserved: 127.9 MiB
System+reserved+buffer: 127.9 MiB
System+reserved+buffer raw GiB: 0.1248779296875
Reserved: 257 KiB
Reserved-iGPU: 129 KiB
iGPU: 128 KiB
PCI Bus: 80 MiB

proc/iomem: $VAR1 = \[
            '130944',
            '257',
            '128'
          ];
Info:
  Processes: 526 Uptime: 6d 4h 43m Memory: total: 128 MiB available: xxx
  used: xxx igpu: 128 KiB Shell: Bash pinxi: 3.3.27-14
Only the total: and igpu: data come from iomem.
 
Old 06-12-2023, 07:56 PM   #10
h2-1
Member
 
Registered: Mar 2018
Distribution: Debian Testing
Posts: 562

Original Poster
Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
JayByrd, i wish I could think of some way to check if the /sys data has that extra block, but I don't know what could predict it.

Note that these blocks can in theory if the system supports it be disabled/turned offline, so you can't really deduce anything from the counts of blocks.

I was really hoping I could finally get a reliable no root RAM total going, assuming the kernel is compiled to create that directory and those files, but given I found one case instantly that had an extra block, and that digging through my debugger data sets, I found another one, then babydr has a live one too, it clearly has something else going on.

The drag is, it's usually in most cases right./sys:

Code:
# server 1
Total: 64 GiB
Blocks: 32
Block-size: 2 GiB

sys memory: $VAR1 = \[
            67108864,
            32,
            2097152
          ];
Info:
  Processes: 702 Uptime: 40d 21h 28m Memory: total: 64 GiB note: check
  available: 62.88 GiB used: 36.14 GiB (57.5%) Init: systemd
  target: graphical (5) Shell: Bash pinxi: 3.3.27-14

# 2
/sys:
Total: 192 GiB
Blocks: 96
Block-size: 2 GiB

sys memory: $VAR1 = \[
            201326592,
            96,
            2097152
          ];
Info:
  Processes: 18 Uptime: 356d 10h 3m Memory: total: 192 GiB note: check
  available: 188.79 GiB used: 73.71 GiB (39.0%) Init: systemd
  target: graphical (5) Shell: sh pinxi: 3.3.27-14

# server 3
/sys:
Total: 32 GiB
Blocks: 256
Block-size: 128 MiB

sys memory: $VAR1 = \[
            33554432,
            256,
            131072
          ];
Info:
  Processes: 610 Uptime: 40d 22h 42m Memory: total: 32 GiB note: check
  available: 31.37 GiB used: 28.39 GiB (90.5%) Init: systemd
  target: graphical (5) Shell: csh pinxi: 3.3.27-14

# server 4, a vm
/sys:
Total: 4 GiB
Blocks: 32
Block-size: 128 MiB

sys memory: $VAR1 = \[
            4194304,
            32,
            131072
          ];
Info:
  Processes: 249 Uptime: 5d 20h 34m Memory: total: 4 GiB note: check
  available: 3.84 GiB used: 1.42 GiB (37.1%) Init: systemd
  target: graphical (5) Shell: Bash pinxi: 3.3.27-14
I'm wondering if maybe try if blocks % 4xblock size == 0 aka modulus might be a hint that it's accurate?
 
Old 06-12-2023, 08:04 PM   #11
h2-1
Member
 
Registered: Mar 2018
Distribution: Debian Testing
Posts: 562

Original Poster
Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
Yes, tested it, this seems to detect the extra block more or less:

Code:
# 1 extra 2GiB block, from babydr
perl -E 'say 270532608 % (4*2097152)'
2097152

# no extra blocks
perl -E 'say 8388608 % (4*131072)'
0

# 1 extra block again
perl -E 'say 136314880 % (4*2097152)'
2097152

# server assumed correct
/sys:
Total: 192 GiB
Blocks: 96
Block-size: 2 GiB
Count check: total % (4xblocksize): 0

sys memory: $VAR1 = \[
            201326592,
            96,
            2097152
          ];
Info:
  Processes: 18 Uptime: 356d 10h 29m Memory: total: 192 GiB
  available: 188.79 GiB used: 73.83 GiB (39.1%) Init: systemd
  target: graphical (5) Shell: sh pinxi: 3.3.27-16

# server with extra block
/sys:
Total: 130 GiB
Blocks: 65
Block-size: 2 GiB
Count check: total % (4xblocksize): 2097152

sys memory: $VAR1 = \[
            136314880,
            65,
            2097152
          ];
Info:
  Processes: 825 Uptime: 12d 17h 53m Memory: total: 130 GiB note: check
  available: 125.79 GiB used: 10.94 GiB (8.7%) Init: systemd
  target: graphical (5) Shell: Bash pinxi: 3.3.27-16
that seems to work ok.

8 works too, but 4 is probably more conservative, that's assuming that there are at least 4 blocks per physical stick, I think, but if that is wrong, it will just show note: check.

Last edited by h2-1; 06-12-2023 at 09:15 PM.
 
Old 06-12-2023, 11:25 PM   #12
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,987

Rep: Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557
This is my system:
Code:
# ./pinxi -Ma --vs 
pinxi 3.3.27-16 (2023-06-12)
Machine:
  Type: Desktop Mobo: Gigabyte model: M68MT-S2 serial: N/A BIOS: Award v: F1
    date: 11/15/2010
The test:
Code:
# ./pinxi -I --dbg 53,54

/sys:
Total: 8 GiB
Blocks: 64
Block-size: 128 MiB
Count check: total % (4xblocksize): 0

sys memory: $VAR1 = \[
            8388608,
            64,
            131072
          ];
00000000-00000fff : Reserved
        size: 4 KiB
00001000-00097fff : System RAM
        size: 604 KiB
00098000-0009f7ff : RAM buffer
        size: 30 KiB
0009f800-0009ffff : Reserved
        size: 2 KiB
00000000-00000000 : PCI Bus 0000:00
        size: 0 KiB
000a0000-000dffff : PCI Bus 0000:00
        size: 256 KiB
  000c0000-000ce9ff : Video ROM
        size: 58 KiB
000f0000-000fffff : Reserved
        size: 64 KiB
  000f0000-000fffff : System ROM
        size: 64 KiB
00100000-cfedffff : System RAM
        size: 3.25 GiB
cfee0000-cfee2fff : ACPI Non-volatile Storage
        size: 12 KiB
cfee3000-cfeeffff : ACPI Tables
        size: 52 KiB
cfef0000-cfefffff : Reserved
        size: 64 KiB
  cfef0000-cfefffff : pnp 00:07
        size: 64 KiB
cff00000-cfffffff : RAM buffer
        size: 1024 KiB
d0000000-dfffffff : PCI Bus 0000:00
        size: 256 MiB
  d0000000-dfffffff : PCI Bus 0000:02
        size: 256 MiB
    d0000000-d7ffffff : 0000:02:00.0
        size: 128 MiB
    de000000-dfffffff : 0000:02:00.0
        size: 32 MiB
      df000000-dfdfffff : vesafb
        size: 14 MiB
e0000000-febfffff : Reserved
        size: 492 MiB
  e4000000-febfffff : PCI Bus 0000:00
        size: 428 MiB
    fb000000-fcffffff : PCI Bus 0000:02
        size: 32 MiB
      fb000000-fbffffff : 0000:02:00.0
        size: 16 MiB
        fb000000-fbffffff : nvidia
        size: 16 MiB
      fcffc000-fcffffff : 0000:02:00.1
        size: 16 KiB
        fcffc000-fcffffff : ICH HD audio
        size: 16 KiB
    fde00000-fdefffff : PCI Bus 0000:01
        size: 1024 KiB
    fdf00000-fdffffff : PCI Bus 0000:01
        size: 1024 KiB
    fe024000-fe027fff : 0000:00:05.0
        size: 16 KiB
      fe024000-fe027fff : ICH HD audio
        size: 16 KiB
    fe02b000-fe02bfff : 0000:00:08.1
        size: 4 KiB
      fe02b000-fe02bfff : sata_nv
        size: 4 KiB
    fe02c000-fe02cfff : 0000:00:08.0
        size: 4 KiB
      fe02c000-fe02cfff : sata_nv
        size: 4 KiB
    fe02d000-fe02dfff : 0000:00:07.0
        size: 4 KiB
      fe02d000-fe02dfff : forcedeth
        size: 4 KiB
    fe02e000-fe02e0ff : 0000:00:02.1
        size: 0 KiB
      fe02e000-fe02e0ff : ehci_hcd
        size: 0 KiB
    fe02f000-fe02ffff : 0000:00:02.0
        size: 4 KiB
      fe02f000-fe02ffff : ohci_hcd
        size: 4 KiB
fec00000-ffffffff : Reserved
        size: 20 MiB
  fec00000-fec003ff : IOAPIC 0
        size: 1 KiB
  fee00000-fee00fff : Local APIC
        size: 4 KiB
    fee00000-fee00fff : pnp 00:07
        size: 4 KiB
  fefe0000-fefe01ff : pnp 00:00
        size: 0 KiB
  fefe1000-fefe10ff : pnp 00:00
        size: 0 KiB
  feff0000-feff03ff : HPET 0
        size: 1 KiB
    feff0000-feff03ff : PNP0103:00
        size: 1 KiB
  ffff0000-ffffffff : pnp 00:07
        size: 64 KiB
100000000-22fffffff : System RAM
        size: 4.75 GiB
  1a7000000-1a7e02607 : Kernel code
        size: 14 MiB
  1a8000000-1a845efff : Kernel rodata
        size: 4.4 MiB
  1a8600000-1a889f8ff : Kernel data
        size: 2.6 MiB
  1a8ef6000-1a93fffff : Kernel bss
        size: 5 MiB

iomem:
System: 8 GiB
Buffer: 1 MiB
System+iGPU: 8 GiB
System+reserved: 8.5 GiB
System+reserved+buffer: 8.5 GiB
System+reserved+buffer raw GiB: 8.49968338012695
Reserved: 512.2 MiB
Reserved-iGPU: 512.2 MiB
iGPU: 0 KiB
PCI Bus: 256.3 MiB

proc/iomem: $VAR1 = \[
            '8911510',
            '524474',
            '0'
          ];
Info:
  Processes: 252 Uptime: 1d 20h 5m Memory: total: 9 GiB note: est.
  available: 7.77 GiB used: 2.66 GiB (34.3%) Shell: Bash pinxi: 3.3.27-16
 
1 members found this post helpful.
Old 06-13-2023, 12:18 AM   #13
h2-1
Member
 
Registered: Mar 2018
Distribution: Debian Testing
Posts: 562

Original Poster
Rep: Reputation: 320Reputation: 320Reputation: 320Reputation: 320
chrisretusn, oh, good, you found one that broke my latest assumptions, lol. That didn't take long.

I'll if I can get that one fixed, thanks.

[update]
this is a puzzler, and may be the exception that kills this notion, or it can just live with it I guess.

Not a bug, but an example of my assumptions not quite matching reality. This is the first example so far where /sys total was right, and /proc/iomem total is wrong.
]
What's that
Code:
e0000000-febfffff : Reserved
        size: 492 MiB
PCI block? I think I see the issue roughly, maybe, those are all PCI devices and it shouldn't be showing Reserved, but then again, I don't fully understand what Reserved means, this example suggests it doesn't mean exactly what I thought.

Annoyingly all samples are now working except this one I believe. I'll have to look through to see if this could be filtered out, that seems to be something that normally would have shown as a PCI Bus item as primary row container, but instead showed as Reserved.

Is one of those bus IDs an internal video device?

The issue is that it's showing as Reserved instead of PCI Bus as the primary container, but then even if I subtract the PCI bits inside of it, it still comes up some 50 MiB over.

What kind of system is that? Laptop, Intel CPU? Desktop?

To me it looks like it was supposed to say PCI Bus instead of Reserved, but this stuff is so arcane I really don't know what is supposed to be what, just what is generally what.

So this so far is the corner case.

The contents of that reserved item don't add up to the 492 MiB, so I'll have to think on this one. In this case, the desired behavior would have been to keep the /sys total, and dump this total, but that is really hard to determine. One test could be if /sys total is divisible by 2, and /proc isn't, proc is probably wrong, but that is hackish again.

I suspected I needed more data, that's what my changelog had in it too as a note.

Either this is a bug in how the kernel is reporting that particular device, as Reserved instead of PCI bus, or there's another layer completely.

I knew there was a risk using ceil to boost up the ram totals in case one did just what yours did, be slightly over more than slightly over the real total.

I'll have to think about this.

The other oddity is that like the vm example above, the actual system RAM was actually complete at 8 GiB, without adding anything to it, which makes this a new type of system unless it's a VM.

Last edited by h2-1; 06-13-2023 at 01:25 AM.
 
Old 06-13-2023, 01:07 AM   #14
rizitis
Member
 
Registered: Mar 2009
Location: Greece,Crete
Distribution: Slackware64-current, Slint
Posts: 709
Blog Entries: 1

Rep: Reputation: 516Reputation: 516Reputation: 516Reputation: 516Reputation: 516Reputation: 516
Code:
pinxi -I --dbg 53,54

/sys:
Total: 15.88 GiB
Blocks: 127
Block-size: 128 MiB
Count check: total % (4xblocksize): 393216

sys memory: $VAR1 = \[
            16646144,
            127,
            131072
          ];
00000000-00000fff : Reserved
        size: 4 KiB
00001000-0009dfff : System RAM
        size: 628 KiB
0009e000-0009efff : Reserved
        size: 4 KiB
0009f000-0009ffff : System RAM
        size: 4 KiB
000a0000-000fffff : Reserved
        size: 384 KiB
  000a0000-000bffff : PCI Bus 0000:00
        size: 128 KiB
  00000000-00000000 : PCI Bus 0000:00
        size: 0 KiB
  000e8000-000effff : PCI Bus 0000:00
        size: 32 KiB
  000f0000-000fffff : System ROM
        size: 64 KiB
00100000-59c62fff : System RAM
        size: 1.4 GiB
59c63000-59ca2fff : Reserved
        size: 256 KiB
59ca3000-5de65fff : System RAM
        size: 65.8 MiB
5de66000-5de66fff : Reserved
        size: 4 KiB
5de67000-5f8d6fff : System RAM
        size: 26.4 MiB
5f8d7000-629d6fff : Reserved
        size: 49 MiB
629d7000-62ae1fff : ACPI Tables
        size: 1 MiB
62ae2000-62c50fff : ACPI Non-volatile Storage
        size: 1.4 MiB
62c51000-67e65fff : Reserved
        size: 82.1 MiB
67e66000-67efefff : Unknown E820 type
        size: 612 KiB
67eff000-67efffff : System RAM
        size: 4 KiB
67f00000-6dffffff : Reserved
        size: 97 MiB
6e800000-6e9fffff : Reserved
        size: 2 MiB
6f000000-743fffff : Reserved
        size: 84 MiB
  70800000-743fffff : Graphics Stolen Memory
        size: 60 MiB
74400000-bfffffff : PCI Bus 0000:00
        size: 1.18 GiB
  74400000-74400fff : 0000:00:1f.5
        size: 4 KiB
  75000000-760fffff : PCI Bus 0000:01
        size: 17 MiB
    75000000-75ffffff : 0000:01:00.0
        size: 16 MiB
      75000000-75ffffff : nvidia
        size: 16 MiB
    76000000-7607ffff : 0000:01:00.0
        size: 512 KiB
    76080000-76083fff : 0000:01:00.1
        size: 16 KiB
      76080000-76083fff : ICH HD audio
        size: 16 KiB
  76200000-762fffff : PCI Bus 0000:06
        size: 1024 KiB
    76200000-76203fff : 0000:06:00.0
        size: 16 KiB
    76204000-76204fff : 0000:06:00.0
        size: 4 KiB
      76204000-76204fff : r8169
        size: 4 KiB
  76300000-763fffff : PCI Bus 0000:04
        size: 1024 KiB
    76300000-76300fff : 0000:04:00.0
        size: 4 KiB
      76300000-76300fff : mmc0
        size: 4 KiB
  76400000-764fffff : PCI Bus 0000:03
        size: 1024 KiB
    76400000-76403fff : 0000:03:00.0
        size: 16 KiB
      76400000-76403fff : nvme
        size: 16 KiB
c0000000-cfffffff : PCI MMCONFIG 0000 [bus 00-ff]
        size: 256 MiB
  c0000000-cfffffff : Reserved
        size: 256 MiB
fd690000-fd69ffff : INTC1055:00
        size: 64 KiB
  fd690000-fd69ffff : INTC1055:00 INTC1055:00
        size: 64 KiB
fd6a0000-fd6affff : INTC1055:00
        size: 64 KiB
  fd6a0000-fd6affff : INTC1055:00 INTC1055:00
        size: 64 KiB
fd6d0000-fd6dffff : INTC1055:00
        size: 64 KiB
  fd6d0000-fd6dffff : INTC1055:00 INTC1055:00
        size: 64 KiB
fd6e0000-fd6effff : INTC1055:00
        size: 64 KiB
  fd6e0000-fd6effff : INTC1055:00 INTC1055:00
        size: 64 KiB
fe000000-fe010fff : Reserved
        size: 68 KiB
fe03e008-fe03efff : pnp 00:05
        size: 4 KiB
fe03f000-fe03ffff : pnp 00:05
        size: 4 KiB
fec00000-fec00fff : Reserved
        size: 4 KiB
  fec00000-fec003ff : IOAPIC 0
        size: 1 KiB
fed00000-fed00fff : Reserved
        size: 4 KiB
  fed00000-fed003ff : HPET 0
        size: 1 KiB
    fed00000-fed003ff : PNP0103:00
        size: 1 KiB
fed20000-fed7ffff : Reserved
        size: 384 KiB
  fed40000-fed44fff : MSFT0101:00
        size: 20 KiB
    fed40000-fed44fff : MSFT0101:00
        size: 20 KiB
fed90000-fed90fff : dmar0
        size: 4 KiB
fed91000-fed91fff : dmar1
        size: 4 KiB
feda0000-feda0fff : pnp 00:03
        size: 4 KiB
feda1000-feda1fff : pnp 00:03
        size: 4 KiB
fedc0000-fedc7fff : pnp 00:03
        size: 32 KiB
fee00000-fee00fff : Local APIC
        size: 4 KiB
  fee00000-fee00fff : Reserved
        size: 4 KiB
ff000000-ffffffff : Reserved
        size: 16 MiB
100000000-48bbfffff : System RAM
        size: 14.18 GiB
  406000000-406e02607 : Kernel code
        size: 14 MiB
  407000000-40745efff : Kernel rodata
        size: 4.4 MiB
  407600000-40789f8ff : Kernel data
        size: 2.6 MiB
  407ef6000-4083fffff : Kernel bss
        size: 5 MiB
48bc00000-48bffffff : RAM buffer
        size: 4 MiB
4000000000-7fffffffff : PCI Bus 0000:00
        size: 256 GiB
  4000000000-400fffffff : 0000:00:02.0
        size: 256 MiB
  4010000000-4016ffffff : 0000:00:02.0
        size: 112 MiB
  4017000000-4017000fff : 0000:00:15.0
        size: 4 KiB
    4017000000-40170001ff : lpss_dev
        size: 0 KiB
      4017000000-40170001ff : i2c_designware.0 lpss_dev
        size: 0 KiB
    4017000200-40170002ff : lpss_priv
        size: 0 KiB
    4017000800-4017000fff : idma64.0
        size: 2 KiB
      4017000800-4017000fff : idma64.0 idma64.0
        size: 2 KiB
  4020000000-40ffffffff : 0000:00:02.0
        size: 3.5 GiB
  6000000000-6101ffffff : PCI Bus 0000:01
        size: 4.03 GiB
    6000000000-60ffffffff : 0000:01:00.0
        size: 4 GiB
    6100000000-6101ffffff : 0000:01:00.0
        size: 32 MiB
  6102100000-61022fffff : PCI Bus 0000:05
        size: 2 MiB
    6102100000-61021fffff : 0000:05:00.0
        size: 1024 KiB
      6102100000-61021fffff : 0000:05:00.0
        size: 1024 KiB
    6102200000-6102203fff : 0000:05:00.0
        size: 16 KiB
    6102204000-6102204fff : 0000:05:00.0
        size: 4 KiB
  6103000000-6103ffffff : 0000:00:02.0
        size: 16 MiB
  6104000000-61040fffff : 0000:00:1f.3
        size: 1024 KiB
    6104000000-61040fffff : Audio DSP
        size: 1024 KiB
  6104100000-610411ffff : 0000:00:04.0
        size: 128 KiB
    6104100000-610411ffff : proc_thermal
        size: 128 KiB
  6104120000-610412ffff : 0000:00:14.0
        size: 64 KiB
    6104120000-610412ffff : xhci-hcd
        size: 64 KiB
  6104130000-610413ffff : 0000:00:0d.0
        size: 64 KiB
    6104130000-610413ffff : xhci-hcd
        size: 64 KiB
  6104140000-6104143fff : 0000:00:1f.3
        size: 16 KiB
    6104140000-6104143fff : Audio DSP
        size: 16 KiB
  6104144000-6104147fff : 0000:00:14.2
        size: 16 KiB
  6104148000-61041480ff : 0000:00:1f.4
        size: 0 KiB
  6104149000-6104149fff : 0000:00:16.0
        size: 4 KiB
    6104149000-6104149fff : mei_me
        size: 4 KiB
  610414b000-610414bfff : 0000:00:14.2
        size: 4 KiB
  610414c000-610414cfff : 0000:00:08.0
        size: 4 KiB

iomem:
System: 15.68 GiB
Buffer: 4 MiB
System+iGPU: 15.73 GiB
System+reserved: 16 GiB
System+reserved+buffer: 16 GiB
System+reserved+buffer raw GiB: 16.0048980712891
Reserved: 332.8 MiB
Reserved-iGPU: 272.8 MiB
iGPU: 60 MiB
PCI Bus: 257.43 GiB

proc/iomem: $VAR1 = \[
            '16778256',
            '340796',
            '61440'
          ];
Info:
  Processes: 424 Uptime: 8m Memory: total: 16 GiB available: 15.31 GiB
  used: 2.69 GiB (17.6%) igpu: 60 MiB Shell: Bash pinxi: 3.3.27-16
Code:
 pinxi -Ma
Machine:
  Type: Laptop System: HP product: OMEN by HP Laptop 16-b1xxx v: N/A
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: HP model: 8A15 v: 32.20 serial: <superuser required> UEFI: AMI
    v: F.06 date: 05/06/2022
 
1 members found this post helpful.
Old 06-13-2023, 09:18 AM   #15
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,987

Rep: Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557
Quote:
Originally Posted by h2-1 View Post
chrisretusn, oh, good, you found one that broke my latest assumptions, lol. That didn't take long.
Glad I could be of help.


Not a bug, but an example of my assumptions not quite matching reality. This is the first example so far where /sys total was right, and /proc/iomem total is wrong.
]
What's that
Code:
e0000000-febfffff : Reserved
        size: 492 MiB
PCI block? I think I see the issue roughly, maybe, those are all PCI devices and it shouldn't be showing Reserved, but then again, I don't fully understand what Reserved means, this example suggests it doesn't mean exactly what I thought.

Annoyingly all samples are now working except this one I believe. I'll have to look through to see if this could be filtered out, that seems to be something that normally would have shown as a PCI Bus item as primary row container, but instead showed as Reserved.
Well your kind of over my head now. I ran this, maybe it will be useful.
Code:
# dmesg | grep -i reserved
[    0.000000] BIOS-e820: [mem 0x000000000009f800-0x000000000009ffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000cfef0000-0x00000000cfefffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000e0000000-0x00000000e7ffffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000ffffffff] reserved
[    0.002629] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
[    0.008590] e820: update [mem 0xcff00000-0xffffffff] usable ==> reserved
[    0.109830] Memory: 8059868K/8387036K available (14345K kernel code, 2686K rwdata, 4476K rodata, 1936K init, 5160K bss, 326908K reserved, 0K cma-reserved)
[    0.243569] PCI: MMCONFIG at [mem 0xe0000000-0xefffffff] reserved in E820
[    0.270099] Expanded resource Reserved due to conflict with PCI Bus 0000:00
[    0.270133] hpet: 3 channels of 0 reserved for per-cpu timers
[    0.272854] system 00:00: [io  0x1000-0x107f] has been reserved
[    0.272860] system 00:00: [io  0x1080-0x10ff] has been reserved
[    0.272863] system 00:00: [io  0x1400-0x147f] has been reserved
[    0.272866] system 00:00: [io  0x1480-0x14ff] has been reserved
[    0.272869] system 00:00: [io  0x1800-0x187f] has been reserved
[    0.272872] system 00:00: [io  0x1880-0x18ff] has been reserved
[    0.272876] system 00:00: [mem 0xfefe0000-0xfefe01ff] has been reserved
[    0.272883] system 00:00: [mem 0xfefe1000-0xfefe10ff] has been reserved
[    0.272955] system 00:01: [io  0x04d0-0x04d1] has been reserved
[    0.272959] system 00:01: [io  0x0800-0x087f] has been reserved
[    0.272963] system 00:01: [io  0x0295-0x0296] has been reserved
[    0.272966] system 00:01: [io  0x0290-0x0294] has been reserved
[    0.273889] system 00:06: [mem 0xe0000000-0xe7ffffff] could not be reserved
[    0.274040] system 00:07: [mem 0x000f0000-0x000f7fff] could not be reserved
[    0.274044] system 00:07: [mem 0x000f8000-0x000fbfff] could not be reserved
[    0.274048] system 00:07: [mem 0x000fc000-0x000fffff] could not be reserved
[    0.274051] system 00:07: [mem 0xcfee0000-0xcfeeffff] could not be reserved
[    0.274055] system 00:07: [mem 0xffff0000-0xffffffff] has been reserved
[    0.274058] system 00:07: [mem 0x00000000-0x0009ffff] could not be reserved
[    0.274062] system 00:07: [mem 0x00100000-0xcfedffff] could not be reserved
[    0.274065] system 00:07: [mem 0xcfef0000-0xcfefffff] has been reserved
[    0.274068] system 00:07: [mem 0xcff00000-0xcfffffff] could not be reserved
[    0.274072] system 00:07: [mem 0xfec00000-0xfec00fff] could not be reserved
[    0.274075] system 00:07: [mem 0xfee00000-0xfee00fff] has been reserved
Quote:
Is one of those bus IDs an internal video device?

The issue is that it's showing as Reserved instead of PCI Bus as the primary container, but then even if I subtract the PCI bits inside of it, it still comes up some 50 MiB over.
Could be, I do have an internal video device (NVIDIA) on the motherboard. I don't use it.

Quote:
What kind of system is that? Laptop, Intel CPU? Desktop?
Code:
# ./pinxi -CMGaz
Machine:
  Type: Desktop Mobo: Gigabyte model: M68MT-S2 serial: N/A BIOS: Award v: F1
    date: 11/15/2010
CPU:
  Info: model: AMD Phenom II X4 840 socket: M2 bits: 64 type: MCP arch: K10
    level: v1 built: 2009-13 process: AMD 45nm family: 0x10 (16) model-id: 5
    stepping: 3 microcode: 0x10000C8
  Topology: cpus: 1x cores: 4 smt: <unsupported> cache: L1: 512 KiB
    desc: d-4x64 KiB; i-4x64 KiB L2: 2 MiB desc: 4x512 KiB
  Speed (MHz): avg: 800 min/max: 800/3200 boost: disabled
    base/boost: 3200/3200 scaling: driver: acpi-cpufreq governor: ondemand
    volts: 1.0 V ext-clock: 200 MHz cores: 1: 800 2: 800 3: 800 4: 800
    bogomips: 25717
  Flags: ht lm nx pae sse sse2 sse3 sse4a svm
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  Type: retbleed status: Not affected
  Type: spec_store_bypass status: Not affected
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Retpolines, STIBP: disabled, RSB filling,
    PBRSB-eIBRS: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: NVIDIA GK208B [GeForce GT 730] vendor: ZOTAC driver: nvidia
    v: 470.182.03 alternate: nvidiafb,nouveau,nvidia_drm non-free:
    series: 470.xx+ status: legacy-active (EOL~2023/24) arch: Kepler
    code: GKxxx process: TSMC 28nm built: 2012-18 pcie: gen: 1 speed: 2.5 GT/s
    lanes: 8 ports: active: none off: DVI-D-1 empty: HDMI-A-1,VGA-1
    bus-ID: 02:00.0 chip-ID: 10de:1287 class-ID: 0300
  Display: server: X.Org v: 21.1.8 with: Xwayland v: 23.1.2
    compositor: kwin_x11 driver: X: loaded: nvidia gpu: nvidia,nvidia-nvswitch
    display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1366x768 s-dpi: 84 s-size: 413x232mm (16.26x9.13")
    s-diag: 474mm (18.65")
  Monitor-1: DVI-D-1 mapped: DVI-D-0 note: disabled model: Philips 192EL
    serial: <filter> built: 2011 res: 1366x768 hz: 60 dpi: 85 gamma: 1.2
    size: 410x230mm (16.14x9.06") diag: 470mm (18.5") ratio: 16:9 modes:
    max: 1366x768 min: 640x480
  API: OpenGL v: 4.6.0 NVIDIA 470.182.03 renderer: NVIDIA GeForce GT
    730/PCIe/SSE2 direct-render: Yes

Quote:
To me it looks like it was supposed to say PCI Bus instead of Reserved, but this stuff is so arcane I really don't know what is supposed to be what, just what is generally what.

So this so far is the corner case.

The contents of that reserved item don't add up to the 492 MiB, so I'll have to think on this one. In this case, the desired behavior would have been to keep the /sys total, and dump this total, but that is really hard to determine. One test could be if /sys total is divisible by 2, and /proc isn't, proc is probably wrong, but that is hackish again.

I suspected I needed more data, that's what my changelog had in it too as a note.

Either this is a bug in how the kernel is reporting that particular device, as Reserved instead of PCI bus, or there's another layer completely.

I knew there was a risk using ceil to boost up the ram totals in case one did just what yours did, be slightly over more than slightly over the real total.

I'll have to think about this.

The other oddity is that like the vm example above, the actual system RAM was actually complete at 8 GiB, without adding anything to it, which makes this a new type of system unless it's a VM.
If you need other data let me know.
 
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
inxi/pinxi + --recommends and Slackware package names, help complete list h2-1 Slackware 62 05-08-2023 03:06 PM
pinxi/inxi huge BSD updates, testers? h2-1 *BSD 0 03-08-2021 11:54 PM
Testersfeedback for new pinxi/inxi feature -E/--bluetooth h2-1 Slackware 2 01-29-2021 06:53 PM
Huge inxi/pinxi upgrade, new features, Logical volumes, raid rewrite, beta testers? h2-1 Slackware 12 12-17-2020 05:04 PM

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

All times are GMT -5. The time now is 11:18 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