inxi weather

archlinux-logo-dark-200dpi.b42bd35d5916

inxi, very versatile script to get various hardware and software data, have also interesting option -w which display local weather data:
Weather: Conditions: 36 F (2 C) - Clear Time: February 4, 8:15 PM CET

…or if you use verbose variante with -x, -xx or -xxx, the output contains more data:
inxi -wxxx
Weather: Conditions: 36 F (2 C) - Clear Wind: From the South at 2 MPH Humidity: 87%
Pressure: 30.21 in (1023 mb) Location: None None (SVN) Altitude: 280 ft
Time: February 4, 8:20 PM CET (Europe/Ljubljana) Observation Time: February 4, 8:00 PM CET

…and with option -W you can change location input:
inxi -wxxx -W vienna,austria
Weather: Conditions: 39 F (4 C) - Mostly Cloudy Wind: From the West at 13 MPH Humidity: 70%
Pressure: 30.15 in (1021 mb) Wind Chill: 32 F (0 C)
Location: Vienna (OS) Altitude: 171 ft
Time: February 4, 8:24 PM CET Observation Time: February 4, 7:50 PM CET

Happy hacking…

My new, old laptop

When my old laptop’s display crashed, it became desktop, connected to external display via working VGA output and I suddenly lost mobility. I ‘need’ mobility, because I like working outside if the weather allows it. I don’t need some powerful laptop, because mostly I use it as text editor (vim) and music player (moc) while I work and that’s it. So all I need is terminal emulator, in my case tmux, vim, moc and of course some extended functionality with vifm as file manager, mutt as mail client, elinks as web browser, newsbeuter as RSS reader and oysttyer as Twitter client (official fork of well known TTYtter) as base. I must not forget ‘upgraded’ working enviroment using X server with i3 window manager, qutebrowser as web browser (I really like that browser – keyboard-driven, vim-like browser based on PyQt5 and QtWebKit) and mpv for playing video and this is about the whole list of what I have installed on my old laptop (now desktop).
toshiba.console

Toshiba running tmux with oysttyer in open window.

When I mentioned to a friend that I need new laptop, he offered me his old Toshiba Satelite Pro 4600 to ‘recycle’ it. That was love an first sight and I was determined to make it operational with new Linux. It is in very good condition, well preserved, keyboard as new and only one dead pixel on display. Last installed operating system was Windows® 2000 from the year 2000, originally it came with Windows® 98 installed.

This is output from inxi, for a little technical background:

System:    Host: boris-t Kernel: 4.3.3-3-ARCH i686 (32 bit) Console: tty 4 Distro: Arch Linux
Machine:   System: TOSHIBA product: Satellite Pro 4600 v: PS460U-06USV8E
           Mobo: TOSHIBA model: Portable PC v: Version A0 Bios: TOSHIBA v: Version 2.50 date: 06/18/2001
CPU:       Single core Pentium III (Coppermine) (-UP-) cache: 256 KB speed: 897 MHz (max)
Graphics:  Card: Trident Microsystems CyberBlade/XP
           Display Server: N/A drivers: trident (unloaded: vesa) tty size: 128x47 Advanced Data: N/A out of X
Audio:     Card Intel 82801BA/BAM AC'97 Audio Controller driver: snd_intel8x0 Sound: ALSA v: k4.3.3-3-ARCH
Network:   Card: Intel 82801BA/BAM/CA/CAM Ethernet Controller driver: e100
           IF: enp2s8 state: up speed: 100 Mbps duplex:
Drives:    HDD Total Size: 52.0GB (23.0% used) ID-1: /dev/sda model: IBM size: 20.0GB
           ID-2: USB /dev/sdb model: STORE_N_GO size: 32.0GB
Partition: ID-1: / size: 19G used: 8.7G (51%) fs: ext4 dev: /dev/sda1
Sensors:   System Temperatures: cpu: 68.0C mobo: N/A
           Fan Speeds (in rpm): cpu: N/A
Info:      Processes: 86 Uptime: 34 min Memory: 83.9/244.5MB Init: systemd Client: Shell (bash) inxi: 2.2.32

and link to Toshiba Satelite Pro 4600 (I only find this and not the version with 900MHz clock speed, 256MB ram and 20GB hard disk as is mine, but everything else is correct) web site.

First thing I did was format and check disk for errors using SystemRescueCD. The CD Rom and floppy disk (and yes I still have floppy disks, found 10 pieces in unopened package) both in excellent condition, the Trident graphic card working without a glitch and integrated ethernet card (last series had also integrated wifi card) had no problem with internet connection. The battery is as new, still with design capacity 4000 mAh and last full capacity 3844 mAh = 96% (stated by acpi, with command acpi -i).

As big ArchLinux fan, there was no doubt what to install. It took me about half an hour to install and configure (backup configuration files were installed with yadm ‘Yet Another Dotfiles Manager’, great backup utility, using git as backup destination) all command line and X apps.

I was realy lucky, that I get my hands on wifi PCMCIA card so I didn’t need to use USB wifi card, and both USB(1) ports are free (I’m using one port for 32GB USB key as second disk for music files, because internal HDD is only 20GB) and I’m mobile again. I must admit that I expected problems during installation.

The only ‘problem’ that I have now is the lack of ram, so boot into X  is slow and opening take some time. I didn’t even try to install Calibre, Firefox or Chromium. So my ebook reader is ncurses fb2 reader fbless and I use Calibre on ‘desktop’ for converting ebooks to fb2 format.

toshiba-i3

Toshiba running running xorg-server, i3 window manager and qutebrowser.

I’m really happy that I succeed and made Toshiba Satelite Pro 4600 functional again, all I need now is to get another HDD as reserve and maybe another 256M ram to upgrade to 512M. Everything else is fine as it is now. This post is also written on this laptop in console with vim.

Inxi – full featured system information script

inxi-2013-05-20-1

How to describe Inxi? Simple said, it’s console system information script,  but it goes far beyond that because it can print out almost any desirable information about your system. Inxi has a wide range of options and custom triggers, along with useful defaults like inxi -v4 -c6 (basic output in short form) or inxi -F -c6 (show Fuller output for inxi, includes all upper case line arguments). Plain inxi with no options, prints a single line of basic system information, but with long list of different options it can print various informations along with different color (-c option) choise, 36 color combinations to be precize. The following options if used without -b, -F or -v + number will show just that complete line:

Output Control Options:
-A  Audio/sound card information.
-b  Basic output, short form. Like inxi -v 2, only minus hard disk names.
-c  Color schemes. Scheme number is required. Color selectors run a color selector option
    prior to inxi starting which lets you set the config file value for the selection.
    Supported color schemes: 0-32 Example: inxi -c 11
    Color selectors for each type display (NOTE: irc and global only show safe color set):
    94 - Console, out of X
    95 - Terminal, running in X - like xTerm
    96 - Gui IRC, running in X - like Xchat, Quassel, Konversation etc.
    97 - Console IRC running in X - like irssi in xTerm
    98 - Console IRC not in  X
    99 - Global - Overrides/removes all settings. Setting specific removes global.
-C  Full CPU output, including per CPU clockspeed (if available).
-d  Optical drive data. Same as -Dd. See also -x and -xx.
-D  Full hard Disk info, not only model, ie: /dev/sda ST380817AS 80.0GB. See also -x and -xx.
-f  All cpu flags, triggers -C. Not shown with -F to avoid spamming. ARM cpus show 'features'.
-F  Full output for inxi. 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
-G  Graphic card information (card, x type, resolution, glx renderer, version).
-i  Wan IP address, and shows local interfaces (requires ifconfig network tool). Same as -Nni
    Not shown with -F for user security reasons, you shouldn't paste your local/wan IP.
-I  Information: processes, uptime, memory, irc client (or shell type), inxi version.
-l  Partition labels. Default: short partition -P. For full -p output, use: -pl (or -plu).
-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.
-n  Advanced Network card information. Same as -Nn. Shows interface, speed, mac id, state, etc.
-N  Network card information. With -x, shows PCI BusID, Port number.
-o  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):  ALL = NOPASSWD: /usr/bin/file (sample)
-p  Full partition information (-P plus all other detected partitions).
-P  Basic partition information (shows what -v 4 would show, but without extra data).
    Shows, if detected: / /boot /home /tmp /usr /var. Use -p to see all mounted partitions.
-r  Distro repository data. Currently supported repo types: APT; PACMAN; PISI; YUM; Ports.
-R  RAID data. Shows RAID devices, states, levels, and components, and extra data with -x/-xx
    md-raid: If device is resyncing, shows resync progress line as well.
-s  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.
-S  System information: host name, kernel, desktop environment (if in X), distro
-t  Processes. Requires extra options: c (cpu) m (memory) cm (cpu+memory). If followed by numbers 1-20,
    shows that number of processes for each type (default: 5; if in irc, max: 5): -t cm10
    Make sure to have no space between letters and numbers (-t cm10 - right, -t cm 10 - wrong).
-u  Partition UUIDs. Default: short partition -P. For full -p output, use: -pu (or -plu).
-v  Script verbosity levels. Verbosity level number is required. Should not be used with -b or -F
    Supported levels: 0-7 Example: inxi -v 4
    0 - Short output, same as: inxi
    1 - Basic verbose, -S + basic CPU + -G + basic Disk + -I.
    2 - Networking card (-N), Machine (-M) data, shows basic hard disk data (names only),
        and, if present, basic raid (devices only, and if inactive, notes that). similar to: inxi -b
    3 - Advanced CPU (-C), network (-n) data, and switches on -x advanced data option.
    4 - Partition size/filled data (-P) for (if present):/, /home, /var/, /boot
        Shows full disk data (-D).
    5 - Audio card (-A); sensors (-s), partition label (-l) and UUID (-u), short form of optical drives,
        standard raid data (-R).
    6 - Full partition (-p), unmounted partition (-o), optical drive (-d), full raid; triggers -xx.
    7 - Network IP data (-i); triggers -xxx.
-w  Local weather data/time. To check an alternate location, see: -W .
    For extra weather data options see -x, -xx, and -xxx.
-W   -  supported options: postal code; city,[state/country]; latitude,longitude
    Only use if you want the weather somewhere other than the machine running inxi.
    Use only ascii characters, replace spaces in city/state/country names with +: new+york,ny
-x  Adds the following extra data (only works with verbose or line output, not short form): 
    -C - Bogomips on Cpu;
    -d - Extra optical drive data; adds rev version to optical drive.
    -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):  ALL = NOPASSWD: /usr/sbin/hddtemp (sample)
    -G - Direct rendering status for Graphics (in X).
    -G - (for single gpu, nvidia driver) screen number gpu is running on.
    -i - IPv6 as well for LAN interface (IF) devices.
    -I - System GCC, default. With -xx, also show other installed GCC versions.
       - If running in console, not in IRC client, shows shell version number if detected.
    -N -A - Version/port(s)/driver version (if available) for Network/Audio;
    -N -A -G - Network, audio, graphics, shows PCI Bus ID/Usb ID number of card;
    -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
    -S - Desktop toolkit if avaliable (GNOME/XFCE/KDE only); Kernel gcc version
    -t - Memory use output to cpu (-xt c), and cpu use to memory (-xt m).
    -w/-W - Wind speed and time zone (-w only).
-xx Show extra, extra data (only works with verbose or line output, not short form): 
    -A - Chip vendor:product ID for each audio device.
    -D - Disk serial number.
    -G - Chip vendor:product ID for each video card.
    -I - Other detected installed gcc versions (if present).
         Adds parent program (or tty) for shell info if not in IRC (like Konsole or Gterm).
    -M - Chassis information, bios rom size (dmidecode only), if data for either is available.
    -N - Chip vendor:product ID for each nic.
    -R - md-raid: Superblock (if present); algorythm, U data. Adds system info line
         (kernel support,read ahead, raid events). If present, adds unused device line. 
         Resync line, shows progress bar.
    -S - Display manager (dm) in desktop output, if in X (like kdm, gdm3, lightdm).
    -w/-W - Humidity, barometric pressure.
    -xx -@  - Automatically uploads debugger data tar.gz file to ftp.techpatterns.com.
-xxx Show extra, extra, extra data (only works with verbose or line output, not short form): 
    -S - Panel/shell information in desktop output, if in X (like gnome-shell, cinnamon, mate-panel).
    -w/-W - Location (uses -z/irc filter), weather observation time, wind chill, heat index,
         dew point (shows extra lines for data where relevant).
-z  Security filters for IP/Mac addresses, location, user home directory name. Default on for irc clients.
-Z  Absolute override for output filters. Useful for debugging networking issues in irc for example.

Additional Options:
-h --help      This help menu.
-H             This help menu, plus developer options. Do not use dev options in normal operation!
--recommends   Checks inxi application dependencies + recommends, and directories, then shows
               what package(s) you need to install to add support for that feature.
-U             Auto-update script. Will also install/update man page. Note: if you installed as root, you
               must be root to update, otherwise user is fine. Man page installs require root user mode.
-V --version   inxi version information. Prints information then exits.

Debugging Options:
-%  Overrides defective or corrupted data.
-@  Triggers debugger output. Requires debugging level 1-14 (8-10 - logging of data).
    Less than 8 just triggers inxi debugger output on screen.
    1-7  - On screen debugger output
    8    - Basic logging
    9    - Full file/sys info logging
    10   - Color logging.
    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 ftp.techpatterns.com: inxi -xx@ 
    For alternate ftp upload locations: Example: inxi -! ftp.yourserver.com/incoming -xx@ 14
    11 - With data file of xiin read of /sys.
    12 - With xorg conf and log data, xrandr, xprop, xdpyinfo, glxinfo etc.
    13 - With data from dev, disks, partitions, etc., plus xiin data file.
    14 - Everything, full data collection.
Advanced Options:
-! 31  Turns off hostname in output. Useful if showing output from servers etc.
-! 32  Turns on hostname in output. Overrides global B_SHOW_HOST='false'

Setup of Inxi is simple, use of the

$ inxi --recommends

command print out optional dependencies that are needed for most complete data collection, also with install instruction for Debian/Ubuntu, Arch Linux and Redhat/Fedora/Suse. After that it’s all about options. The complete list can be found online or with:

$ inxi --help

or

$ man inxi

Another very useful ‘addon’ is very good connectivity to various IRC client, which comes very handy when seeking out help or reports bugs over IRC. Because of versatility Inxi should be a must Linux app, useful for admins and also ‘regular’ users.

Have you hugged a penguin today?