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 ...
随机推荐
- hihoCoder 1252 Kejin Game
2015 ACM / ICPC 北京站 D题 网络最大流 和同学讨论了一会儿,还是Xiang578机智... ... /* ************************************** ...
- Linux 添加Nginx 到 service 启动
第一步: 编写nginx文件,放入/etc/init.d/ nginx文件内容如下,粉红色部分为自己实际nginx安装的路径. #!/bin/bash # nginx Startup script f ...
- 使用response实现文件下载注意点
创建web工程,使用response实现文件的下载. 在webRoot下创建download文件,里面包含要下载的文件,现在把源码贴上来,然后再说我遇到的问题 public class DownLoa ...
- Zencart 500错误查找和解决方法
有时在一些虚拟主机下(如HostMonster,BlueHost),Zencart网站会莫名奇妙输出空白页面,查看HTTP头,其实可以看到是500错误.至于500错误的出现原因,一般是由于服务器脚本或 ...
- JS对象引用
对象和函数都是引用的关系(改变后者会改变前者) 但是下面这个列子情况不一样了.刚开始的时候 B 引用了 A的地址,后来B又重新赋值,新占了一个地址,A B俩的关系已经脱离. 那么有的时候,我们只有 ...
- Struts2--简单的数据校验
action没有request, response等属性, 无法往前台传信息, 出来一个概念, valuestack: 存放action的属性, 还有各种error等... <s:propert ...
- Linux下gcc编译生成动态链接库*.so文件并调用它 是转载的
动态库*.so在linux下用c和c++编程时经常会碰到,最近在网站找了几篇文章介绍动态库的编译和链接,总算搞懂了这个之前一直不太了解得东东,这里做个笔记,也为其它正为动态库链接库而苦恼的兄弟们提供一 ...
- CentOS x 64 MooseFS 学习
一.MFS 简介.... MooseFS(Moose File System,mfs)是一种分布式文件系统,它将数据分布在网络中的 不同服务器上,支持FUSE,客户端可以作为一个 普通的Unix 文件 ...
- 用于辅助在 bootstrap-dialog 中的表现:app-jquery-dialog.js
// 用于通某个元素共享配置数据 $.extend($.fn, { formOption : function(showOpt) { var opt = $.data(this[0], "f ...
- Analyzing the Meaning of Sentences
1. How can we represent natural language meaning so that a computer can process these representation ...