Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ Get basic information about Linux server script     - Commonly used Linux system camouflage method (Linux)

- Ubuntu 14.04 virtual machine switching desktop environments (Linux)

- Linux upgrade Glibc (Linux)

- CentOS 6.4 under PXE + Kickstart unattended operating system installation (Programming)

- The signature can not be verified under Debian (Linux)

- Experts teach you how to identify the actual functional differences between the firewall (Linux)

- vector C ++ sequence containers (Programming)

- Through Oracle to help restore MySQL data problems (Database)

- Linux firewall to prevent external network attacks (Linux)

- Linux operating system buffer overflow attacks Countermeasures (Linux)

- Use custom backup plans for Debian backupninja (Linux)

- Upgrading Oracle 11.2.0.1.0 to 11.2.0.3.0 (Database)

- C # using the HttpClient Note: Preheat the long connection (Programming)

- Python programmers most often committed ten errors (Programming)

- Linux 101 hack book reading notes (Linux)

- Configuring Haproxy log support (syslog logging support) (Server)

- How to view the Linux QPS (Linux)

- Python implementation restart the router (Programming)

- LVM management parameters commonly used commands explained in detail (Linux)

- RHEL 6.5 x86_64 CentOS yum configuration source (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:      
 
- stat Usage: Get permission to file the corresponding figures (Linux)
- Copy files between two Linux hosts (Linux)
- B-tree - ideas and implementation of C language code (Programming)
- Fedora 20 Installation and Configuration (Linux)
- Elaborate .NET Multithreading: Using Task (Programming)
- Android media library of analysis: MediaProvider (Programming)
- Using C ++ Container Templates in Shared Memory (Programming)
- Linux Platform Oracle 11g Single Instance Installation Deployment Configuration Quick Reference (Database)
- Why is better than Git SVN (Linux)
- Spark local development environment to build (Server)
- Installing Linux and Windows 10 dual system (Linux)
- CentOS6.x and Windows XP and Windows Server 2003 Open IPv6 related matters (Linux)
- Zabbix monitoring Oracle Database use Orabbix plug (Enhanced Edition) (Database)
- DM9000 bare Driver Design (Programming)
- The ORA-01113 error is handled with BBED without archiving (Database)
- tar decompression problems gzip: stdin: not in gzip format (Linux)
- C ++ overloaded stream insertion operator and the stream extraction operator (Programming)
- Android Launcher3 Application List Modify a transparent background (Linux)
- How to upgrade to Ubuntu 14.04 Ubuntu 14.10 (Linux)
- Linux boot the system does not display a progress bar setting method (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.