mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
New version, new tarball, new man page. Unless disabled by distribution maintainers, offers
weather -w option. With -x, -xx-, -xxx, shows more information. Basic line is just weather and system time there. -x adds time zone, which is useful for servers, particurly web servers. -x also adds wind speed. -xx adds humidity and barometric pressure. -xxx adds a possible new line, if data is available, heat index, wind chill, and dew point. -xxx also adds a line for location (blocked by irc/-z) / weather observation time. -z filter applies as usual to location data, removes it in irc by default. -Z overrides override. The api this uses is probably going to be dropped at some point, so this is just going to work while it works, then it will need to be updated at some point, so don't get very attached to it. Also adds option to, with -w: -! location=<location string> This lets users send an alternate location using either <city,state> or <postal code> or <latitude,longitude> (commas for city,state and latitude,longitude are not optional, and the order must be as listed. If There is a developer flag if distro maintainers do not want this enabled, simply set: B_ALLOW_WEATHER='false' before packaging and the weather feature will be disabled.
This commit is contained in:
parent
68677c9278
commit
5465241cfe
406
inxi
406
inxi
|
@ -1,8 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
########################################################################
|
||||
#### Script Name: inxi
|
||||
#### Version: 1.8.47
|
||||
#### Date: May 3 2013
|
||||
#### Version: 1.9.00
|
||||
#### Date: May 17 2013
|
||||
#### Patch Number: 00
|
||||
########################################################################
|
||||
#### SPECIAL THANKS
|
||||
|
@ -236,6 +236,7 @@ A_PS_DATA=''
|
|||
A_RAID_DATA=''
|
||||
A_SENSORS_DATA=''
|
||||
A_UNMOUNTED_PARTITION_DATA=''
|
||||
A_WEATHER_DATA=''
|
||||
A_X_DATA=''
|
||||
|
||||
### Boolean true/false globals ## usage: 'B_<var>'
|
||||
|
@ -243,7 +244,7 @@ A_X_DATA=''
|
|||
# flag to allow distro maintainers to turn off update features. If false, turns off
|
||||
# -U and -! testing/advanced update options, as well as removing the -U help menu item
|
||||
B_ALLOW_UPDATE='true'
|
||||
B_ALLOW_WEATHER='false'
|
||||
B_ALLOW_WEATHER='true'
|
||||
## standard boolean flags ##
|
||||
B_BSD_RAID='false'
|
||||
B_COLOR_SCHEME_SET='false'
|
||||
|
@ -448,6 +449,7 @@ SEP3='' # do not set, will be set dynamically
|
|||
### Script names/paths - must be non root writable
|
||||
SCRIPT_DATA_DIR="$HOME/.inxi"
|
||||
ALTERNATE_FTP='' # for data uploads
|
||||
ALTERNATE_WEATHER_LOCATION='' # weather alternate location
|
||||
LOG_FILE="$SCRIPT_DATA_DIR/inxi.log"
|
||||
LOG_FILE_1="$SCRIPT_DATA_DIR/inxi.1.log"
|
||||
LOG_FILE_2="$SCRIPT_DATA_DIR/inxi.2.log"
|
||||
|
@ -2232,6 +2234,9 @@ get_parameters()
|
|||
V) print_version_info
|
||||
exit 0
|
||||
;;
|
||||
w) B_SHOW_WEATHER=true
|
||||
use_short='false'
|
||||
;;
|
||||
# this will trigger either with x, xx, xxx or with Fx but not with xF
|
||||
x) if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
|
||||
B_EXTRA_EXTRA_EXTRA_DATA='true'
|
||||
|
@ -2350,6 +2355,10 @@ get_parameters()
|
|||
ftp*)
|
||||
ALTERNATE_FTP="$OPTARG"
|
||||
;;
|
||||
# for weather function, allows user to set an alternate weather location
|
||||
location=*)
|
||||
ALTERNATE_WEATHER_LOCATION=$( sed 's/location=//' <<< $OPTARG )
|
||||
;;
|
||||
*) error_handler 11 "$OPTARG"
|
||||
;;
|
||||
esac
|
||||
|
@ -2466,7 +2475,8 @@ show_options()
|
|||
print_screen_output " 7 - Network IP data (-i); triggers -xxx."
|
||||
# if distro maintainers don't want the weather feature disable it
|
||||
if [[ $B_ALLOW_WEATHER == 'true' ]];then
|
||||
print_screen_output "-w Local weather data. "
|
||||
print_screen_output "-w Local weather data/time. To check an alternate location, see: -! location=<location>."
|
||||
print_screen_output " For extra data options see -x, -xx, and -xxx."
|
||||
fi
|
||||
print_screen_output "-x Adds the following extra data (only works with verbose or line output, not short form): "
|
||||
print_screen_output " -C - Bogomips on Cpu;"
|
||||
|
@ -2484,7 +2494,10 @@ show_options()
|
|||
print_screen_output " blocks; chunk size; bitmap (if present). Resync line, shows blocks synced/total blocks."
|
||||
print_screen_output " - zfs-raid: Shows raid array full size; available size; portion allocated to RAID"
|
||||
print_screen_output " -S - Desktop toolkit if avaliable (GNOME/XFCE/KDE only); Kernel gcc version"
|
||||
print_screen_output " -t - Adds memory use output to cpu (-xt c), and cpu use to memory (-xt m)."
|
||||
print_screen_output " -t - Memory use output to cpu (-xt c), and cpu use to memory (-xt m)."
|
||||
if [[ $B_ALLOW_WEATHER == 'true' ]];then
|
||||
print_screen_output " -w - Wind speed and time zone."
|
||||
fi
|
||||
print_screen_output "-xx Show extra, extra data (only works with verbose or line output, not short form): "
|
||||
print_screen_output " -A - Chip vendor:product ID for each audio device."
|
||||
print_screen_output " -D - Disk serial number."
|
||||
|
@ -2497,9 +2510,15 @@ show_options()
|
|||
print_screen_output " (kernel support,read ahead, raid events). If present, adds unused device line. "
|
||||
print_screen_output " Resync line, shows progress bar."
|
||||
print_screen_output " -S - Display manager (dm) in desktop output, if in X (like kdm, gdm3, lightdm)."
|
||||
if [[ $B_ALLOW_WEATHER == 'true' ]];then
|
||||
print_screen_output " -w - Humidity, barometric pressure."
|
||||
fi
|
||||
print_screen_output " -xx -@ <11-14> - Automatically uploads debugger data tar.gz file to ftp.techpatterns.com."
|
||||
print_screen_output "-xxx Show extra, extra, extra data (only works with verbose or line output, not short form): "
|
||||
print_screen_output " -S - Panel/shell information in desktop output, if in X (like gnome-shell, cinnamon, mate-panel)."
|
||||
if [[ $B_ALLOW_WEATHER == 'true' ]];then
|
||||
print_screen_output " -w - Location (uses -z/irc filter), weather observation time, wind chill, heat index," print_screen_output " dew point (shows extra lines for data where relevant)."
|
||||
fi
|
||||
print_screen_output "-z Security filters for IP/Mac addresses, and user home directory name. Default on for irc clients."
|
||||
print_screen_output "-Z Absolute override for output filters. Useful for debugging networking issues in irc for example."
|
||||
print_screen_output " "
|
||||
|
@ -2532,6 +2551,11 @@ show_options()
|
|||
print_screen_output "Advanced Options:"
|
||||
print_screen_output "-! 31 Turns off hostname in output. Useful if showing output from servers etc."
|
||||
print_screen_output "-! 32 Turns on hostname in output. Overrides global B_SHOW_HOST='false'"
|
||||
if [[ $B_ALLOW_WEATHER == 'true' ]];then
|
||||
print_screen_output "-! location=<location> - <location> Supported types: zip (postal) code; city,state; latitude,longtitude"
|
||||
print_screen_output " Only use if you want the weather somewhere other than the machine running $SCRIPT_NAME."
|
||||
print_screen_output " Must be used with -w"
|
||||
fi
|
||||
if [[ $1 == 'full' ]];then
|
||||
print_screen_output " "
|
||||
print_screen_output "Developer and Testing Options (Advanced):"
|
||||
|
@ -5800,7 +5824,7 @@ get_networking_wan_ip_data()
|
|||
# awk has bad regex handling so checking it with grep -E instead
|
||||
# ip=$( echo 2001:0db8:85a3:0000:0000:8a2e:0370:7334 | gawk --re-interval '
|
||||
# ip=$( wget -q -O - $WAN_IP_URL | gawk --re-interval '
|
||||
ip=$( wget -q -O - $WAN_IP_URL | gawk --re-interval '
|
||||
ip=$( wget -t 1 -T 4 -q -O - $WAN_IP_URL | gawk --re-interval '
|
||||
{
|
||||
#gsub("\n","",$2")
|
||||
print $NF
|
||||
|
@ -7937,6 +7961,249 @@ get_uptime()
|
|||
eval $LOGFE
|
||||
}
|
||||
|
||||
get_weather_data()
|
||||
{
|
||||
eval $LOGFS
|
||||
|
||||
local location_site='http://geoip.ubuntu.com/lookup'
|
||||
local weather_feed='http://api.wunderground.com/auto/wui/geo/WXCurrentObXML/index.xml?query='
|
||||
local weather_spider='http://wunderground.com/'
|
||||
local data_grab_error='' wget_error=0 b_testing=false b_debug=false
|
||||
local location_data='' location='' weather_data='' location_array_value='' a_location=''
|
||||
local weather_array_value='' site_elevation=''
|
||||
local testDir="$HOME/bin/scripts/inxi/data/weather/"
|
||||
|
||||
# first we get the location data, once that is parsed and handled, we move to getting the
|
||||
# actual weather data, assuming no errors
|
||||
if [[ -n $ALTERNATE_WEATHER_LOCATION ]];then
|
||||
location=$ALTERNATE_WEATHER_LOCATION
|
||||
else
|
||||
if [[ $b_testing != 'true' ]];then
|
||||
# make sure location site is up
|
||||
wget -q -t 1 -T 5 --spider $location_site || wget_error=$?
|
||||
# grab the location xml file
|
||||
if [[ $wget_error -eq 0 ]];then
|
||||
location_data=$( wget -q -t 1 -T 5 -O- $location_site || wget_error=$? )
|
||||
else
|
||||
data_grab_error="Error: unable to connect to location server - wget: $wget_error"
|
||||
fi
|
||||
if [[ $wget_error -ne 0 ]];then
|
||||
data_grab_error="Error: location server up but download error - wget: $wget_error"
|
||||
fi
|
||||
else
|
||||
if [[ -f $testDir/my-location.xml ]];then
|
||||
location_data="$( cat $testDir/my-location.xml)"
|
||||
else
|
||||
data_grab_error="Error: location xml local file not found."
|
||||
fi
|
||||
fi
|
||||
if [[ -z $( grep -i '<?xml' <<< $location_data ) ]];then
|
||||
data_grab_error="Error: location downloaded but data contains no <?xml statement."
|
||||
else
|
||||
# clean up xml and make easy to process with newlines, note, bsd sed has no support for inserting
|
||||
# \n dircctly so we have to use this hack
|
||||
# location_data="$( sed $SED_RX 's|><|>\n<|g' <<< $location_data )"
|
||||
location_data="$( sed $SED_RX 's|><|>\
|
||||
<|g' <<< $location_data )"
|
||||
location_array_value=$( gawk '
|
||||
function clean(data) {
|
||||
returnData=""
|
||||
# some lines might be empty, so ignore those
|
||||
if (data !~ /^<[^>]+>$/ ) {
|
||||
returnData=gensub(/(.*>)([^<]*)(<.*)/, "\\2", 1, data)
|
||||
}
|
||||
return returnData
|
||||
}
|
||||
BEGIN {
|
||||
IGNORECASE=1
|
||||
locationString=""
|
||||
countryCode=""
|
||||
countryCode3=""
|
||||
countryName=""
|
||||
regionCode=""
|
||||
regionName=""
|
||||
city=""
|
||||
postalCode=""
|
||||
latitude=""
|
||||
longitude=""
|
||||
timeZone=""
|
||||
areaCode=""
|
||||
}
|
||||
/CountryCode/ {
|
||||
if ( $0 ~ /CountryCode3/ ){
|
||||
countryCode3=clean($0)
|
||||
}
|
||||
else {
|
||||
countryCode=clean($0)
|
||||
}
|
||||
}
|
||||
/CountryName/ {
|
||||
countryName = clean($0)
|
||||
}
|
||||
/RegionCode/ {
|
||||
regionCode = clean($0)
|
||||
}
|
||||
/RegionName/ {
|
||||
regionName = clean($0)
|
||||
}
|
||||
/City/ {
|
||||
city = clean($0)
|
||||
}
|
||||
/ZipPostalCode/ {
|
||||
postalCode = clean($0)
|
||||
}
|
||||
/Latitude/ {
|
||||
latitude = clean($0)
|
||||
}
|
||||
/Longitude/ {
|
||||
longitude = clean($0)
|
||||
}
|
||||
/TimeZone/ {
|
||||
timeZone = clean($0)
|
||||
}
|
||||
END {
|
||||
locationString = city ";" regionCode ";" regionName ";" countryName ";" countryCode ";" countryCode3
|
||||
locationString = locationString ";" latitude "," longitude ";" postalCode ";" timeZone
|
||||
print locationString
|
||||
}' <<< "$location_data" )
|
||||
fi
|
||||
A_WEATHER_DATA[0]=$location_array_value
|
||||
IFS=";"
|
||||
a_location=( ${A_WEATHER_DATA[0]} )
|
||||
IFS="$ORIGINAL_IFS"
|
||||
|
||||
# assign location, cascade from most accurate
|
||||
# latitude,longitude first
|
||||
if [[ -n ${a_location[6]} ]];then
|
||||
location="${a_location[6]}"
|
||||
# city,state next
|
||||
elif [[ -n ${a_location[0]} && -n ${a_location[1]} ]];then
|
||||
location="${a_location[0]},${a_location[1]}"
|
||||
# postal code last, that can be a very large region
|
||||
elif [[ -n ${a_location[7]} ]];then
|
||||
location=${a_location[7]}
|
||||
fi
|
||||
fi
|
||||
if [[ $b_debug == 'true' ]];then
|
||||
echo "${A_WEATHER_DATA[0]}"
|
||||
echo "location: $location"
|
||||
fi
|
||||
|
||||
if [[ -z $location ]];then
|
||||
data_grab_error="Error: location data downloaded but no location detected."
|
||||
fi
|
||||
|
||||
# now either dump process or go on to get weather data
|
||||
if [[ -n $data_grab_error ]];then
|
||||
A_WEATHER_DATA=$data_grab_error
|
||||
else
|
||||
if [[ $b_testing != 'true' ]];then
|
||||
wget -q -t 1 -T 5 --spider $weather_spider || wget_error=$?
|
||||
# grab the weather feed xml file
|
||||
if [[ $wget_error -eq 0 ]];then
|
||||
weather_data="$( wget -q -t 1 -T 5 -O- $weather_feed$location || wget_error=$? )"
|
||||
else
|
||||
data_grab_error="Error: unable to connect to weather server - wget: $wget_error"
|
||||
fi
|
||||
if [[ $wget_error -ne 0 ]];then
|
||||
data_grab_error="Error: weather server up but download error - wget: $wget_error"
|
||||
fi
|
||||
else
|
||||
if [[ -f $testDir/weather-feed.xml ]];then
|
||||
weather_data="$( cat $testDir/weather-feed.xml)"
|
||||
else
|
||||
data_grab_error="Error: weather feed xml local file not found."
|
||||
fi
|
||||
fi
|
||||
if [[ -z $( grep -i '<current_observation' <<< $weather_data ) ]];then
|
||||
data_grab_error="Error: weather data downloaded but shows no xml start."
|
||||
fi
|
||||
if [[ -z $data_grab_error ]];then
|
||||
# trim off zeros
|
||||
weather_data=$( sed 's/^[[:space:]]*//' <<< "$weather_data" )
|
||||
site_elevation=$( grep -im 1 '<elevation>' <<< "$weather_data" | sed $SED_RX -e 's/<[^>]*>//g' \
|
||||
-e 's/\.[0-9]*//' )
|
||||
|
||||
# clean off everything before/after observation_location
|
||||
weather_data=$( sed -e '/<current_observation>/,/<observation_location>/d' \
|
||||
-e '/<icons>/,/<\/current_observation>/d' <<< "$weather_data" -e 's/^[[:space:]]*$//g' -e '/^$/d' )
|
||||
|
||||
# echo "$weather_data";exit
|
||||
weather_array_value=$( gawk -v siteElevation="$site_elevation" '
|
||||
function clean(data) {
|
||||
returnData=""
|
||||
# some lines might be empty, so ignore those
|
||||
if (data !~ /^<[^>]+>$/ ) {
|
||||
returnData=gensub(/(.*>)([^<]*)(<.*)/, "\\2", 1, data)
|
||||
gsub(/^[[:space:]]+|[[:space:]]+$|NA|N\/A/, "", returnData)
|
||||
}
|
||||
return returnData
|
||||
}
|
||||
BEGIN {
|
||||
IGNORECASE=1
|
||||
observationTime=""
|
||||
localTime=""
|
||||
weather=""
|
||||
tempString=""
|
||||
humidity=""
|
||||
windString=""
|
||||
pressureString=""
|
||||
dewpointString=""
|
||||
heatIndexString=""
|
||||
windChillString=""
|
||||
weatherString=""
|
||||
}
|
||||
/observation_time>/ {
|
||||
observationTime=clean($0)
|
||||
sub(/Last Updated on /, "", observationTime )
|
||||
}
|
||||
/local_time>/ {
|
||||
localTime=clean($0)
|
||||
}
|
||||
/<weather/ {
|
||||
weather=clean($0)
|
||||
}
|
||||
/temperature_string/ {
|
||||
tempString=clean($0)
|
||||
}
|
||||
/relative_humidity/ {
|
||||
humidity=clean($0)
|
||||
}
|
||||
/wind_string/ {
|
||||
windString=clean($0)
|
||||
}
|
||||
/pressure_string/ {
|
||||
pressureString=clean($0)
|
||||
}
|
||||
/heat_index_string/ {
|
||||
heatIndexString=clean($0)
|
||||
}
|
||||
/windchill_string/ {
|
||||
windChillString=clean($0)
|
||||
}
|
||||
END {
|
||||
weatherString = observationTime ";" localTime ";" weather ";" tempString ";" humidity
|
||||
weatherString = weatherString ";" windString ";" pressureString ";" dewpointString ";" heatIndexString
|
||||
weatherString = weatherString ";" windChillString ";" siteElevation
|
||||
print weatherString
|
||||
}' <<< "$weather_data" )
|
||||
fi
|
||||
if [[ -z $weather_array_value ]];then
|
||||
A_WEATHER_DATA="Error: weather info downloaded but no data detected."
|
||||
else
|
||||
A_WEATHER_DATA[1]=$weather_array_value
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ $b_debug == 'true' ]];then
|
||||
echo "site_elevation: $site_elevation"
|
||||
echo "${A_WEATHER_DATA[1]}"
|
||||
fi
|
||||
|
||||
eval $LOGFE
|
||||
}
|
||||
# get_weather_data;exit
|
||||
|
||||
#### -------------------------------------------------------------------
|
||||
#### special data handling for specific options and conditions
|
||||
#### -------------------------------------------------------------------
|
||||
|
@ -8074,6 +8341,9 @@ 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
|
||||
|
@ -10371,6 +10641,130 @@ print_unmounted_partition_data()
|
|||
eval $LOGFE
|
||||
}
|
||||
|
||||
print_weather_data()
|
||||
{
|
||||
eval $LOGFS
|
||||
|
||||
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=''
|
||||
local openP='(' closeP=')'
|
||||
|
||||
if [[ $B_RUNNING_IN_SHELL == 'false' ]];then
|
||||
openP=''
|
||||
closeP=''
|
||||
fi
|
||||
|
||||
get_weather_data
|
||||
|
||||
# city ";" regionCode ";" regionName ";" countryName ";" countryCode ";" countryCode3
|
||||
# ";" latitude "," longitude ";" postalCode ";" timeZone
|
||||
|
||||
# observationTime ";" localTime ";" weather ";" tempString ";" humidity
|
||||
# ";" windString ";" pressureString ";" dewpointString ";" heatIndexString
|
||||
# ";" windChillString ";" siteElevation
|
||||
|
||||
if [[ ${#A_WEATHER_DATA[@]} -eq 2 ]];then
|
||||
IFS=";"
|
||||
a_location=(${A_WEATHER_DATA[0]})
|
||||
a_weather=(${A_WEATHER_DATA[1]})
|
||||
IFS="$ORIGINAL_IFS"
|
||||
|
||||
if [[ -n ${a_weather[3]} ]];then
|
||||
temp=${a_weather[3]}
|
||||
else
|
||||
temp='N/A'
|
||||
fi
|
||||
if [[ -n ${a_weather[2]} ]];then
|
||||
weather=" - ${a_weather[2]}"
|
||||
else
|
||||
weather=''
|
||||
fi
|
||||
if [[ $B_EXTRA_DATA == 'true' ]];then
|
||||
if [[ -n ${a_weather[5]} ]];then
|
||||
winds=" ${C1}wind$SEP3${C2} ${a_weather[5]}"
|
||||
fi
|
||||
fi
|
||||
if [[ $B_EXTRA_EXTRA_DATA == 'true' ]];then
|
||||
if [[ -n ${a_weather[4]} ]];then
|
||||
humidity=" ${C1}humidity$SEP3${C2} ${a_weather[4]}"
|
||||
fi
|
||||
if [[ -n ${a_weather[6]} ]];then
|
||||
pressure="${C1}pressure$SEP3${C2} ${a_weather[6]} "
|
||||
fi
|
||||
fi
|
||||
weather_string="${C1}weather$SEP3${C2} $temp$weather$winds$humidity"
|
||||
|
||||
if [[ -n ${a_weather[1]} ]];then
|
||||
local_time=" ${a_weather[1]}"
|
||||
else
|
||||
local_time=" $(date)"
|
||||
fi
|
||||
if [[ $B_EXTRA_DATA == 'true' && -n ${a_location[8]} ]];then
|
||||
time_zone=" (${a_location[8]})"
|
||||
fi
|
||||
time_string="$pressure${C1}time$SEP3${C2}$local_time$time_zone"
|
||||
|
||||
if [[ $B_EXTRA_DATA != 'true' ]];then
|
||||
weather_data="$weather_string $time_string"
|
||||
weather_data=$( create_print_line "Weather:" "$weather_data" )
|
||||
print_screen_output "$weather_data"
|
||||
else
|
||||
weather_data="$weather_string"
|
||||
weather_data=$( create_print_line "Weather:" "$weather_data" )
|
||||
print_screen_output "$weather_data"
|
||||
if [[ $B_EXTRA_EXTRA_EXTRA_DATA == 'true' ]];then
|
||||
if [[ -n ${a_weather[8]} ]];then
|
||||
heat_index="${C1}heat index$SEP3${C2} ${a_weather[8]} "
|
||||
fi
|
||||
if [[ -n ${a_weather[9]} ]];then
|
||||
wind_chill="${C1}wind chill$SEP3${C2} ${a_weather[9]} "
|
||||
fi
|
||||
if [[ -n ${a_weather[7]} ]];then
|
||||
dew_point="${C1}dew point$SEP3${C2} ${a_weather[7]} "
|
||||
fi
|
||||
# these were blank in my tests
|
||||
if [[ -n "$heat_index$wind_chill$dew_point" ]];then
|
||||
weather_data=$( create_print_line " " "$heat_index$wind_chill$dew_point" )
|
||||
print_screen_output "$weather_data"
|
||||
fi
|
||||
fi
|
||||
weather_data="$time_string"
|
||||
weather_data=$( create_print_line " " "$weather_data" )
|
||||
print_screen_output "$weather_data"
|
||||
if [[ $B_EXTRA_EXTRA_EXTRA_DATA == 'true' ]];then
|
||||
if [[ -n ${a_weather[0]} ]];then
|
||||
observation_time="${C1}observation time$SEP3${C2} ${a_weather[0]} "
|
||||
fi
|
||||
if [[ $B_OUTPUT_FILTER != 'true' ]];then
|
||||
if [[ -n ${a_location[0]} ]];then
|
||||
city=" ${a_location[0]}"
|
||||
fi
|
||||
if [[ -n ${a_location[1]} ]];then
|
||||
state=" ${a_location[1]}"
|
||||
fi
|
||||
if [[ -n ${a_location[5]} ]];then
|
||||
country=" $openP${a_location[5]}$closeP"
|
||||
fi
|
||||
if [[ -n ${a_weather[10]} ]];then
|
||||
altitude=" ${C1}altitude$SEP3${C2} ${a_weather[10]}"
|
||||
fi
|
||||
location_string="${C1}location$SEP3${C2}$city$state$country$altitude "
|
||||
fi
|
||||
weather_data=$( create_print_line " " "$location_string$observation_time" )
|
||||
print_screen_output "$weather_data"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
weather_data=$( create_print_line "Weather:" "Weather data failure: $(date)" )
|
||||
print_screen_output "$weather_data"
|
||||
weather_data=$( create_print_line " " "${A_WEATHER_DATA}" )
|
||||
print_screen_output "$weather_data"
|
||||
fi
|
||||
eval $LOGFE
|
||||
}
|
||||
|
||||
########################################################################
|
||||
#### SCRIPT EXECUTION
|
||||
########################################################################
|
||||
|
|
445
inxi.1
445
inxi.1
|
@ -1,15 +1,15 @@
|
|||
.TH INXI 1 "2013-02-27" inxi "inxi manual"
|
||||
.TH INXI 1 "2013\-05\-17" inxi "inxi manual"
|
||||
.SH NAME
|
||||
inxi - Command line system information script for console and IRC
|
||||
inxi \- Command line system information script for console and IRC
|
||||
|
||||
.SH SYNOPSIS
|
||||
.B inxi \fR - Single line, short form. Very basic output.
|
||||
.B inxi \fR \- Single line, short form. Very basic output.
|
||||
|
||||
.B inxi \fR[\fB-AbCdDfFGhHiIlMnNopPrRsSu\fR] \fR[\fB-c NUMBER\fR] \fR[\fB-v NUMBER\fR]
|
||||
.B inxi \fR[\fB\-AbCdDfFGhHiIlMnNopPrRsSu\fR] \fR[\fB\-c NUMBER\fR] \fR[\fB\-v NUMBER\fR]
|
||||
|
||||
.B inxi \fR[\fB-t \fR(\fBc\fR or\fB m\fR or\fB cm\fR or\fB mc NUMBER\fR)] \fR[\fB-x -OPTION\fR(\fBs\fR)] \fR[\fB-xx -OPTION\fR(\fBs\fR)] \fR[\fB-xxx -OPTION\fR(\fBs\fR)]
|
||||
.B inxi \fR[\fB\-t \fR(\fBc\fR or\fB m\fR or\fB cm\fR or\fB mc NUMBER\fR)] \fR[\fB\-x \-OPTION\fR(\fBs\fR)] \fR[\fB\-xx \-OPTION\fR(\fBs\fR)] \fR[\fB\-xxx \-OPTION\fR(\fBs\fR)]
|
||||
|
||||
.B inxi \fR[\fB--help\fR] \fR[\fB--recommends\fR] \fR[\fB--version\fR] \fR[\fB-@ NUMBER\fR]
|
||||
.B inxi \fR[\fB\-\-help\fR] \fR[\fB\-\-recommends\fR] \fR[\fB\-\-version\fR] \fR[\fB\-@ NUMBER\fR]
|
||||
|
||||
.SH DESCRIPTION
|
||||
.B inxi\fR is a command line system information script built for for console and IRC. It is also used for forum technical support, as a debugging tool, to quickly ascertain user system configuration and hardware. inxi shows system
|
||||
|
@ -17,7 +17,7 @@ hardware, CPU, drivers, Xorg, Desktop, Kernel, GCC version(s), Processes, RAM us
|
|||
useful information.
|
||||
|
||||
.B inxi\fR output varies between CLI and IRC, with some default filters and color options applied to IRC use. Script colors can
|
||||
be turned off if desired with \fB-c 0\fR, or changed using the \fB-c\fR color options listed in the OPTIONS section below.
|
||||
be turned off if desired with \fB\-c 0\fR, or changed using the \fB\-c\fR color options listed in the OPTIONS section below.
|
||||
|
||||
.SH PRIVACY AND SECURITY
|
||||
|
||||
|
@ -25,8 +25,8 @@ In order to maintain basic privacy and security, inxi filters out automatically
|
|||
your network card mac address, WAN and LAN IP, your /home username directory in partitions,
|
||||
and a few other things.
|
||||
|
||||
Because inxi is often used on forums for support, you can also trigger this filtering with the \fB-z\fR
|
||||
option (\fB-Fz\fR, for example). To override the IRC filter, you can use the \fB-Z\fR option. This can be useful
|
||||
Because inxi is often used on forums for support, you can also trigger this filtering with the \fB\-z\fR
|
||||
option (\fB\-Fz\fR, for example). To override the IRC filter, you can use the \fB\-Z\fR option. This can be useful
|
||||
to debug network connection issues online in a private chat, for example.
|
||||
|
||||
.SH USING OPTIONS
|
||||
|
@ -37,24 +37,24 @@ together or separate them.
|
|||
Letters with numbers can have no gap or a gap at your discretion unless using \fB \-t\fR.
|
||||
|
||||
For example:
|
||||
.B inxi -AG\fR or \fBinxi -A -G\fR or \fBinxi -c10
|
||||
.B inxi \-AG\fR or \fBinxi \-A \-G\fR or \fBinxi \-c10
|
||||
|
||||
.SH STANDARD OPTIONS
|
||||
|
||||
.TP
|
||||
.B -A
|
||||
.B \-A
|
||||
Show Audio/sound card information.
|
||||
.TP
|
||||
.B -b
|
||||
Shows basic output, short form (previously \fB-d\fR). Same as: \fBinxi \-v 2
|
||||
.B \-b
|
||||
Shows basic output, short form (previously \fB\-d\fR). Same as: \fBinxi \-v 2
|
||||
.TP
|
||||
.B -c \fR[\fB0\fR-\fB32\fR]
|
||||
.B \-c \fR[\fB0\fR\-\fB32\fR]
|
||||
Available color schemes. Scheme number is required.
|
||||
|
||||
Supported color schemes: \fB0-32
|
||||
Supported color schemes: \fB0\-32
|
||||
|
||||
.TP
|
||||
.B -c \fR[\fB94\fR-\fB99\fR]
|
||||
.B \-c \fR[\fB94\fR\-\fB99\fR]
|
||||
Color selectors run a color selector option prior to inxi starting which lets
|
||||
you set the config file value for the selection.
|
||||
|
||||
|
@ -62,100 +62,100 @@ Color selectors for each type display.
|
|||
|
||||
(NOTE: irc and global only show safe color set):
|
||||
.TP
|
||||
.B -c 94\fR
|
||||
- Console, out of X.
|
||||
.B \-c 94\fR
|
||||
\- Console, out of X.
|
||||
.TP
|
||||
.B -c 95\fR
|
||||
- Terminal, running in X - like xTerm.
|
||||
.B \-c 95\fR
|
||||
\- Terminal, running in X \- like xTerm.
|
||||
.TP
|
||||
.B -c 96\fR
|
||||
- Gui IRC, running in X - like Xchat, Quassel,
|
||||
.B \-c 96\fR
|
||||
\- Gui IRC, running in X \- like Xchat, Quassel,
|
||||
Konversation etc.
|
||||
.TP
|
||||
.B -c 97\fR
|
||||
- Console IRC running in X - like irssi in xTerm.
|
||||
.B \-c 97\fR
|
||||
\- Console IRC running in X \- like irssi in xTerm.
|
||||
.TP
|
||||
.B -c 98\fR
|
||||
- Console IRC not in X.
|
||||
.B \-c 98\fR
|
||||
\- Console IRC not in X.
|
||||
.TP
|
||||
.B -c 99\fR
|
||||
- Global - Overrides/removes all settings.
|
||||
.B \-c 99\fR
|
||||
\- Global \- Overrides/removes all settings.
|
||||
|
||||
Setting specific color type removes the global color selection.
|
||||
|
||||
.TP
|
||||
.B -C
|
||||
.B \-C
|
||||
Show full CPU output, including per CPU clockspeed if available.
|
||||
.TP
|
||||
.B -d
|
||||
Shows optical drive data. Same as \fB-Dd\fR. With \fB-x\fR, adds features line to output.
|
||||
\fB-xx\fR adds a few more features.
|
||||
.B \-d
|
||||
Shows optical drive data. Same as \fB\-Dd\fR. With \fB\-x\fR, adds features line to output.
|
||||
\fB\-xx\fR adds a few more features.
|
||||
.TP
|
||||
.B -D
|
||||
.B \-D
|
||||
Show full hard Disk info, not only model, ie: \fI/dev/sda ST380817AS 80.0GB.
|
||||
.TP
|
||||
.B -f
|
||||
Show all cpu flags used, not just the short list. Not shown with \fB-F\fR to avoid
|
||||
.B \-f
|
||||
Show all cpu flags used, not just the short list. Not shown with \fB\-F\fR to avoid
|
||||
spamming.
|
||||
.TP
|
||||
.B -F
|
||||
Show Full output for inxi. Includes all Upper Case line letters, plus \fB-s\fR and \fB-n\fR.
|
||||
Does not show extra verbose options like \fB-x \-d \-f \-u \-l \-o \-p \-t \-r\fR unless you use
|
||||
.B \-F
|
||||
Show Full output for inxi. Includes all Upper Case line letters, plus \fB\-s\fR and \fB\-n\fR.
|
||||
Does not show extra verbose options like \fB\-x \-d \-f \-u \-l \-o \-p \-t \-r\fR unless you use
|
||||
that argument.
|
||||
.TP
|
||||
.B -G
|
||||
.B \-G
|
||||
Show Graphic card information (card, x type, resolution, glx renderer, version).
|
||||
.TP
|
||||
.B -h
|
||||
.B \-h
|
||||
This help menu.
|
||||
.TP
|
||||
.B --help
|
||||
Same as \fB-h\fR
|
||||
.B \-\-help
|
||||
Same as \fB\-h\fR
|
||||
.TP
|
||||
.B -H
|
||||
.B \-H
|
||||
This help menu, plus developer options. Do not use dev options in normal
|
||||
operation!
|
||||
.TP
|
||||
.B -i
|
||||
.B \-i
|
||||
Show Wan IP address, and shows local interfaces (requires ifconfig network tool).
|
||||
Same as \-Nni. Not shown with \fB-F\fR for user security reasons, you shouldn't
|
||||
Same as \-Nni. Not shown with \fB\-F\fR for user security reasons, you shouldn't
|
||||
paste your local/wan IP.
|
||||
.TP
|
||||
.B -I
|
||||
.B \-I
|
||||
Show Information: processes, uptime, memory, irc client (or shell type if run in shell, not irc), inxi version.
|
||||
.TP
|
||||
.B -l
|
||||
Show partition labels. Default: short partition \fB-P\fR. For full \fB-p\fR output, use: \fB-pl\fR (or \fB-plu\fR).
|
||||
.B \-l
|
||||
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
|
||||
.B \-M
|
||||
Show 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. If using dmidecode,
|
||||
may also show bios revision as well as version.
|
||||
.TP
|
||||
.B -n
|
||||
Show Advanced Network card information. Same as \fB-Nn\fR. Shows interface, speed,
|
||||
.B \-n
|
||||
Show Advanced Network card information. Same as \fB\-Nn\fR. Shows interface, speed,
|
||||
mac id, state, etc.
|
||||
.TP
|
||||
.B -N
|
||||
Show Network card information. With \fB-x\fR, shows PCI BusID, Port number.
|
||||
.B \-N
|
||||
Show Network card information. With \fB\-x\fR, shows PCI BusID, Port number.
|
||||
.TP
|
||||
.B -o
|
||||
.B \-o
|
||||
Show unmounted partition 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):
|
||||
|
||||
.B <username> ALL = NOPASSWD: /usr/bin/file (sample)
|
||||
|
||||
Does not show components (partitions that create the md raid array) of md-raid arrays.
|
||||
Does not show components (partitions that create the md raid array) of md\-raid arrays.
|
||||
.TP
|
||||
.B -p
|
||||
Show full partition information (\fB-P\fR plus all other detected partitions).
|
||||
.B \-p
|
||||
Show full partition information (\fB\-P\fR plus all other detected partitions).
|
||||
.TP
|
||||
.B -P
|
||||
Show Partition information (shows what \fB-v 4\fR would show, but without extra data).
|
||||
Shows, if detected: / /boot /home /tmp /usr /var. Use \fB-p\fR to see all mounted partitions.
|
||||
.B \-P
|
||||
Show Partition information (shows what \fB\-v 4\fR would show, but without extra data).
|
||||
Shows, if detected: / /boot /home /tmp /usr /var. Use \fB\-p\fR to see all mounted partitions.
|
||||
.TP
|
||||
.B -r
|
||||
.B \-r
|
||||
Show distro repository data. Currently supported repo types:
|
||||
APT (Debian, Ubuntu + derived versions)
|
||||
|
||||
|
@ -168,246 +168,265 @@ YUM. (Fedora, Redhat, maybe Suse + derived versions)
|
|||
(as distro data is collected more will be added. If your's is missing please show us how to get this
|
||||
information and we'll try to add it.)
|
||||
.TP
|
||||
.B -R
|
||||
Show RAID data. Shows RAID devices, states, levels, and components, and extra data with \fB-x\fR / \fB-xx\fR.
|
||||
md-raid: If device is resyncing, shows resync progress line as well.
|
||||
.B \-R
|
||||
Show RAID data. Shows RAID devices, states, levels, and components, and extra data with \fB\-x\fR / \fB\-xx\fR.
|
||||
md\-raid: If device is resyncing, shows resync progress line as well.
|
||||
.TP
|
||||
.B --recommends
|
||||
.B \-\-recommends
|
||||
Checks inxi application dependencies + recommends, and directories, then shows
|
||||
what package(s) you need to install to add support for that feature.
|
||||
.TP
|
||||
.B -s
|
||||
.B \-s
|
||||
Show sensors output (if sensors installed/configured): mobo/cpu/gpu temp; detected
|
||||
fan speeds. Gpu temp only for Fglrx/Nvidia drivers. Nvidia shows screen number for > 1 screens.
|
||||
.TP
|
||||
.B -S
|
||||
Show System information: host name, kernel, desktop environment (if in X), distro. With \fB-xx\fR show
|
||||
dm - or startx - (only shows if present and running if out of X), and if in X, with \fB-xxx\fR show more desktop info, like shell/panel etc.
|
||||
.B \-S
|
||||
Show System information: host name, kernel, desktop environment (if in X), distro. With \fB\-xx\fR show
|
||||
dm \- or startx \- (only shows if present and running if out of X), and if in X, with \fB\-xxx\fR show more desktop info, like shell/panel etc.
|
||||
.TP
|
||||
.B -t \fR[\fBc\fR or\fB m\fR or\fB cm\fR or\fB mc NUMBER\fR]\fR
|
||||
Show processes. If followed by numbers \fB1-20\fR, shows that number of processes for each type
|
||||
.B \-t \fR[\fBc\fR or\fB m\fR or\fB cm\fR or\fB mc NUMBER\fR]\fR
|
||||
Show processes. If followed by numbers \fB1\-20\fR, shows that number of processes for each type
|
||||
(default: \fB5\fR; if in irc, max: \fB5\fR)
|
||||
|
||||
Make sure to have no space between letters and numbers (\fB-t cm10\fR - right, \fB-t cm 10\fR - wrong).
|
||||
Make sure to have no space between letters and numbers (\fB\-t cm10\fR \- right, \fB\-t cm 10\fR \- wrong).
|
||||
.TP
|
||||
.B -t c\fR
|
||||
- cpu only. With \fB-x\fR, shows also memory for that process on same line.
|
||||
.B \-t c\fR
|
||||
\- cpu only. With \fB\-x\fR, shows also memory for that process on same line.
|
||||
.TP
|
||||
.B -t m\fR
|
||||
- memory only. With \fB-x\fR, shows also cpu for that process on same line.
|
||||
.B \-t m\fR
|
||||
\- memory only. With \fB\-x\fR, shows also cpu for that process on same line.
|
||||
.TP
|
||||
.B -t cm\fR
|
||||
- cpu+memory. With \fB-x\fR, shows also cpu or memory for that process on same line.
|
||||
.B \-t cm\fR
|
||||
\- cpu+memory. With \fB\-x\fR, shows also cpu or memory for that process on same line.
|
||||
|
||||
.TP
|
||||
.B -u
|
||||
Show partition UUIDs. Default: short partition \fB-P\fR. For full \fB-p\fR output, use: \fB-pu\fR (or \fB-plu\fR).
|
||||
.B \-u
|
||||
Show partition UUIDs. Default: short partition \fB\-P\fR. For full \fB\-p\fR output, use: \fB\-pu\fR (or \fB\-plu\fR).
|
||||
.TP
|
||||
.B -U
|
||||
Note -- Maintainer may have disabled this function.
|
||||
.B \-U
|
||||
Note \- Maintainer may have disabled this function.
|
||||
If inxi \-h has no listing for U then its disabled.
|
||||
Auto-update script. Note: if you installed as root, you must be root to update,
|
||||
otherwise user is fine. Also installs /updates this Man Page to: \fB-/usr/share/man/man8\fR
|
||||
Auto\-update script. Note: if you installed as root, you must be root to update,
|
||||
otherwise user is fine. Also installs /updates this Man Page to: \fB/usr/share/man/man8\fR
|
||||
This requires that you be root to write to that directory.
|
||||
.TP
|
||||
.B -V
|
||||
.B \-V
|
||||
inxi version information. Prints information then exits.
|
||||
.TP
|
||||
.B --version
|
||||
same as \fB-V
|
||||
.B \-\-version
|
||||
same as \fB\-V
|
||||
.TP
|
||||
.B -v
|
||||
Script verbosity levels. Verbosity level number is required. Should not be used with \fB-b\fR or \fB-F\fR.
|
||||
.B \-v
|
||||
Script verbosity levels. Verbosity level number is required. Should not be used with \fB\-b\fR or \fB\-F\fR.
|
||||
|
||||
Supported levels: \fB0-7\fR Examples :\fB inxi \-v 4 \fR or \fB inxi \-v4\fR
|
||||
Supported levels: \fB0\-7\fR Examples :\fB inxi \-v 4 \fR or \fB inxi \-v4\fR
|
||||
.TP
|
||||
.B -v 0
|
||||
- Short output, same as: \fBinxi\fR
|
||||
.B \-v 0
|
||||
\- Short output, same as: \fBinxi\fR
|
||||
.TP
|
||||
.B -v 1
|
||||
- Basic verbose, \fB-S\fR + basic CPU + \fB-G\fR + basic Disk + \fB-I\fR.
|
||||
.B \-v 1
|
||||
\- Basic verbose, \fB\-S\fR + basic CPU + \fB\-G\fR + basic Disk + \fB\-I\fR.
|
||||
.TP
|
||||
.B -v 2
|
||||
- Adds networking card (\fB-N\fR), Machine (\fB-M\fR) data, and shows basic hard disk data
|
||||
.B \-v 2
|
||||
\- Adds networking card (\fB\-N\fR), Machine (\fB\-M\fR) data, and shows basic hard disk data
|
||||
(names only). Same as: \fBinxi \-b
|
||||
.TP
|
||||
.B -v 3
|
||||
- Adds advanced CPU (\fB-C\fR); network (\fB-n\fR) data; triggers \fB-x\fR advanced data option.
|
||||
.B \-v 3
|
||||
\- Adds advanced CPU (\fB\-C\fR); network (\fB\-n\fR) data; triggers \fB\-x\fR advanced data option.
|
||||
.TP
|
||||
.B -v 4
|
||||
- Adds partition size/filled data (\fB-P\fR) for (if present):/, /home, /var/, /boot
|
||||
Shows full disk data (\fB-D\fR)
|
||||
.B \-v 4
|
||||
\- Adds partition size/filled data (\fB\-P\fR) for (if present):/, /home, /var/, /boot
|
||||
Shows full disk data (\fB\-D\fR)
|
||||
.TP
|
||||
.B -v 5
|
||||
- Adds audio card (\fB-A\fR); sensors (\fB-s\fR), partition label (\fB-l\fR) and UUID (\fB-u\fR), short form of
|
||||
.B \-v 5
|
||||
\- Adds audio card (\fB\-A\fR); sensors (\fB\-s\fR), partition label (\fB\-l\fR) and UUID (\fB\-u\fR), short form of
|
||||
optical drives.
|
||||
.TP
|
||||
.B -v 6
|
||||
- Adds full partition data (\fB-p\fR), unmounted partition data (\fB-o\fR), optical drive data (\fB-d\fR);
|
||||
triggers \fB-xx\fR extra data option.
|
||||
.B \-v 6
|
||||
\- Adds full partition data (\fB\-p\fR), unmounted partition data (\fB\-o\fR), optical drive data (\fB\-d\fR);
|
||||
triggers \fB\-xx\fR extra data option.
|
||||
.TP
|
||||
.B -v 7
|
||||
- Adds network IP data (\fB-i\fR); triggers \fB-xxx
|
||||
.B \-v 7
|
||||
\- Adds network IP data (\fB\-i\fR); triggers \fB\-xxx
|
||||
.TP
|
||||
.B -z
|
||||
Adds security filters for IP addresses, Mac, and user home directory name. Default on for irc clients.
|
||||
.B \-w
|
||||
Adds weather line. Note, this depends on an unreliable api so it may not always be working in the future.
|
||||
To get weather for an alternate location, use also the \-! location=<location_string>. See also \-x, \-xx, \-xxx option.
|
||||
.TP
|
||||
.B -Z
|
||||
.B \-z
|
||||
Adds security filters for IP addresses, Mac, location (\-w), and user home directory name. Default on for irc clients.
|
||||
.TP
|
||||
.B \-Z
|
||||
Absolute override for output filters. Useful for debugging networking issues in irc for example.
|
||||
|
||||
.SH EXTRA DATA OPTIONS
|
||||
|
||||
These options are for long form only, and can be triggered by one or more \fB-x\fR, like \fB-xx\fR.
|
||||
Alternately, the \fB-v\fR options trigger them in the following way:
|
||||
\fB-v 3\fR adds \fB-x\fR; \fB-v 6\fR adds \fB-xx\fR; \fB-v 7\fR adds \fB-xxx\fR
|
||||
These options are for long form only, and can be triggered by one or more \fB\-x\fR, like \fB\-xx\fR.
|
||||
Alternately, the \fB\-v\fR options trigger them in the following way:
|
||||
\fB\-v 3\fR adds \fB\-x\fR; \fB\-v 6\fR adds \fB\-xx\fR; \fB\-v 7\fR adds \fB\-xxx\fR
|
||||
|
||||
These extra data triggers can be useful for getting more in-depth data on various options.
|
||||
Can be added to any long form option list, like: \fB-bxx\fR or \fB-Sxxx\fR
|
||||
These extra data triggers can be useful for getting more in\-depth data on various options.
|
||||
Can be added to any long form option list, like: \fB\-bxx\fR or \fB\-Sxxx\fR
|
||||
|
||||
There are 3 extra data levels: \fB-x\fR; \fB-xx\fR; and \fB-xxx\fR
|
||||
There are 3 extra data levels: \fB\-x\fR; \fB\-xx\fR; and \fB\-xxx\fR
|
||||
|
||||
The following shows which lines / items get extra information with each extra data level.
|
||||
|
||||
.TP
|
||||
.B -x -A
|
||||
- Adds version/port(s)/driver version (if available) for each Audio device.
|
||||
.B \-x \-A
|
||||
\- Adds version/port(s)/driver version (if available) for each Audio device.
|
||||
.TP
|
||||
.B -x -A
|
||||
- Shows PCI Bus ID/Usb ID number of each Audio device.
|
||||
.B \-x \-A
|
||||
\- Shows PCI Bus ID/Usb ID number of each Audio device.
|
||||
.TP
|
||||
.B -x -C
|
||||
- bogomips on CPU (if available).
|
||||
.B \-x \-C
|
||||
\- bogomips on CPU (if available).
|
||||
.TP
|
||||
.B -x -d
|
||||
- Adds items to features line of optical drive; adds rev version to optical drive.
|
||||
.B \-x \-d
|
||||
\- Adds items to features line of optical drive; adds rev version to optical drive.
|
||||
.TP
|
||||
.B -x -D
|
||||
- Hdd temp with disk data if you have hddtemp installed, if you are root OR if you have added to
|
||||
.B \-x \-D
|
||||
\- Hdd temp with disk data if you have hddtemp installed, if you are root OR if you have added to
|
||||
/etc/sudoers (sudo v. 1.7 or newer):
|
||||
|
||||
.B <username> ALL = NOPASSWD: /usr/sbin/hddtemp (sample)
|
||||
.TP
|
||||
.B -x -G
|
||||
- Direct rendering status for Graphics (in X).
|
||||
.B \-x \-G
|
||||
\- Direct rendering status for Graphics (in X).
|
||||
.TP
|
||||
.B -x -G
|
||||
- (for single gpu, nvidia driver) screen number gpu is running on.
|
||||
.B \-x \-G
|
||||
\- (for single gpu, nvidia driver) screen number gpu is running on.
|
||||
.TP
|
||||
.B -x -G
|
||||
- Shows PCI Bus ID/Usb ID number of each Graphics card.
|
||||
.B \-x \-G
|
||||
\- Shows PCI Bus ID/Usb ID number of each Graphics card.
|
||||
.TP
|
||||
.B -x -i
|
||||
- Show IPv6 as well for LAN interface (IF) devices.
|
||||
.B \-x \-i
|
||||
\- Show IPv6 as well for LAN interface (IF) devices.
|
||||
.TP
|
||||
.B -x -I
|
||||
- Show system GCC, default. With \-xx, also show other installed GCC versions.
|
||||
.B \-x \-I
|
||||
\- Show system GCC, default. With \-xx, also show other installed GCC versions.
|
||||
.TP
|
||||
.B -x -I
|
||||
- If in shell (not in IRC client, that is), show shell 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 -N
|
||||
- Adds version/port(s)/driver version (if available) for each Network card;
|
||||
.B \-x \-N
|
||||
\- Adds version/port(s)/driver version (if available) for each Network card;
|
||||
.TP
|
||||
.B -x -N
|
||||
- Shows PCI Bus ID/Usb ID number of each Network card.
|
||||
.B \-x \-N
|
||||
\- Shows PCI Bus ID/Usb ID number of each Network card.
|
||||
.TP
|
||||
.B -x -R
|
||||
- md-raid: Shows component raid id. Adds second RAID Info line: raid level; report on drives
|
||||
.B \-x \-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 (ie, not available as storage)."
|
||||
\- zfs\-raid: Shows raid array full size; available size; portion allocated to RAID (ie, not available as storage)."
|
||||
.TP
|
||||
.B -x -S
|
||||
- Desktop toolkit if available (GNOME/XFCE/KDE only); Kernel gcc version.
|
||||
.B \-x \-S
|
||||
\- Desktop toolkit if available (GNOME/XFCE/KDE only); Kernel gcc version.
|
||||
.TP
|
||||
.B -x -t
|
||||
- Adds memory use output to cpu (\fB-xt c\fR), and cpu use to memory (\fB-xt m\fR).
|
||||
.B \-x \-t
|
||||
\- Adds memory use output to cpu (\fB\-xt c\fR), and cpu use to memory (\fB\-xt m\fR).
|
||||
.TP
|
||||
.B -xx -A
|
||||
- Adds vendor:product ID of each Audio device.
|
||||
.B \-x \-w
|
||||
\- Adds wind speed and time zone, and makes output go to two lines.
|
||||
.TP
|
||||
.B -xx -D
|
||||
- Adds disk serial number.
|
||||
.B \-xx \-A
|
||||
\- Adds vendor:product ID of each Audio device.
|
||||
.TP
|
||||
.B -xx -G
|
||||
- Adds vendor:product ID of each Graphics card.
|
||||
.B \-xx \-D
|
||||
\- Adds disk serial number.
|
||||
.TP
|
||||
.B -xx -I
|
||||
- Adds other detected installed gcc versions to primary gcc output (if present).
|
||||
.B \-xx \-G
|
||||
\- Adds vendor:product ID of each Graphics card.
|
||||
.TP
|
||||
.B -xx -I
|
||||
- Adds parent program (or tty) that started shell, if not IRC client, to shell information.
|
||||
.B \-xx \-I
|
||||
\- Adds other detected installed gcc versions to primary gcc output (if present).
|
||||
.TP
|
||||
.B -xx -M
|
||||
- Adds chassis information, if any data for that is available. Also shows BIOS rom size if using dmidecode.
|
||||
.B \-xx \-I
|
||||
\- Adds parent program (or tty) that started shell, if not IRC client, to shell information.
|
||||
.TP
|
||||
.B -xx -N
|
||||
- Adds vendor:product ID of each Network card.
|
||||
.B \-xx \-M
|
||||
\- Adds chassis information, if any data for that is available. Also shows BIOS rom size if using dmidecode.
|
||||
.TP
|
||||
.B -xx -R
|
||||
- md-raid: Adds superblock (if present); algorythm, U data. Adds system info line (kernel support,
|
||||
.B \-xx \-N
|
||||
\- Adds vendor:product ID of each Network card.
|
||||
.TP
|
||||
.B \-xx \-R
|
||||
\- md\-raid: Adds superblock (if present); algorythm, U data. Adds system info line (kernel support,
|
||||
read ahead, raid events). Adds if present, unused device line. If device is resyncing, shows
|
||||
resync progress line as well.
|
||||
.TP
|
||||
.B -xx -S
|
||||
- Adds, if run in X, display manager type to Desktop information, if present. If none, shows N/A.
|
||||
.B \-xx \-S
|
||||
\- Adds, if run in X, display manager type to Desktop information, if present. If none, shows N/A.
|
||||
Supports most known display managers, like xdm, gdm, kdm, slim, lightdm, or mdm.
|
||||
.TP
|
||||
.B -xx -@ <11-14>
|
||||
- Automatically uploads debugger data tar.gz file to \fIftp.techpatterns.com\fR.
|
||||
.B \-xx \-w
|
||||
\- Adds humidity and barometric pressure.
|
||||
.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.
|
||||
.B \-xx \-@ <11\-14>
|
||||
\- Automatically uploads debugger data tar.gz file to \fIftp.techpatterns.com\fR.
|
||||
.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.
|
||||
.TP
|
||||
.B \-xxx \-w
|
||||
\- Adds third line of information: location (city state country), weather observation time, altitude of system.
|
||||
If wind chill, heat index, or dew point are available, adds a line for to hold that data as well.
|
||||
|
||||
.SH ADVANCED OPTIONS
|
||||
.TP
|
||||
.B -! 31
|
||||
Turns off hostname in System line. Useful, with \fB-z\fR, for anonymizing your inxi output for posting on
|
||||
.B \-! 31
|
||||
Turns off hostname in System line. Useful, with \fB\-z\fR, for anonymizing your inxi output for posting on
|
||||
forums or IRC.
|
||||
.TP
|
||||
.B -! 32
|
||||
.B \-! 32
|
||||
Turns on hostname in System line. Overrides inxi config file value (if set): B_SHOW_HOST='false'.
|
||||
|
||||
.TP
|
||||
.B \-! location=<location_string>
|
||||
With \-w, get weather for an alternate location. Accepts postal/zip code, city,state pair, or latitude,longitude.
|
||||
Examples: \-! location=95623 OR \-! location=Boston,MA OR \-! location=\-122.6762
|
||||
|
||||
.SH DEBUGGING OPTIONS
|
||||
.TP
|
||||
.B -%
|
||||
.B \-%
|
||||
Overrides defective or corrupted data.
|
||||
.TP
|
||||
.B -@
|
||||
Triggers debugger output. Requires debugging level \fB1-14\fR (\fB8-10\fR - logging of data).
|
||||
.B \-@
|
||||
Triggers debugger output. Requires debugging level \fB1\-14\fR (\fB8\-10\fR \- logging of data).
|
||||
Less than 8 just triggers inxi debugger output on screen.
|
||||
.TP
|
||||
.B -@ \fR[\fB1\fR-\fB7\fR]
|
||||
- On screen debugger output.
|
||||
.B \-@ \fR[\fB1\fR\-\fB7\fR]
|
||||
\- On screen debugger output.
|
||||
.TP
|
||||
.B -@ 8
|
||||
- Basic logging. Check \fI /home/yourname/.inxi/inxi*.log
|
||||
.B \-@ 8
|
||||
\- Basic logging. Check \fI /home/yourname/.inxi/inxi*.log
|
||||
.TP
|
||||
.B -@ 9
|
||||
- Full file/sys info logging.
|
||||
.B \-@ 9
|
||||
\- Full file/sys info logging.
|
||||
.TP
|
||||
.B -@ 10
|
||||
- Color logging.
|
||||
.B \-@ 10
|
||||
\- Color logging.
|
||||
.TP
|
||||
.B -@ <11-14>
|
||||
.B \-@ <11\-14>
|
||||
The following create a tar.gz file of system data, plus collecting the inxi output to file:
|
||||
To automatically upload debugger data tar.gz file to \fIftp.techpatterns.com\fR: \fBinxi \-xx@ <11-14>\fR
|
||||
To automatically upload debugger data tar.gz file to \fIftp.techpatterns.com\fR: \fBinxi \-xx@ <11\-14>\fR
|
||||
For alternate ftp upload locations: Example:
|
||||
|
||||
.B inxi -! \fIftp.yourserver.com/incoming\fB -xx@ 14\fR
|
||||
.B inxi \-! \fIftp.yourserver.com/incoming\fB \-xx@ 14\fR
|
||||
|
||||
.TP
|
||||
.B -@ 11
|
||||
- With data file of xiin read of /sys
|
||||
.B \-@ 11
|
||||
\- With data file of xiin read of /sys
|
||||
.TP
|
||||
.B -@ 12
|
||||
- With xorg conf and log data, xrandr, xprop, xdpyinfo, glxinfo etc.
|
||||
.B \-@ 12
|
||||
\- With xorg conf and log data, xrandr, xprop, xdpyinfo, glxinfo etc.
|
||||
.TP
|
||||
.B -@ 13
|
||||
- With data from dev, disks, partitions, etc., plus xiin data file.
|
||||
.B \-@ 13
|
||||
\- With data from dev, disks, partitions, etc., plus xiin data file.
|
||||
.TP
|
||||
.B -@ 14
|
||||
- Everything, full data collection.
|
||||
.B \-@ 14
|
||||
\- Everything, full data collection.
|
||||
|
||||
.SH SUPPORTED IRC CLIENTS
|
||||
BitchX, Gaim/Pidgin, ircII, Irssi, Konversation, Kopete, KSirc, KVIrc, Weechat, and Xchat. Plus any others that
|
||||
|
@ -418,9 +437,9 @@ To trigger inxi output in your IRC client, pick the appropriate method from the
|
|||
|
||||
.TP
|
||||
.B Xchat, irssi \fR(and many other IRC clients)
|
||||
.B /exec -o inxi \fR[\fBoptions\fR]
|
||||
.B /exec \-o inxi \fR[\fBoptions\fR]
|
||||
|
||||
If you leave off the \fB-o\fR, only you will see the output on your local IRC client.
|
||||
If you leave off the \fB\-o\fR, only you will see the output on your local IRC client.
|
||||
.TP
|
||||
.B Konversation
|
||||
.B /cmd inxi \fR[\fBoptions\fR]
|
||||
|
@ -428,7 +447,7 @@ If you leave off the \fB-o\fR, only you will see the output on your local IRC cl
|
|||
To run inxi in konversation as a native script if your distribution or inxi package did not do this for you,
|
||||
create this symbolic link:
|
||||
|
||||
.B ln -s /usr/local/bin/inxi /usr/share/kde4/apps/konversation/scripts/inxi
|
||||
.B ln \-s /usr/local/bin/inxi /usr/share/kde4/apps/konversation/scripts/inxi
|
||||
|
||||
If inxi is somewhere else, change the path /usr/local/bin to wherever it is located.
|
||||
|
||||
|
@ -437,10 +456,10 @@ Then you can start inxi directly, like this:
|
|||
.B /inxi \fR[\fBoptions\fR]
|
||||
.TP
|
||||
.B WeeChat
|
||||
.B /shell -o inxi \fR[\fBoptions\fR]
|
||||
.B /shell \-o inxi \fR[\fBoptions\fR]
|
||||
|
||||
Before WeeChat can run external scripts like inxi, you need to install the
|
||||
weechat-plugins package. This is automatically installed for Debian users.
|
||||
weechat\-plugins package. This is automatically installed for Debian users.
|
||||
Next, if you don't already have it, you need to install shell.py,
|
||||
which is a python script.
|
||||
|
||||
|
@ -453,14 +472,14 @@ Make the script executable by
|
|||
|
||||
Move it to your home folder: \fI/.weechat/python/autoload/\fR then logout, and start WeeChat with
|
||||
|
||||
.B weechat-curses
|
||||
.B weechat\-curses
|
||||
|
||||
Top of screen should say what pythons scripts have loaded, and should include shell. Then to run inxi,
|
||||
you would enter a command like this:
|
||||
|
||||
.B /shell -o inxi -bx
|
||||
.B /shell \-o inxi \-bx
|
||||
|
||||
If you leave off the \fB-o\fR, only you will see the output on your local weechat. WeeChat
|
||||
If you leave off the \fB\-o\fR, only you will see the output on your local weechat. WeeChat
|
||||
users may also like to check out the weeget.py
|
||||
|
||||
.SH INITIALIZATION FILE
|
||||
|
@ -487,7 +506,7 @@ inxi main website/svn/wiki, file an issue report:
|
|||
.I http://code.google.com/p/inxi/issues/list
|
||||
.TP
|
||||
post on inxi developer forums:
|
||||
.I http://techpatterns.com/forums/forum-32.html
|
||||
.I http://techpatterns.com/forums/forum\-32.html
|
||||
.TP
|
||||
You can also visit
|
||||
.I irc.oftc.net \fRchannel:\fI #smxi
|
||||
|
@ -502,17 +521,17 @@ to post issues.
|
|||
is is a fork of locsmif's largely unmaintained yet very clever, infobash script.
|
||||
|
||||
Original infobash author and copyright holder:
|
||||
Copyright (C) 2005-2007 Michiel de Boer a.k.a. locsmif
|
||||
Copyright (C) 2005\-2007 Michiel de Boer a.k.a. locsmif
|
||||
|
||||
inxi version: Copyright (C) 2008-13 Scott Rogers & Harald Hope
|
||||
inxi version: Copyright (C) 2008\-13 Scott Rogers & Harald Hope
|
||||
|
||||
Further fixes (listed as known): Horst Tritremmel <hjt at sidux.com>
|
||||
|
||||
Steven Barrett (aka: damentz) - usb audio patch; swap percent used patch.
|
||||
Jarett.Stevens - dmidecode -M patch for older systems with no /sys
|
||||
Steven Barrett (aka: damentz) \- usb audio patch; swap percent used patch.
|
||||
Jarett.Stevens \- dmidecode \-M patch for older systems with no /sys
|
||||
|
||||
And a special thanks to the nice people at irc.oftc.net channels #linux-smokers-club and #smxi,
|
||||
who all really have to be considered to be co-developers because of their non-stop enthusiasm
|
||||
And a special thanks to the nice people at irc.oftc.net channels #linux\-smokers\-club and #smxi,
|
||||
who all really have to be considered to be co\-developers because of their non\-stop enthusiasm
|
||||
and willingness to provide real time testing and debugging of inxi development.
|
||||
|
||||
Without a wide range of diverse Linux kernel based Free Desktop systems to test on, we could
|
||||
|
|
|
@ -1,3 +1,34 @@
|
|||
=====================================================================================
|
||||
Version: 1.9.00
|
||||
Patch Version: 00
|
||||
Script Date: May 17 2013
|
||||
-----------------------------------
|
||||
Changes:
|
||||
-----------------------------------
|
||||
New version, new tarball, new man page. Unless disabled by distribution maintainers, offers
|
||||
weather -w option. With -x, -xx-, -xxx, shows more information. Basic line is just weather
|
||||
and system time there. -x adds time zone, which is useful for servers, particurly web servers.
|
||||
-x also adds wind speed. -xx adds humidity and barometric pressure. -xxx adds a possible new line,
|
||||
if data is available, heat index, wind chill, and dew point.
|
||||
-xxx also adds a line for location (blocked by irc/-z) / weather observation time.
|
||||
|
||||
-z filter applies as usual to location data, removes it in irc by default. -Z overrides override.
|
||||
|
||||
The api this uses is probably going to be dropped at some point, so this is just going to work
|
||||
while it works, then it will need to be updated at some point, so don't get very attached to it.
|
||||
|
||||
Also adds option to, with -w: -! location=<location string>
|
||||
This lets users send an alternate location using either <city,state> or <postal code>
|
||||
or <latitude,longitude> (commas for city,state and latitude,longitude are not optional, and the order
|
||||
must be as listed.
|
||||
|
||||
If There is a developer flag if distro maintainers do not want this enabled, simply set:
|
||||
B_ALLOW_WEATHER='false'
|
||||
before packaging and the weather feature will be disabled.
|
||||
|
||||
-----------------------------------
|
||||
-- Harald Hope - Fri, 17 May 2013 18:47:24 -0700
|
||||
|
||||
=====================================================================================
|
||||
Version: 1.8.47
|
||||
Patch Version: 00
|
||||
|
|
Loading…
Reference in a new issue