mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
New version, new man page, new tarball. Realized that I can on some systems also add
maximum supported module size, and module voltage. Most systems do not have this data, but some do. It's Type 5 item in dmidecode. Getting the type 6 data however is too hard, and even using type 5 assumes that the system only has one physical memory array, but that's fine given how few systems probably will have this information in the first place.
This commit is contained in:
parent
a49695250b
commit
0b8847301d
52
inxi
52
inxi
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### Version: 2.1.93
|
#### Version: 2.1.94
|
||||||
#### Date: 2014-08-13
|
#### Date: 2014-08-13
|
||||||
#### Patch Number: 00
|
#### Patch Number: 00
|
||||||
########################################################################
|
########################################################################
|
||||||
|
@ -2699,7 +2699,7 @@ show_options()
|
||||||
print_lines_basic "2" "-G" "(for single gpu, nvidia driver) screen number gpu is running on."
|
print_lines_basic "2" "-G" "(for single gpu, nvidia driver) screen number gpu is running on."
|
||||||
print_lines_basic "2" "-i" "IPv6 as well for LAN interface (IF) devices."
|
print_lines_basic "2" "-i" "IPv6 as well for LAN interface (IF) devices."
|
||||||
print_lines_basic "2" "-I" "System GCC, default. With -xx, also show other installed GCC versions. If running in console, not in IRC client, shows shell version number, if detected. Init/RC Type and runlevel (if available)."
|
print_lines_basic "2" "-I" "System GCC, default. With -xx, also show other installed GCC versions. If running in console, not in IRC client, shows shell version number, if detected. Init/RC Type and runlevel (if available)."
|
||||||
print_lines_basic "2" "-m" "Part number."
|
print_lines_basic "2" "-m" "Part number; Max memory module size (if available)."
|
||||||
print_lines_basic "2" "-N -A" "Version/port(s)/driver version (if available) for Network/Audio;"
|
print_lines_basic "2" "-N -A" "Version/port(s)/driver version (if available) for Network/Audio;"
|
||||||
print_lines_basic "2" "-N -A -G" "Network, audio, graphics, shows PCI Bus ID/Usb ID number of card."
|
print_lines_basic "2" "-N -A -G" "Network, audio, graphics, shows PCI Bus ID/Usb ID number of card."
|
||||||
print_lines_basic "2" "-R" "md-raid: Shows component raid id. Adds second RAID Info line: raid level; report on drives (like 5/5); blocks; chunk size; bitmap (if present). Resync line, shows blocks synced/total blocks. zfs-raid: Shows raid array full size; available size; portion allocated to RAID"
|
print_lines_basic "2" "-R" "md-raid: Shows component raid id. Adds second RAID Info line: raid level; report on drives (like 5/5); blocks; chunk size; bitmap (if present). Resync line, shows blocks synced/total blocks. zfs-raid: Shows raid array full size; available size; portion allocated to RAID"
|
||||||
|
@ -2723,7 +2723,7 @@ show_options()
|
||||||
fi
|
fi
|
||||||
print_lines_basic "2" "-@ 11-14" "Automatically uploads debugger data tar.gz file to ftp.techpatterns.com. EG: $SCRIPT_NAME^-xx@14"
|
print_lines_basic "2" "-@ 11-14" "Automatically uploads debugger data tar.gz file to ftp.techpatterns.com. EG: $SCRIPT_NAME^-xx@14"
|
||||||
print_lines_basic "1" "-xxx" "Show extra, extra, extra data (only works with verbose or line output, not short form):"
|
print_lines_basic "1" "-xxx" "Show extra, extra, extra data (only works with verbose or line output, not short form):"
|
||||||
print_lines_basic "2" "-m" "Width of memory bus, data and total (if present and greater than data). Detail, if present, for Type."
|
print_lines_basic "2" "-m" "Width of memory bus, data and total (if present and greater than data); Detail, if present, for Type; module voltage, if available."
|
||||||
print_lines_basic "2" "-S" "Panel/shell information in desktop output, if in X (like gnome-shell, cinnamon, mate-panel)."
|
print_lines_basic "2" "-S" "Panel/shell information in desktop output, if in X (like gnome-shell, cinnamon, mate-panel)."
|
||||||
if [[ $B_ALLOW_WEATHER == 'true' ]];then
|
if [[ $B_ALLOW_WEATHER == 'true' ]];then
|
||||||
print_lines_basic "2" "-w -W" "Location (uses -z/irc filter), weather observation time, wind chill, heat index, dew point (shows extra lines for data where relevant)."
|
print_lines_basic "2" "-w -W" "Location (uses -z/irc filter), weather observation time, wind chill, heat index, dew point (shows extra lines for data where relevant)."
|
||||||
|
@ -8141,11 +8141,23 @@ get_ram_data()
|
||||||
location=""
|
location=""
|
||||||
locator=""
|
locator=""
|
||||||
maxCapacity=""
|
maxCapacity=""
|
||||||
|
maxModuleSize=""
|
||||||
|
moduleVoltage=""
|
||||||
numberOfDevices=""
|
numberOfDevices=""
|
||||||
primaryType=""
|
primaryType=""
|
||||||
totalWidth=""
|
totalWidth=""
|
||||||
use=""
|
use=""
|
||||||
}
|
}
|
||||||
|
/^Handle .* DMI type 5(,|[[:space:]])/ {
|
||||||
|
while ( getline && !/^$/ ) {
|
||||||
|
if ( $1 == "Maximum Memory Module Size" ) {
|
||||||
|
maxModuleSize=$2
|
||||||
|
}
|
||||||
|
if ( $1 == "Memory Module Voltage" ) {
|
||||||
|
moduleVoltage=$2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
/^Handle .* DMI type 16/ {
|
/^Handle .* DMI type 16/ {
|
||||||
primaryType="memory-array"
|
primaryType="memory-array"
|
||||||
arrayHandle=gensub(/Handle[[:space:]]([0-9a-zA-Z]+)([[:space:]]|,).*/,"\\1",$0)
|
arrayHandle=gensub(/Handle[[:space:]]([0-9a-zA-Z]+)([[:space:]]|,).*/,"\\1",$0)
|
||||||
|
@ -8178,7 +8190,7 @@ get_ram_data()
|
||||||
numberOfDevices=$2
|
numberOfDevices=$2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
print primaryType "," arrayHandle "," location "," maxCapacity "," numberOfDevices "," use "," errorCorrection
|
print primaryType "," arrayHandle "," location "," maxCapacity "," numberOfDevices "," use "," errorCorrection "," maxModuleSize "," moduleVoltage
|
||||||
# reset
|
# reset
|
||||||
primaryType=""
|
primaryType=""
|
||||||
arrayHandle=""
|
arrayHandle=""
|
||||||
|
@ -8187,6 +8199,8 @@ get_ram_data()
|
||||||
numberOfDevices=""
|
numberOfDevices=""
|
||||||
use=""
|
use=""
|
||||||
errorCorrection=""
|
errorCorrection=""
|
||||||
|
maxModuleSize=""
|
||||||
|
moduleVoltage=""
|
||||||
}
|
}
|
||||||
/^Handle .* DMI type 17/ {
|
/^Handle .* DMI type 17/ {
|
||||||
primaryType="memory-device"
|
primaryType="memory-device"
|
||||||
|
@ -11903,6 +11917,7 @@ print_ram_data()
|
||||||
local manufacturer='' part_nu='' serial_nu='' device_speed='' configured_speed='' bus_width=
|
local manufacturer='' part_nu='' serial_nu='' device_speed='' configured_speed='' bus_width=
|
||||||
local data_width='' total_width='' device_type='' device_type_detail='' bank='' slot='' form_factor=''
|
local data_width='' total_width='' device_type='' device_type_detail='' bank='' slot='' form_factor=''
|
||||||
local device_size='' array_use='' location='' error_correction='' max_capacity='' nu_of_devices=''
|
local device_size='' array_use='' location='' error_correction='' max_capacity='' nu_of_devices=''
|
||||||
|
local max_module_size='' module_voltage=''
|
||||||
|
|
||||||
get_ram_data
|
get_ram_data
|
||||||
#echo ${#A_MEMORY_DATA[@]}
|
#echo ${#A_MEMORY_DATA[@]}
|
||||||
|
@ -11926,7 +11941,9 @@ print_ram_data()
|
||||||
part_nu=''
|
part_nu=''
|
||||||
serial_nu=''
|
serial_nu=''
|
||||||
manufacturer=''
|
manufacturer=''
|
||||||
# memory-array,0x0012,System Board,8 GB,4,System Memory,None
|
max_module_size=''
|
||||||
|
module_voltage=''
|
||||||
|
# memory-array,0x0012,System Board,8 GB,4,System Memory,None,max size,moudule voltage
|
||||||
if [[ ${a_memory_item[0]} == 'memory-array' ]];then
|
if [[ ${a_memory_item[0]} == 'memory-array' ]];then
|
||||||
if [[ -n ${a_memory_item[4]} ]];then
|
if [[ -n ${a_memory_item[4]} ]];then
|
||||||
nu_of_devices=${a_memory_item[4]}
|
nu_of_devices=${a_memory_item[4]}
|
||||||
|
@ -11943,7 +11960,28 @@ print_ram_data()
|
||||||
else
|
else
|
||||||
error_correction='N/A'
|
error_correction='N/A'
|
||||||
fi
|
fi
|
||||||
|
if [[ $B_EXTRA_DATA == 'true' ]];then
|
||||||
|
if [[ -n ${a_memory_item[7]} ]];then
|
||||||
|
max_module_size="${C1}max module size${SEP3}${C2} ${a_memory_item[7]}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [[ $B_EXTRA_EXTRA_EXTRA_DATA == 'true' ]];then
|
||||||
|
if [[ -n ${a_memory_item[8]} ]];then
|
||||||
|
module_voltage=" ${C1}module voltage$SEP3${C2} ${a_memory_item[8]}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
memory_line="${C1}Array-$array_counter capacity$SEP3${C2} $max_capacity ${C1}devices$SEP3${C2} $nu_of_devices ${C1}EC$SEP3${C2} $error_correction "
|
memory_line="${C1}Array-$array_counter capacity$SEP3${C2} $max_capacity ${C1}devices$SEP3${C2} $nu_of_devices ${C1}EC$SEP3${C2} $error_correction "
|
||||||
|
line_2="$max_module_size$module_voltage"
|
||||||
|
if [[ -n $line_2 && $( calculate_line_length "$memory_line$line_2" ) -gt $COLS_INNER ]];then
|
||||||
|
memory_line=$( create_print_line "$line_starter" "$memory_line${CN}" )
|
||||||
|
print_screen_output "$memory_line"
|
||||||
|
memory_line="$line_2"
|
||||||
|
line_starter=' '
|
||||||
|
line_2=''
|
||||||
|
else
|
||||||
|
memory_line="$memory_line$line_2"
|
||||||
|
line_2=''
|
||||||
|
fi
|
||||||
(( array_counter++ ))
|
(( array_counter++ ))
|
||||||
device_counter=1 # reset so device matches device count per array
|
device_counter=1 # reset so device matches device count per array
|
||||||
else
|
else
|
||||||
|
@ -12066,12 +12104,12 @@ print_ram_data()
|
||||||
print_screen_output "$memory_line"
|
print_screen_output "$memory_line"
|
||||||
memory_line="$line_2"
|
memory_line="$line_2"
|
||||||
line_starter=' '
|
line_starter=' '
|
||||||
if [[ -n $line_3 && $( calculate_line_length "$memory_line$line_3" ) -gt $COLS_INNER ]];then
|
if [[ -n $memory_line && -n $line_3 && $( calculate_line_length "$memory_line$line_3" ) -gt $COLS_INNER ]];then
|
||||||
memory_line=$( create_print_line "$line_starter" "$memory_line${CN}" )
|
memory_line=$( create_print_line "$line_starter" "$memory_line${CN}" )
|
||||||
print_screen_output "$memory_line"
|
print_screen_output "$memory_line"
|
||||||
memory_line="$line_3"
|
memory_line="$line_3"
|
||||||
else
|
else
|
||||||
memory_line="$line_2$line_3"
|
memory_line="$memory_line$line_3"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
memory_line="$memory_line$line_2$line_3"
|
memory_line="$memory_line$line_2$line_3"
|
||||||
|
|
6
inxi.1
6
inxi.1
|
@ -334,6 +334,9 @@ version number, if available.
|
||||||
.B \-x \-m
|
.B \-x \-m
|
||||||
\- Shows memory device Part Number (\fBpart:\fR). Useful to order new or replacement memory sticks etc. Usually part numbers are unique, particularly if you use the word \fBmemory\fR in the search as well. With \fB\-xx\fR, shows Serial Number and Manufactorer as well.
|
\- Shows memory device Part Number (\fBpart:\fR). Useful to order new or replacement memory sticks etc. Usually part numbers are unique, particularly if you use the word \fBmemory\fR in the search as well. With \fB\-xx\fR, shows Serial Number and Manufactorer as well.
|
||||||
.TP
|
.TP
|
||||||
|
.B \-x \-m
|
||||||
|
\- If present, shows maximum memory module/device size in the Array line. Only some systems will have this data available.
|
||||||
|
.TP
|
||||||
.B \-x \-N
|
.B \-x \-N
|
||||||
\- Adds version/port(s)/driver version (if available) for each Network card;
|
\- Adds version/port(s)/driver version (if available) for each Network card;
|
||||||
.TP
|
.TP
|
||||||
|
@ -408,6 +411,9 @@ Supports most known display managers, like xdm, gdm, kdm, slim, lightdm, or mdm.
|
||||||
.B \-xxx \-m
|
.B \-xxx \-m
|
||||||
\- Adds device Type Detail, eg: DDR3 (Synchronous).
|
\- Adds device Type Detail, eg: DDR3 (Synchronous).
|
||||||
.TP
|
.TP
|
||||||
|
.B \-xxx \-m
|
||||||
|
\- If present, will add memory module voltage. Only some systems will have this data available.
|
||||||
|
.TP
|
||||||
.B \-xxx \-S
|
.B \-xxx \-S
|
||||||
\- Adds, if run in X, shell/panel type info to Desktop information, if present. If none, shows nothing.
|
\- Adds, if run in X, shell/panel type info to Desktop information, if present. If none, shows nothing.
|
||||||
Supports some current desktop extras like gnome\-panel, lxde\-panel, and others. Added mainly for Mint support.
|
Supports some current desktop extras like gnome\-panel, lxde\-panel, and others. Added mainly for Mint support.
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
=====================================================================================
|
||||||
|
Version: 2.1.94
|
||||||
|
Patch Version: 00
|
||||||
|
Script Date: 2014-08-13
|
||||||
|
-----------------------------------
|
||||||
|
Changes:
|
||||||
|
-----------------------------------
|
||||||
|
New version, new man page, new tarball. Realized that I can on some systems also add
|
||||||
|
maximum supported module size, and module voltage. Most systems do not have this data,
|
||||||
|
but some do. It's Type 5 item in dmidecode.
|
||||||
|
|
||||||
|
Getting the type 6 data however is too hard, and even using type 5 assumes that the
|
||||||
|
system only has one physical memory array, but that's fine given how few systems
|
||||||
|
probably will have this information in the first place.
|
||||||
|
|
||||||
|
-----------------------------------
|
||||||
|
-- Harald Hope - Wed, 13 Aug 2014 14:03:03 -0700
|
||||||
|
|
||||||
=====================================================================================
|
=====================================================================================
|
||||||
Version: 2.1.93
|
Version: 2.1.93
|
||||||
Patch Version: 00
|
Patch Version: 00
|
||||||
|
|
Loading…
Reference in a new issue