
cacti
LifeSecret
追求简单的结束战斗,大部分时间在磨刀霍霍
展开
-
Cacti - Add New Servers With A Script
~/$cacti/cli/#!/bin/baship=$1# 判断是否存在,如果存在就退出hostfind=`php add_graphs.php --list-hosts | grep $ip$ | wc -l`[ $hostfind -eq 1 ] && ( echo "host $ip 已经存在 ";exit 0 )# 添加hostsphp add_device.php --descri原创 2015-08-30 23:33:47 · 782 阅读 · 0 评论 -
Cacti - Template For VMSTAT
Client# vmstat 1 2, 一秒间隔,取两次,因为发现第一次不准确command[cacti_vmstat]=/usr/bin/vmstat 1 2Server Data Input Method/bin/bash <path_cacti>/scripts/bigbig_vmstat_cpu.sh <server_addr>#!/bin/bash# bigbig_vmstat_cpu原创 2015-08-30 23:41:35 · 780 阅读 · 0 评论 -
Cacti - SOCKSTAT - tcpInuse
目标根据/proc/net/sockstat创建针对服务器sockstat的状态Cacti图形目标探索 # cat /proc/net/sockstatsockets: used 6121TCP: inuse 6142 orphan 0 tw 63905 alloc 6145 mem 4206UDP: inuse 6 mem 3UDPLITE: inuse 0RAW: inuse 0FR原创 2015-09-09 09:50:50 · 1187 阅读 · 0 评论 -
Cacti - nginx -
前期准备探测nginx#!/bin/bashhostname=$1result=`curl http://$hostname/nginx_status`echo $resultActive connections: 28500 server accepts handled requests 135478105597 135478105597 210542656774 Reading: 16175原创 2015-09-10 11:12:54 · 579 阅读 · 0 评论 -
Cacti - SOCKSTAT
简介在linux的监控中, 在TCP方面,有一个很重要的文件,叫/proc/net/sockstat,里面的内容如下:sockets: used 150TCP: inuse 10 orphan 0 tw 48175 alloc 12 mem 2UDP: inuse 8 mem 2UDPLITE: inuse 0RAW: inuse 0FRAG: inuse 0 memory 0一般来说,主原创 2015-09-12 17:45:48 · 966 阅读 · 0 评论