diff --git a/inxi b/inxi index 29db451..082ff2d 100755 --- a/inxi +++ b/inxi @@ -1,7 +1,7 @@ #!/usr/bin/env bash ######################################################################## #### Script Name: inxi -#### Version: 2.1.91 +#### Version: 2.1.92 #### Date: 2014-08-12 #### Patch Number: 00 ######################################################################## @@ -2661,7 +2661,7 @@ show_options() 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" "-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. Shows physical system memory arrays, and individual memory devices (sticks of memory). Shows physical memory array(s) capacity, and number of devices. For devices, shows bank, slot, size, speed, type (DDR3)." + 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" "Machine data. Motherboard, Bios, and if present, System Builder (Like Lenovo). 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" "Network card information. With -x, shows PCI BusID, Port number." @@ -2699,6 +2699,7 @@ show_options() 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" "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" "-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" "-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" @@ -2712,6 +2713,7 @@ show_options() print_lines_basic "2" "-D" "Disk serial number." print_lines_basic "2" "-G" "Chip vendor:product ID for each video card." print_lines_basic "2" "-I" "Other detected installed gcc versions (if present). System default runlevel. Adds parent program (or tty) for shell info if not in IRC (like Konsole or Gterm). Adds Init/RC (if found) version number." + print_lines_basic "2" "-m" "Manufacturer, Serial Number." print_lines_basic "2" "-M" "Chassis information, bios rom size (dmidecode only), if data for either is available." print_lines_basic "2" "-N" "Chip vendor:product ID for each nic." print_lines_basic "2" "-R" "md-raid: Superblock (if present); algorythm, U data. Adds system info line (kernel support,read ahead, raid events). If present, adds unused device line. Resync line, shows progress bar." @@ -2721,6 +2723,7 @@ show_options() 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 "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" "-S" "Panel/shell information in desktop output, if in X (like gnome-shell, cinnamon, mate-panel)." 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)." @@ -4886,8 +4889,7 @@ get_dmidecode_data() { eval $LOGFS - local dmiData=" -" + local dmiData="" local dmidecodePath='' if [[ $B_DMIDECODE_SET != 'true' ]];then @@ -5017,8 +5019,7 @@ get_gcc_system_version() /^gcc/ { print $2 exit - }' ) - + }' ) # can't use xargs -L basename because not all systems support thats if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then gcc_others=$( ls /usr/bin/gcc-* 2>/dev/null ) @@ -8204,13 +8205,17 @@ get_ram_data() } if ( $1 == "Locator") { # sub(/.*_/,"",$2) - sub(/RAM slot #|^DIMM/, "slot",$2) - locator=toupper($2) + #sub(/RAM slot #|^DIMM/, "Slot",$2) + sub(/RAM slot #/, "Slot",$2) + #locator=toupper($2) + locator=$2 } if ( $1 == "Bank Locator") { - sub(/_.*/,"",$2) - sub(/RAM slot #|Channel|Chan/,"bank",$2) - bankLocator=toupper($2) + #sub(/_.*/,"",$2) + #sub(/RAM slot #|Channel|Chan/,"bank",$2) + #sub(/RAM slot #|Channel|Chan/,"bank",$2) + #bankLocator=toupper($2) + bankLocator=$2 } if ( $1 == "Form Factor") { formFactor=$2 @@ -8240,13 +8245,24 @@ get_ram_data() deviceSerialNumber=$2 } } - print primaryType "," arrayHandle "," deviceSize "," bankLocator "," locator "," formFactor "," deviceType "," deviceTypeDetail "," deviceSpeed "," configuredClockSpeed "," dataWidth "," totalWidth "," deviceManufacturer "," devicePartNumber "," deviceSerialNumber + # because of the wide range of bank/slot type data, we will just use + # the one that seems most likely to be right. Some have: Bank: SO DIMM 0 slot: J6A + # so we dump the useless data and use the one most likely to be visibly correct + if ( bankLocator ~ /DIMM/ ) { + mainLocator=bankLocator + } + else { + mainLocator=locator + } + print primaryType "," arrayHandle "," deviceSize "," bankLocator "," locator "," formFactor "," deviceType "," deviceTypeDetail "," deviceSpeed "," configuredClockSpeed "," dataWidth "," totalWidth "," deviceManufacturer "," devicePartNumber "," deviceSerialNumber "," mainLocator primaryType="" arrayHandle="" deviceSize="" bankLocator="" locator="" + mainLocator="" + mainLocator="" formFactor="" deviceType="" deviceTypeDetail="" @@ -11868,7 +11884,7 @@ print_raid_data() print_ram_data() { eval $LOGFS - local memory_line='' line_2='' line_3='' + local memory_line='' line_2='' line_3='' b_module_present='true' local error_string='' a_memory_item='' line_starter='Memory:' array_counter=0 local dmidecodeNull='No dmidecode memory data: try newer kernel.' @@ -11915,9 +11931,11 @@ print_ram_data() 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" (( array_counter++ )) else - if [[ -n ${a_memory_item[3]} ]];then + # not used for now + if [[ -n ${a_memory_item[3333]} ]];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=${bank## } else bank=${a_memory_item[3]} @@ -11925,9 +11943,11 @@ print_ram_data() else bank='N/A' fi - if [[ -n ${a_memory_item[4]} ]];then + # not used for now + if [[ -n ${a_memory_item[44444]} ]];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=${slot## } else slot=${a_memory_item[4]} @@ -11935,8 +11955,19 @@ print_ram_data() else slot='N/A' fi + if [[ -n ${a_memory_item[15]} ]];then + locator=${a_memory_item[15]} + locator=${locator## } + else + locator='N/A' + fi if [[ -n ${a_memory_item[2]} ]];then device_size=${a_memory_item[2]} + if [[ $device_size == 'No Module Installed' ]];then + b_module_present='false' + else + b_module_present='true' + fi else device_size='N/A' fi @@ -11944,10 +11975,10 @@ print_ram_data() device_type=${a_memory_item[6]} if [[ $B_EXTRA_EXTRA_EXTRA_DATA == 'true' && -n ${a_memory_item[7]} \ && ${a_memory_item[7]} != 'Other' ]];then - device_type="$device_type (${a_memory_item[7]}) " + device_type="$device_type (${a_memory_item[7]})" fi else - device_type='N/A ' + device_type='N/A' fi device_type="${C1}type$SEP3${C2} $device_type " if [[ -n ${a_memory_item[8]} ]];then @@ -11959,45 +11990,54 @@ print_ram_data() else device_speed='N/A' fi - device_speed="${C1}speed$SEP3${C2} $device_speed " - # memory-device,0x002C,8192 MB,ChannelD,ChannelD_Dimm2,DIMM,DDR3,Synchronous,2400 MHz,2400 MHz,64 bits,64 bits,Undefined,F3-19200C10-8GBZH,00000000 - if [[ $B_EXTRA_DATA == 'true' ]];then - if [[ -n ${a_memory_item[13]} ]];then - part_nu=${a_memory_item[13]} - else - part_nu='N/A' - fi - part_nu="${C1}part$SEP3${C2} $part_nu " + if [[ $b_module_present == 'true' ]];then + device_speed="${C1}speed$SEP3${C2} $device_speed " + else + device_speed='' fi - if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then - if [[ -n ${a_memory_item[12]} ]];then - manufacturer=${a_memory_item[12]} - else - manufacturer='N/A' + # memory-device,0x002C,8192 MB,ChannelD,ChannelD_Dimm2,DIMM,DDR3,Synchronous,2400 MHz,2400 MHz,64 bits,64 bits,Undefined,F3-19200C10-8GBZH,00000000 + if [[ $b_module_present == 'true' ]];then + if [[ $B_EXTRA_DATA == 'true' ]];then + if [[ -n ${a_memory_item[13]} ]];then + part_nu=${a_memory_item[13]} + else + part_nu='N/A' + fi + part_nu="${C1}part$SEP3${C2} $part_nu " fi - manufacturer="${C1}manufacturer$SEP3${C2} $manufacturer " - if [[ -n ${a_memory_item[14]} ]];then - serial_nu=${a_memory_item[14]} - else - serial_nu='N/A' + if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then + if [[ -n ${a_memory_item[12]} ]];then + manufacturer=${a_memory_item[12]} + else + manufacturer='N/A' + fi + manufacturer="${C1}manufacturer$SEP3${C2} $manufacturer " + if [[ -n ${a_memory_item[14]} ]];then + serial_nu=${a_memory_item[14]} + else + serial_nu='N/A' + fi + serial_nu="${C1}serial$SEP3${C2} $serial_nu " fi - serial_nu="${C1}serial$SEP3${C2} $serial_nu " fi if [[ $B_EXTRA_EXTRA_EXTRA_DATA == 'true' ]];then - if [[ -n ${a_memory_item[11]} ]];then - data_width=${a_memory_item[11]} - else - data_width='N/A' + if [[ $b_module_present == 'true' ]] || \ + [[ -n ${a_memory_item[11]} || -n ${a_memory_item[10]} ]];then + if [[ -n ${a_memory_item[11]} ]];then + data_width=${a_memory_item[11]} + else + data_width='N/A' + fi + data_width="${C1}width$SEP3 total$SEP3${C2} $data_width " + if [[ -n ${a_memory_item[10]} ]];then + total_width=${a_memory_item[10]} + else + total_width='N/A' + fi + total_width="${C1}data$SEP3${C2} $total_width " fi - data_width="${C1}width$SEP3 total$SEP3${C2} $data_width " - if [[ -n ${a_memory_item[10]} ]];then - total_width=${a_memory_item[10]} - else - total_width='N/A' - fi - total_width="${C1}data$SEP3${C2} $total_width " fi - memory_line="${C1}Bank$SEP3${C2} $bank ${C1}slot$SEP3${C2} $slot ${C1}size$SEP3${C2} $device_size $device_speed" + memory_line="${C1}Locator$SEP3${C2} $locator ${C1}size$SEP3${C2} $device_size $device_speed" if [[ $( calculate_line_length "$memory_line$device_type" ) -le $COLS_INNER ]];then memory_line="$memory_line$device_type" device_type='' diff --git a/inxi.1 b/inxi.1 index 538ac58..c6e1a77 100755 --- a/inxi.1 +++ b/inxi.1 @@ -1,4 +1,4 @@ -.TH INXI 1 "2014\-08\-11" inxi "inxi manual" +.TH INXI 1 "2014\-08\-12" inxi "inxi manual" .SH NAME inxi \- Command line system information script for console and IRC .SH SYNOPSIS @@ -126,7 +126,7 @@ 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). .TP .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. For devices, shows bank, slot, 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 set up sudo to permit it to read \fB/dev/mem\fR as user. +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. .TP .B \-M Show machine data. Motherboard, Bios, and if present, System Builder (Like Lenovo). @@ -329,6 +329,9 @@ version number, if available. .B \-x \-I \- If in shell (not in IRC client, that is), show shell version number (if available). .TP +.B \-x \-m +\- Shows memory device Part number. Useful to order new sticks etc. +.TP .B \-x \-N \- Adds version/port(s)/driver version (if available) for each Network card; .TP @@ -373,6 +376,9 @@ not all systemd systems have the default value set, in that case, if present, it .B \-xx \-I \- Adds parent program (or tty) that started shell, if not IRC client, to shell information. .TP +.B \-xx \-m +\- Shows memory device Manufacturer and Serial Number. +.TP .B \-xx \-M \- Adds chassis information, if any data for that is available. Also shows BIOS rom size if using dmidecode. .TP @@ -394,6 +400,12 @@ Supports most known display managers, like xdm, gdm, kdm, slim, lightdm, or mdm. .B \-xx \-@ <11\-14> \- Automatically uploads debugger data tar.gz file to \fIftp.techpatterns.com\fR. .TP +.B \-xx \-m +\- Memory channel width, for type: total and data (eg: 64 bit). +.TP +.B \-xx \-m +\- Adds device Type Detail, eg: DDR3 (Synchronous). +.TP .B \-xxx \-S \- 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. diff --git a/inxi.changelog b/inxi.changelog index ccd0233..711a98f 100755 --- a/inxi.changelog +++ b/inxi.changelog @@ -1,3 +1,26 @@ +===================================================================================== +Version: 2.1.92 +Patch Version: 00 +Script Date: 2014-08-12 +----------------------------------- +Changes: +----------------------------------- +New version, new tarball. This is closer to final release. Removed Bank/Slot separate +items and am now just generating one: Locator item, usually from Slot/DIMM locator info, +but sometimes from Bank Locator info when it is more reliable based on my data samples. + +Updated help menu, updated man page, now shows working -x -xx -xxx extra data. This may +change slightly over time. + +Also removed speed output when No Module Installed is returned for device size. This +also wills switch off width if both total/data are empty. + +This is much closer now to live 2.2.0, but I'll leave a few more tests before putting +it at 2.2.0. + +----------------------------------- +-- Harald Hope - Tue, 12 Aug 2014 20:16:04 -0700 + ===================================================================================== Version: 2.1.91 Patch Version: 00