Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ Get basic information about Linux server script     - How to enhance the Nagios server security (Linux)

- Linux environment Duplex (multi-machine) automatic mutual backup scheme (Linux)

- RedHat 6.5 installation and deployment Openfire (Server)

- Linux some lessons learned about network security (Linux)

- To create a full command line Android Build System (Linux)

- Oracle Database Restore (Database)

- Performance issues under CentOS 6.5 VLAN devices (Linux)

- Linux user groups, file permissions Detailed (Linux)

- The Gitlab migrated to Docker container (Server)

- Modify MySQL character encoding under Linux (Database)

- Why JavaScript basic types can invoke methods (Programming)

- System with Windows Remote Desktop to connect Ubuntu 15.04 (Linux)

- openSUSE 13.1 / 13.2 installation SoundConverter 2.1.2 (Linux)

- Java memory model subclasses (Programming)

- How to set up HTTPS policies for older browsers (Server)

- Docker data container protection the pros and cons (Server)

- How to find on Linux and delete duplicate files: FSlint (Linux)

- How to disable IPv6 on Ubuntu, Linux Mint, Debian (Linux)

- CentOS How to mount the hard drive (Linux)

- iscsiadm command usage (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:      
 
- CentOS / Linux restart active NIC connection paths / network configure error Error Resolution (Linux)
- linux server security (Linux)
- AppCode developed Mac OS X application or shared library experience summary (Programming)
- To install the Ubuntu Touch emulator on Ubuntu (Linux)
- Linux how to prohibit the use of Ping command (Linux)
- Ubuntu users Steam controller does not work solutions (Linux)
- Oracle large table to clean truncate .. reuse storage (Database)
- IP configuration under Linux (Linux)
- Basic Java JNI (Programming)
- Encounter ORA-00600: internal error code, arguments: [4194] ORA-1552 (Database)
- Compare Swift achieve rapid sorting and sorted Methods (Programming)
- Win7 used Eclipse to connect the virtual machine in Ubuntu Hadoop2.4 (Server)
- How to install Git client in Ubuntu (Linux)
- Log4Net (Linux)
- Testing Oracle 11g RMAN replicate database (Database)
- CentOS install SystemTap-2.6 (Linux)
- Kubernetes cluster deployment (Server)
- Using shell users or virtual users to login to pureftpd (Linux)
- VirtualBox 4.3 Can not open a new task for a virtual computer solution (Linux)
- MySQL performance view and configure finishing Daquan (Database)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.