#!/bin/bash
os_system(){
##系统信息
os_type=(uname)echo"(uname) echo "操作系统的类型 :{os_type}"

##系统信息
os_ver=(cat/etc/redhatrelease)echo"(cat /etc/redhat-release) echo "操作系统的类型 :{os_ver}"

os_ker=(unamer)echo"(uname -r) echo "操作系统的版本信息 :{os_ker}"

os_time=(date+echo":(date +%F_%T) echo "服务器当前时间:{os_time}"

os_last_reboot=$(uptime |awk ‘{print $3,$4}’|awk -F ‘,’ '{print KaTeX parse error: Expected 'EOF', got '}' at position 2: 1}̲') echo "服务器最后重…{os_last_reboot}"
os_hostname=(hostname)echo"(hostname) echo "服务器主机名称:{os_hostname}"
}
while :
do
os_system
done

系统信息脚本

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-16
  • 2022-12-23
  • 2021-11-28
  • 2021-05-17
  • 2021-07-01
  • 2021-04-29
猜你喜欢
  • 2022-01-02
  • 2022-01-17
  • 2021-07-16
  • 2021-06-19
  • 2021-08-31
  • 2021-07-19
  • 2021-11-08
相关资源
相似解决方案