Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ See Shell Script Linux Server network traffic     - Installation JDK1.7 under Ubuntu14.04 64-bit (Linux)

- Automatic batch resolve dependencies problem locally installed rpm package (Linux)

- nginx.conf Optimization (Server)

- Dynamic programming Android (Programming)

- Add your own kernel and ramfs based on an existing Linux LiveCD (Linux)

- How screenshots from the Linux command line (Linux)

- CentOS / Debian configuration Gitlab 7.1x to build self Git repository (Linux)

- RedHat Linux 7 build yum source server (Server)

- Install Python 3.3.4 under CentOS 6.4 (Linux)

- Linux platform to prevent hackers to share practical skills (Linux)

- C language files update in real time (Programming)

- Linux System Getting Started Learning: Debian download, installation and graphical interface (Linux)

- How to install Docker and basic usage on Ubuntu 15.04 (Server)

- Bitmap memory footprint of computing Android memory optimization (Linux)

- Android imitation UC browser scroll up and down functions (Programming)

- Linux how to prohibit the use of Ping command (Linux)

- How to track performance issues when using the Unity Game Development Android (Programming)

- Getting Started with Linux: CentOS7 Install Mono with the yum command (Server)

- Create RAID 1 (mirroring) with two disks (Linux)

- Python implementation Bursa transition model (Programming)

 
         
  See Shell Script Linux Server network traffic
     
  Add Date : 2017-08-31      
         
         
         
  Check before written a small script Linux server current flow, it is very simple, but it can give us some visual information

#! / Bin / sh
 
The average flow rate in the 10s statistics ### to Mb units
if [ "$ 1" = ""]; then
  echo -e "\ n use interface_name after the script, like \" $ 0 eth0 \ "... \ n"
  exit -1
fi
 
echo -e "\ n start monitoring the $ 1, press \" ctrl + c \ "to stop"
echo ------------------------------------------------- ---------
#ls / etc / sysconfig / network-scripts / | grep ifcfg | cut -d "-" -f 2
 
while true
  do
 
  RX_bytes = `cat / proc / net / dev | grep" $ 1 "| awk '{print $ 1}' | cut -d": "-f 2`
  TX_bytes = `cat / proc / net / dev | grep" $ 1 "| awk '{print $ 9}'`
 
  sleep 10
 
  RX_bytes_later = `cat / proc / net / dev | grep" $ 1 "| awk '{print $ 1}' | cut -d": "-f 2`
  TX_bytes_later = `cat / proc / net / dev | grep" $ 1 "| awk '{print $ 9}'`
 
  ### Mb = B * 8/1024/1024
  speed_RX = `echo" scale = 2; ($ RX_bytes_later - $ RX_bytes) * 8/1024/1024/10 "| bc`
  speed_TX = `echo" scale = 2; ($ TX_bytes_later - $ TX_bytes) * 8/1024/1024/10 "| bc`
 
  printf "% -3s% -3.1f% -10s% -4s% -3.1f% -4s \ n" IN: $ speed_RX Mb / s OUT: $ speed_TX Mb / s
    
done
     
         
         
         
  More:      
 
- [JavaScript] catch (ex) statements of ex (Programming)
- MySQL Tutorial: Philosophical Reflections on the unauthenticated user (Database)
- Which file system is most suitable for your Linux system (Linux)
- Using PHP MySQL library (Programming)
- Installation Elementary OS Freya 20 things to do (Linux)
- DB2 manually create a library (Database)
- Ubuntu 14.10 splash screen brightness settings (Linux)
- Kafka cluster deployment (Server)
- MySQL Tutorial: About checkpoint mechanism (Database)
- The Rabbitmq installation under CentOS 6.4 (Linux)
- Python2.7.7 source code analysis (Programming)
- Eclipse improve the efficiency of good habits (Programming)
- MariaDB 10.1 and MySQL 5.7 in general performance on commodity hardware (Database)
- MariaDB 10 Multi-source replication (Database)
- Linux Platform Oracle 11g Single Instance Installation Deployment Configuration Quick Reference (Database)
- Shell programming entry (Programming)
- Linux Workstation Security Checklist - from the Linux Foundation Internal (Linux)
- Using Ruby to build a simple HTTP service and sass environment (Server)
- CentOS iptables firewall configuration (Linux)
- Hibernate learning introductory tutorial (Programming)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.