nsbin/get-sysinfo.sh

31 lines
298 B
Bash
Raw Normal View History

#!/bin/sh
host="$(hostname)"
dest="${0%%*/}.${host}.log"
(
# log, what produced the output
cat "$0"
uname -a
dmesg
# pci stuff
lspci -nn
lspci -vv
# hw in total
lshw
# ram
free
# cpu
cat /proc/cpuinfo
# disk
mount
df -h
) 2>&1 | tee "$dest"