check_arp
检查arp表是否满
#!/bin/bash
LANG=C
test -e /bin/date && timestamp=`/bin/date +%s`
ARP=`which arp`
arp_num=$(wc -l /proc/net/arp|awk '{print $1}')
check_full=0
time0=$(dmesg |tail -n 1000|grep 'Neighbour table overflow'|tail -n1 |awk '{print $1}'|sed -r 's/[^0-9\.]//g')
time1=$(cat /proc/uptime |awk '{print $1}')
check_full=$(echo "$time1 $time0"|awk '{if(($1-$2)/3600<24){print 1 }else{print 0 }}')
if [ -z $time0 ];then
check_full=0
fi
if [ $check_full -eq 1 ];then
MSG="arp_cache_full"
else
MSG="arp_cache_not_full"
fi
#If check_full=0 means arp_cache_not_full
#check_full
echo -e "$timestamp\tarp_cache_count=$arp_num check_full=$check_full msg=$MSG"
check_arp的更多相关文章
- lvs+keepalived
一.简介 VS/NAT原理图: 二.系统环境 实验拓扑: 系统平台:CentOS 6.3 Kernel:2.6.32-279.el6.i686 LVS版本:ipvsadm-1.26 keepalive ...
随机推荐
- C# devExpress BandedGridView属性 备忘
BandedGridView属性备忘 StringBuilder sb = new StringBuilder(); DevExpress.XtraGrid.Views.BandedGrid.Band ...
- Bundle display name 与 Bundle name 的区别
Bundle display name 与 Bundle name 的区别是什么?"Bundle Name" and "Bundle display name" ...
- codeforce 611B New Year and Old Property
暴力搞 #include<cstdio> #include<cstring> #include<cmath> #include<algorithm> u ...
- 结合Pnotify插件--app-jquery-notify.js
$.NOTIFY = { showSuccess : function (title, text, context) { var opt = { title : title, text : text, ...
- 17.4.3 使用MulticastSocket实现多点广播(5)
该类主要实现底层的网络通信功能,在该类中提供了一个broadCast()方法,该方法使用Multicast Socket将指定字符串广播到所有客户端:还提供了sendSingle()方法,该方法使用D ...
- php 安装php5-mysql 拓展
Your PHP installation appears to be missing the MySQL extension which is required by WordPress Error ...
- Openlayers实现第一张地图
<html><head><title>OpenLayers Hello World</title> <style type="text/ ...
- (中等) HDU 5046 Airport ,DLX+可重复覆盖+二分。
Description The country of jiuye composed by N cites. Each city can be viewed as a point in a two- d ...
- Crazyflie笔记五: CRTP 实时通信协议(一)(转)
源:Crazyflie笔记五: CRTP 实时通信协议(一) 这里详细介绍了 Crazyflie 的 CRTP实时通信协议的相关内容,由于内容很长,分几篇博文来讲述.这里是第一节内容.欢迎交流:301 ...
- Android L(5.0)源码之手势识别GestureDetector
本人新手,最近下了Android L的源码,正在研究手势识别,能力有限,现总结如下: Android识别触摸屏手势使得用户体验大大提高.在View类中有个View.OnTouchListener内部接 ...