Thursday, 7 May 2009

Basic linux script to document system

!#/usr/bin/ksh
echo '#####date'
date
echo "#####system name kernel info"
uname -a
echo "#####name and version OS"
head -n1 /etc/issue
#echo "#####Partitions registered"
#cat /proc/partitions
echo "#####MEMORY Info"
grep MemTotal /proc/meminfo
echo "#####CPU info"
grep "model name" /proc/cpuinfo
echo "#####filesystem mounts"
mount | column -t
echo "#####uptime"
uptime
echo "#####disk information"
hdparm -i /dev/sda
echo "#####file system capacity"
df -k
echo "ipconfig"
ifconfig

No comments:

Extending JDE to generative AI