查看Linux基本系统信息
2016-04-22 14:44
246 查看
#! /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系统用户下的crontab任务不执行问题处理
- Linux下libiconv库的安装和使用
- Linux系统中date格式输出
- 在Centos中yum安装和卸载软件的使用方法
- Linux netstat命令详解
- linux系统的7种运行级别
- linux系统的7种运行级别
- linux系统的7种运行级别
- Linux下集群时间同步
- linux基础命令之:su和sudo用户切换命令的使用
- Linux ssh远程登录到另一台机器命令
- 如何让vim编辑器永久显示行号
- centos7 安装nfs报错
- Linux虚拟地址空间布局
- linux上挂载windows共享文件夹
- Linux下 开发工具和资源的位置
- Linux Kernel Release Versions
- linux中,常用的账号管理命令
- linux期中总结
- 让linux每天定时备份MySQL数据库并删除五天前的备份文件