码迷,mamicode.com
首页 > 系统相关 > 详细

查看Linux基本系统信息

时间:2016-04-22 15:59:39      阅读:204      评论:0      收藏:0      [点我收藏+]

标签:

#! /bin/bash
#The scripts will return the system infomation

#return hostname and version infomation   // 返回主机名和系统版本信息
echo -e "\e[31;43m///// HOSTNAME INFOMATION *****\e[0m"
hostname
uname -r
cat /proc/version
echo ""

#File system disk space usage            // 文件系统磁盘可用空间
echo -e "\e[31;43m***** File System Disk Space usage INFOMATION *****\e[0m"
df -h
echo ""

#Idie time system and use of memory     //系统空闲和使用中的内存
echo -e "\e[31;43m***** Idie system And use of memory infomation *****\e[0m"
free
echo ""

#system start time                     //系统启动时间
echo -e "\e[31;43m***** System start time INFOMATION *****\e[0m"
uptime
echo ""

#User logged on                        //登录的用户
echo -e "\e[31;43m***** User logged on INFOMATION *****\e[0m"
who
echo ""

#Use memory up to five processes         //使用内存最多的五个进程
echo -e "\e[31;43m***** Use memory up to five processes INFOMATION *****\e[0m"
ps -eo %mem,%cpu,comm --sort=-%mem | head -n 6
echo ""
echo -e "\e[1;32mDone.\e[0m"

 

查看Linux基本系统信息

标签:

原文地址:http://www.cnblogs.com/yangxiaofei/p/5421263.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!