From f5c36fb2c443380d1284e39ccfed3f0ff9359261 Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Thu, 16 Aug 2012 01:02:18 +0200 Subject: [PATCH] Add support for swapon, mdadm, LVM + dmsetup While ad it make the script use bash in shebang to avoid failing bashism. --- grml-hwinfo | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/grml-hwinfo b/grml-hwinfo index 4105ee0..52fabd4 100755 --- a/grml-hwinfo +++ b/grml-hwinfo @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # Filename: grml-hwinfo # Purpose: get hardware information # Authors: grml-team (grml.org), (c) Michael Prokop @@ -149,6 +149,7 @@ cd "${OUTDIR}" || exit 1 for i in free lsmod mount lsdev ; do exectest $i && $i > $i done + swapon -s > swapon 2>swapon.error # proc stuff for i in cpuinfo interrupts cmdline devices dma fb iomem ioports \ @@ -229,6 +230,16 @@ else /usr/share/doc/lm-sensors/examples/eeprom/decode-dimms.pl > decode-dimms 2>decode-dimms.error fi + exectest mdadm && mdadm --detail /dev/md[0-9]* >> mdadm 2>mdadm.error + + # LVM + exectest pvs && pvs > pvs 2>pvs.error + exectest vgs && vgs > vgs 2>vgs.error + exectest lvs && lvs > lvs 2>lvs.error + exectest lvdisplay && lvdisplay > lvdisplay 2>lvdisplay.error + + exectest dmsetup && dmsetup ls > dmsetup_ls 2>dmsetup_ls.error + for disk in $disklist; do exectest smartctl && echo "smartctl -a /dev/$disk :\n" >> smartctl && smartctl -a /dev/$disk >> smartctl && echo "\n\n" >> smartctl exectest hdparm && echo "hdparm -iv /dev/$disk :\n" >> hdparm && hdparm -iv /dev/$disk >> hdparm && echo "\n\n" >> hdparm -- 2.1.4