summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatarUnit 193 <unit193@ubuntu.com>2014-05-01 14:14:14 -0400
committerLibravatarUnit 193 <unit193@ubuntu.com>2014-05-01 14:14:14 -0400
commit332044fd929174f69f5d3a24fb53ead10486ba96 (patch)
treefcdd0090eb2c0f50b28ce74c26d31a5fbd81f504
parent84e3d0adcff642974711a8b379d2e102e64aa659 (diff)
downloadinxi-332044fd929174f69f5d3a24fb53ead10486ba96.tar.bz2
inxi-332044fd929174f69f5d3a24fb53ead10486ba96.tar.xz
inxi-332044fd929174f69f5d3a24fb53ead10486ba96.tar.zst
Imported Upstream version 2.1.25upstream/2.1.25
-rwxr-xr-xinxi313
-rwxr-xr-xinxi.114
-rwxr-xr-xinxi.1.gzbin8577 -> 8782 bytes
-rwxr-xr-xinxi.changelog230
4 files changed, 483 insertions, 74 deletions
diff --git a/inxi b/inxi
index ce21aaa..0d4d65d 100755
--- a/inxi
+++ b/inxi
@@ -1,8 +1,8 @@
#!/usr/bin/env bash
########################################################################
#### Script Name: inxi
-#### Version: 2.1.20
-#### Date: 2014-04-08
+#### Version: 2.1.25
+#### Date: 2014-04-28
#### Patch Number: 00
########################################################################
#### SPECIAL THANKS
@@ -75,6 +75,7 @@
#### xrandr (x11-xserver-utils)
#### -i - IP information, local/wan - ip (iproute) legacy, not used if ip present: ifconfig (net-tools)
#### -Ix - view current runlevel while not in X window system (or with -x): runlevel (sysvinit)
+#### -m - all systems, dmidecode, unless someone can find a better way.
#### -M - for older systems whose kernel does not have /sys data for machine, dmidecode (dmidecode)
#### -o - for unmounted file system information in unmounted drives (root only default): file (file)
#### Note: requires user action for this feature to run as user (edit /etc/sudoers file)
@@ -257,6 +258,7 @@ A_HDD_DATA=''
A_INIT_DATA=''
A_INTERFACES_DATA=''
A_MACHINE_DATA=''
+A_MEMORY_DATA=''
A_NETWORK_DATA=''
A_OPTICAL_DRIVE_DATA=''
A_PARTITION_DATA=''
@@ -286,6 +288,7 @@ B_DMIDECODE_SET='false'
B_EXTRA_DATA='false'
# triggered by -xx
B_EXTRA_EXTRA_DATA='false'
+B_FORCE_DMIDECODE='false'
B_ID_SET='false'
# override certain errors due to currupted data
B_HANDLE_CORRUPT_DATA='false'
@@ -333,6 +336,7 @@ B_SHOW_INFO='false'
B_SHOW_IP='false'
B_SHOW_LABELS='false'
B_SHOW_MACHINE='false'
+B_SHOW_MEMORY='false'
B_SHOW_NETWORK='false'
# either -v > 3 or -P will show partitions
B_SHOW_PARTITIONS='false'
@@ -791,10 +795,12 @@ initialize_data()
eval $LOGFS
BSD_VERSION=$( uname -s 2>/dev/null | tr '[A-Z]' '[a-z]' )
# note: archbsd says they are a freebsd distro, so assuming it's the same as freebsd
- if [[ -z ${BSD_VERSION/*bsd*/} ]];then
+ if [[ -z ${BSD_VERSION/*bsd*/} || -z ${BSD_VERSION/*darwin*/} ]];then
# GNU/kfreebsd will by definition have GNU tools like sed/grep
if [[ -z ${BSD_VERSION/*kfreebsd*/} ]];then
BSD_TYPE='debian-bsd' # debian gnu bsd
+ elif [[ -z ${BSD_VERSION/*darwin*/} ]];then
+ BSD_TYPE='darwin-bsd' # debian gnu bsd
else
BSD_TYPE='bsd' # all other bsds
SED_I="-i ''"
@@ -1759,15 +1765,25 @@ debug_data_collector()
ls -l /dev/disk/by-id &> $debug_data_dir/dev-disk-id-data.txt
ls -l /dev/disk/by-label &> $debug_data_dir/dev-disk-label-data.txt
ls -l /dev/disk/by-uuid &> $debug_data_dir/dev-disk-uuid-data.txt
+ # http://comments.gmane.org/gmane.linux.file-systems.zfs.user/2032
+ ls -l /dev/disk/by-wwn &> $debug_data_dir/dev-disk-wwn-data.txt
ls -l /dev/disk/by-path &> $debug_data_dir/dev-disk-path-data.txt
ls -l /dev/mapper &> $debug_data_dir/dev-disk-mapper-data.txt
readlink /dev/root &> $debug_data_dir/dev-root.txt
df -h -T -P --exclude-type=aufs --exclude-type=squashfs --exclude-type=unionfs --exclude-type=devtmpfs --exclude-type=tmpfs --exclude-type=iso9660 --exclude-type=devfs --exclude-type=linprocfs --exclude-type=sysfs --exclude-type=fdescfs &> $debug_data_dir/df-h-T-P-excludes.txt
df -T -P --exclude-type=aufs --exclude-type=squashfs --exclude-type=unionfs --exclude-type=devtmpfs --exclude-type=tmpfs --exclude-type=iso9660 --exclude-type=devfs --exclude-type=linprocfs --exclude-type=sysfs --exclude-type=fdescfs &> $debug_data_dir/df-T-P-excludes.txt
+ df -T -P --exclude-type=aufs --exclude-type=squashfs --exclude-type=unionfs --exclude-type=devtmpfs --exclude-type=tmpfs --exclude-type=iso9660 --exclude-type=devfs --exclude-type=linprocfs --exclude-type=sysfs --exclude-type=fdescfs --total &> $debug_data_dir/df-T-P-excludes-total.txt
df -H -T &> $debug_data_dir/bsd-df-H-T-no-excludes.txt
df -H &> $debug_data_dir/bsd-df-H-no-excludes.txt
+ df -k -T &> $debug_data_dir/bsd-df-k-T-no-excludes.txt
+ df -k &> $debug_data_dir/bsd-df-k-no-excludes.txt
+ atacontrol list &> $debug_data_dir/bsd-atacontrol-list.txt
+ camcontrol devlist &> $debug_data_dir/bsd-camcontrol-devlist.txt
# bsd tool
mount &> $debug_data_dir/mount.txt
+ btrfs filesystem show &> $debug_data_dir/btrfs-filesystem-show.txt
+ btrfs filesystem show --mounted &> $debug_data_dir/btrfs-filesystem-show-mounted.txt
+ # btrfs filesystem show --all-devices &> $debug_data_dir/btrfs-filesystem-show-all-devices.txt
gpart list &> $debug_data_dir/bsd-gpart-list.txt
gpart show &> $debug_data_dir/bsd-gpart-show.txt
gpart status &> $debug_data_dir/bsd-gpart-status.txt
@@ -1935,7 +1951,7 @@ check_recommends_items()
xrandr:x11-xserver-utils~xrandr~x11-server-utils~:-G_single_screen_resolution
'
local recommended_apps='
- dmidecode:dmidecode~dmidecode~dmidecode~:-M_if_no_sys_machine_data
+ dmidecode:dmidecode~dmidecode~dmidecode~:-M_if_no_sys_machine_data;_-m_memory
file:file~file~file~:-o_unmounted_file_system
hddtemp:hddtemp~hddtemp~hddtemp~:-Dx_show_hdd_temp
ifconfig:net-tools~net-tools~net-tools~:-i_ip_lan-deprecated
@@ -2185,7 +2201,7 @@ get_parameters()
# no need to run through these if there are no args
# reserved for future use: -g for extra Graphics; -m for extra Machine; -d for extra Disk
elif [[ -n $1 ]];then
- while getopts Abc:CdDfFGhHiIlMnNopPrRsSt:uUv:V${weather_flag}xy:zZ%@:!: opt
+ while getopts Abc:CdDfFGhHiIlmMnNopPrRsSt:uUv:V${weather_flag}xy:zZ%@:!: opt
do
case $opt in
A) B_SHOW_AUDIO='true'
@@ -2286,6 +2302,9 @@ get_parameters()
B_SHOW_PARTITIONS='true'
use_short='false'
;;
+ m) B_SHOW_MEMORY='true'
+ use_short='false'
+ ;;
M) B_SHOW_MACHINE='true'
use_short='false'
;;
@@ -2529,6 +2548,9 @@ get_parameters()
32)
B_SHOW_HOST='true'
;;
+ 33)
+ B_FORCE_DMIDECODE='true'
+ ;;
ftp*)
ALTERNATE_FTP="$OPTARG"
;;
@@ -2607,7 +2629,7 @@ show_options()
print_lines_basic "2" "99" "Global - Overrides/removes all settings. Setting specific removes global."
print_lines_basic "1" "-C" "CPU output, including per CPU clockspeed (if available)."
print_lines_basic "1" "-d" "Optical drive data. Same as -Dd. See also -x and -xx."
- print_lines_basic "1" "-D" "Full hard Disk info, not only model, ie: /dev/sda ST380817AS 80.0GB. See also -x and -xx."
+ print_lines_basic "1" "-D" "Full hard Disk info, not only model, ie: /dev/sda ST380817AS 80.0GB. See also -x and -xx. Disk total used percentage includes swap partition size(s)."
print_lines_basic "1" "-f" "All cpu flags, triggers -C. Not shown with -F to avoid spamming. ARM cpus show 'features'."
print_lines_basic "1" "-F" "Full output for $SCRIPT_NAME. Includes all Upper Case line letters, plus -s and -n. Does not show extra verbose options like -x -d -f -u -l -o -p -t -r"
print_lines_basic "1" "-G" "Graphic card information (card, display server type/version, resolution, glx renderer, version)."
@@ -2615,7 +2637,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" "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."
+ 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."
print_lines_basic "1" "-o" "Unmounted $partition_string information (includes UUID and LABEL if available). Shows file system type if you have file installed, if you are root OR if you have added to /etc/sudoers (sudo v. 1.7 or newer) Example:^<username>^ALL^=^NOPASSWD:^/usr/bin/file^"
@@ -2708,6 +2730,7 @@ show_options()
print_screen_output "Advanced Options:"
print_lines_basic "1" "-! 31" "Turns off hostname in output. Useful if showing output from servers etc."
print_lines_basic "1" "-! 32" "Turns on hostname in output. Overrides global B_SHOW_HOST='false'"
+ print_lines_basic "1" "-! 33" "Forces use of dmidecode data instead of /sys where relevant (-M)."
if [[ $1 == 'full' ]];then
print_screen_output " "
@@ -2723,9 +2746,10 @@ show_options()
print_lines_basic "1" "-! 14" "Triggers an update from svn branch four - if present, of course."
print_lines_basic "1" "-! 15" "Triggers an update from svn branch BSD - if present, of course."
print_lines_basic "1" "-! 16" "Triggers an update from svn branch GNUBSD - if present, of course."
- print_lines_basic "1" "-! <http://......>" "Triggers an update from whatever server you list."
+ print_lines_basic "1" "-! " "<http://......> Triggers an update from whatever server you list."
+ print_lines_basic "1" "" "Example: inxi^-!^http://yourserver.com/testing/inxi"
fi
- print_lines_basic "1" "-! <ftp.......>" "Changes debugging data ftp upload location to whatever you enter here. Only used together with -xx@^11-14, and must be used in front of that."
+ print_lines_basic "1" "-! " "<ftp.......> Changes debugging data ftp upload location to whatever you enter here. Only used together with -xx@^11-14, and must be used in front of that."
print_lines_basic "1" "" "Example: inxi^-!^ftp.yourserver.com/incoming^-xx@^14"
fi
print_screen_output " "
@@ -4806,7 +4830,7 @@ get_dmidecode_data()
gsub(/'"$BAN_LIST_NORMAL"'/, "", twoData)
gsub(/,/, " ", $0)
# clean out Handle line
- sub(/^Handle.*/,"", $0)
+ # sub(/^Handle.*/,"", $0)
sub(/^[[:space:]]*Inactive.*/,"",$0)
# yes, there is a typo in a user data set, unknow
# Base Board Version|Base Board Serial Number
@@ -4816,6 +4840,7 @@ get_dmidecode_data()
# strip out starting white space so that the following stuff will clear properly
sub(/^[[:space:]]+/, "", twoData)
sub(/^Base Board .*|^Chassis .*|.*O\.E\.M\..*|.*OEM.*|^Not .*|^System .*|.*unknow.*|.*N\/A.*|none|^To be filled.*/, "", twoData)
+ sub(/(AssetTagNum|Manufacturer| Or Motherboard|PartNum|SerNum).*/, "", twoData)
gsub(/bios|acpi/, "", twoData)
sub(/http:\/\/www.abit.com.tw\//, "Abit", twoData)
@@ -5389,27 +5414,61 @@ get_hdd_data_basic()
{
eval $LOGFS
local hdd_used='' a_temp='' df_string=''
- local hdd_data='' df_test=''
+ local hdd_data='' df_test='' swap_size=0
if [[ -z $BSD_TYPE ]];then
- df_string='df -P -T --exclude-type=aufs --exclude-type=devfs --exclude-type=devtmpfs
- --exclude-type=fdescfs --exclude-type=iso9660 --exclude-type=linprocfs --exclude-type=procfs
- --exclude-type=squashfs --exclude-type=sysfs --exclude-type=tmpfs --exclude-type=unionfs'
+ ## NOTE: older df do not have --total (eg: v: 6.10 2008)
+ ## keep in mind the only value of use with --total is 'used' in blocks, which
+ ## we can use later to calculate the real percentags based on disk sizes, not
+ ## mounted partitions. Not using --total because it's more reliable to exclude non /dev
+ df_string="df -P -T --exclude-type=aufs --exclude-type=devfs --exclude-type=devtmpfs
+ --exclude-type=fdescfs --exclude-type=iso9660 --exclude-type=linprocfs --exclude-type=nfs
+ --exclude-type=nfs3 --exclude-type=nfs4 --exclude-type=nfs5 --exclude-type=procfs --exclude-type=smbfs
+ --exclude-type=squashfs --exclude-type=sysfs --exclude-type=tmpfs --exclude-type=unionfs"
+ if swapon -s &>/dev/null;then
+ swap_size=$( swapon -s 2>/dev/null | gawk '
+ BEGIN {
+ swapSize=0
+ total=0
+ }
+ ( $2 == "partition" ) && ( $3 ~ /^[0-9]+$/ ) {
+ total += ( 1000 / 1024 ) * $3
+ }
+ END {
+ # result in kB, change to 1024 Byte blocks
+ total = total * 1000 / 1024
+ total = sprintf( "%.1f", total )
+ print total
+ }' )
+ fi
else
- # default size is 512, so use -k for 1024
- df_string='df -T -k'
- # default size is 512, -H only for size in human readable format
+ # default size is 512, , so use -k for 1024 -H only for size in human readable format
# older bsds don't support -T, pain, so we'll use partial output there
- df_test=$( df -H -T 2>/dev/null )
- if [[ -n $df_test ]];then
+ if df -k -T &>/dev/null;then
df_string='df -k -T'
else
df_string='df -k'
fi
+ if swapctl -l &>/dev/null;then
+ swap_size=$( swapctl -l 2>/dev/null | gawk '
+ BEGIN {
+ swapSize=0
+ total=0
+ }
+ ( $1 ~ /^\/dev/ ) && ( $2 ~ /^[0-9]+$/ ) {
+ total += $2
+ }
+ END {
+ # result in blocks already
+ print total
+ }' )
+ fi
fi
+ # echo ss: $swap_size
hdd_data="$( eval $df_string )"
+ # eval $df_string | awk 'BEGIN{tot=0} !/total/ {tot+=$4} END{print tot}'
log_function_data 'raw' "hdd_data:\n$hdd_data"
- hdd_used=$( echo "$hdd_data" | gawk -v bsdType=$BSD_TYPE '
+ hdd_used=$( echo "$hdd_data" | gawk -v bsdType=$BSD_TYPE -v swapSize=$swap_size '
BEGIN {
# this is used for specific cases where bind, or incorrect multiple mounts to same partitions,
# is present. The value is searched for an earlier appearance of that partition and if it is
@@ -5419,15 +5478,18 @@ get_hdd_data_basic()
devSet=""
devWorking=""
mountWorking=""
+ used=0
}
# using $1, not $2, because older bsd df do not have -T, filesystem type
- ( bsdType != "" ) && $1 ~ /^(aufs|devfs|devtmpfs|fdescfs|filesystem|iso9660|linprocfs|procfs|squashfs|sysfs|tmpfs|type|unionfs)$/ {
+ ( bsdType != "" ) && $1 ~ /^(aufs|devfs|devtmpfs|fdescfs|filesystem|iso9660|linprocfs|nfs|nfs3|nfs4|nfs5|procfs|squashfs|smbfs|sysfs|tmpfs|type|unionfs)$/ {
# note use next, not getline or it does not work right
next
}
# also handles odd dm-1 type, from lvm, and mdraid, and some other bsd partition syntax
# note that linux 3.2.45-grsec-9th types kernels have this type of partition name: /dev/xvdc (no number, letter)
- /^\/dev\/(mapper\/|[hsv]d[a-z][0-9]+|dm[-]?[0-9]+|ada[0-9]+p[0-9]+.*|md[0-9]+|[aw]d[0-9]+s.*|xvd[a-z])/ {
+ # note: btrfs does not seem to use partition integers, just the primary /dev/sdx identifier
+ # df can also show /dev/disk/(by-label|by-uuid etc)
+ /^\/dev\/(disk\/|mapper\/|[hsv]d[a-z][0-9]*|dm[-]?[0-9]+|ada[0-9]+p[0-9]+.*|md[0-9]+|[aw]d[0-9]+s.*|xvd[a-z])/ {
# this handles the case where the first item is too long
# and makes df wrap output to next line, so here we advance
# it to the next line for that single case. Using df -P should
@@ -5469,9 +5531,11 @@ get_hdd_data_basic()
}
}
END {
- print used
+ used=used + swapSize
+ used = sprintf( "%.1f", used )
+ print used
}' )
-
+ # echo hdu:$hdd_used
if [[ -z $hdd_used ]];then
hdd_used='na'
fi
@@ -5483,7 +5547,7 @@ get_hdd_data_basic()
if [[ $B_PARTITIONS_FILE == 'true' ]];then
A_HDD_DATA=( $(
- gawk -v hddused="$hdd_used" '
+ gawk -v hddUsed=$hdd_used '
/[hsv]d[a-z]$/ {
driveSize = $(NF - 1)*1024/1000**3
gsub(/,/, " ", driveSize)
@@ -5499,12 +5563,11 @@ get_hdd_data_basic()
$1 ~ /^(3|8|22|33|202|252|253|254)$/ && $NF ~ /[hsv]d[a-z]$/ && ( $2 % 16 == 0 || $2 % 16 == 8 ) {
size += $3
}
-
END {
size = size*1024/1000**3 # calculate size in GB size
- workingUsed = hddused*1024/1000**3 # calculate workingUsed in GB used
+ workingUsed = hddUsed*1024/1000**3 # calculate workingUsed in GB used
# this handles a special case with livecds where no hdd_used is detected
- if ( size > 0 && hddused == "na" ) {
+ if ( size > 0 && hddUsed == "na" ) {
size = sprintf( "%.1f", size )
print size "GB,-"
}
@@ -5522,6 +5585,7 @@ get_hdd_data_basic()
fi
IFS="$ORIGINAL_IFS"
a_temp=${A_HDD_DATA[@]}
+ # echo ${a_temp[@]}
log_function_data "A_HDD_DATA: $a_temp"
eval $LOGFE
}
@@ -5531,7 +5595,8 @@ get_hard_drive_data_advanced()
{
eval $LOGFS
local a_temp_working='' a_temp_scsi='' temp_holder='' temp_name='' i='' j=''
- local sd_ls_by_id='' ls_disk_by_id='' usb_exists='' a_temp=''
+ local sd_ls_by_id='' ls_disk_by_id='' ls_disk_by_path='' usb_exists='' a_temp=''
+ local firewire_exists='' thunderbolt_exists=''
## check for all ide type drives, non libata, only do it if hdx is in array
## this is now being updated for new /sys type paths, this may handle that ok too
@@ -5601,6 +5666,7 @@ get_hard_drive_data_advanced()
# first pack the main ls variable so we don't have to keep using ls /dev...
# not all systems have /dev/disk/by-id
ls_disk_by_id="$( ls -l /dev/disk/by-id 2>/dev/null )"
+ ls_disk_by_path="$( ls -l /dev/disk/by-path 2>/dev/null )"
for (( i=0; i < ${#A_HDD_DATA[@]} - 1; i++ ))
do
if [[ -n $( grep -E '^sd[a-z]' <<< ${A_HDD_DATA[$i]} ) ]];then
@@ -5620,7 +5686,6 @@ get_hard_drive_data_advanced()
# get rid of whitespace for some drive names and ids, and extra data after - in name
temp_name=$( cut -d '-' -f 1 <<< ${a_temp_scsi[$j]// /_} )
sd_ls_by_id=$( grep -Em1 ".*$temp_name.*${a_temp_working[0]}$" <<< "$ls_disk_by_id" )
-
if [[ -n $sd_ls_by_id ]];then
temp_name=${a_temp_scsi[$j]}
break
@@ -5635,11 +5700,23 @@ get_hard_drive_data_advanced()
if [[ -z $temp_name ]];then
temp_name="Name n/a"
- else
+ # maybe remove this from the conditional, detection of usb may not depend on the name
+ else #
usb_exists=$( grep -Em1 "usb-.*$temp_name.*${a_temp_working[0]}$" <<< "$ls_disk_by_id" )
+ firewire_exists=$( grep -Em1 "ieee1394-.*$temp_name.*${a_temp_working[0]}$" <<< "$ls_disk_by_id" )
+ # note: sometimes with wwn- numbering usb does not appear in by-id but it does in by-path
+ if [[ -z $usb_exists ]];then
+ usb_exists=$( grep -Em1 "usb-.*${a_temp_working[0]}$" <<< "$ls_disk_by_path" )
+ fi
if [[ -n $usb_exists ]];then
a_temp_working[3]='USB'
fi
+ if [[ -z $firewire_exists ]];then
+ firewire_exists=$( grep -Em1 "ieee1394-.*${a_temp_working[0]}$" <<< "$ls_disk_by_path" )
+ fi
+ if [[ -n $firewire_exists ]];then
+ a_temp_working[3]='FireWire'
+ fi
fi
a_temp_working[2]=$temp_name
# these loops are to easily extend the cpu array created in the gawk script above with more fields per cpu.
@@ -5877,7 +5954,7 @@ get_machine_data()
chassis_vendor chassis_type chassis_version chassis_serial
"
fi
- if [[ -d $id_dir ]];then
+ if [[ -d $id_dir && $B_FORCE_DMIDECODE == 'false' ]];then
for id_file in $machine_files
do
file_data=''
@@ -8104,7 +8181,8 @@ get_sensors_data()
gawk -F ':' -v userCpuNo="$SENSORS_CPU_NO" '
BEGIN {
IGNORECASE=1
- core0Temp="" # only if all else fails...
+ core0Temp="" # these only if all else fails...
+ cpuPeciTemp="" # use if temps are missing or wrong
cpuTemp=""
cpuTempReal=""
fanWorking=""
@@ -8119,6 +8197,8 @@ get_sensors_data()
sysFanString=""
temp1=""
temp2=""
+ temp3=""
+ tempDiff=20 # for C, handled for F after that is determined
tempFanType="" # set to 1 or 2
tempUnit=""
tempWorking=""
@@ -8147,6 +8227,8 @@ get_sensors_data()
tempUnit=tempWorkingUnit
}
}
+ # issue 58 msi/asus show wrong for CPUTIN so overwrite it if PECI 0 is present
+ # http://www.spinics.net/lists/lm-sensors/msg37308.html
/^CPU(.*)\+([0-9]+)(.*)[ \t°](C|F)/ && $2 ~ /^[ \t]*\+([0-9]+)/ {
cpuTemp=gensub( /[ \t]+\+([0-9\.]+)(.*)/, "\\1", 1, $2 )
tempWorkingUnit=gensub( /[ \t]+\+([0-9\.]+)[ \t°]+([CF])(.*)/, "\\2", 1, $2 )
@@ -8154,6 +8236,13 @@ get_sensors_data()
tempUnit=tempWorkingUnit
}
}
+ /^PECI[[:space:]]Agent[[:space:]]0(.*)\+([0-9]+)(.*)[ \t°](C|F)/ && $2 ~ /^[ \t]*\+([0-9]+)/ {
+ cpuPeciTemp=gensub( /[ \t]+\+([0-9\.]+)(.*)/, "\\1", 1, $2 )
+ tempWorkingUnit=gensub( /[ \t]+\+([0-9\.]+)[ \t°]+([CF])(.*)/, "\\2", 1, $2 )
+ if ( tempWorkingUnit ~ /^C|F$/ && tempUnit == "" ){
+ tempUnit=tempWorkingUnit
+ }
+ }
/^(P\/S|Power)(.*)\+([0-9]+)(.*)[ \t°](C|F)/ && $2 ~ /^[ \t]*\+([0-9]+)/ {
psuTemp=gensub( /[ \t]+\+([0-9\.]+)(.*)/, "\\1", 1, $2 )
tempWorkingUnit=gensub( /[ \t]+\+([0-9\.]+)[ \t°]+([CF])(.*)/, "\\2", 1, $2 )
@@ -8161,9 +8250,10 @@ get_sensors_data()
tempUnit=tempWorkingUnit
}
}
+ # for temp1/2 only use temp1/2 if they are null or greater than the last ones
$1 ~ /^temp1$/ && $2 ~ /^[ \t]*\+([0-9]+)/ {
tempWorking=gensub( /[ \t]+\+([0-9\.]+)(.*)/, "\\1", 1, $2 )
- if ( temp1 == "" || tempWorking > 0 ) {
+ if ( temp1 == "" || ( tempWorking != "" && tempWorking > 0 ) ) {
temp1=tempWorking
}
tempWorkingUnit=gensub( /[ \t]+\+([0-9\.]+)[ \t°]+([CF])(.*)/, "\\2", 1, $2 )
@@ -8173,7 +8263,7 @@ get_sensors_data()
}
$1 ~ /^temp2$/ && $2 ~ /^[ \t]*\+([0-9]+)/ {
tempWorking=gensub( /[ \t]+\+([0-9\.]+)(.*)/, "\\1", 1, $2 )
- if ( temp2 == "" || tempWorking > 0 ) {
+ if ( temp2 == "" || ( tempWorking != "" && tempWorking > 0 ) ) {
temp2=tempWorking
}
tempWorkingUnit=gensub( /[ \t]+\+([0-9\.]+)[ \t°]+([CF])(.*)/, "\\2", 1, $2 )
@@ -8181,12 +8271,22 @@ get_sensors_data()
tempUnit=tempWorkingUnit
}
}
-
+ # temp3 is only used as an absolute override for systems with all 3 present
+ $1 ~ /^temp3$/ && $2 ~ /^[ \t]*\+([0-9]+)/ {
+ tempWorking=gensub( /[ \t]+\+([0-9\.]+)(.*)/, "\\1", 1, $2 )
+ if ( temp3 == "" || ( tempWorking != "" && tempWorking > 0 ) ) {
+ temp3=tempWorking
+ }
+ tempWorkingUnit=gensub( /[ \t]+\+([0-9\.]+)[ \t°]+([CF])(.*)/, "\\2", 1, $2 )
+ if ( tempWorkingUnit ~ /^C|F$/ && tempUnit == "" ){
+ tempUnit=tempWorkingUnit
+ }
+ }
# final fallback if all else fails, funtoo user showed sensors putting
# temp on wrapped second line, not handled
- /^(core0|core 0)(.*)\+([0-9]+)(.*)[ \t°](C|F)/ && $2 ~ /^[ \t]*\+([0-9]+)/ {
+ /^(core0|core 0|Physical id 0)(.*)\+([0-9]+)(.*)[ \t°](C|F)/ && $2 ~ /^[ \t]*\+([0-9]+)/ {
tempWorking=gensub( /[ \t]+\+([0-9\.]+)(.*)/, "\\1", 1, $2 )
- if ( core0Temp == "" || tempWorking > 0 ) {
+ if ( tempWorking != "" && core0Temp == "" && tempWorking > 0 ) {
core0Temp=tempWorking
}
tempWorkingUnit=gensub( /[ \t]+\+([0-9\.]+)[ \t°]+([CF])(.*)/, "\\2", 1, $2 )
@@ -8194,7 +8294,6 @@ get_sensors_data()
tempUnit=tempWorkingUnit
}
}
-
# note: can be cpu fan:, cpu fan speed:, etc. Some cases have no space before
# $2 starts (like so :1234 RPM), so skip that space test in regex
/^CPU(.*)[ \t]*([0-9]+)[ \t]RPM/ {
@@ -8252,17 +8351,18 @@ get_sensors_data()
}
}
}
-
END {
# first we need to handle the case where we have to determine which temp/fan to use for cpu and mobo:
# note, for rare cases of weird cool cpus, user can override in their prefs and force the assignment
+ # this is wrong for systems with > 2 tempX readings, but the logic is too complex with 3 variables
+ # so have to accept that it will be wrong in some cases, particularly for motherboard temp readings.
if ( temp1 != "" && temp2 != "" ){
if ( userCpuNo != "" && userCpuNo ~ /(1|2)/ ) {
tempFanType=userCpuNo
}
else {
# first some fringe cases with cooler cpu than mobo: assume which is cpu temp based on fan speed
- # but only if other fan speed is 0
+ # but only if other fan speed is 0.
if ( temp1 >= temp2 && 1 in aFanDefault && 2 in aFanDefault && aFanDefault[1] == 0 && aFanDefault[2] > 0 ) {
tempFanType=2
}
@@ -8290,38 +8390,91 @@ get_sensors_data()
tempFanType=1
}
}
-
- # then get the real cpu temp, best guess is hottest is real
- if ( cpuTemp != "" ){
- cpuTempReal=cpuTemp
+ # convert the diff number for F, it needs to be bigger that is
+ if ( tempUnit == "F" ) {
+ tempDiff = tempDiff * 1.8
}
- else if ( tempFanType != "" ){
- if ( tempFanType == 1 ){
- cpuTempReal=temp1
+ if ( cpuTemp != "" ) {
+ # specific hack to handle broken CPUTIN temps with PECI
+ if ( cpuPeciTemp != "" && ( cpuTemp - cpuPeciTemp ) > tempDiff ){
+ cpuTempReal=cpuPeciTemp
}
+ # then get the real cpu temp, best guess is hottest is real
else {
- cpuTempReal=temp2
+ cpuTempReal=cpuTemp
}
}
else {
- cpuTempReal=temp1
+ if ( tempFanType != "" ){
+ # there are some weird scenarios
+ if ( tempFanType == 1 ){
+ if ( temp1 != "" && temp2 != "" && temp2 > temp1 ) {
+ cpuTempReal=temp2
+ }
+ else {
+ cpuTempReal=temp1
+ }
+ }
+ else {
+ if ( temp1 != "" && temp2 != "" && temp1 > temp2 ) {
+ cpuTempReal=temp1
+ }
+ else {
+ cpuTempReal=temp2
+ }
+ }
+ }
+ else {
+ cpuTempReal=temp1 # can be null, that is ok
+ }
+ if ( cpuTempReal != "" ) {
+ # using temp3 is just not reliable enough, more errors caused than fixed imo
+ #if ( temp3 != "" && temp3 > cpuTempReal ) {
+ # cpuTempReal=temp3
+ #}
+ # there are some absurdly wrong temp1: acpitz-virtual-0 temp1: +13.8°C
+ if ( core0Temp != "" && (core0Temp - cpuTempReal) > tempDiff ) {
+ cpuTempReal=core0Temp
+ }
+ }
}
- # if all else fails, use core0 temp if it is present and cpu is null
- if ( cpuTempReal == "" && core0Temp != "" ) {
- cpuTempReal=core0Temp
+ # if all else fails, use core0/peci temp if present and cpu is null
+ if ( cpuTempReal == "" ) {
+ if ( core0Temp != "" ) {
+ cpuTempReal=core0Temp
+ }
+ # note that peci temp is known to be colder than the actual system
+ # sometimes so it is the last fallback we want to use even though in theory
+ # it is more accurate, but fact suggests theory wrong.
+ else if ( cpuPeciTemp != "" ) {
+ cpuTempReal=cpuPeciTemp
+ }
}
-
# then the real mobo temp
if ( moboTemp != "" ){
moboTempReal=moboTemp
}
else if ( tempFanType != "" ){
if ( tempFanType == 1 ) {
- moboTempReal=temp2
+ if ( temp1 != "" && temp2 != "" && temp2 > temp1 ) {
+ moboTempReal=temp1
+ }
+ else {
+ moboTempReal=temp2
+ }
}
else {
- moboTempReal=temp1
+ if ( temp1 != "" && temp2 != "" && temp1 > temp2 ) {
+ moboTempReal=temp2
+ }
+ else {
+ moboTempReal=temp1
+ }
}
+ ## NOTE: not safe to assume temp3 is the mobo temp, sad to say
+ #if ( temp1 != "" && temp2 != "" && temp3 != "" && temp3 < moboTempReal ) {
+ # moboTempReal= temp3
+ #}
}
else {
moboTempReal=temp2
@@ -8339,7 +8492,6 @@ get_sensors_data()
aFanDefault[2]=""
}
}
-
# then we need to get the actual numeric max array count for both fan arrays
for (i = 0; i <= 29; i++) {
if ( i in aFanMain && i > indexCountaFanMain ) {
@@ -8351,7 +8503,6 @@ get_sensors_data()
indexCountaFanDefault=i
}
}
-
# clear out any duplicates. Primary fan real trumps fan working always if same speed
for (i = 1; i <= indexCountaFanMain; i++) {
if ( i in aFanMain && aFanMain[i] != "" && aFanMain[i] != 0 ) {
@@ -8362,7 +8513,6 @@ get_sensors_data()
}
}
}
-
# now see if you can find the fast little mobo fan, > 5000 rpm and put it as mobo
# note that gawk is returning true for some test cases when aFanDefault[j] < 5000
# which has to be a gawk bug, unless there is something really weird with arrays
@@ -8381,7 +8531,6 @@ get_sensors_data()
}
}
}
-
# then construct the sys_fan string for echo, note that iteration 1
# makes: fanDefaultString separator null, ie, no space or ,
for (j = 1; j <= indexCountaFanDefault; j++) {
@@ -8402,7 +8551,6 @@ get_sensors_data()
if ( cpuTempReal != "" ) {
cpuTempReal = cpuTempReal tempUnit
}
-
# if they are ALL null, print error message. psFan is not used in output currently
if ( cpuTempReal == "" && moboTempReal == "" && aFanMain[1] == "" && aFanMain[2] == "" && aFanMain[3] == "" && fanDefaultString == "" ) {
print "No active sensors found. Have you configured your sensors yet?"
@@ -9095,12 +9243,12 @@ print_it_out()
if [[ $B_SHOW_MACHINE == 'true' ]];then
print_machine_data
fi
- if [[ $B_SHOW_WEATHER == 'true' ]];then
- print_weather_data
- fi
if [[ $B_SHOW_BASIC_CPU == 'true' || $B_SHOW_CPU == 'true' ]];then
print_cpu_data
fi
+ if [[ $B_SHOW_MEMORY == 'true' ]];then
+ print_memory_data
+ fi
if [[ $B_SHOW_GRAPHICS == 'true' ]];then
print_graphics_data
fi
@@ -9131,6 +9279,9 @@ print_it_out()
if [[ $B_SHOW_PS_CPU_DATA == 'true' || $B_SHOW_PS_MEM_DATA == 'true' ]];then
print_ps_data
fi
+ if [[ $B_SHOW_WEATHER == 'true' ]];then
+ print_weather_data
+ fi
if [[ $B_SHOW_INFO == 'true' ]];then
print_info_data
fi
@@ -9903,7 +10054,7 @@ print_hard_disk_data()
fi
hdd_serial=" ${C1}serial$SEP3${C2} $hdd_serial"
fi
- dev_data="${C1}ID-$((i+1))$SEP3${C2} /dev/${a_hdd_working[0]} "
+ dev_data="/dev/${a_hdd_working[0]} "
fi
if [[ -n ${a_hdd_working[2]} ]];then
hdd_name_temp=${a_hdd_working[2]}
@@ -9912,7 +10063,7 @@ print_hard_disk_data()
fi
# echo "loop: $i"
hdd_name="${C1}model$SEP3${C2} $hdd_name_temp"
- hdd_string="$usb_data$dev_data$hdd_name$size_data$hdd_serial$hdd_temp_data"
+ hdd_string="${C1}ID-$((i+1))$SEP3${C2} $usb_data$dev_data$hdd_name$size_data$hdd_serial$hdd_temp_data"
part_1_data="$hdd_model$hdd_string "
if [[ $i -eq 0 ]];then
@@ -10148,7 +10299,7 @@ print_machine_data()
# set A_MACHINE_DATA
get_machine_data
- if [[ -n $BSD_TYPE ]];then
+ if [[ -n $BSD_TYPE || $B_FORCE_DMIDECODE == 'true' ]];then
sysDmiError=''
sysDmiNull='No machine data available. Is dmidecode installed?'
fi
@@ -10278,7 +10429,8 @@ print_machine_data()
system_line="${C2}$sysDmiNull"
fi
# patch to dump all of above if dmidecode was data source and non root user
- if [[ ${A_MACHINE_DATA[0]} == 'dmidecode-non-root-user' || ${A_MACHINE_DATA[0]} == 'dmidecode-no-smbios-dmi-data' ]];then
+ if [[ ${A_MACHINE_DATA[0]} == 'dmidecode-non-root-user' || \
+ ${A_MACHINE_DATA[0]} == 'dmidecode-no-smbios-dmi-data' ]];then
if [[ ${A_MACHINE_DATA[0]} == 'dmidecode-non-root-user' ]];then
system_line="${C2}${sysDmiError}dmidecode: you must be root to run dmidecode"
elif [[ ${A_MACHINE_DATA[0]} == 'dmidecode-no-smbios-dmi-data' ]];then
@@ -10306,6 +10458,26 @@ print_machine_data()
eval $LOGFE
}
+print_memory_data()
+{
+ eval $LOGFS
+ local memory_line="${C1}Placeholder$SEP3${C2} Feature not yet developed"
+
+ memory_line=$( create_print_line "Memory:" "$memory_line${CN}" )
+ print_screen_output "$memory_line"
+
+ if [[ ${A_MEMORY_DATA[0]} == 'dmidecode-non-root-user' || \
+ ${A_MEMORY_DATA[0]} == 'dmidecode-no-smbios-dmi-data' ]];then
+ if [[ ${A_MEMORY_DATA[0]} == 'dmidecode-non-root-user' ]];then
+ memory_line="${C2}${sysDmiError}dmidecode: you must be root to run dmidecode"
+ elif [[ ${A_MEMORY_DATA[0]} == 'dmidecode-no-smbios-dmi-data' ]];then
+ memory_line="${C2}${sysDmiError}dmidecode: no machine data available"
+ fi
+ fi
+
+ eval $LOGFE
+}
+
# args: $1 - module name (could be > 1, so loop it ); $2 - audio (optional)
print_module_version()
{
@@ -11224,7 +11396,6 @@ print_raid_data()
recovery_speed=" ${C1}speed$SEP3${C2} ${a_raid_working[15]}"
fi
fi
-
a_raid_data[$raid_counter]="${C1}Recovering$SEP3${C2} $recovery_percent$recovery_progress_bar$recovered_sectors$finish_time$recovery_speed"
(( raid_counter++ ))
fi
@@ -11340,7 +11511,7 @@ print_repo_data()
# use bots that show page title for urls, so need to break the url by adding
# a white space.
if [[ $B_IRC == 'true' ]];then
- file_content=$( echo $file_content | sed 's|://|: //|' )
+ file_content=$( echo ${file_content/:\/\//: \/\/} )
else
file_content=$( echo $file_content )
fi
@@ -11706,7 +11877,7 @@ print_weather_data()
local weather_data='' location_string='' local_time='' time_string='' pressure=''
local a_location='' a_weather='' weather_string='' weather='' temp='' winds='' humidity=''
local time_zone='' observation_time='' city='' state='' country='' altitude=''
- local heat_index="" wind_chill='' dewpoint='' xxx_humidity=''
+ local heat_index='' wind_chill='' dewpoint='' xxx_humidity=''
local openP='(' closeP=')'
if [[ $B_IRC == 'true' ]];then
diff --git a/inxi.1 b/inxi.1
index ef393d6..359ac27 100755
--- a/inxi.1
+++ b/inxi.1
@@ -1,4 +1,4 @@
-.TH INXI 1 "2014\-04\-03" inxi "inxi manual"
+.TH INXI 1 "2014\-04\-27" inxi "inxi manual"
.SH NAME
inxi \- Command line system information script for console and IRC
.SH SYNOPSIS
@@ -80,7 +80,12 @@ Shows optical drive data. Same as \fB\-Dd\fR. With \fB\-x\fR, adds features line
\fB\-xx\fR adds a few more features.
.TP
.B \-D
-Show full hard Disk info, not only model, ie: \fB/dev/sda ST380817AS 80.0GB.
+Show full hard Disk info, not only model, ie: \fB/dev/sda ST380817AS 80.0GB\fR. Shows disk space
+total + used percentage. The disk used percentage includes space used by swap partition(s), since
+those are not usable for data storage. Note that with RAID disks, the percentage will be wrong
+since the total is computed from the disk sizes, but the used is computed from mounted partition used
+percentages. This small defect may get corrected in the future. Also, unmounted partitions are not
+counted in disk use percentages since inxi has no access to that data.
.TP
.B \-f
Show all cpu flags used, not just the short list. Not shown with \fB\-F\fR to avoid
@@ -123,7 +128,7 @@ Show partition labels. Default: short partition \fB\-P\fR. For full \fB\-p\fR ou
.B \-M
Show machine data. Motherboard, Bios, and if present, System Builder (Like Lenovo).
Older systems/kernels without the required \fB/sys\fR data can use dmidecode instead, run as root. If using dmidecode,
-may also show bios revision as well as version.
+may also show bios revision as well as version. \fB\-! 33\fR can force use of \fBdmidecode\fR data instead of \fB/sys\fR.
.TP
.B \-n
Show Advanced Network card information. Same as \fB\-Nn\fR. Shows interface, speed,
@@ -401,6 +406,9 @@ forums or IRC.
.TP
.B \-! 32
Turns on hostname in System line. Overrides inxi config file value (if set): B_SHOW_HOST='false'.
+.TP
+.B \-! 33
+Force use of \fBdmidecode\fR. This will override \fB/sys\fR data in some lines, like \fB\-M\fR.
.SH DEBUGGING OPTIONS
.TP
.B \-%
diff --git a/inxi.1.gz b/inxi.1.gz
index 0b678c2..b7b6519 100755
--- a/inxi.1.gz
+++ b/inxi.1.gz
Binary files differ
diff --git a/inxi.changelog b/inxi.changelog
index 5f7878a..9ba1e0e 100755
--- a/inxi.changelog
+++ b/inxi.changelog
@@ -1,4 +1,234 @@
=====================================================================================
+Version: 2.1.25
+Patch Version: 00
+Script Date: 2014-04-28
+-----------------------------------
+Changes:
+-----------------------------------
+no version change, new tarball. On consideration, I'm not using temp3, that is simply
+not reliable enough and leads I think to more false readings than right ones.
+
+-----------------------------------
+-- Harald Hope - Mon, 28 Apr 2014 14:47:41 -0700
+
+=====================================================================================
+Version: 2.1.25
+Patch Version: 00
+Script Date: 2014-04-28
+-----------------------------------
+Changes:
+-----------------------------------
+New version, new tarball. This fixes a possible bug with using --total to calculate disk
+used percentage, there are too many possible remote file systems to safely exclude, so
+sticking with using the test that partition is /dev mounted.
+
+Howeve, did add excludes of nfs/smbfs types, as well as future bsd excludes of those.
+
+-----------------------------------
+-- Harald Hope - Mon, 28 Apr 2014 14:23:39 -0700
+
+=====================================================================================
+Version: 2.1.24
+Patch Version: 00
+Script Date: 2014-04-28
+-----------------------------------
+Changes:
+-----------------------------------
+Quick fix, new tarball, no new version. This fixes a -D size used error, if nfs, nfs4, smbfs
+are mounted, inxi included those in the disk space used, creating insane used errors.
+
+-----------------------------------
+-- Harald Hope - Mon, 28 Apr 2014 14:12:50 -0700
+
+=====================================================================================
+Version: 2.1.24
+Patch Version: 00
+Script Date: 2014-04-28
+-----------------------------------
+Changes:
+-----------------------------------
+New version, new tarball. This is an attempt to make -s accurate more of the time,
+particularly with fringe or broken sensors outputs. See inxi issue 58 for details.
+http://code.google.com/p/inxi/issues/detail?id=58
+
+Added temp3, and an override to capture cases where temp3 is the actual cpu temp.
+
+Added PECI overrides for cases like msi/asus mobos have defective CPUTIN return data.
+
+Added core0 overrides as well, for cases where the temp returned is too low.
+
+It is absolutely 100% guaranteed that these changes will break some outputs that were
+working, but it's also certain that I believe that more wrong outputs will be corrected.
+
+With sensors, really the only way you can get reliable sensors is to use the lm-sensors
+config files for your motherboard, then set: CPU: temp and MB: temp explicitly.
+
+inxi will always use CPU: or MB: to override anything found.
+
+-----------------------------------
+-- Harald Hope - Mon, 28 Apr 2014 13:17:53 -0700
+
+=====================================================================================
+Version: 2.1.23
+Patch Version: 00
+Script Date: 2014-04-27
+-----------------------------------
+Changes:
+-----------------------------------
+New version, new tarball, new man. Found a pesky bug with false disk used results.
+
+It turns out I'd neglected to include /dev/disk partitions, oops, in the df data.
+
+Since this is a long time bug, it warrants a new release even though I just did
+2.1.22.
+
+-----------------------------------
+-- Harald Hope - Sun, 27 Apr 2014 15:55:20 -0700
+
+=====================================================================================
+Version: 2.1.22
+Patch Version: 00
+Script Date: 2014-04-27
+-----------------------------------
+Changes:
+-----------------------------------
+Quick update to -D, now inxi uses the total partition swap space to calculate the
+disk used percentage as well. Since swap space is not available as disk space, it
+makes sense to me to count it as used. -P/-p show the percent of swap used as well.
+
+-----------------------------------
+-- Harald Hope - Sun, 27 Apr 2014 14:41:06 -0700
+
+=====================================================================================
+Version: 2.1.22
+Patch Version: 00
+Script Date: 2014-04-27
+-----------------------------------
+Changes:
+-----------------------------------
+New version, new tarball. A bug fix for btrfs, which does not internally use /dev/sdx[number]
+to identify a partition, but rather the basic /dev/sdc for example.
+
+This made -D show wrong disk used percentage.
+
+Also, I added --total for df that have that supported, there is however an oddity which you
+can see here:
+
+df --total -P -T --exclude-type=aufs --exclude-type=devfs --exclude-type=devtmpfs \
+--exclude-type=fdescfs --exclude-type=iso9660 --exclude-type=linprocfs --exclude-type=procfs \
+--exclude-type=squashfs --exclude-type=sysfs --exclude-type=tmpfs --exclude-type=unionfs | \
+awk 'BEGIN {total=0} !/total/ {total = total + $4 }END {print total}'
+result:
+614562236
+
+df --total -P -T --exclude-type=aufs --exclude-type=devfs --exclude-type=devtmpfs \
+--exclude-type=fdescfs --exclude-type=iso9660 --exclude-type=linprocfs --exclude-type=procfs \
+--exclude-type=squashfs --exclude-type=sysfs --exclude-type=tmpfs --exclude-type=unionfs | \
+awk 'BEGIN {total=0} /^total/ {total = total + $4 }END {print total}'
+
+result:
+614562228
+
+ df -P -T --exclude-type=aufs --exclude-type=devfs --exclude-type=devtmpfs \
+ --exclude-type=fdescfs --exclude-type=iso9660 --exclude-type=linprocfs --exclude-type=procfs \
+ --exclude-type=squashfs --exclude-type=sysfs --exclude-type=tmpfs --exclude-type=unionfs | \
+ awk 'BEGIN {total=0} {total = total + $4 }END {print total}'
+
+ result:
+ 614562236
+
+ In my tests, using --total gives a greater disk user percentage than adding the results
+ up manually, as inxi did before, and still does for systems without --total for df.
+
+ df --total -P -T --exclude-type=aufs --exclude-type=devfs --exclude-type=devtmpfs \
+ --exclude-type=fdescfs --exclude-type=iso9660 --exclude-type=linprocfs \
+ --exclude-type=procfs --exclude-type=squashfs --exclude-type=sysfs --exclude-type=tmpfs \
+ --exclude-type=unionfs
+
+Filesystem Type 1024-blocks Used Available Capacity Mounted on
+/dev/disk/by-label/root-data ext3 12479556 12015624 335816 98% /
+/dev/sdc9 ext3 20410156 18013360 1979432 91% /home
+/dev/sdc7 ext3 4904448 3785460 1016672 79% /media/sdb2
+/dev/sdc5 ext3 30382896 27467220 2295720 93% /var/www/m
+/dev/sdc8 ext3 61294356 41849300 18196972 70% /home/me/1
+/dev/sdb1 ext3 307532728 285159432 20810456 94% /home/me/2
+/dev/sdd1 ext3 26789720 18153076 7542620 71% /home/me/3
+/dev/sdd2 ext3 213310776 206932912 2040960 100% /home/me/4
+/dev/sda7 ext3 10138204 1185772 8434348 13% /home/me/5
+total - 687242840 614562156 62652996 91% -
+
+Strange, no? the data is in blocks, and it should of course in theory add up to exactly the
+same thing. However, because --total lets df do the math, I'm going to use that for now,
+unless someone can show it's not good.
+
+inxi still falls back for bsds and older df to the standard method.
+-----------------------------------
+-- Harald Hope - Sun, 27 Apr 2014 12:49:06 -0700
+
+=====================================================================================
+Version: 2.1.21
+Patch Version: 00
+Script Date: 2014-04-24
+-----------------------------------
+Changes:
+-----------------------------------
+New tarball, small update, added hopefully firewire support to drive type id.
+
+That's searching for ieee1394- hopefully that will do it.
+
+-----------------------------------
+-- Harald Hope - Thu, 24 Apr 2014 13:22:51 -0700
+
+=====================================================================================
+Version: 2.1.21
+Patch Version: 00
+Script Date: 2014-04-24
+-----------------------------------
+Changes:
+-----------------------------------
+New version, tarball. This fixes one small oversight, placing USB in front of ID-[x]
+of disk drive lists. Was showing USB ID-1: /dev/sde now shows: ID-1: USB /dev/sde
+that is more intuitive and keeps the columns in alignment more or less, easier
+to read.
+
+Second, fixes a bug with some file systems / usb drives
+where they do not use usb- in the /dev/disk/by-id line but only wwn-
+https://access.redhat.com/site/documentation/en
+-US/Red_Hat_Enterprise_Linux/5/html/Online_Storage_Reconfiguration_Guide/persistent_naming.html
+explains it somewhat.
+
+the fix is adding a second if null test of the device /dev/sdx in by-path, that seems
+to fix the issue. by-path does have the usb- item, though it does not have the name
+so it's not as reliable in absolute terms, but it's fine as a second step fallback
+option.
+
+-----------------------------------
+-- Harald Hope - Thu, 24 Apr 2014 11:47:08 -0700
+
+=====================================================================================
+Version: 2.1.20
+Patch Version: 00
+Script Date: 2014-04-08
+-----------------------------------
+Changes:
+-----------------------------------
+While this release has some new features, they are all intended for development use
+for the next major feature, -m / memory, so there is no particular reason to package
+this release. There is a new development option, -! 33, which lets me override /sys
+data use for -M, which is useful to debug dmidecode output for -m and other features.
+
+No new version, new man. There may be a few more of these releases, but functionally
+there is no particular reason to make a new package if you are a maintainer, so there
+is no new version number. This release is a preparation for some branches/one/inxi
+tests that will be run in the future.
+
+The man/help document -! 33 just to have it there, but it should make no difference
+to anyone but me at this stage.
+
+-----------------------------------
+-- Harald Hope - Mon, 14 Apr 2014 13:31:24 -0700
+
+=====================================================================================
Version: 2.1.20
Patch Version: 00
Script Date: 2014-04-08