HP-UX系统信息备份脚本

##### HOST Information #####
echo "# uname -a" > $PWD/uname.txt | uname -a >> $PWD/uname.txt
echo "# model" > $PWD/model.txt | model >> $PWD/model.txt

##### IO Map #####
echo "# ioscan -fnk" > $PWD/ioscan_fnk.txt | ioscan -fnk >> $PWD/ioscan_fnk.txt
echo "# ioscan -fnkCdisk" > $PWD/ioscan_disk.txt | ioscan -fnkCdisk >> $PWD/ioscan_disk.txt
echo "# ioscan -fnkCext_bus" > $PWD/ioscan_ext_bus.txt | ioscan -fnkCext_bus  >> $PWD/ioscan_ext_bus.txt
echo "# kmtune"> $PWD/kernel.txt| kmtune >>$PWD/kernel.txt

##### LVM Configuration #####
echo "# bdf" > $PWD/bdf.txt | bdf >> $PWD/bdf.txt
echo "# strings /etc/lvmtab" > $PWD/lvmtab.txt | strings /etc/lvmtab >> $PWD/lvmtab.txt
echo "# vgdisplay -v " > $PWD/vgdisplay_v.txt | vgdisplay -v >> $PWD/vgdisplay_v.txt
echo "# vgdisplay " > $PWD/vgdisplay.txt | vgdisplay >> $PWD/vgdisplay.txt
echo "# ll /dev/*/group" > $PWD/vg_minor.txt | ll /dev/*/group >> $PWD/vg_minor.txt
echo "# ll /dev/*/r*" > $PWD/lv_minor.txt | ll /dev/*/r* >> $PWD/lv_minor.txt
echo "# swapinfo " > $PWD/swapinfo.txt | swapinfo >> $PWD/swapinfo.txt
echo "# lvlnboot -v " > $PWD/lvlnboot.txt | lvlnboot -v >> $PWD/lvlnboot.txt
echo "# fstab " > $PWD/fstab.txt | cat /etc/fstab >> $PWD/fstab.txt

##### account information #####
echo "# cat $HOME/.profile" > $PWD/profile.txt | cat $HOME/.profile >> $PWD/profile.txt
echo "# cat /etc/passwd" > $PWD/passwd.txt | cat /etc/passwd >> $PWD/passwd.txt
echo "# cat /etc/group" > $PWD/group.txt | cat /etc/group >> $PWD/group.txt
echo "# cat /etc/oratab" > $PWD/oratab.txt | cat /etc/oratab >> $PWD/oratab.txt

##### Software information #####
echo "# swlist" > $PWD/swlist.txt | swlist >> $PWD/swlist.txt
if [ `uname -r` = 'B.11.00' ]
then
        echo "# swlist -l patch" > $PWD/swlist_patch.txt | swlist -l patch  >> $PWD/swlist_patch.txt
else
        echo "# swlist -l fileset | grep patch" > $PWD/swlist_patch.txt | swlist -l fileset | grep patch >> $PWD/swlist_patch.txt
fi

##### Network Configuration #####
echo "# lanscan -v" > $PWD/lanscan_v.txt | lanscan -v >> $PWD/lanscan_v.txt
echo "# lanscan" > $PWD/lanscan.txt | lanscan >> $PWD/lanscan.txt
echo "# netstat -in" > $PWD/netstat_in.txt | netstat -in >> $PWD/netstat_in.txt
echo "# netstat -rn" > $PWD/netstat_rn.txt | netstat -rn >> $PWD/netstat_rn.txt
echo "# cat /etc/hosts" > $PWD/hosts.txt | cat /etc/hosts >> $PWD/hosts.txt
echo "# cat /etc/rc.config.d/netconf" > $PWD/netconf.txt | cat /etc/rc.config.d/netconf >> $PWD/netconf.txt
echo "# cat /etc/inetd.conf" > $PWD/inetd.conf.txt | cat /etc/inetd.conf >> $PWD/inetd.conf.txt
echo "# cat /var/adm/inetd.sec" > $PWD/inetd.sec.txt | cat /var/adm/inetd.sec >> $PWD/inetd.sec.txt
echo "# cat $HOME/.rhosts" > $PWD/rhost.txt | cat $HOME/.rhosts >> $PWD/rhosts.txt
echo "# cat /etc/netconfig" > $PWD/netconfig.txt | cat /etc/netconfig >> $PWD/netconfig.txt
echo "# cat /etc/services" > $PWD/services.txt | cat /etc/services >> $PWD/services.txt

###### MC/SG Cluster Configuration #####
echo "# cmviewcl" > $PWD/cmviewcl.txt | cmviewcl >> $PWD/cmviewcl.txt
echo "# cmviewcl -v" > $PWD/cmviewcl_v.txt | cmviewcl -v >> $PWD/cmviewcl_v.txt
cmviewconf -o $PWD/cmviewconf.txt
cp -p -r /etc/cmcluster $PWD/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值