From: Michael Prokop Date: Wed, 15 Aug 2012 23:02:18 +0000 (+0200) Subject: Add support for swapon, mdadm, LVM + dmsetup X-Git-Tag: v0.6.0~11 X-Git-Url: http://git.grml.org/?p=grml-hwinfo.git;a=commitdiff_plain;h=f5c36fb2c443380d1284e39ccfed3f0ff9359261 Add support for swapon, mdadm, LVM + dmsetup While ad it make the script use bash in shebang to avoid failing bashism. --- 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