Friday, August 12, 2011

Linux QRTask Commands

Hi,

Those who working as a linux administrator may have came across Quarterly Review Task (QRTask).
Its gathering of information about server after every 4 months. We generally perform QRTASK's its very easy to do, and here are few of important commands used for QRTASK :

You can save below lines as shell script with .sh extension :
-----------------------------------------------------------


echo ---------------------------------------
echo "Server Name"
echo ---------------------------------------
hostname

echo ---------------------------------------
echo "Server Model"
echo ---------------------------------------
dmidecode | grep -m1 "Product Name"

echo ---------------------------------------
echo "System Firmware Revision"
echo ---------------------------------------
dmidecode -s bios-version

echo ---------------------------------------
echo "OS Type"
echo ---------------------------------------
uname -a


echo --------------------------------------
echo "HBA"
echo --------------------------------------
lspci |grep -i -e fib -e hba

echo ---------------------------------------
echo "OS Backups"
echo ---------------------------------------
cat /proc/mdstat

echo ---------------------------------------
echo "System INformation"
echo ---------------------------------------
dmidecode -t system


echo ---------------------------------------
echo "BIOS Information"
echo ---------------------------------------
dmidecode -t bios

echo ---------------------------------------
echo "Processor INformation"
echo ---------------------------------------
dmidecode -t processor





echo ---------------------------------------
echo "CPU information"
echo ---------------------------------------
cat /proc/cpuinfo
           
echo ---------------------------------------
echo "MEMORY-USAGE"
echo ---------------------------------------
cat /proc/meminfo  

echo ---------------------------------------
echo "SWAP"
echo ---------------------------------------
swapon -s

echo ---------------------------------------
echo "I/O throughput"
echo ---------------------------------------
iostat




echo ---------------------------------------
echo "Disk Space"
echo ---------------------------------------
df -h

echo ---------------------------------------
echo "FIRMWARE REVISION"
echo ---------------------------------------
dmidecode --type bios




echo ---------------------------------------
echo "NETWORK INTERFACES"
echo ---------------------------------------

ifconfig | grep eth


echo ---------------------------------------
echo "NETWORK-INFORMATION"
echo ---------------------------------------

ethtool eth0;ethtool eth1;ethtool eth2;ethtool eth3


echo ---------------------------------------
echo "PATCH-LIST"
echo ---------------------------------------
rpm -qa>rpm.txt

echo ---------------------------------------
echo "User List"
echo ---------------------------------------
cat /etc/passwd



This information is then documented for official purpose.

Thanks & Regards,
Girish...

No comments:

Post a Comment