OmniOS啟用net-snmp

參考來源:http://itnotepad.wordpress.com/2013/08/22/net-snmp-on-omnios/

 

建立並編輯/etc/net-snmp/snmp/snmpd.conf此檔案,加入下列內容

#提供本台設備的一些資訊
syscontact "flight@netos.net"
syslocation "DB8F F26"
#唯讀的community,可從任何地方存取
rocommunity public
#可讀可寫的community,僅可從本機存取
rwcommunity private 127.0.0.1
#修正10GbE網卡ifHighSpeed欄位抓取錯誤問題
interface ixgbe0 6 10000000000

啟用服務

svcadm enable net-snmp

重新啟動net-snmp

svcadm restart net-snmp

 

 

Facebook Comments Box

測試一

#!/bin/bash

#dynamic html
URL='http://chtos.net/web11.php'

if [ "$#" -eq 1 ];then
  URL=$1
fi

echo "Fetching $URL"
echo -e "Location\ttotal\tcode\tnamelookup\tconnect\tptrans\tredir\tstrans\ts_download"
curl --header 'Accept-Encoding: gzip,deflate,sdch' --no-keepalive -s --write-out '  Direct:\t%{time_total}\t%{http_code}\t%{time_namelookup}\t\t%{time_connect}\t%{time_pretransfer}\t%{time_redirect}\t%{time_starttransfer}\t%{size_download}\n' $URL -o 1.txt
curl --header 'Accept-Encoding: gzip,deflate,sdch' --no-keepalive -s --write-out 'NH Proxy:\t%{time_total}\t%{http_code}\t%{time_namelookup}\t\t%{time_connect}\t%{time_pretransfer}\t%{time_redirect}\t%{time_starttransfer}\t%{size_download}\n' $URL -o 2.txt --proxy 10.10.10.1:80
curl --header 'Accept-Encoding: gzip,deflate,sdch' --no-keepalive -s --write-out 'TP Proxy:\t%{time_total}\t%{http_code}\t%{time_namelookup}\t\t%{time_connect}\t%{time_pretransfer}\t%{time_redirect}\t%{time_starttransfer}\t%{size_download}\n' $URL -o 3.txt --proxy 20.20.20.2:80

 

Facebook Comments Box