Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ Get basic information about Linux server script     - Five Linux user space debugging tool (Linux)

- RM Environment Database RMAN Backup Strategy Formulation (Database)

- Database Blob data type conversion String (Programming)

- Fedora 23 How to install LAMP server (Server)

- VirtualBox virtual machine to install Linux (Linux)

- Linux kernel boot to retain large memory method summary (Linux)

- To install Cinnamon desktop environment on your Ubuntu 14.04 / 12.04 (Linux)

- How to display a dialog Bash Shell script (Programming)

- Linux asynchronous read documents by AIO (Programming)

- Examples of Exploration Class File (Programming)

- Oracle data row split multiple lines (Database)

- The most concise Systemd tutorial, just ten minutes (Linux)

- Android Service Lifecycle and usage (Programming)

- Sturdy build secure Linux server (Linux)

- Linux security settings Notes (Linux)

- Android development environment to build under Fedora 13 (Linux)

- Ten linux version of the system (Linux)

- Ubuntu 14.04 installation and configuration environment variable JDK1.8.0_25 (Linux)

- Installation of Python2.7.10 under CentOS 6.4 (Linux)

- Use custom backup plans for Debian backupninja (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:      
 
- pscp use Detailed Windows and Linux each file transfer tool (Linux)
- 3 tips Linux command (Linux)
- Installation Mesos + Marathon + Zookeeper under CentOS 7 (Server)
- How do I use Linux development environment (Linux)
- ogg start being given libnnz11.so: can not open shared object file (Database)
- Linux Hard Disk Partition and file system management (Linux)
- Common DDOS attacks (Linux)
- 6 common PHP security attacks (Linux)
- Depth study and understanding for individual users suicide DDoS attacks (Linux)
- How to use the command line ftp upload and download files (Linux)
- Ant command-line compiler Android project (Programming)
- Python in os.path Magical (Programming)
- Security implementation of disk data protection under Linux (Linux)
- Linux Powerful IDE - Geany configuration instructions (Linux)
- Linux uses shared memory communication process synchronization Withdrawal (Programming)
- SSH without password (Linux)
- Getting Started with Linux: Learn how to upgrade Docker in Ubuntu (Server)
- How do you turn on and off IPv6 address on Fedora (Linux)
- IPTABLES configuration steps under Linux (Linux)
- CentOS / RedHat system partition essential requirements and partition scheme (Linux)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.