Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ Get basic information about Linux server script     - Tomcat session clustering and server session (Server)

- CentOS 5.5 kernel upgrade installation iftop (Linux)

- Tmux Getting Start (Linux)

- To use yum install VLC under CentOS (Linux)

- Using a proxy method under Linux terminal (Linux)

- CentOS environment prepared crontab scheduled tasks (Linux)

- 64 Ubuntu 15.04 Linux kernel upgrade to Linux 4.1.0 (Linux)

- IntelliJ IDEA common list of shortcuts (Linux)

- Spring classic face questions Share (Programming)

- MySQL combination Git achieve differential backups can be used in the production environment (Database)

- Linux file system management partition, format, mount - label mount (Linux)

- Fedora 22 Server how to upgrade to Fedora 23 Beta Server (Linux)

- PostgreSQL procedural language learning (Database)

- Java framework for parallel study - ForkJoin (Programming)

- How to use Linux iptables tool for network sharing (Linux)

- Windows 7 hard disk installation notes Debian (Linux)

- OpenGL Superb Learning Notes - Depth Texture and Shadows (Programming)

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

- Linux and Unix systems really do network more secure (Linux)

- Linux System Getting Started Tutorial: How to update outdated version of Ubuntu (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:      
 
- Flask deploy applications using Nginx on Ubuntu (Server)
- C + + secondary pointer memory model (pointer array) (Programming)
- Try debugfs restore the deleted files ext3 file system (Linux)
- Zabbix monitoring different versions of RAID installation and monitoring and MySQL master-slave monitor (Server)
- No password on Oracle and MySQL login (Database)
- Using IntelliJ IDEA 13 integrated development environment to build Android (Linux)
- Service manager OpenBSD on rccl (Server)
- Differences Shell scripting languages and compiled languages (Programming)
- MongoDB start under Linux (Database)
- The first IOS Objective-C program (Programming)
- Linux 6 use UDEV binding shared storage (Linux)
- To install the iNode client on UbuntuKylin 13.10 (Linux)
- MySQL bulk insert data script (Database)
- Java precision four operations (Programming)
- Oracle 12C with multi-column index (Database)
- Ubuntu installed racing game Speed Dreams 2.1 (Linux)
- To use yum install VLC under CentOS (Linux)
- EChart simple and practical control on chart (Programming)
- Linux basic introductory tutorial ---- regex basis (Linux)
- SELinux multi-level security (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.