mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
New version, new man page. Fixed man page errors, improved man page explanations of -m
features. Changed output syntax to be more consistent, now each main array line starts with: Array-X capacity: (where X is an integer, counting from 1) and each device line starts with: Device-X: (where X is an integer incremented by 1 for each device, and starting at 1 for each array. I have no data sets that contain > 1 physical memory array, if one appears, I may need to patch the output to link the array handles with the device handles explicitly. Made memory bus width output more clear, and added in a hack to correct dmidecode output errors, sometimes total width > data width, and sometimes data width is > total width, so using always greatest value for total if not equal to other width. I think this will be close to it barring any user feedback or bugs, if nothing comes to mind within a few days, I'll move the number to the new major version, 2.2.0
This commit is contained in:
parent
54aef688bb
commit
013236264b
96
inxi
96
inxi
|
@ -1,8 +1,8 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### Version: 2.1.92
|
#### Version: 2.1.93
|
||||||
#### Date: 2014-08-12
|
#### Date: 2014-08-13
|
||||||
#### Patch Number: 00
|
#### Patch Number: 00
|
||||||
########################################################################
|
########################################################################
|
||||||
#### SPECIAL THANKS
|
#### SPECIAL THANKS
|
||||||
|
@ -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 channel, data and total. 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."
|
||||||
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)."
|
||||||
|
@ -8207,6 +8207,7 @@ get_ram_data()
|
||||||
# sub(/.*_/,"",$2)
|
# sub(/.*_/,"",$2)
|
||||||
#sub(/RAM slot #|^DIMM/, "Slot",$2)
|
#sub(/RAM slot #|^DIMM/, "Slot",$2)
|
||||||
sub(/RAM slot #/, "Slot",$2)
|
sub(/RAM slot #/, "Slot",$2)
|
||||||
|
sub(/^<BAD INDEX>|\.\.$/,"",$2)
|
||||||
#locator=toupper($2)
|
#locator=toupper($2)
|
||||||
locator=$2
|
locator=$2
|
||||||
}
|
}
|
||||||
|
@ -8254,6 +8255,17 @@ get_ram_data()
|
||||||
else {
|
else {
|
||||||
mainLocator=locator
|
mainLocator=locator
|
||||||
}
|
}
|
||||||
|
# sometimes the data is just wrong, they reverse total/data. data I believe is
|
||||||
|
# used for the actual memory bus width, total is some synthetic thing, sometimes missing.
|
||||||
|
# note that we do not want a regular string comparison, because 128 bit memory buses are
|
||||||
|
# in our future, and 128 bits < 64 bits with string compare
|
||||||
|
intData=gensub(/(^[0-9]+).*/,"\\1",1,dataWidth)
|
||||||
|
intTotal=gensub(/(^[0-9]+).*/,"\\1",1,totalWidth)
|
||||||
|
if (intData != "" && intTotal != "" && intData > intTotal ) {
|
||||||
|
tempWidth=dataWidth
|
||||||
|
dataWidth=totalWidth
|
||||||
|
totalWidth=tempWidth
|
||||||
|
}
|
||||||
print primaryType "," arrayHandle "," deviceSize "," bankLocator "," locator "," formFactor "," deviceType "," deviceTypeDetail "," deviceSpeed "," configuredClockSpeed "," dataWidth "," totalWidth "," deviceManufacturer "," devicePartNumber "," deviceSerialNumber "," mainLocator
|
print primaryType "," arrayHandle "," deviceSize "," bankLocator "," locator "," formFactor "," deviceType "," deviceTypeDetail "," deviceSpeed "," configuredClockSpeed "," dataWidth "," totalWidth "," deviceManufacturer "," devicePartNumber "," deviceSerialNumber "," mainLocator
|
||||||
|
|
||||||
primaryType=""
|
primaryType=""
|
||||||
|
@ -11885,10 +11897,10 @@ print_ram_data()
|
||||||
{
|
{
|
||||||
eval $LOGFS
|
eval $LOGFS
|
||||||
local memory_line='' line_2='' line_3='' b_module_present='true'
|
local memory_line='' line_2='' line_3='' b_module_present='true'
|
||||||
local error_string='' a_memory_item='' line_starter='Memory:' array_counter=0
|
local error_string='' a_memory_item='' line_starter='Memory:' array_counter=1 device_counter=1
|
||||||
local dmidecodeNull='No dmidecode memory data: try newer kernel.'
|
local dmidecodeNull='No dmidecode memory data: try newer kernel.'
|
||||||
|
|
||||||
local manufacturer='' part_nu='' serial_nu='' device_speed='' configured_speed=''
|
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=''
|
||||||
|
|
||||||
|
@ -11908,6 +11920,9 @@ print_ram_data()
|
||||||
memory_line=''
|
memory_line=''
|
||||||
line_2=''
|
line_2=''
|
||||||
line_3=''
|
line_3=''
|
||||||
|
bus_width=''
|
||||||
|
data_width=
|
||||||
|
total_width=
|
||||||
part_nu=''
|
part_nu=''
|
||||||
serial_nu=''
|
serial_nu=''
|
||||||
manufacturer=''
|
manufacturer=''
|
||||||
|
@ -11928,33 +11943,34 @@ print_ram_data()
|
||||||
else
|
else
|
||||||
error_correction='N/A'
|
error_correction='N/A'
|
||||||
fi
|
fi
|
||||||
memory_line="${C1}Array$SEP3${C2} $array_counter ${C1}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"
|
||||||
(( array_counter++ ))
|
(( array_counter++ ))
|
||||||
|
device_counter=1 # reset so device matches device count per array
|
||||||
else
|
else
|
||||||
# not used for now
|
# not used for now
|
||||||
if [[ -n ${a_memory_item[3333]} ]];then
|
# if [[ -n ${a_memory_item[3333]} ]];then
|
||||||
if [[ -z ${a_memory_item[3]/BANK*/} ]];then
|
# if [[ -z ${a_memory_item[3]/BANK*/} ]];then
|
||||||
#bank=${a_memory_item[3]#BANK}
|
# #bank=${a_memory_item[3]#BANK}
|
||||||
bank=${a_memory_item[3]}
|
# bank=${a_memory_item[3]}
|
||||||
bank=${bank## }
|
# bank=${bank## }
|
||||||
else
|
# else
|
||||||
bank=${a_memory_item[3]}
|
# bank=${a_memory_item[3]}
|
||||||
fi
|
# fi
|
||||||
else
|
# else
|
||||||
bank='N/A'
|
# bank='N/A'
|
||||||
fi
|
# fi
|
||||||
# not used for now
|
# # not used for now
|
||||||
if [[ -n ${a_memory_item[44444]} ]];then
|
# if [[ -n ${a_memory_item[44444]} ]];then
|
||||||
if [[ -z ${a_memory_item[4]/SLOT*/} ]];then
|
# if [[ -z ${a_memory_item[4]/SLOT*/} ]];then
|
||||||
#slot=${a_memory_item[4]#SLOT}
|
# #slot=${a_memory_item[4]#SLOT}
|
||||||
slot=${a_memory_item[4]}
|
# slot=${a_memory_item[4]}
|
||||||
slot=${slot## }
|
# slot=${slot## }
|
||||||
else
|
# else
|
||||||
slot=${a_memory_item[4]}
|
# slot=${a_memory_item[4]}
|
||||||
fi
|
# fi
|
||||||
else
|
# else
|
||||||
slot='N/A'
|
# slot='N/A'
|
||||||
fi
|
# fi
|
||||||
if [[ -n ${a_memory_item[15]} ]];then
|
if [[ -n ${a_memory_item[15]} ]];then
|
||||||
locator=${a_memory_item[15]}
|
locator=${a_memory_item[15]}
|
||||||
locator=${locator## }
|
locator=${locator## }
|
||||||
|
@ -12022,28 +12038,27 @@ print_ram_data()
|
||||||
fi
|
fi
|
||||||
if [[ $B_EXTRA_EXTRA_EXTRA_DATA == 'true' ]];then
|
if [[ $B_EXTRA_EXTRA_EXTRA_DATA == 'true' ]];then
|
||||||
if [[ $b_module_present == 'true' ]] || \
|
if [[ $b_module_present == 'true' ]] || \
|
||||||
[[ -n ${a_memory_item[11]} || -n ${a_memory_item[10]} ]];then
|
[[ -n ${a_memory_item[11]} || -n ${a_memory_item[10]} ]];then
|
||||||
if [[ -n ${a_memory_item[11]} ]];then
|
# only create this if the total exists and is > data width
|
||||||
data_width=${a_memory_item[11]}
|
if [[ -n ${a_memory_item[10]/ bits/} && -n ${a_memory_item[11]/ bits} && \
|
||||||
else
|
${a_memory_item[11]/ bits/} -gt ${a_memory_item[10]/ bits/} ]];then
|
||||||
data_width='N/A'
|
total_width=" (total$SEP3 ${a_memory_item[11]})"
|
||||||
fi
|
fi
|
||||||
data_width="${C1}width$SEP3 total$SEP3${C2} $data_width "
|
|
||||||
if [[ -n ${a_memory_item[10]} ]];then
|
if [[ -n ${a_memory_item[10]} ]];then
|
||||||
total_width=${a_memory_item[10]}
|
data_width=${a_memory_item[10]}
|
||||||
else
|
else
|
||||||
total_width='N/A'
|
data_width='N/A'
|
||||||
fi
|
fi
|
||||||
total_width="${C1}data$SEP3${C2} $total_width "
|
bus_width="${C1}bus width$SEP3${C2} $data_width$total_width "
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
memory_line="${C1}Locator$SEP3${C2} $locator ${C1}size$SEP3${C2} $device_size $device_speed"
|
memory_line="${C1}Device-$device_counter$SEP3${C2} $locator ${C1}size$SEP3${C2} $device_size $device_speed"
|
||||||
if [[ $( calculate_line_length "$memory_line$device_type" ) -le $COLS_INNER ]];then
|
if [[ $( calculate_line_length "$memory_line$device_type" ) -le $COLS_INNER ]];then
|
||||||
memory_line="$memory_line$device_type"
|
memory_line="$memory_line$device_type"
|
||||||
device_type=''
|
device_type=''
|
||||||
fi
|
fi
|
||||||
line_3="$manufacturer$part_nu$serial_nu"
|
line_3="$manufacturer$part_nu$serial_nu"
|
||||||
line_2="$device_type$data_width$total_width"
|
line_2="$device_type$bus_width"
|
||||||
# echo $( calculate_line_length "$memory_line" )
|
# echo $( calculate_line_length "$memory_line" )
|
||||||
# echo $( calculate_line_length "$memory_line$line_2" )
|
# echo $( calculate_line_length "$memory_line$line_2" )
|
||||||
if [[ $( calculate_line_length "$memory_line$line_2$line_3" ) -gt $COLS_INNER ]];then
|
if [[ $( calculate_line_length "$memory_line$line_2$line_3" ) -gt $COLS_INNER ]];then
|
||||||
|
@ -12061,6 +12076,7 @@ print_ram_data()
|
||||||
else
|
else
|
||||||
memory_line="$memory_line$line_2$line_3"
|
memory_line="$memory_line$line_2$line_3"
|
||||||
fi
|
fi
|
||||||
|
(( device_counter++ ))
|
||||||
fi
|
fi
|
||||||
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"
|
||||||
|
|
14
inxi.1
14
inxi.1
|
@ -1,4 +1,4 @@
|
||||||
.TH INXI 1 "2014\-08\-12" inxi "inxi manual"
|
.TH INXI 1 "2014\-08\-13" inxi "inxi manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
inxi \- Command line system information script for console and IRC
|
inxi \- Command line system information script for console and IRC
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
@ -126,7 +126,9 @@ See \fB\-x\fR and \fB\-xx\fR for extra information (init type/version, runlevel)
|
||||||
Show partition labels. Default: short partition \fB\-P\fR. For full \fB\-p\fR output, use: \fB\-pl\fR (or \fB\-plu\fR).
|
Show partition labels. Default: short partition \fB\-P\fR. For full \fB\-p\fR output, use: \fB\-pl\fR (or \fB\-plu\fR).
|
||||||
.TP
|
.TP
|
||||||
.B \-m
|
.B \-m
|
||||||
Memory (RAM) data. Shows physical system memory arrays, and individual memory devices (sticks of memory). Shows physical memory array(s) capacity, and number of devices supported by each physical memory array. For devices, shows locator data, size, speed, type (eg: DDR3). Does not show with \-b or \-F unless you use \-m. Note that this uses \fBdmidecode\fR, which must be run as root, unless you figure out how to set up sudo to permit it to read \fB/dev/mem\fR as user. Note that speed will not show if \fBNo Module Installed\fR is found in size. This will also turn off Width data if both are null.
|
Memory (RAM) data. Does not show with \-b or \-F unless you use \-m. Ordered by system board physical system memory array(s) (\fBArray\-X capacity:\fR), and individual memory devices (\fBDevice\-[number]\fR). Physical memory array(s) data shows array capacity, and number of devices supported, and Error Correction information. Devices shows locator data (highly variable in syntax), size, speed, type (eg: \fBtype: DDR3\fR).
|
||||||
|
|
||||||
|
Note that \fB\-m\fR uses \fBdmidecode\fR, which must be run as root (or start \fBinxi\fR with \fBsudo\fR), unless you figure out how to set up sudo to permit dmidecode to read \fB/dev/mem\fR as user. Note that speed will not show if \fBNo Module Installed\fR is found in size. This will also turn off Bus Width data output if it is null.
|
||||||
.TP
|
.TP
|
||||||
.B \-M
|
.B \-M
|
||||||
Show machine data. Motherboard, Bios, and if present, System Builder (Like Lenovo).
|
Show machine data. Motherboard, Bios, and if present, System Builder (Like Lenovo).
|
||||||
|
@ -330,7 +332,7 @@ version number, if available.
|
||||||
\- If in shell (not in IRC client, that is), show shell version number (if available).
|
\- If in shell (not in IRC client, that is), show shell version number (if available).
|
||||||
.TP
|
.TP
|
||||||
.B \-x \-m
|
.B \-x \-m
|
||||||
\- Shows memory device Part number. Useful to order new sticks etc.
|
\- Shows memory device Part Number (\fBpart:\fR). Useful to order new or replacement memory sticks etc. Usually part numbers are unique, particularly if you stick the word \fBmemory\fR in the search as well. With \-xx, shows Serial Number and Manufactorer as well.
|
||||||
.TP
|
.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;
|
||||||
|
@ -400,10 +402,10 @@ Supports most known display managers, like xdm, gdm, kdm, slim, lightdm, or mdm.
|
||||||
.B \-xx \-@ <11\-14>
|
.B \-xx \-@ <11\-14>
|
||||||
\- Automatically uploads debugger data tar.gz file to \fIftp.techpatterns.com\fR.
|
\- Automatically uploads debugger data tar.gz file to \fIftp.techpatterns.com\fR.
|
||||||
.TP
|
.TP
|
||||||
.B \-xx \-m
|
.B \-xxx \-m
|
||||||
\- Memory channel width, for type: total and data (eg: 64 bit).
|
\- Memory bus width: primary bus width, and if present, total width. eg: bus width: 64 bit (total: 72 bits). Note that total / data widths are mixed up sometimes in dmidecode output, so inxi will take the larger value as total if present. If no total width data is found, then inxi will not show that item.
|
||||||
.TP
|
.TP
|
||||||
.B \-xx \-m
|
.B \-xxx \-m
|
||||||
\- Adds device Type Detail, eg: DDR3 (Synchronous).
|
\- Adds device Type Detail, eg: DDR3 (Synchronous).
|
||||||
.TP
|
.TP
|
||||||
.B \-xxx \-S
|
.B \-xxx \-S
|
||||||
|
|
|
@ -1,3 +1,30 @@
|
||||||
|
=====================================================================================
|
||||||
|
Version: 2.1.93
|
||||||
|
Patch Version: 00
|
||||||
|
Script Date: 2014-08-13
|
||||||
|
-----------------------------------
|
||||||
|
Changes:
|
||||||
|
-----------------------------------
|
||||||
|
New version, new man page. Fixed man page errors, improved man page explanations of -m
|
||||||
|
features. Changed output syntax to be more consistent, now each main array line starts with:
|
||||||
|
|
||||||
|
Array-X capacity: (where X is an integer, counting from 1)
|
||||||
|
|
||||||
|
and each device line starts with:
|
||||||
|
Device-X: (where X is an integer incremented by 1 for each device, and starting at 1
|
||||||
|
for each array. I have no data sets that contain > 1 physical memory array, if one appears,
|
||||||
|
I may need to patch the output to link the array handles with the device handles explicitly.
|
||||||
|
|
||||||
|
Made memory bus width output more clear, and added in a hack to correct dmidecode output errors,
|
||||||
|
sometimes total width > data width, and sometimes data width is > total width, so using always
|
||||||
|
greatest value for total if not equal to other width.
|
||||||
|
|
||||||
|
I think this will be close to it barring any user feedback or bugs, if nothing comes to
|
||||||
|
mind within a few days, I'll move the number to the new major version, 2.2.0
|
||||||
|
|
||||||
|
-----------------------------------
|
||||||
|
-- Harald Hope - Wed, 13 Aug 2014 12:12:23 -0700
|
||||||
|
|
||||||
=====================================================================================
|
=====================================================================================
|
||||||
Version: 2.1.92
|
Version: 2.1.92
|
||||||
Patch Version: 00
|
Patch Version: 00
|
||||||
|
|
Loading…
Reference in a new issue