Several commonly used Linux monitoring scripts

  
 

Sometimes from time to time, a friend asked me about server monitoring. I asked the usual server monitors to use other open source software, such as: cacti, nagios monitoring, can you write your own shell script? Shell scripts written according to their own needs can better meet the needs, and can further refine the comprehensiveness of host monitoring.

The following are some common host monitoring scripts that I use. You can modify them according to your own situation. I hope I can give you some help.

1. View host network card traffic

#! /bin/bash

#network

#Mike.Xu

while : ; do

time=‘date +%m“-” %d“ ”%k“:&&quoquo;%M’

day=‘date +%m“-”%d’

rx_before=‘ifconfig eth0

Copyright © Windows knowledge All Rights Reserved