更新install_shell/get_parameter_log.sh文件
modified: install_shell/get_parameter_log.sh
Signed-off-by: weishuai <swei@linx-info.com>
This commit is contained in:
@@ -16,39 +16,39 @@ reset_color() {
|
||||
echo -en "\\033[0;39m"
|
||||
}
|
||||
|
||||
exit_script() {
|
||||
#exit_script() {
|
||||
|
||||
echo -e "由于凝思安全功能不正常,是否提前退出收集信息脚本(y/n)?\n"
|
||||
echo -e "Because linx security function is not normal, whether early exit collect information script(y/n)?\n"
|
||||
read flag_of_exit
|
||||
if [ -z ${flag_of_exit} ]
|
||||
then
|
||||
flag_of_exit="n"
|
||||
fi
|
||||
if [ ${flag_of_exit} == "y" ];then
|
||||
reset_color
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
grep '6.0.3' /etc/issue &>/dev/null
|
||||
if [ $? -eq 0 ];then
|
||||
if [ -d /sys/kernel/security/linx ];then
|
||||
echo "The linx6.0.3 safety function is normal"
|
||||
else
|
||||
echo "The linx6.0.3 safety function abnormal"
|
||||
echo_fail
|
||||
exit_script
|
||||
fi
|
||||
else
|
||||
lsmod |grep linx &>/dev/null
|
||||
if [ $? -eq 0 ];then
|
||||
echo "The rocky4.2 or linx6.0.4 security module is loaded."
|
||||
else
|
||||
echo "The rocky4.2 or linx6.0.4 security module isn't loaded."
|
||||
echo_fail
|
||||
exit_script
|
||||
fi
|
||||
fi
|
||||
# echo -e "由于凝思安全功能不正常,是否提前退出收集信息脚本(y/n)?\n"
|
||||
# echo -e "Because linx security function is not normal, whether early exit collect information script(y/n)?\n"
|
||||
# read flag_of_exit
|
||||
# if [ -z ${flag_of_exit} ]
|
||||
# then
|
||||
# flag_of_exit="n"
|
||||
# fi
|
||||
# if [ ${flag_of_exit} == "y" ];then
|
||||
# reset_color
|
||||
# exit 1
|
||||
# fi
|
||||
#}
|
||||
#grep '6.0.3' /etc/issue &>/dev/null
|
||||
#if [ $? -eq 0 ];then
|
||||
# if [ -d /sys/kernel/security/linx ];then
|
||||
# echo "The linx6.0.3 safety function is normal"
|
||||
# else
|
||||
# echo "The linx6.0.3 safety function abnormal"
|
||||
# echo_fail
|
||||
# exit_script
|
||||
# fi
|
||||
#else
|
||||
# lsmod |grep linx &>/dev/null
|
||||
# if [ $? -eq 0 ];then
|
||||
# echo "The rocky4.2 or linx6.0.4 security module is loaded."
|
||||
# else
|
||||
# echo "The rocky4.2 or linx6.0.4 security module isn't loaded."
|
||||
# echo_fail
|
||||
# exit_script
|
||||
# fi
|
||||
#fi
|
||||
reset_color
|
||||
export LANG=posix
|
||||
E_BADARGS=65
|
||||
@@ -133,14 +133,24 @@ cp /etc/rc.d/rc.local ./${hostname}.etc.rc.d.rc.local
|
||||
cp /etc/X11/xorg.conf ./${hostname}.etc.X11.xorg.conf
|
||||
cp /etc/cgconfig.conf ./${hostname}.etc.cgconfig.conf
|
||||
cp /etc/cgrules.conf ./${hostname}.etc.cgrules.conf
|
||||
cp /etc/ntp.conf ./${hostname}.etc.ntp.conf
|
||||
cp /etc/ntp/ntp.conf ./${hostname}.etc.ntp.ntp.conf
|
||||
cp /etc/linxsn/cgroup_sn.conf ./${hostname}.etc.linxsn.cgroup_sn.conf
|
||||
cp /etc/linxsn/HA_sn.conf ./${hostname}.etc.linxsn.HA_sn.conf
|
||||
cp /etc/linxsn/multipath_sn.conf ./${hostname}.etc.linxsn.multipath_sn.conf
|
||||
cp /etc/sysctl.conf ./${hostname}.etc.sysctl.conf
|
||||
tar czvf ./${hostname}.etc.sysctl.d.tgz /etc/sysctl.d
|
||||
tar czvf ./${hostname}.etc.logrotate.d.tgz /etc/logrotate.d
|
||||
cp /etc/modprobe.conf ./${hostname}.modprobe.conf
|
||||
tar czvf ./${hostname}.etc.modprobe.d.tgz /etc/modprobe.d
|
||||
cp /etc/sysconfig/modules ./${hostname}.etc.sysconfig.modules
|
||||
cp /etc/ld.so.conf ./${hostname}.etc.ld.so.conf
|
||||
tar czvf ./${hostname}.etc.ld.so.conf.d.tgz /etc/ld.so.conf.d
|
||||
cp /usr/sbin/update_time.sh ./${hostname}.usr.sbin.update_time.sh
|
||||
cat /proc/cmdline>./${hostname}.cmdline
|
||||
cat /proc/asound/cards>./${hostname}.proc.asound.cards
|
||||
df >./${hostname}.df
|
||||
df -h >./${hostname}.df.-h
|
||||
df -ih >./${hostname}.df.-ih
|
||||
last -i >./${hostname}.last.-i.wtmp
|
||||
last -i -f /var/log/btmp >./${hostname}.last.-i.btmp
|
||||
lastlog >./${hostname}.lastlog
|
||||
@@ -212,8 +222,17 @@ cat /lxcg/oms_limits/tasks>./${hostname}.lxcg.cgroup.oms.tasks
|
||||
free>./${hostname}.free
|
||||
top -bn10 >./${hostname}.top.-bn10
|
||||
fdisk -l >./${hostname}.fdisk.-l
|
||||
grep '6.0.3' /etc/issue &>/dev/null
|
||||
if [ $? -ne 0 ];then
|
||||
parted -l >./${hostname}.parted.-l
|
||||
fi
|
||||
top -bn1 -H >./${hostname}.top.-bn1.-H
|
||||
mii-tool>./${hostname}.mii-tool
|
||||
ipmitool -I open sel list>./${hostname}.ipmitool.i.open.sel.list
|
||||
ipmitool -I open sdr>./${hostname}.ipmitool.i.open.sdr
|
||||
ipmitool -I open sensor list>./${hostname}.ipmitool.i.open.sensor.list
|
||||
ipmitool -I open chassis restart_cause>./${hostname}.ipmitool.i.open.chassis.restart_cause
|
||||
ipmitool -I open chassis policy list>./${hostname}.ipmitool.i.open.chassis.policy.list
|
||||
cat /proc/loadavg >./${hostname}.proc.loadavg
|
||||
cat /proc/net/bonding/bond0 >./${hostname}.proc.net.bonding.bond0
|
||||
cat /proc/net/bonding/bond1 >./${hostname}.proc.net.bonding.bond1
|
||||
@@ -226,9 +245,12 @@ uname -a >./${hostname}.uname.-a
|
||||
crm configure show>./${hostname}.crm.configure.show
|
||||
crm_mon -1>./${hostname}.crm_mon.-1
|
||||
cat /etc/corosync/corosync.conf >./${hostname}.etc.corosync.corosync.conf
|
||||
corosync-cfgtool -s >./${hostname}.corosync-cfgtool.-s
|
||||
cat /etc/corosync/lxha_iplist.conf >./${hostname}.etc.corosync.lxha_iplist.conf
|
||||
cat /etc/multipath.conf >./${hostname}.etc.multipath.conf
|
||||
multipath -ll >./${hostname}.multipath-ll
|
||||
cat /etc/lvm/lvm.conf >./${hostname}.etc.lvm.lvm.conf
|
||||
cat /etc/security/limits.conf >./${hostname}.etc.security.limits.conf
|
||||
cat /proc/meminfo >./${hostname}.proc.meminfo
|
||||
lsmod >./${hostname}.lsmod
|
||||
sysctl -A>./${hostname}.sysctl.-A
|
||||
@@ -240,9 +262,12 @@ cat ~oms/.tcshrc>./${hostname}.oms.tcshrc
|
||||
cat ~ems/.tcshrc>./${hostname}.ems.tcshrc
|
||||
cat /etc/crontab>./${hostname}.etc.crontab
|
||||
tar czvf ./${hostname}.etc.tgz /etc/rc.d /etc/init.d /etc/rc?.d
|
||||
tar czvf ./${hostname}.etc.security.tgz /etc/security
|
||||
tar czvf ./${hostname}.etc.pam.d.tgz /etc/pam.d
|
||||
faillog -a > ./${hostname}.faillog.-a
|
||||
crontab -u d5000 -l>./${hostname}.var.spool.cron.crontabs.d5000
|
||||
netstat -anp>./${hostname}.netstat.-anp
|
||||
ps uaxw>./${hostname}.ps.auxw
|
||||
ps auxww>./${hostname}.ps.auxww
|
||||
ps eauxf>./${hostname}.ps.eauxf
|
||||
ps -efL>./${hostname}.ps.-efL
|
||||
pstree >./${hostname}.pstree
|
||||
@@ -444,8 +469,10 @@ then
|
||||
#tar czvf ./${hostname}.linx-watch-top.tgz /var/log/linx*.log
|
||||
fi
|
||||
#tar czvf /opt/${hostname}.${DATE}.tgz /tmp/${hostname}
|
||||
rm ~sysadmin/*.tgz
|
||||
tar czvf ~sysadmin/${hostname}.${DATE}.tgz /tmp/${hostname}
|
||||
chown sysadmin.sysadmin ~sysadmin/${hostname}.${DATE}.tgz
|
||||
|
||||
rm -rf /tmp/${hostname}
|
||||
export LANG=zh_CN.utf-8
|
||||
|
||||
|
||||
Reference in New Issue
Block a user