boxinfo.pl: What it shows

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

2013-01-01-solo-2150-boxinfo-01

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,

2013-01-01-solo-2150-boxinfo-02

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 boxinfo.pl 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
Memory:

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
Interfaces:

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

Destination Gateway Genmask Interface
0.0.0.0 192.168.0.1 0.0.0.0 wlan0
192.168.0.0 0.0.0.0 255.255.255.0 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 1.8.0.3  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
[http://search.cpan.org/dist/Digest-MD5Digest::MD5] 2.51
[http://search.cpan.org/dist/Sys-SyslogSys::Syslog] 0.29
[http://search.cpan.org/dist/Time-HiResTime::HiRes] 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
ENVs:

Name Value
BROWSER /home/kmandla/.scripts/elinks.sh
EDITOR /home/kmandla/.scripts/vim.sh
HISTCONTROL ignoredups
HISTIGNORE &:ls:[bf]g:exit
HOME /home/kmandla
LANG en_US.UTF-8
LOGNAME kmandla
MAIL /var/spool/mail/kmandla
PAGER most
PATH /usr/local/bin:
/usr/bin:
/bin:
/usr/local/sbin:
/usr/sbin:
/sbin:
/usr/bin/core_perl:
/sbin/:
/usr/lib/surfraw:
/sbin/:
/usr/lib/surfraw
SCRIPTPATH $HOME/.scripts/
SHELL /bin/bash
USER kmandla
WINDOW  
XDG_CACHE_HOME /home/kmandla/.cache
XDG_CONFIG_DIRS /etc/xdg
XDG_CONFIG_HOME /home/kmandla/.config
XDG_DATA_DIRS /usr/local/share/:
/usr/share/
XDG_DATA_HOME /home/kmandla/.local/share
XDG_RUNTIME_DIR /run/user/1000
XDG_SEAT seat0
XDG_SESSION_ID 1
XDG_VTNR 1
_ /usr/bin/perl

3 thoughts on “boxinfo.pl: What it shows

  1. totalizator

    Fancy but I prefer my bash CGI:

    #!/bin/bash
    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: stats.pl: Voices from the dead | Inconsolation

Comments are closed.