From 48ee8476ffbe434b4e9decf258ef40d5ee3cfde8 Mon Sep 17 00:00:00 2001 From: Your Name Date: Mon, 9 Jan 2023 09:22:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- os/get-os-init.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/os/get-os-init.sh b/os/get-os-init.sh index 7dcb8f3..3514b25 100644 --- a/os/get-os-init.sh +++ b/os/get-os-init.sh @@ -62,7 +62,24 @@ remote_yum_make(){ } init(){ + # 系统信息采集 + color Info "当前用户 $USER" + color Info "当前时间 `date "+%F %X"`" + echo 3 >/proc/sys/vm/drop_caches + color Info "当前内存 $(free |awk 'NR==2{print $4/1024}')M" + color Info "当前核心 $(grep -E '^processor' /proc/cpuinfo|wc -l)个" + color Info "核心品牌 $(grep -E '^model name' /proc/cpuinfo |head -n 1 |awk -F: '{print $2}')" + color Info "启动时长 $(uptime |awk -F',' '{print $1}')" color Success "开始配置静态ip" + color Info "修改文件打开数、进程打开数" +cat >>/etc/security/limits.conf <> /etc/sysctl.conf +sed -i 's/#UseDNS.*/UseDNS no/' /etc/ssh/sshd_config static_addr if [ $? -eq 10 ];then color Success "静态ip配置并检测完成"