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

- DVD production using CentOS installation source within the company Yum (Linux)

- Linux script to copy the folder to all folders with the same name (Linux)

- CentOS 6.5 installation and deployment SVN 1.8.10 (Linux)

- CentOS 6.5 installation configuration DRBD (Server)

- Oracle 11g users to create, authorize and import dmp file (Database)

- Install NetBeans IDE 8.0 on Ubuntu, Linux Mint, Elementary OS, and Debian (Linux)

- Ubuntu 12.04 commonly use shortcuts finishing Share (Linux)

- Getting the Linux shell variable test (Programming)

- How do I upgrade to Ubuntu 15.04 (Beta) (Linux)

- C ++ input and output summary _ Input (Programming)

- Let OS X support NTFS write file (Linux)

- Depth understanding of the TCP protocol (Database)

- Share Practical Tutorial GitHub (Linux)

- Ubuntu 14.04.1 LTS compile and install the new kernel (Linux)

- By way of a binary installation innobackupex (Database)

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

- A well-known but rarely used skills: object pool (Programming)

- Linux file system structure Introduction (Linux)

- How to turn Java String into Date (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:      
 
- Flow control message transmission between RAC (Database)
- Let MySQL 5.6 support Emoji expression (Database)
- SecureCRT connect virtual machine Linux system (Ubuntu) (Linux)
- AIX system file security aspects (Linux)
- Linux Samba server-side structures and the use of the client (Server)
- Java call by value and by reference (Programming)
- Docker startups use continuous integration deployment (Server)
- Database start listening TNS-12537, TNS-12560 error (Database)
- Linux, ls command to achieve (Linux)
- JavaScript is implemented without new keywords constructor (Programming)
- Unix / Linux commonly used to clean up disk space command (Linux)
- How to build a custom exclusive Ubuntu Live CD (Linux)
- Vim useful plugin: EasyGrep (Linux)
- Lenovo Ultrabooks Ubuntu system can not open the wireless hardware switch solutions (Linux)
- Linux find command detailing (Linux)
- lolcat: an output terminal rainbow effects in the Linux command-line tool (Linux)
- Good wireless network security information spread in the air (Linux)
- Compile and install the latest version of Redis Stable (Database)
- Reset CentOS / RHEL root account password 7 (Linux)
- MySQL combination Git achieve differential backups can be used in the production environment (Database)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.