home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
linuxmafia.com 2016
/
linuxmafia.com.tar
/
linuxmafia.com
/
pub
/
hardware
/
system-info
< prev
next >
Wrap
Text File
|
2002-11-09
|
3KB
|
142 lines
#!/bin/bash
# Generate a summary of system information.
PATH=/bin:/usr/bin:/sbin:/usr/sbin
function tabout () { fold -w 70 | sed -e '/^/s// /'; }
function spaceout () { fold -w 70 | sed -e '/^/s// /'; }
# init sudo:
sudo -v
cat <<EOF
System Configuration Summary
----------------------------
Date: $( date )
User: $USER: $( grep karsten /etc/passwd | cut -f 5 -d ':' | cut -f 1 -d , )
Hostname: $( hostname )
$( uname -a | tabout )
Uptime: $( uptime )
$( basename $0 ) version: 1.7, 2002/04/05 20:10:44
========================================================================
Basic Hardware:
------------------------------------
cpu:
--------------------
$( echo; cat /proc/cpuinfo | tabout )
memory:
--------------------
$( echo; cat /proc/meminfo | tabout )
PCI:
--------------------
$( echo; /sbin/lspci | tabout )
Networking:
------------------------------------
ifconfig:
--------------------
$( echo; ifconfig | spaceout )
route:
--------------------
$( echo; route -n | spaceout )
arp:
--------------------
$( echo; arp | spaceout )
Disk:
------------------------------------
Partitioning:
--------------------
$( echo; sudo /sbin/fdisk -l /dev/[hs]d[a-z] | tabout )
Mount table:
--------------------
$( echo; cat /etc/fstab | spaceout )
Mounted partitions:
--------------------
$( echo; cat /proc/mounts | tabout )
Free space:
--------------------
$( echo; df | tabout ; echo; df -h | tabout )
System resources:
------------------------------------
IO:
--------------------
$( echo; cat /proc/ioports | tabout )
IRQs:
--------------------
$( echo; cat /proc/interrupts | tabout )
Devices:
--------------------
$( echo; cat /proc/devices | tabout )
filesystems:
--------------------
$( echo; cat /proc/filesystems | tabout )
USB devices:
--------------------
$( echo; cat /proc/bus/usb/devices | tabout )
Kernel resources:
------------------------------------
Version: $( cat /proc/version )
Modules:
--------------------
$( echo; cat /proc/modules | tabout )
Boot Kernel Messages (dmesg):
--------------------
$( echo; cat /var/log/dmesg | tabout )
Configuration:
--------------------
$( echo; cat /boot/config-$( awk '{ print $3 }' /proc/version ) | tabout)
------------------------------------------------------------------------
This is an automatically created summary.
The command is "$( basename $0 )".
Written by Karsten M. Self <kmself@ix.netcom.com>, (c) 2002.
This program may be freely distributed and modified, with attribution
and the following disclaimer.
This program comes with NO WARRANTY and NO LIABILITY FOR DAMAGES.
Revision information:
Author: karsten
Version: 1.7
Last revised: 2002/04/05 20:10:44
EOF