Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ Get basic information about Linux server script     - Use matplotlib scientific drawing in Linux (Linux)

- Use exp exported EXP-00091 error (Database)

- MySQL5.6.12 Waiting for commit lock lead to hang from the library housing problem analysis (Database)

- Ubuntu 14.04 LTS next upgrade gcc to gcc-4.9, gcc-5 version (Linux)

- Ubuntu treated with cue file to ape and wav files automatically track points (Linux)

- Linux Basics Tutorial: Combining awk delete data before the specified date hdfs (Linux)

- Git bulk delete remote tag (Linux)

- Linux, C programming language library file handling and preparation of Makefile (Programming)

- 12 Linux Process Management Commands (Linux)

- About Samba certification process and permissions (Linux)

- Linux iptables firewall settings whitelist (RHEL 6 and CentOS 7) (Linux)

- DM9000 timing settings (Programming)

- About enhanced Linux / Unix server system security program (Linux)

- Git commands (Linux)

- Timing task Crontab under Linux system (Linux)

- PostgreSQL log classification and management (Database)

- Ubuntu comes with gedit editor to add Markdown preview widget (Linux)

- Standard and IO redirection (Linux)

- C language keywords Comments (Programming)

- 10 practical Java programming technology (Programming)

 
         
  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:      
 
- File SUID, SGID, Sticky property (Linux)
- Large site architecture study notes (Server)
- Install Ubuntu text editor KKEdit 0.2.10 (Linux)
- Android working with Volley Comments (Programming)
- Shell generated using automated configuration script Orabbix (Database)
- IOS interview questions Summary (Programming)
- Linux with Windows Explorer as a security system (Linux)
- Linux operating system Study Notes (Linux)
- Binary tree to the next node (Programming)
- File permissions under Linux (Linux)
- Iptables use examples (Linux)
- MongoDB version 3.2 WiredTiger storage engine performance tests (Database)
- Overall Physical Migration of Oracle Database with (Database)
- Https (SSL / TLS) Detailed principles (Server)
- Through Oracle to help restore MySQL data problems (Database)
- MySQL and MariaDB traditional master-slave cluster configuration (Database)
- Java reflection summary (Programming)
- Detailed software to run UnixBench (Linux)
- pga_aggregate_target and _pga_max_size can not use absolute limit actual PGA (Database)
- Using IntelliJ IDEA 13 integrated development environment to build Android (Linux)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.