View basic Linux system information

Source: Internet
Author: User

View basic Linux system information

View basic Linux system information

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

# Return hostname and version infomation // return host name and System version Information
Echo-e "\ e [31; 43 m /// hostname infomation ***** \ e [0 m"
Hostname
Uname-r
Cat/proc/version
Echo ""

# File system disk space usage // available space of the File system disk
Echo-e "\ e [31; 43 m ***** File System Disk Space usage INFOMATION ***** \ e [0 m"
Df-h
Echo ""

# Idie time system and use of memory // memory in idle and used system
Echo-e "\ e [31; 43 m ***** Idie system And use of memory infomation ***** \ e [0 m"
Free
Echo ""

# System start time // system start time
Echo-e "\ e [31; 43 m ***** System start time INFOMATION ***** \ e [0 m"
Uptime
Echo ""

# User logged on // Login User
Echo-e "\ e [31; 43 m ****** User logged on INFOMATION ****** \ e [0 m"
Who
Echo ""

# Use memory up to five processes // five processes with the maximum memory usage
Echo-e "\ e [31; 43 m ***** Use memory up to five processes INFOMATION ***** \ e [0 m"
Ps-eo % mem, % cpu, comm -- sort =-% mem | head-n 6
Echo ""
Echo-e "\ e [1; 32mDone. \ e [0 m"

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.