Squeezing in a last change for 2.3.4, added to -m if valid output, and if no -I or -tm

triggers used, will show system ram used/total, from the -I line.
This commit is contained in:
Harald Hope 2016-11-03 20:21:51 -07:00
parent 54c57f3e07
commit dce92040ec
3 changed files with 28 additions and 3 deletions

13
inxi
View file

@ -3010,7 +3010,7 @@ show_options()
network tool). Same as -Nni. Not shown with -F for user security reasons, you shouldn't paste your local/wan IP." network tool). Same as -Nni. Not shown with -F for user security reasons, you shouldn't paste your local/wan IP."
print_lines_basic "1" "-I" "Information: processes, uptime, memory, irc client (or shell type), $SCRIPT_NAME version." print_lines_basic "1" "-I" "Information: processes, uptime, memory, irc client (or shell type), $SCRIPT_NAME version."
print_lines_basic "1" "-l" "$partition_string_u labels. Default: short $partition_string -P. For full -p output, use: -pl (or -plu)." print_lines_basic "1" "-l" "$partition_string_u labels. Default: short $partition_string -P. For full -p output, use: -pl (or -plu)."
print_lines_basic "1" "-m" "Memory (RAM) data. Physical system memory array(s), capacity, how many devices (slots) supported, and individual memory devices (sticks of memory etc). For devices, shows device locator, size, speed, type (like: DDR3). Also see -x, -xx, -xxx" print_lines_basic "1" "-m" "Memory (RAM) data. Physical system memory array(s), capacity, how many devices (slots) supported, and individual memory devices (sticks of memory etc). For devices, shows device locator, size, speed, type (like: DDR3). If neither -I nor -tm are selected, also shows ram used/total. Also see -x, -xx, -xxx"
print_lines_basic "1" "-M" "Machine data. Device type (desktop, server, laptop, VM etc.), Motherboard, Bios, and if present, System Builder (Like Lenovo). Shows UEFI/BIOS/UEFI [Legacy}. Older systems/kernels without the required /sys data can use dmidecode instead, run as root. Dmidecode can be forced with -! 33" print_lines_basic "1" "-M" "Machine data. Device type (desktop, server, laptop, VM etc.), Motherboard, Bios, and if present, System Builder (Like Lenovo). Shows UEFI/BIOS/UEFI [Legacy}. Older systems/kernels without the required /sys data can use dmidecode instead, run as root. Dmidecode can be forced with -! 33"
print_lines_basic "1" "-n" "Advanced Network card information. Same as -Nn. Shows interface, speed, mac id, state, etc." print_lines_basic "1" "-n" "Advanced Network card information. Same as -Nn. Shows interface, speed, mac id, state, etc."
print_lines_basic "1" "-N" "Network card information. With -x, shows PCI BusID, Port number." print_lines_basic "1" "-N" "Network card information. With -x, shows PCI BusID, Port number."
@ -14236,7 +14236,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='' bank_connection='' local max_module_size='' module_voltage='' bank_connection='' memory_info=''
get_ram_data get_ram_data
#echo ${#A_MEMORY_DATA[@]} #echo ${#A_MEMORY_DATA[@]}
@ -14246,6 +14246,9 @@ print_ram_data()
error_string=$( print_dmidecode_error 'default' "${A_MEMORY_DATA[0]}" ) error_string=$( print_dmidecode_error 'default' "${A_MEMORY_DATA[0]}" )
memory_line="${C2}$error_string" memory_line="${C2}$error_string"
else else
if [[ $B_SHOW_INFO == 'false' && $B_SHOW_PS_MEM_DATA == 'false' ]];then
memory_info="${C1}Used/Total$SEP3${C2} $( get_memory_data )"
fi
for (( i=0;i<${#A_MEMORY_DATA[@]};i++ )) for (( i=0;i<${#A_MEMORY_DATA[@]};i++ ))
do do
IFS=',' IFS=','
@ -14263,6 +14266,12 @@ print_ram_data()
max_module_size='' max_module_size=''
module_voltage='' module_voltage=''
bank_connection='' bank_connection=''
if [[ -n $memory_info ]];then
memory_line=$( create_print_line "$line_starter" "$memory_info" )
print_screen_output "$memory_line"
line_starter=''
memory_info=''
fi
# memory-array,0x0012,System Board,8 GB,4,System Memory,None,max size,moudule 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

5
inxi.1
View file

@ -1,4 +1,4 @@
.TH INXI 1 "2016\-10\-29" inxi "inxi manual" .TH INXI 1 "2016\-11\-03" 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
@ -157,6 +157,9 @@ Memory (RAM) data. Does not show with \fB\-b\fR or \fB\-F\fR unless you use \
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. 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.
If memory information was found, and if the \fB\-I\fR line or the \fB\-tm\fR item have not been triggered,
will also print the ram used/total.
Because dmidecode data is extremely unreliable, inxi will try to make best guesses. If you see \fB(check)\fR after capacity number, you should check it for sure with specifications. \fB(est)\fR is slightly more reliable, but you should still check the real specifications before buying ram. Unfortunately there is nothing \fBinxi\fR can do to get truly reliable data about the system ram, maybe one day the kernel devs will put this data into \fB/sys\fR, and make it real data, taken from the actual system, not dmi data. For most people, the data will be right, but a significant percentage of users will have either wron max module size, if present, or max capacity. Because dmidecode data is extremely unreliable, inxi will try to make best guesses. If you see \fB(check)\fR after capacity number, you should check it for sure with specifications. \fB(est)\fR is slightly more reliable, but you should still check the real specifications before buying ram. Unfortunately there is nothing \fBinxi\fR can do to get truly reliable data about the system ram, maybe one day the kernel devs will put this data into \fB/sys\fR, and make it real data, taken from the actual system, not dmi data. For most people, the data will be right, but a significant percentage of users will have either wron max module size, if present, or max capacity.
.TP .TP
.B \-M .B \-M

View file

@ -1,3 +1,16 @@
=====================================================================================
Version: 2.3.4
Patch Version: 00
Script Date: 2016-11-03
-----------------------------------
Changes:
-----------------------------------
Squeezing in a last change for 2.3.4, added to -m if valid output, and if no -I or -tm
triggers used, will show system ram used/total, from the -I line.
-----------------------------------
-- Harald Hope - Thu, 03 Nov 2016 20:20:37 -0700
===================================================================================== =====================================================================================
Version: 2.3.4 Version: 2.3.4
Patch Version: 00 Patch Version: 00