关闭

HP-UX系统信息备份脚本

标签: HP-UX
270人阅读 评论(0) 收藏 举报
分类:

##### 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/

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:670次
    • 积分:25
    • 等级:
    • 排名:千里之外
    • 原创:2篇
    • 转载:0篇
    • 译文:0篇
    • 评论:0条
    文章分类
    文章存档