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

- Start Linux ISO image directly from the hard disk (Linux)

- Good wireless network security information spread in the air (Linux)

- MongoDB configuration in Ubuntu 14.04 (Database)

- Virtual Judge environment to build and configure under Ubuntu (Server)

- MyCAT read and write separation of MySQL (Database)

- Linux Network Programming - raw socket instance: MAC Address Scanner (Programming)

- Debian (Wheezy) were installed wxPython GUI development (Linux)

- The Java way to stop a thread of execution (Programming)

- Ubuntu installation module Python rq (Linux)

- ORA-30926 and MERGE tables empty the temporary occupation problem (Database)

- About Java 7 module system (Programming)

- Linux 4.0+ kernel support for hardware switching module (HW Switch Offload) (Linux)

- Spring AOP custom annotation way to achieve log management (Programming)

- The method of CentOS-7.0. The installation and configuration of Tomcat-7 (Server)

- Linux dd command make U disk boot disk (Linux)

- Linux folder and extract the differential file comparison techniques -rsync Magical (Linux)

- File sharing and fork function (Programming)

- Android timer use (Programming)

- Use Ambari rapid deployment Hadoop big data environment (Server)

 
         
  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:      
 
- Oracle 11g can not export a variety of empty table solution (Database)
- Linux system security configuration (Linux)
- iostat command Detailed (Linux)
- Ubuntu 14.04 Install WordPress on Nginx (Server)
- See how --nand flash timing diagram of a read operation Comments (Programming)
- Recovery from MySQL master data consistency summary (Database)
- Red Hat Linux security settings document (Linux)
- Oracle Database import and export combat (Database)
- Analyzing Linux server architecture is 32-bit / 64-bit (Server)
- Asynchronous communication mechanism between the Android source code analysis thread (Programming)
- Java concurrent programming combat (using synchronized synchronization method) (Programming)
- How to install Go1.5 source development environment on Mac (Server)
- W and uptime command (Linux)
- NIC configuration parameters under Linux (Linux)
- Linux Firewall Basics (Linux)
- Use smartmontools view the health status of hard disk (Linux)
- Xshell configure SSH free password (Server)
- How to clear the v $ archived_log view expiration information (Database)
- TeamCity continuous integration in the Linux installation (Linux)
- How to install the client sqlplus under linux (Database)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.