Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ Get basic information about Linux server script     - A list of the basics of Python, Ganso, Dictionary (Programming)

- Linux firewall to prevent external network attacks (Linux)

- Ubuntu Server security risk checks (Linux)

- NFS-based services and service utilization Corosync DRBD high availability cluster configuration, respectively (Server)

- Apache Mina framework Practice (Programming)

- Linux Network Programming - raw socket can do (Programming)

- Oracle and MySQL difference between the jdbc (Database)

- Nginx introduced Dynamic Module Architecture (Server)

- Java Foundation - implicit conversion vs cast (Programming)

- Cacti Linux-based system monitoring and alarm (Linux)

- Oracle 10g, 11g database silent installation of small differences (Database)

- Defensive programming in PHP (Programming)

- Configure the Linux kernel and use iptables to do port mapping (Linux)

- Use cmake to compile and install MySQL 5.5 (Database)

- Getting the Linux shell variable test (Programming)

- Oracle Database High-Risk Vulnerability Warning (Database)

- xCAT line installation on CentOS 6.X (Linux)

- Ubuntu 14.04 configure JDK1.8.0_25, switchable version (Linux)

- Linux platform NTOP Installation and Configuration (Linux)

- Linux system server network security management tips (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:      
 
- Browser caching mechanism on the analysis (Linux)
- The best tools and techniques to find data on a Unix system (Linux)
- Binary tree to the next node (Programming)
- SSH without password (Linux)
- The best known for archiving / compression tool under linux (Linux)
- CentOS / Linux SELinux Close (Linux)
- CoreOS Linux introduces Kubernetes kubelet (Server)
- Linux Disk and File Management (Linux)
- Getting Started with Linux system to learn: How to compress JPEG images on the command line (Linux)
- Red Flag Linux Desktop 6.0 hard disk installation guide (Programming)
- Linux installation and error under codeblocks exclude [Ubuntu 10.04] (Linux)
- Ubuntu Apache2 setting, problem solving css, pictures, etc. can not be displayed (Server)
- Linux System Getting Started Tutorial: Linux file permissions brief description (Linux)
- Several reasons MySQL garbled (Database)
- Java List add duplicate the same object (Programming)
- Learning MySQL data types (Database)
- Standardized UNIX command-line tool (Linux)
- Through eight skills to let you become a super Linux end-user (Linux)
- C ++ thread creates transmission parameters are changed (Programming)
- 20 Top Linux commands (Linux)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.