CentOS 的 Landscape-sysinfo 吗?

CentOS 的 Landscape-sysinfo 吗?

我一直/usr/bin/landscape-sysinfo在 Ubuntu 上使用,现在正在寻找一个可以在 CentOS 机器上使用的替代产品。有没有办法安装要求,使其在 CentOS 上运行?

答案1

我从文章中找到了此脚本Centos 操作系统的 Landscape-sysinfo 已归档

#!/bin/bash
#Simple motd script for Centos 5/6
#created by Vitalijus Ryzakovas

b=`tput bold`
n=`tput sgr0`
echo "Checking for system updates:"
while ps aux | grep -e [y]um > /dev/null; do echo -n .;sleep 1; done &
up=`yum -e0 -d0 check-update | awk '{print $1}'`
reset
echo -e "${b}Hostname:${n} `hostname` \t\t IP address: `/sbin/ifconfig venet0:0 | grep "inet addr" | awk -F: '{print $2}' | awk '{print $1}'`"
echo -e "${b}CPU load:${n} `cat /proc/loadavg | cut -d" " -f1-3`"
echo -e "${b}Uptime:${n} `uptime | cut -d" " -f 4-7 | cut -d"," -f1-2`"
echo -e "Free memorry: `cat /proc/meminfo | grep MemFree | awk {'print int($2/1000)'}` MB \t\t Total memory: `cat /proc/meminfo | grep MemTotal | awk {'print int($2/1000)'}` MB"
echo -e "${b}Available updates:${n} `if [[ ! -n "${up}" ]]; then echo "system up-to-date"; else echo $up; fi`\n"
echo -e "Mail quere length: `exim -bpc`"
echo -e "Proccess number: `cat /proc/loadavg | cut -d"/" -f2| cut -d" " -f1`\n"
echo -e "${b}Active sessions:${n} `w | tail -n +2`"

其结果将如下所示:

图像

相关内容