Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ Get basic information about Linux server script     - Redmine Installation (Linux)

- Use dump restore mode fast backup and recovery system FreeBSD (Linux)

- Ubuntu 12.04 64bit Install Source Insight 3.5 and create desktop icons (Linux)

- fcntl file locking function add (Programming)

- To install MySQL 5.6 binary packages under CentOS 6.4 64bit (Database)

- Installation and use GAMIT / GLOBK Software (Linux)

- Distributed Firewall Design on Linux platform (Linux)

- Ubuntu achieve initialization iptables (Linux)

- Linux permissions Detailed (Linux)

- dd command: do hard disk IO performance test (Linux)

- Installation and Configuration JDK8 In CentOS 7 (Linux)

- Ubuntu: HDF5 error: HDF5 header version does not match with the HDF5 library (Linux)

- How to make a U disk to install Ubuntu (Linux)

- C ++ Fundamentals study notes (Programming)

- java.net.NoRouteToHostException of Hadoop problem: no route to host (Server)

- Impact test noatime Linux file access time (Linux)

- STL source code analysis - iterator each container classification (Programming)

- C # socket udp broadcast (Programming)

- shell script: a key to install LAMP, LNMP script (Server)

- CentOS7 install MySQL5.6.22 (Linux)

 
         
  Get basic information about Linux server script
     
  Add Date : 2018-11-21      
         
         
         
 

In order to facilitate the daily operation and maintenance of a simple piece of writing scripts for obtaining centralized Linux server operating system, CPU, memory usage, load, disk usage, network information.

script is relatively simple, do not explain, friends are interested in your own view.

# / bin / bash
#
#Name:! System_info
#Ver: 1.0
#Author: lykyl
#
#
# program Description:
# obtain basic information about the server scripts
#
echo '[OS info]'
echo 'Host Name:' `uname -n`
echo 'OS:' `cat / etc / RedHat-release`
echo 'Kernel:'` uname -r`
echo
echo '[CPU Info]'
echo 'CPU: physical' `grep" physical id "/ proc / cpuinfo | uniq | wc -l` 'cores'`grep" cpu cores "/ proc / cpuinfo | uniq`
echo
echo' [ System Info] '
echo `uptime | sed' s /^.* load / load / g'`
echo" Zombie: `ps aux | awk '{print $ 8, $ 2, $ 11}' | sed -n '/ ^ Z / p' | wc -l` "
echo
echo '[Memory Info]'
echo` free -m | grep Mem | awk '{print " total: "$ 2" MB used: "$ 3" MB free: "$ 4" MB shared: "$ 5" MB buffers: "$ 6" MB cached: "$ 7" MB "} '`
echo
echo '[Disk Info]'
echo -e "` df -h | sed '1d' | awk '/% / {if ($ 6 == "") {printf "% s ttotal:% s tused :% s tUse%:% s n ", $ 5, $ 1, $ 2, $ 4} else {printf"% s ttotal:% s tused:% s tUse%:% s n ", $ 6, $ 2 , $ 3, $ 5}} ' `"
echo
echo' [Net Info] '
echo' IP: ' `ifconfig | grep" inet addr: "| grep -v" 127.0. 0.1 "| awk '{print $ 2}' | awk -F: '{print $ 2}'`
echo "netstat:` netstat -an | awk '/ ^ tcp / {++ s [$ NF]} BEGIN {ORS = ""} END {for (a in s) print a, s [a]} ' `"

     
         
         
         
  More:      
 
- Installation and Configuration JDK8 In CentOS 7 (Linux)
- Linux kernel RCU (Read Copy Update) lock Brief - prequel (Linux)
- How to Install Node.js in CentOS 7 (Linux)
- Install the free open source financial software GnuCash 2.6.6 under Ubuntu (Linux)
- Linux at command (Linux)
- Linux stand-alone OGG synchronous Oracle 11g DB test (Database)
- CentOS6.6 ordinary users to use sudo command to borrow root user privileges (Linux)
- RMAN backup file is much larger than the size of the database Cause Analysis (Database)
- [SHELL] MySQL primary recovery solution from + Keepalived online (Server)
- To update Python version under CentOS system (Linux)
- Copy Recovery using RMAN repository development environment (Database)
- Oracle and MySQL difference between the jdbc (Database)
- How comprehensive resist attacks from the network (Linux)
- Linux and hardware (Linux)
- C ++ CBitmap, HBitmap, Bitmap difference and contact (Programming)
- Linux in order to make NMAP hide and seek with the firewall (Linux)
- Linux C programming and Shell Programming in the development of practical tools similarities summary (Programming)
- Shell Programming points to note about the function (Programming)
- Let Ubuntu 14.04 Save screen luminance value (Linux)
- Install Ubuntu text editor KKEdit 0.2.10 (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.