Created
June 29, 2010 13:30
-
-
Save anonymous/457221 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ------------------------------------------------------------------- | |
# Constants | |
# ------------------------------------------------------------------- | |
PROGNAME=$(basename $0) | |
VERSION="0.0.1" | |
## FIXME:Where do you want to place the file? | |
HWINFO=$PWD/$HOSTNAME.rtf | |
##### Initialization And Setup ##### | |
function error_exit | |
{ | |
echo "${PROGNAME}: ${1:-"you are not root, please run as root"}" >&2 | |
exit 1 | |
} | |
# check for root | |
#FIXME: NOTE; FILE WILL BE OWNED BY ROOT:ROOT, SO YOU SHOULD NOT PLACE IT IN A USERS $HOME DIR! | |
[[ "$UID" == "0" ]] && : || error_exit | |
# Set file creation mask so that all files are created with 666 permissions. | |
umask 000 | |
# Set standards | |
## See **Comments** | |
##### Main Logic ##### | |
echo -e "\t\tMain System Information" > $HWINFO | |
echo -e '\n' >> $HWINFO | |
if [ "`uname -a`" == "" ]; then | |
echo 'no output' >> $HWINFO | |
else | |
uname -a >> $HWINFO | |
fi | |
echo -e "\n\tProcessor" >> $HWINFO | |
if [ "`lshal | grep -i cpu | grep info.product`" == "" ]; then | |
echo 'no output' >> $HWINFO | |
else | |
lshal | grep -i cpu | grep "info.product" >> $HWINFO | |
fi | |
#echo -e "\n\tMemory" >> $HWINFO | |
#if [ "`hwinfo --memory |grep 'Memory Size:'`" == "" ]; then | |
# echo 'no output' >> $HWINFO | |
#else | |
# hwinfo --memory |grep 'Memory Size:' >> $HWINFO | |
#fi | |
echo -e "\n\tVideo Card" >> $HWINFO | |
if [ "`lspci | grep -i vga`" == "" ]; then | |
echo 'no output' >> $HWINFO | |
else | |
lspci | grep -i vga >> $HWINFO | |
fi | |
echo -e "\n\tAudio" >> $HWINFO | |
if [ "`lspci | grep -i audio`" == "" ]; then | |
echo 'no output' >> $HWINFO | |
else | |
lspci | grep -i audio >> $HWINFO | |
fi | |
echo -e "\n\tWireless Networking" >> $HWINFO | |
if [ "`lspci |grep 'Network controller'`" == "" ]; then | |
echo 'no output' >> $HWINFO | |
else | |
lspci |grep "Network controller" >> $HWINFO | |
fi | |
echo -e "\n\tWired Networking" >> $HWINFO | |
if [ "`lspci | grep -i ethernet`" == "" ]; then | |
echo 'no output' >> $HWINFO | |
else | |
lspci | grep -i ethernet >> $HWINFO | |
fi | |
echo -e "\n\tBluetooth" >> $HWINFO | |
if [ "`lsusb | grep -i bluetooth`" == "" ]; then | |
echo 'no device found' >> $HWINFO | |
else | |
lsusb | grep -i bluetooth >> $HWINFO | |
fi | |
#echo -e "\n\tCD/DVD-Rom Drive" >> $HWINFO | |
#if [ "`hwinfo --cdrom |grep Features`" == "" ]; then | |
# echo 'no info available' >> $HWINFO | |
#else | |
# hwinfo --cdrom |grep Features >> $HWINFO | |
#fi | |
echo -e "\n\tHard Drive" >> $HWINFO | |
if [ "`df -ah`" == "" ]; then | |
echo 'no info available' >> $HWINFO | |
else | |
df -ah >> $HWINFO | |
fi | |
echo -e "\n\tErrors in dmesg" >> $HWINFO | |
dmesg | grep -i error >> $HWINFO | |
echo -e "\n\tErrors in messages" >> $HWINFO | |
grep -i error /var/log/messages | tail >> $HWINFO | |
cp $HWINFO $HOSTNAME.txt | |
mkdir SysInfo | |
cp $HWINFO SysInfo/. | |
cp *.txt SysInfo/. | |
tar -czvf SysInfo.tar.gz SysInfo | |
cat $HWINFO | less | |
exit $? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Main System Information | |
Linux localhost.localdomain 2.6.33.5-124.fc13.x86_64 #1 SMP Fri Jun 11 09:38:12 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux | |
Processor | |
no output | |
Video Card | |
01:05.0 VGA compatible controller: ATI Technologies Inc M880G [Mobility Radeon HD 4200] | |
Audio | |
00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA) | |
01:05.1 Audio device: ATI Technologies Inc RS880 Audio Device [Radeon HD 4200] | |
Wireless Networking | |
09:00.0 Network controller: Broadcom Corporation BCM4312 802.11b/g LP-PHY (rev 01) | |
Wired Networking | |
02:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8072 PCI-E Gigabit Ethernet Controller (rev 10) | |
Bluetooth | |
no device found | |
Hard Drive | |
Filesystem Size Used Avail Use% Mounted on | |
/dev/mapper/VolGroup-lv_root | |
50G 4.1G 43G 9% / | |
proc 0 0 0 - /proc | |
sysfs 0 0 0 - /sys | |
devpts 0 0 0 - /dev/pts | |
tmpfs 877M 420K 877M 1% /dev/shm | |
/dev/sda1 485M 63M 398M 14% /boot | |
/dev/mapper/VolGroup-lv_home | |
177G 9.0G 159G 6% /home | |
none 0 0 0 - /proc/sys/fs/binfmt_misc | |
sunrpc 0 0 0 - /var/lib/nfs/rpc_pipefs | |
gvfs-fuse-daemon 0.0K 0.0K 0.0K - /home/wbc/.gvfs | |
imgserv.tc.net:/home/nix | |
447G 370G 54G 88% /mnt/nfs1 | |
Errors in dmesg | |
amd64_edac: probe of 0000:00:18.2 failed with error -22 | |
Errors in messages | |
Jun 14 18:43:58 localhost kernel: amd64_edac: probe of 0000:00:18.2 failed with error -22 | |
Jun 14 18:44:00 localhost NetworkManager[1172]: <warn> bluez error getting default adapter: The name org.bluez was not provided by any .service files | |
Jun 15 06:34:32 localhost dbus-daemon: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.104" (uid=500 pid=2827 comm="/usr/libexec/gdm-user-switch-applet) interface="org.gnome.DisplayManager.Settings" member="GetValue" error name="(unset)" requested_reply=0 destination="org.gnome.DisplayManager" (uid=0 pid=1507 comm="/usr/sbin/gdm-binary)) | |
Jun 15 06:34:32 localhost dbus-daemon: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.104" (uid=500 pid=2827 comm="/usr/libexec/gdm-user-switch-applet) interface="org.gnome.DisplayManager.Settings" member="GetValue" error name="(unset)" requested_reply=0 destination="org.gnome.DisplayManager" (uid=0 pid=1507 comm="/usr/sbin/gdm-binary)) | |
Jun 15 06:34:32 localhost dbus-daemon: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.104" (uid=500 pid=2827 comm="/usr/libexec/gdm-user-switch-applet) interface="org.gnome.DisplayManager.Settings" member="GetValue" error name="(unset)" requested_reply=0 destination="org.gnome.DisplayManager" (uid=0 pid=1507 comm="/usr/sbin/gdm-binary)) | |
Jun 16 07:58:56 localhost kernel: amd64_edac: probe of 0000:00:18.2 failed with error -22 | |
Jun 16 07:58:58 localhost NetworkManager[1091]: <warn> bluez error getting default adapter: The name org.bluez was not provided by any .service files | |
Jun 16 07:59:21 localhost dbus-daemon: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.61" (uid=500 pid=2112 comm="/usr/libexec/gdm-user-switch-applet) interface="org.gnome.DisplayManager.Settings" member="GetValue" error name="(unset)" requested_reply=0 destination="org.gnome.DisplayManager" (uid=0 pid=1396 comm="/usr/sbin/gdm-binary)) | |
Jun 16 07:59:21 localhost dbus-daemon: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.61" (uid=500 pid=2112 comm="/usr/libexec/gdm-user-switch-applet) interface="org.gnome.DisplayManager.Settings" member="GetValue" error name="(unset)" requested_reply=0 destination="org.gnome.DisplayManager" (uid=0 pid=1396 comm="/usr/sbin/gdm-binary)) | |
Jun 16 07:59:21 localhost dbus-daemon: [system] Rejected send message, 2 matched rules; type="method_call", sender=":1.61" (uid=500 pid=2112 comm="/usr/libexec/gdm-user-switch-applet) interface="org.gnome.DisplayManager.Settings" member="GetValue" error name="(unset)" requested_reply=0 destination="org.gnome.DisplayManager" (uid=0 pid=1396 comm="/usr/sbin/gdm-binary)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment