What it shows

Today’s gizmo is probably cheating; there’s nothing to show when runs — no interface, no nifty controls or multicolor output.


There’s nothing except perhaps a terse message, acknowledging it exists.

But just the same, the fun part is what it shows. In this case, it creates a cool-beans HTML file, beautifully formatted and designed, which shows every little detail about the host,


Very clever actually. I’m no HTML genius, but it seems like the output from this could be adapted to almost anything web-based, to show system specs.

So sure, the beauty of is what it produces, not what it does while it works. What it shows, really.

P.S.: Because you’re probably wondering. …

server solo-2150:

Date gathered: Wed Jan 2 07:21:10 JST 2013
Program version: 1.4.0
Hostname: solo-2150
OS: linux
CPU: 1 x Celeron (Coppermine) (501 MHz) Cache size: 128 KB
RAM: 277.90 MB
VM: No
Uptime: 44 min
Users: 9
Load average: 0.73
Kernel info:

Kernel name: Linux
Kernel release: 3.6.10-1-ARCH
Kernel version: #1 SMP PREEMPT Tue Dec 11 10:19:36 CET 2012
Hardware name: i686

shmmax: 32 MB
shmmni: 4096
shmall: 2 MB
swappiness: 60
dirty_ratio: 20
dirty_background_ratio: 10
Free: 79.62 MB
Cached: 125.91 MB
Active: 63.93 MB
Swap Total: 243.16 MB
Active shared mem:

Active segments: 0 Active semaphores: 0 Active messages: 0

Name IP Status Speed
wlan0: Active ?
lo: Active N/A

Destination Gateway Genmask Interface wlan0 wlan0
Mounting info:

Name Mount Size/Used % Inode % Filesystem (options)
/dev/sda1 /boot 92M/32% 2% ?
/dev/sda3 / 7.6G/22% 15% ?
/dev/sda4 /home 66G/12% 1% ?
dev /dev 138M/0% 1% ?
rootfs / 7.6G/22% 15% ?
run /run 139M/1% 1% ?
tmpfs /tmp 139M/0% 1% ?
Program versions:

Name Version Name Version
autoconf 2.69  awk 4.0.1
bash 4.2.39(2)-release  bzip2 1.0.6
cc 4.7.2  curl 7.28.1
elinks 0.13.GIT  ethtool 3.6
find 4.4.2  gcc 4.7.2
git  gpg 2.0.19
gzip 1.5  iconv 2.17
make 3.82  mii-tool 1.9
nano 2.2.6  ntpd 4.2.6p5
openssl 1.0.1c  perl 5.16.2
python 3.3.0  screen 4.00.03
sed 4.2.2  ssh 6.1p1
tar 1.26  vim 7.3
wget 1.14     
Perl info:

Version: 5.16.2
IThreads: Yes
Multiplicity: Yes
Perl modules:

Module Version
[] 2.51
[] 0.29
[] 1.9725
User limits:

Name Limit
POSIX message queues 819200
core file size 0
cpu time unlimited
data seg size unlimited
file locks unlimited
file size unlimited
max locked memory unlimited
max memory size unlimited
max user processes 2197
open files 1024
pending signals 2197
pipe size 8
real-time priority 99
scheduling priority 30
stack size 8192
virtual memory unlimited

Name Value
BROWSER /home/kmandla/.scripts/
EDITOR /home/kmandla/.scripts/
HISTCONTROL ignoredups
HISTIGNORE &:ls:[bf]g:exit
HOME /home/kmandla
LOGNAME kmandla
MAIL /var/spool/mail/kmandla
PAGER most
PATH /usr/local/bin:
SHELL /bin/bash
USER kmandla
XDG_CACHE_HOME /home/kmandla/.cache
XDG_CONFIG_HOME /home/kmandla/.config
XDG_DATA_DIRS /usr/local/share/:
XDG_DATA_HOME /home/kmandla/.local/share
XDG_RUNTIME_DIR /run/user/1000
XDG_SEAT seat0
_ /usr/bin/perl

3 thoughts on “ What it shows

  1. totalizator

    Fancy but I prefer my bash CGI:

    echo "Content-type: text/html"
    echo ""
    echo "<html><head><title>Bash as CGI"
    echo "</title></head><body>"
    echo "<h1>General system information for host $(hostname)</h1>"
    echo ""
    echo "<h1>Uptime</h1>"
    echo "<pre> $(uptime) </pre>"
    echo "<h1>Memory Info</h1>"
    echo "<pre> $(free -m) </pre>"
    echo "<h1>Disk Info:</h1>"
    echo "<pre> $(df -h) </pre>"
    echo "<h1>Logged in user</h1>"
    echo "<pre> $(w) </pre>"
    echo "<h1>auth</h1>"
    echo "<pre> $(sudo /usr/bin/tail -n 30 /var/log/auth.log) </pre>"
    echo "<h1>Cherokee access</h1>"
    echo "<pre> $(sudo /bin/cat /var/log/cherokee/cherokee.access) </pre>"
    echo "<h1>netstat</h1>"
    echo "<pre> $(netstat -W) </pre>"
    echo "<center>Information generated on $(date)</center>"
    echo "</body></html>"
  2. Pingback: album: Pictures in a show | Inconsolation

  3. Pingback: Voices from the dead | Inconsolation

Comments are closed.