From e06e4e09c4c22c28cf4173437b76449ebfff31c0 Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Mon, 12 May 2014 14:14:32 -0400 Subject: Imported Upstream version 2.1.28 --- inxi | 270 +++++++++++++++++++++++++++++++++++++++++++-------------- inxi.1 | 6 +- inxi.1.gz | Bin 8782 -> 8777 bytes inxi.changelog | 68 +++++++++++++++ 4 files changed, 277 insertions(+), 67 deletions(-) diff --git a/inxi b/inxi index 0d4d65d..a1bfb11 100755 --- a/inxi +++ b/inxi @@ -1,8 +1,8 @@ #!/usr/bin/env bash ######################################################################## #### Script Name: inxi -#### Version: 2.1.25 -#### Date: 2014-04-28 +#### Version: 2.1.28 +#### Date: 2014-05-05 #### Patch Number: 00 ######################################################################## #### SPECIAL THANKS @@ -614,7 +614,7 @@ DISTROS_OS_RELEASE_GOOD="arch-release SuSE-release" # Note that \ bans only words, not parts of strings; in \ you can't use punctuation characters like . or , # we're saving about 10+% of the total script exec time by hand building the ban lists here, using hard quotes. BAN_LIST_NORMAL='chipset|components|computing|computer|corporation|communications|electronics|electrical|electric|gmbh|group|incorporation|industrial|international|nee|revision|semiconductor|software|technologies|technology|ltd\.|\|inc\.|\|intl\.|co\.|\|corp\.|\|\(tm\)|\(r\)|®|\(rev ..\)' -BAN_LIST_CPU='@|cpu deca|dual core|dual-core|tri core|tri-core|quad core|quad-core|ennea|genuine|hepta|hexa|multi|octa|penta|processor|single|triple|[0-9\.]+ *[MmGg][Hh][Zz]' +BAN_LIST_CPU='@||cpu |cpu deca|dual core|dual-core|tri core|tri-core|quad core|quad-core|ennea|genuine|hepta|hexa|multi|octa|penta|processor|single|triple|[0-9\.]+ *[MmGg][Hh][Zz]' SENSORS_GPU_SEARCH='intel|radeon|nouveau' @@ -796,11 +796,14 @@ initialize_data() 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*/} || -z ${BSD_VERSION/*darwin*/} ]];then + if [[ -z ${BSD_VERSION/*openbsd*/} ]];then + BSD_VERSION='openbsd' + elif [[ -z ${BSD_VERSION/*darwin*/} ]];then + BSD_VERSION='darwin' + fi # 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 ''" @@ -970,7 +973,7 @@ initialize_paths() { local path='' added_path='' b_path_found='' sys_path='' # Extra path variable to make execute failures less likely, merged below - local extra_paths="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin" + local extra_paths="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/opt/local/bin" # this needs to be set here because various options call the parent initialize function directly. SCRIPT_PATH=$( dirname $0 ) @@ -1570,9 +1573,9 @@ script_self_updater() debug_data_collector() { local xiin_app='' xiin_data_file='' xiin_download='' error='' b_run_xiin='false' - local debug_data_dir='' bsd_string='' xorg_d_files='' xorg_file='' + local debug_data_dir='' bsd_string='' xorg_d_files='' xorg_file='' a_distro_ids='' local completed_gz_file='' xiin_file='xiin.py' ftp_upload='ftp.techpatterns.com/incoming' - local Line='-------------------------' + local Line='-------------------------' root_string='' local start_directory=$( pwd ) local host=$( tr '[A-Z]' '[a-z]' <<< "$HOSTNAME" ) if [[ -n $host ]];then @@ -1583,8 +1586,11 @@ debug_data_collector() if [[ -n $BSD_TYPE ]];then bsd_string="-$BSD_TYPE" fi + if [[ $( whoami ) == 'root' ]];then + root_string='-root' + fi - debug_data_dir="inxi$bsd_string-$host-$(date +%Y%m%d-%H%M%S)-$1" + debug_data_dir="inxi$bsd_string-$host-$(date +%Y%m%d-%H%M%S)-$1$root_string" if [[ $B_IRC == 'false' ]];then if [[ -n $ALTERNATE_FTP ]];then @@ -1610,12 +1616,26 @@ debug_data_collector() echo 'Collecting system info: sensors, lsusb, lspci, lspci -v data, plus /proc data' echo 'also checking for dmidecode data: note, you must be root to have dmidecode work.' echo "Data going into: $SCRIPT_DATA_DIR/$debug_data_dir" - # bsd tools + # bsd tools http://cb.vu/unixtoolbox.xhtml + pciconf -l -cv &> $debug_data_dir/bsd-pciconf-cvl.txt pciconf -vl &> $debug_data_dir/bsd-pciconf-vl.txt + pciconf -l &> $debug_data_dir/bsd-pciconf-l.txt sysctl -a &> $debug_data_dir/bsd-sysctl-a.txt - + usbdevs -v &> $debug_data_dir/bsd-usbdevs-v.txt + kldstat &> $debug_data_dir/bsd-kldstat.txt + # diskinfo -v + # fdisk dmidecode &> $debug_data_dir/dmidecode.txt + if type -p shopt &>/dev/null;then + shopt -s nullglob;a_distro_ids=(/etc/*[-_]{release,version});shopt -u nullglob;echo ${a_distro_ids[@]} &> $debug_data_dir/etc-distro-files.txt + for distro_file in ${a_distro_ids[@]} /etc/issue + do + if [[ -f $distro_file ]];then + cat $distro_file &> $debug_data_dir/distro-file${distro_file//\//-} + fi + done + fi lscpu &> $debug_data_dir/lscpu.txt lspci &> $debug_data_dir/lspci.txt lspci -k &> $debug_data_dir/lspci-k.txt @@ -1651,6 +1671,7 @@ debug_data_collector() head -n 1 /proc/asound/card*/codec* &> $debug_data_dir/proc-asound-card-codec.txt ls /usr/bin/gcc* &> $debug_data_dir/gcc-sys-versions.txt gcc --version &> $debug_data_dir/gcc-version.txt + clang --version &> $debug_data_dir/clang-version.txt cat /etc/issue &> $debug_data_dir/etc-issue.txt cat $FILE_LSB_RELEASE &> $debug_data_dir/lsb-release.txt cat $FILE_OS_RELEASE &> $debug_data_dir/os-release.txt @@ -1894,7 +1915,7 @@ check_recommends_user_output() echo "Python version: $python_version" echo $Line - echo "Test One: Required System Directories." + echo "Test One: Required System Directories (Linux Only)." print_lines_basic "0" "" "If one of these system directories is missing, $SCRIPT_NAME cannot operate:" echo check_recommends_items 'required-dirs' @@ -3620,7 +3641,7 @@ get_audio_alsa_data() get_cpu_core_count() { eval $LOGFS - local cpu_physical_count='' cpu_core_count='' cpu_type='' cpu_alpha_count='' + local cpu_physical_count='' cpu_core_count='' cpu_type='' cpu_alpha_count='' cores_per_cpu='' if [[ $B_CPUINFO_FILE == 'true' ]]; then # load the A_CPU_TYPE_PCNT_CCNT core data array get_cpu_ht_multicore_smp_data @@ -3642,19 +3663,36 @@ get_cpu_core_count() if [[ $BSD_VERSION == 'openbsd' ]];then gawk_fs='=' fi - cpu_core_count=$( gawk -F "$gawk_fs" ' + cpu_core_count=$( gawk -F "$gawk_fs" -v bsdType=$BSD_VERSION ' # note: on openbsd can also be hw.ncpufound so exit after first - /^hw.ncpu/ { + BEGIN { + coreCount="" + } + /^hw.ncpu$/ { + coreCount=$NF + } + /^machdep.cpu.core_count/ { + coreCount=$NF + } + END { + print coreCount + }' <<< "$Sysctl_a_Data" ) + cores_per_cpu=$( gawk -F "$gawk_fs" ' + /^machdep.cpu.cores_per_package/ { print $NF - exit }' <<< "$Sysctl_a_Data" ) + if [[ -n $( grep -E '^[0-9]+$' <<< "$cpu_core_count" ) ]];then cpu_alpha_count=$( get_cpu_core_count_alpha "$cpu_core_count" ) if [[ $cpu_core_count -gt 1 ]];then cpu_type='SMP' fi fi - cpu_physical_count=1 + if [[ -n $cores_per_cpu ]];then + cpu_physical_count=$(( $cpu_core_count / $cores_per_cpu )) + else + cpu_physical_count=1 + fi A_CPU_CORE_DATA=( "$cpu_physical_count" "$cpu_alpha_count" "$cpu_type" "$cpu_core_count" ) fi a_temp=${A_CPU_CORE_DATA[@]} @@ -3852,7 +3890,7 @@ get_cpu_data_bsd() if [[ -n $Sysctl_a_Data || -n $bsd_cpu_flags ]];then IFS=$'\n' A_CPU_DATA=( $( - gawk -F "$gawk_fs" -v cpuFlags="$bsd_cpu_flags" ' + gawk -F "$gawk_fs" -v bsdVersion=$BSD_VERSION -v cpuFlags="$bsd_cpu_flags" ' BEGIN { IGNORECASE=1 cpuModel="" @@ -3860,8 +3898,9 @@ get_cpu_data_bsd() cpuCache="" cpuBogomips="" cpuVendor="" + bSwitchFs="false" } - /^hw.model/ { + /^hw.model/ && ( bsdVersion != "darwin" ) { gsub(/'"$BAN_LIST_NORMAL"'/, "", $NF ) gsub(/'"$BAN_LIST_CPU"'/, "", $NF ) sub(//,"",$NF) @@ -3873,12 +3912,32 @@ get_cpu_data_bsd() exit } } - /^hw.(clock|cpuspeed)/ { + /^hw.clock/ { cpuClock=$NF if ( cpuModel != "" ) { exit } } + /^hw.cpufrequency/ { + cpuClock = $NF / 1000000 + } + /^hw.l2cachesize/ { + cpuCache=$NF/1024 + cpuCache=cpuCache " kB" + } + /^machdep.cpu.vendor/ { + cpuVendor=$NF + } + /^machdep.cpu.brand_string/ { + gsub(/'"$BAN_LIST_NORMAL"'/, "", $NF ) + gsub(/'"$BAN_LIST_CPU"'/, "", $NF ) + sub(//,"",$NF) + sub(/[a-z]+-core/, "", $NF ) + gsub(/^ +| +$|\"/, "", $NF) + gsub(/ [ \t]+/, " ", $NF) + sub(/[[:space:]]*@.*/,"",$NF) + cpuModel=$NF + } END { print cpuModel "," cpuClock "," cpuCache "," cpuFlags "," cpuBogomips "," cpuVendor print "N/A" @@ -3894,9 +3953,12 @@ get_cpu_flags_bsd() eval $LOGFS local cpu_flags='' - + local gawk_fs=':' + if [[ $BSD_VERSION == 'openbsd' ]];then + gawk_fs='=' + fi if [[ -n $Dmesg_Boot_Data ]];then - cpu_flags=$( gawk -F '=' ' + cpu_flags=$( gawk -F "=" ' BEGIN { IGNORECASE=1 cpuFlags="" @@ -3916,6 +3978,16 @@ get_cpu_flags_bsd() print cpuFlags exit }' <<< "$Dmesg_Boot_Data" ) + elif [[ -n $Sysctl_a_Data ]];then + cpu_flags=$( gawk -F "$gawk_fs" ' + BEGIN { + cpuFlags="" + } + /^machdep.cpu.features/ { + cpuFlags=tolower($NF) + print cpuFlags + exit + }' <<< "$Sysctl_a_Data" ) fi echo $cpu_flags log_function_data "$cpu_flags" @@ -3970,7 +4042,6 @@ get_cpu_ht_multicore_smp_data() } } # array of logical processors, both HT and physical - /^processor/ { gsub(/,/, " ", $NF) gsub(/^ +| +$/, "", $NF) @@ -3990,7 +4061,6 @@ get_cpu_ht_multicore_smp_data() a_processor_id[proc_iter] = nr } } - # array of physical cpu ids, note, this will be unset for vm cpus in many cases # because they have no physical cpu, so we cannot assume this will be here. /^physical/ { @@ -4025,7 +4095,6 @@ get_cpu_ht_multicore_smp_data() for ( i in a_physical_id ) { num_of_physical_cpus++ } - i = 0 ## count unique cores ## for ( i in a_core_id ) { @@ -4099,7 +4168,7 @@ get_desktop_environment() eval $LOGFS # set the default, this function only runs in X, if null, don't print data out - local desktop_environment='' xprop_root='' + local desktop_environment='' xprop_root='' version2='' local version='' version_data='' toolkit='' # works on 4, assume 5 will id the same, why not, no need to update in future @@ -4249,18 +4318,25 @@ get_desktop_environment() # note: openbox-lxde --version may be present, but returns openbox data version=$( get_program_version 'openbox' '^openbox' '2' ) if [[ $XDG_CURRENT_DESKTOP == 'LXDE' || \ - -n $( grep -is 'lxde' <<< "$Ps_aux_Data" ) ]];then + -n $( grep -is '/lxsession' <<< "$Ps_aux_Data" ) ]];then if [[ -n $version ]];then version="(Openbox $version)" fi desktop_environment='LXDE' - elif [[ -n $( grep -is 'razor-desktop' <<< "$Ps_aux_Data" ) ]];then + elif [[ $XDG_CURRENT_DESKTOP == 'Razor' || $XDG_CURRENT_DESKTOP == 'LXQt' ]] || \ + [[ -n $( grep -Eis '(razor-desktop|lxqt-session)' <<< "$Ps_aux_Data" ) ]];then + if [[ -n $( grep -is 'lxqt-session' <<< "$Ps_aux_Data" ) ]];then + desktop_environment='LXQt' + elif [[ -n $( grep -is 'razor-desktop' <<< "$Ps_aux_Data" ) ]];then + desktop_environment='Razor-Qt' + else + desktop_environment='LX-Qt-Variant' + fi if [[ -n $version ]];then version="(Openbox $version)" fi - desktop_environment='Razor-QT' else - desktop_environment='Openbox' + desktop_environment='Openbox' fi elif [[ -n $( grep -is 'ICEWM' <<< "$xprop_root" ) ]];then version=$( get_program_version 'icewm' '^icewm' '2' ) @@ -4505,7 +4581,17 @@ get_distro_data() # may need modification if archbsd / debian can be id'ed with /etc files if [[ -n $BSD_TYPE ]];then - distro=$( uname -sr ) + if [[ $BSD_VERSION != 'darwin' ]];then + distro=$( uname -sr ) + else + if [[ -f /System/Library/CoreServices/SystemVersion.plist ]];then + distro=$( grep -A1 -E '(ProductName|ProductVersion)' /System/Library/CoreServices/SystemVersion.plist | grep '' | sed -E 's/<[\/]?string>//g' ) + distro=$( echo $distro ) + fi + if [[ -z $distro ]];then + distro='Mac OS X' + fi + fi echo "$distro" log_function_data "distro: $distro" eval $LOGFE @@ -4896,17 +4982,6 @@ get_dmesg_boot_data() eval $LOGFE } -get_gcc_kernel_version() -{ - # note that we use gawk to get the last part because beta, alpha, git versions can be non-numeric - local gccVersion='' - - if [[ -e /proc/version ]];then - gccVersion=$( grep -Eio 'gcc[[:space:]]*version[[:space:]]*([^ \t]*)' /proc/version 2>/dev/null | gawk '{print $3}' ) - fi - echo $gccVersion -} - get_gcc_system_version() { eval $LOGFS @@ -5825,6 +5900,10 @@ get_init_data() init_type='Epoch' # epoch version == Epoch Init System 1.0.1 "Sage" init_version=$( get_program_version 'epoch' '^Epoch' '4' ) + elif type -p launchctl &>/dev/null;then + init_type='launchd' + # / launchd/ version.plist /etc/launchd.conf + # init_version=$( get_program_version 'Launchd' '^Launchd' '4' ) # missing data: # http://smarden.org/runit/sv.8.html elif [[ -e /sbin/runit-init || -e /etc/runit || -n $( type -p sv ) ]];then @@ -5879,6 +5958,49 @@ get_init_data() eval $LOGFE } +get_kernel_compiler_version() +{ + # note that we use gawk to get the last part because beta, alpha, git versions can be non-numeric + local compiler_version='' compiler_type='' + + if [[ -e /proc/version ]];then + compiler_version=$( grep -Eio 'gcc[[:space:]]*version[[:space:]]*([^ \t]*)' /proc/version 2>/dev/null | gawk '{print $3}' ) + if [[ -n $compiler_version ]];then + compiler_type='gcc' + fi + else + if [[ $BSD_VERSION == 'darwin' ]];then + if type -p gcc &>/dev/null;then + compiler_version=$( get_program_version 'gcc' 'Apple[[:space:]]LLVM' '4' ) + if [[ -n $compiler_version ]];then + compiler_type='LLVM-GCC' + fi + fi + else + if [[ -f /etc/src.conf ]];then + compiler_type=$( grep '^CC' /etc/src.conf | cut -d '=' -f 2 ) + elif [[ -f /etc/make.conf ]];then + compiler_type=$( grep '^CC' /etc/make.conf | cut -d '=' -f 2 ) + fi + if [[ -n $compiler_type ]];then + if type -p $compiler_type &>/dev/null;then + if [[ $compiler_type == 'gcc' ]];then + compiler_version=$( get_program_version 'gcc' '^gcc' '3' ) + elif [[ $compiler_type == 'clang' ]];then + # FreeBSD clang version 3.0 (tags/RELEASE_30/final 145349) 20111210 + compiler_version=$( get_program_version 'clang' 'clang' '4' ) + fi + fi + fi + fi + fi + if [[ -n $compiler_version ]];then + compiler_version="$compiler_type^$compiler_version" + fi + echo $compiler_version +} + + get_kernel_version() { eval $LOGFS @@ -5886,7 +6008,9 @@ get_kernel_version() local kernel_version='' ksplice_kernel_version='' kernel_version=$( uname -rm ) - + if [[ $BSD_VERSION == 'darwin' ]];then + kernel_version="Darwin $kernel_version" + fi if [[ -n $( type -p uptrack-uname ) && -n $kernel_version ]];then ksplice_kernel_version=$( uptrack-uname -rm ) if [[ $kernel_version != $ksplice_kernel_version ]];then @@ -6123,7 +6247,7 @@ get_memory_data() log_function_data 'cat' "$FILE_MEMINFO" elif [[ $B_SYSCTL == 'true' && -n $Sysctl_a_Data ]];then local gawk_fs=': ' - + # darwin sysctl is broken and uses both : and = and repeats these items if [[ $BSD_VERSION == 'openbsd' ]];then gawk_fs='=' fi @@ -6133,7 +6257,7 @@ get_memory_data() freeMemory="" } # freebsd seems to use bytes here - /^hw.physmem/ { + /^hw.physmem/ && ( realMemory == "" ) { gsub(/^[^0-9]+|[^0-9]+$/,"",$2) realMemory = $2/1024 if ( freeMemory != "" ) { @@ -6150,7 +6274,7 @@ get_memory_data() } } END { - # hack: temp fix for openbsd: in case no free mem was detected but we have physmem + # hack: temp fix for openbsd/darwin: in case no free mem was detected but we have physmem if ( freeMemory == "" && realMemory != "" ) { printf("NA/%.1fMB\n", realMemory/1024) } @@ -6814,7 +6938,7 @@ get_partition_data() eval $LOGFS local a_partition_working='' dev_item='' a_temp='' dev_working_item='' - local swap_data='' df_string='' main_partition_data='' df_test='' fs_type='' + local swap_data='' df_string='' main_partition_data='' fs_type='' local mount_data='' dev_bsd_item='' #local excluded_file_types='--exclude-type=aufs --exclude-type=tmpfs --exclude-type=iso9660' # df doesn't seem to work in script with variables like at the command line @@ -6828,8 +6952,7 @@ get_partition_data() swap_data="$( swapctl -l 2>/dev/null )" # default size is 512, -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 -H -T &>/dev/null;then df_string='df -H -T' else df_string='df -H' @@ -6855,7 +6978,7 @@ get_partition_data() # $NF = partition name; $(NF - 4) = partition size; $(NF - 3) = used, in gB; $(NF - 1) = percent used ## note: by subtracting from the last field number NF, we avoid a subtle issue with LVM df output, where if ## the first field is too long, it will occupy its own line, this way we are getting only the needed data - A_PARTITION_DATA=( $( echo "$main_partition_data" | gawk -v bsdType=$BSD_TYPE ' + A_PARTITION_DATA=( $( echo "$main_partition_data" | gawk -v bsdType=$BSD_TYPE -v bsdVersion=$BSD_VERSION ' BEGIN { IGNORECASE=1 fileSystem="" @@ -6902,7 +7025,13 @@ get_partition_data() else { fileSystem="" } - print $NF "," $(NF - 4) "," $(NF - 3) "," $(NF - 1) ",main," fileSystem "," devBase + # /dev/disk0s2 249G 24G 225G 10% 5926984 54912758 10% / + if ( bsdVersion == "darwin" && $(NF - 4) ~ /[0-9]+%/ ) { + print $NF "," $(NF - 7) "," $(NF - 6) "," $(NF - 4) ",main," fileSystem "," devBase + } + else { + print $NF "," $(NF - 4) "," $(NF - 3) "," $(NF - 1) ",main," fileSystem "," devBase + } } # skip all these, including the first, header line. Use the --exclude-type # to handle new filesystems types we do not want listed here @@ -6910,7 +7039,11 @@ get_partition_data() # this is to avoid file systems with spaces in their names, that will make # the test show the wrong data in each of the fields, if no x%, then do not use # using 3 cases, first default, standard, 2nd, 3rd, handles one and two spaces in name - if ( $(NF - 1) ~ /[0-9]+%/ ) { + if ( bsdVersion == "darwin" && $(NF - 4) ~ /[0-9]+%/ ) { + fileSystem="" + print $NF "," $(NF - 7) "," $(NF - 6) "," $(NF - 4) ",main," fileSystem "," devBase + } + else if ( $(NF - 1) ~ /[0-9]+%/ ) { # note, older df in bsd do not have file system column if ( NF == "7" ) { fileSystem=$(NF - 5) @@ -6990,7 +7123,7 @@ get_partition_data() dev_item=${a_partition_working[6]} # reset each loop fs_type=${a_partition_working[5]} # older bsds have df minus -T so can't get fs type easily, try using mount instead - if [[ $BSD_TYPE == 'bsd' && -z $fs_type && -n $dev_item ]];then + if [[ $BSD_TYPE == 'bsd' ]] && [[ -z $fs_type && -n $dev_item ]];then dev_bsd_item=$( sed -e 's/non-dev-//' -e 's|/|\\/|g' <<< "$dev_item" ) fs_type=$( gawk -F '(' ' /'$dev_bsd_item'/ { @@ -8658,7 +8791,12 @@ get_sysctl_data() local sysctl_data='' if [[ $B_SYSCTL ]];then - sysctl_data="$( sysctl -$1 )" + # darwin sysctl has BOTH = and : separators, and repeats data. Why? No bsd discipline, that's for sure + if [[ $BSD_VERSION == 'darwin' ]];then + sysctl_data="$( sysctl -$1 | sed 's/[[:space:]]*=[[:space:]]*/: /' )" + else + sysctl_data="$( sysctl -$1 )" + fi fi # log_function_data "sysctl_data: $sysctl_data" echo "$sysctl_data" @@ -9610,7 +9748,7 @@ print_cpu_data() # bmip_data="${a_cpu_working[4]}" # fi # bogomips are a linux thing, but my guess is over time bsds will use them somewhere anyway - if [[ $BSD_TYPE == 'bsd' && -z $bmip_data ]];then + if [[ -n $BSD_TYPE && -z $bmip_data ]];then bmip_data='' else bmip_data="${C1}bmips$SEP3${C2} $bmip_data " @@ -9619,10 +9757,14 @@ print_cpu_data() ## note: this handles how intel reports L2, total instead of per core like AMD does # note that we need to multiply by number of actual cpus here to get true cache size if [[ -n ${a_cpu_working[2]} ]];then - if [[ $cpu_vendor != 'intel' ]];then - cpu_cache=$( calculate_multicore_data "${a_cpu_working[2]}" "$(( $cpu_core_count * $cpu_physical_count ))" ) + if [[ -z $BSD_TYPE ]];then + if [[ $cpu_vendor != 'intel' ]];then + cpu_cache=$( calculate_multicore_data "${a_cpu_working[2]}" "$(( $cpu_core_count * $cpu_physical_count ))" ) + else + cpu_cache=$( calculate_multicore_data "${a_cpu_working[2]}" "$cpu_physical_count" ) + fi else - cpu_cache=$( calculate_multicore_data "${a_cpu_working[2]}" "$cpu_physical_count" ) + cpu_cache=${a_cpu_working[2]} fi else cpu_cache='N/A' @@ -10153,7 +10295,7 @@ print_info_data() local processes=$(( $( wc -l <<< "$Ps_aux_Data" ) - 1 )) local up_time="$( get_uptime )" local patch_version_number=$( get_patch_version_string ) - local gcc_string='' gcc_installed='' gcc_others='' closing_data='' + local gcc_installed='' gcc_others='' closing_data='' if [[ -z $memory ]];then memory='N/A' @@ -11703,7 +11845,7 @@ print_system_data() local host_name=$HOSTNAME local current_kernel=$( get_kernel_version ) local distro="$( get_distro_data )" - local tty_session='' + local tty_session='' compiler_string='' # I think these will work, maybe, if logged in as root and in X if [[ $B_RUNNING_IN_DISPLAY == 'true' ]];then @@ -11744,9 +11886,9 @@ print_system_data() fi fi if [[ $B_EXTRA_DATA == 'true' ]];then - gcc_string=$( get_gcc_kernel_version ) - if [[ -n $gcc_string ]];then - gcc_string=" ${C1}gcc$SEP3${C2} $gcc_string" + compiler_string=$( get_kernel_compiler_version ) + if [[ -n $compiler_string ]];then + compiler_string=" ${C1}${compiler_string%^*}$SEP3${C2} ${compiler_string#*^}" fi fi # check for 64 bit first @@ -11755,7 +11897,7 @@ print_system_data() else bits="32" fi - bits=" ($bits bit$gcc_string)" + bits=" ($bits bit$compiler_string)" if [[ $B_SHOW_HOST == 'true' ]];then if [[ -z $HOSTNAME ]];then if [[ -n $( type p hostname ) ]];then diff --git a/inxi.1 b/inxi.1 index 359ac27..1789874 100755 --- a/inxi.1 +++ b/inxi.1 @@ -1,4 +1,4 @@ -.TH INXI 1 "2014\-04\-27" inxi "inxi manual" +.TH INXI 1 "2014\-05\-01" inxi "inxi manual" .SH NAME inxi \- Command line system information script for console and IRC .SH SYNOPSIS @@ -265,7 +265,7 @@ Examples: \fB\-W 95623\fR OR \fB\-W Boston,MA\fR OR \fB\-W45.5234,\-122.6762\fR OR \fB\-W bodo,norway\fR. .TP .B \-y = 80> -This is an absolute width override which sets the output line width max. Overrides \fBCOLS_MAX_IRC\fR / \fBCOLS_MAX_CONSOLE\fR globals, or the actual widths of the terminal. If used with \fB\-h\fR or \fB\-c 94-99\fR, put \fB\-y\fR option first or the override will be ignored. Cannot be used with \fB\-\-help\fR/\fB\-\-version\fR/\fB\-\-recommends\fR type long options. Example: \fBinxi \-y 130 -Fxx\fR +This is an absolute width override which sets the output line width max. Overrides \fBCOLS_MAX_IRC\fR / \fBCOLS_MAX_CONSOLE\fR globals, or the actual widths of the terminal. If used with \fB\-h\fR or \fB\-c 94-99\fR, put \fB\-y\fR option first or the override will be ignored. Cannot be used with \fB\-\-help\fR/\fB\-\-version\fR/\fB\-\-recommends\fR type long options. Example: \fBinxi \-y 130 \-Fxx\fR .TP .B \-z Adds security filters for IP addresses, Mac, location (\fB\-w\fR), and user home directory name. Default on for irc clients. @@ -480,7 +480,7 @@ Then you can start inxi directly, like this: .B OLD: /shell \-o inxi \fR[\fBoptions\fR] Newer (2014 and later) WeeChats work pretty much the same now as other console IRC -clients, with \fB/exec -o inxi \fR[\fBoptions\fR]. Also, newer WeeChats have dropped +clients, with \fB/exec \-o inxi \fR[\fBoptions\fR]. Also, newer WeeChats have dropped the \fB\-curses\fR part of their program name, ie: \fBweechat\fR instead of \fBweechat-curses\fR. Deprecated: diff --git a/inxi.1.gz b/inxi.1.gz index b7b6519..7341b15 100755 Binary files a/inxi.1.gz and b/inxi.1.gz differ diff --git a/inxi.changelog b/inxi.changelog index 9ba1e0e..c55328c 100755 --- a/inxi.changelog +++ b/inxi.changelog @@ -1,3 +1,71 @@ +===================================================================================== +Version: 2.1.28 +Patch Version: 00 +Script Date: 2014-05-05 +----------------------------------- +Changes: +----------------------------------- +new version, new tarball. Adding tentative desktop id for LXQt, but I don't think +that this method will be super long lived, I expect LXDE to change how it shows itself +to the system when the gtk variant goes away. Good for lxde by the way in dumping gtk. + +----------------------------------- +-- Harald Hope - Mon, 05 May 2014 12:11:27 -0700 + +===================================================================================== +Version: 2.1.27 +Patch Version: 00 +Script Date: 2014-05-02 +----------------------------------- +Changes: +----------------------------------- +New version, new tarball. Should be almost no changes for linux platforms, though I +added in an abstracted kernel_compiler method, not just gcc, that may work on freebsd, +and in the future, it may also work if distros or kernel people start using either +clang or LLVM-GCC or LLVM for compiling linux kernels. I'd need some data sets to +show that however before adding that full linux kernel support, but the framework +is now there. + +That continues the abstraction of certain features, like kernel compiler, init system, +display server. Display server still needs full data sets from mir/wayland, at least +wayland, and the bsd display servers as well, I have no idea how to get that data +at this point, but the starting framework is present anyway for that time I get +those datasets. + +Almost all these changes are for darwin osx, and that is about all I will do for that +junky broken platform, they have no tools, they have no discipline when it comes to +following unix like conventions, they even use spaces in program names, like windows. + +Given it has no native lspci or pciconf tool that I am aware of, or dmesg.boot, +there's little point in putting more time into it. dmidecode does not run on darwin, +so there's nothing to learn there either, you can get a silly 3rd party program to +generate a dmidecode.bin data file that dmidecode can then read, but since that +requires not one, but two third party programs be installed, that's not going to +happen. + +Next time an osx user calls this system 'unix' I will laugh. + +----------------------------------- +-- Harald Hope - Fri, 02 May 2014 12:44:38 -0700 + +===================================================================================== +Version: 2.1.26 +Patch Version: 00 +Script Date: 2014-05-01 +----------------------------------- +Changes: +----------------------------------- +New version, new tarball. Maintainer: this is only for bsd darwin (aka osx, it's an +experiment, just to get it running, so you can all ignore this release. + +Added in darwin cpu, init, distro version support, and updated inxi to support +darwin/osx without exiting. + +No linux changes. + +----------------------------------- +-- Harald Hope - Thu, 01 May 2014 13:32:21 -0700 + ===================================================================================== Version: 2.1.25 Patch Version: 00 -- cgit v1.2.3