POSTS
RRDtool
為 MRTG 進階版,原 MRTG 作者覺得 MRTG 有缺點(例如無法一個流量圖集合所有相關要統計的數據)所以便又著手開發 RRDTool,RRDTool 一樣是利用 SNMP 協定,去偵測有提供 SNMP 資訊的設備來畫出數據統計流量圖,原 RRDTool 1.0.x 版本時時是利用 GD 來畫出數據統計流量圖,在 RRDTool 1.2.x 版本之後作者為了使數據統計流量圖能匯出 PDF 文件格式,因此便改為使用 libart 及 freetype 來畫出數據統計流量圖(雖然效率慢很多),但因為 rrdtool 語法必須要深入研究因此有人利用 php 寫出 [cacti] 這軟體使您比較容易控制 rrdtool,同時也有許多的 cacti plugin 可以使用,本篇實作也是利用 cacti 來控制 rrdtool作說明。
安裝 net-snmp (使本機器能吐出 SNMP Information)
#cd /usr/ports/net-mgmt/net-snmp //切換至安裝路徑 #make install clean //安裝套件並清除安裝過程中產生不必要檔案
安裝 rrdtool (收集 SNMP Information 後統計收集數據畫出圖表)
#cd /usr/ports/databases/rrdtool //切換至安裝路徑 #make install clean //安裝套件並清除安裝過程中產生不必要檔案
安裝 cacti (網頁介面方便設定 rrdtool)
#cd /usr/ports/net-mgmt/cacti //切換至安裝路徑 #make install clean //安裝套件並清除安裝過程中產生不必要檔案
Added group "cacti". Added user "cacti". ===> Generating temporary packing list ===> Checking if net-mgmt/cacti already installed ======================================================================= Cacti is now installed. If you intall it for the first time, you may have to follow this steps to make it work correctly: 1. Create the MySQL database: # mysqladmin --user=root create cacti 2. Create a mysql user/password for cacti: (change user and/or password if requered) # echo "GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'cactiuser'; FLUSH PRIVILEGES;" | mysql 3. Import the default cacti database: # mysql cacti < /usr/local/share/cacti/cacti.sql 4. Edit /usr/local/share/cacti/include/db-settings.php. 5. Add a line to your /etc/crontab file similar to: */5 * * * * cacti /usr/local/bin/php /usr/local/share/cacti/poller.php > /dev/null 2>&1 6. Add alias in apache config for the cacti dir: Alias /cacti "/usr/local/share/cacti/" 7. Be sure apache gives an access to the directory ('Allow from' keywords). 8. Open a cacti login page in your web browser and login with admin/admin. If you update cacti, open a login page, an updating process will start automatically. If you are using PLUGIN option set, in file /usr/local/share/cacti/include/config.php change the follow line $config["url_path"] = '/'; with location where your cacti is available. E.g.: $config["url_path"] = '/cacti/'; if your URL is http://yoursite.com/cacti ======================================================================= ===> Registering installation for cacti-0.8.6j.3_2
設定 snmpd.conf 設定
#ee snmpd.conf //自行建立-內容如下 #mkdir /usr/local/etc/snmp
com2sec local localhost private com2sec mynet 192.168.1.0/24 public com2sec public default public group mygroup v1 mynet group mygroup v2c mynet group mygroup usm mynet group local v1 local group local v2c local group local usm local group public v1 public group public v2c public group public usm public view all included .1 80 access mygroup "" any noauth exact mib2 none none access public "" any noauth exact all none none access local "" any noauth exact all all all syslocation Right here, right now. syscontact Me proc mountd proc ntalkd 4 proc sendmail 10 1 exec echotest /bin/echo hello world disk / 10000 load 12 14 14
#ee /etc/rc.conf //編輯rc.conf snmpd_enable="YES" snmpd_flags="-a -p /var/run/snmpd.pid" snmptrapd_enable="YES" snmptrapd_flags="-a -p /var/run/snmptrapd.pid"
啟動 snmp 服務
#/usr/local/etc/rc.d/snmpd start //啟動 snmp 服務 Starting snmpd.檢查本機是否可吐出 SNMP Information
srv1# snmpwalk -v 1 -c public localhost |more
SNMPv2-MIB::sysDescr.0 = STRING: FreeBSD srv1.sd.idv.tw 6.2-STABLE FreeBSD 6.2-STABLE #0: Wed Oct 17 01:39:27 CST 2007 root@srv1.sd.idv.tw:/usr/obj/usr/src/sys/GENERIC i386
SNMPv2-MIB::sysObjectID.0 = OID: NET-SNMP-MIB::netSnmpAgentOIDs.8
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (2580) 0:00:25.80
SNMPv2-MIB::sysContact.0 = STRING: Me
SNMPv2-MIB::sysName.0 = STRING: srv1.sd.idv.tw
SNMPv2-MIB::sysLocation.0 = STRING: Right here, right now.
SNMPv2-MIB::sysServices.0 = INTEGER: 11
SNMPv2-MIB::sysORLastChange.0 = Timeticks: (1) 0:00:00.01
SNMPv2-MIB::sysORID.1 = OID: SNMPv2-MIB::snmpMIB
SNMPv2-MIB::sysORID.2 = OID: TCP-MIB::tcpMIB
SNMPv2-MIB::sysORID.3 = OID: IP-MIB::ip
SNMPv2-MIB::sysORID.4 = OID: UDP-MIB::udpMIB
SNMPv2-MIB::sysORID.5 = OID: SNMP-VIEW-BASED-ACM-MIB::vacmBasicGroup
SNMPv2-MIB::sysORID.6 = OID: SNMP-FRAMEWORK-MIB::snmpFrameworkMIBCompliance
SNMPv2-MIB::sysORID.7 = OID: SNMP-MPD-MIB::snmpMPDCompliance
SNMPv2-MIB::sysORID.8 = OID: SNMP-USER-BASED-SM-MIB::usmMIBCompliance
SNMPv2-MIB::sysORID.9 = OID: IF-MIB::ifMIB
SNMPv2-MIB::sysORDescr.1 = STRING: The MIB module for SNMPv2 entities
SNMPv2-MIB::sysORDescr.2 = STRING: The MIB module for managing TCP implementations
SNMPv2-MIB::sysORDescr.3 = STRING: The MIB module for managing IP and ICMP implementations
SNMPv2-MIB::sysORDescr.4 = STRING: The MIB module for managing UDP implementations
SNMPv2-MIB::sysORDescr.5 = STRING: View-based Access Control Model for SNMP.
SNMPv2-MIB::sysORDescr.6 = STRING: The SNMP Management Architecture MIB.
SNMPv2-MIB::sysORDescr.7 = STRING: The MIB for Message Processing and Dispatching.
SNMPv2-MIB::sysORDescr.8 = STRING: The management information definitions for the SNMP User-based Security Model.
SNMPv2-MIB::sysORDescr.9 = STRING: The MIB module to describe generic objects for network interface sub-layers
SNMPv2-MIB::sysORUpTime.1 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.2 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.3 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.4 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.5 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.6 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.7 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.8 = Timeticks: (0) 0:00:00.00
SNMPv2-MIB::sysORUpTime.9 = Timeticks: (1) 0:00:00.01
IF-MIB::ifNumber.0 = INTEGER: 5
IF-MIB::ifIndex.1 = INTEGER: 1
IF-MIB::ifIndex.2 = INTEGER: 2
IF-MIB::ifIndex.3 = INTEGER: 3
IF-MIB::ifIndex.4 = INTEGER: 4
IF-MIB::ifIndex.5 = INTEGER: 5
IF-MIB::ifDescr.1 = STRING: msk0
檢查 snmp log 可看到本機自行連結自已的 SNMP 要求
#tail /var/log/snmpd.log
Connection from UDP: [127.0.0.1]:56682
http://yoursite.com/cacti/index.php 連結到您的 cacti 控制頁面,按下 Next 準備初始化 cacti
補充引用 http://freebsd.ntut.idv.tw/document/cacti.html
CACTI 流量監控工具
Description :
介紹一個很好用的流量監控工具 CACTI ,比 MRTG 方便管理流量監控軟體,此套軟體系統資源吃很重,所以若要正式上線建議 要有較佳的硬體設備。 官方網站:http://www.cacti.net ,我的安裝說明是參考官方的手冊:http://www.cacti.net/downloads/docs/html/
Environment :
硬體:i386 PC Intel P3 500
記憶體網卡:256M RAM + 一片網卡
作業系統:FreeBSD 5.3 Release
<p>
</small><small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #990000"></span></small><small><font class="content"><font style="color: #990000; font-family: Helvetica,Arial,sans-serif" class="content"><strong>安裝 CACTI – Installing CACTI :</strong></font></font></small><small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold"></span></small><small style="font-family: Helvetica,Arial,sans-serif"><br /> </small><small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #990000"><br /> </span></small><small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold">安裝於 FreeBSD 需求的環境:</span></p>
<p>
<span style="font-weight: bold; color: #000099">#/usr/ports/databases/mysql41-server</span><br style="font-weight: bold; color: #000099" /> <span style="font-weight: bold; color: #000099">#make install<br /> </span></small><small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #000099">#/usr/ports/net-mgmt/net-snmp4<br /> </span></small><small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #000099">#make install</span><span style="font-weight: bold; color: #000099"></span><br style="font-weight: bold; color: #000099" /> <span style="font-weight: bold; color: #000099"></span></small><small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #000099">#/usr/ports/net/rrdtool</span></small><br style="font-weight: bold; color: #000099" /> <small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #000099"></span><span style="font-weight: bold; color: #000099">#make install</span></small><br style="font-weight: bold; color: #000099" /> <small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #000099"></span><span style="font-weight: bold; color: #000099">#/usr/ports/www/apache2</span></small><small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #000099"></span><br style="font-weight: bold; color: #000099" /> </small><small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #000099">#make install</span></small><small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #000099"></span><span style="font-weight: bold; color: #000099"><br /> </span></small><small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #000099">#/usr/ports/lang/php4 </span></small><small style="font-family: Helvetica,Arial,sans-serif"># 安裝這邊的 php4 已經包含( Apache Module and CLI )</small><small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #000099"></span><br style="font-weight: bold; color: #000099" /> <span style="font-weight: bold; color: #000099">#make install</span></small><br style="font-weight: bold; color: #000099" /> <small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #000099"></span><span style="font-weight: bold; color: #000099">#/usr/ports/lang/php4-extensions </span></small><small style="font-family: Helvetica,Arial,sans-serif"># 選擇你要的php 套件</small><small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #000099"></span><br style="font-weight: bold; color: #000099" /> <span style="font-weight: bold; color: #000099">#make install </span></small><small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #990000"><br /> </span></small><small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold"><br /> 開始安裝 cacti 套件:</span><br /> <br style="font-weight: bold; color: #000099" /> <span style="font-weight: bold; color: #000099"></span><span style="font-weight: bold; color: #000099">#tar xzvf cacti-version.tar.gz </span></small><small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #000099"> </span></small><small style="font-family: Helvetica,Arial,sans-serif"># 解壓縮重 cacti 官網抓回的最新套件<br /> <span style="font-weight: bold; color: #000099">#mysqladmin –user=root create cacti </span></small><small style="font-family: Helvetica,Arial,sans-serif"># 製做一個cacti 的資料庫</small><small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #000099"></span><br style="font-weight: bold; color: #000099" /> <span style="font-weight: bold; color: #000099">#mysql -p cacti < cacti.sql </span></small><small style="font-family: Helvetica,Arial,sans-serif"># 將 cacti 已經建好的資料表導入剛剛建好的 cacti 資料庫 </small><small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #000099"></span><br /> </small><small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #000099">#mysql -u root -pxxxxx </span></small><small style="font-family: Helvetica,Arial,sans-serif"># 使用 root 進入 mysql </small><small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #000099"></span><br /> <span style="font-weight: bold; color: #000099">mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY ‘somepassword’; </span></small><small style="font-family: Helvetica,Arial,sans-serif"># 建立 cacti 資料庫的使用者帳號及密碼<br /> </small><small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #000099"></span>Query OK, 0 rows affected (0.07 sec)<br /> <span style="font-weight: bold; color: #000099">mysql> flush privileges; </span></small><small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #000099"> </span></small><small style="font-family: Helvetica,Arial,sans-serif"># 更新資料庫,使改變的部份生效<br /> Query OK, 0 rows affected (0.05 sec) </small><small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #000099"></span><br /> </small><small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #000099">mysql>exit </span></small><small style="font-family: Helvetica,Arial,sans-serif"># 跳出 mysql<br /> Bye<br /> </small><small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #000099">#vi /usr/local/www/data-dist/cacti/include/config.php </span></small><small style="font-family: Helvetica,Arial,sans-serif"># 編輯 cacti 的 config 設定檔</small><br /> <small style="font-family: Helvetica,Arial,sans-serif"><br /> <span style="color: #006600">$database_default = “cacti”;</span><br style="color: #006600" /> <span style="color: #006600">$database_hostname = “localhost”;</span><br style="color: #006600" /> <span style="color: #006600">$database_username = “cactiuser”;</span><br style="color: #006600" /> <span style="color: #006600">$database_password = “somepassword”;</span></p>
<p>
<span style="font-weight: bold; color: #000099">#pw adduser cactiuser</span> </small><small style="font-family: Helvetica,Arial,sans-serif"># 建立 cactiuser 這個帳號</small><br /> <small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #000099">#passwd cactiuser</span><br /> Changing local password for cactiuser<br /> New Password: xxxx<br /> Retype New Password: xxxx<br /> <br style="font-weight: bold; color: #000099" /> <span style="font-weight: bold; color: #000099"></span></small><small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #000099">#cd /usr/local/www/data-dist/cacti</span></small><br /> <small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #000099">#chown -R cactiuser rra/ log/ </span></small><small style="font-family: Helvetica,Arial,sans-serif"># 修改 rra 跟 log 兩個目錄權限讓 cactiuser 為擁有者</p>
<p>
</small><small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold"> 設定 http://your-server/cacti/</span> </small><br /> <small style="font-family: Helvetica,Arial,sans-serif"> 開個瀏覽器開始瀏覽你的 cacti 目錄,並且進行第一次登入安裝設定,第一次進入的帳號密碼為 admin / admin ,登入前系統會要求你更改新的登入 admin 使用者密碼。</p>
<p>
</small><small style="font-family: Helvetica,Arial,sans-serif"> <span style="font-weight: bold; color: #000099">#crontab -e </span></small><small style="font-family: Helvetica,Arial,sans-serif"># 建立 crontab 每五分鍾跑一次 cacti 流量圖</small><small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #000099"></span></p>
<p>
<span style="color: #006600">*/5 * * * * /usr/local/bin/php /usr/local/www/data-dist/cacti/poller.php > /dev/null 2>&1</span></small><small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold"></span></p>
<p>
</small><small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #000099">#php poller.php</span> # 你也可手動跑一次 cacti</small><br /> <small style="font-family: Helvetica,Arial,sans-serif"><br /> </small><small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #990000"></span></small><small><font class="content"><font style="color: #990000; font-family: Helvetica,Arial,sans-serif" class="content"><strong>升級 CACTI – Upgrading CACTI :</strong></font></font></small><br style="font-weight: bold; color: #000099" /> <small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #000099"></span><br /> <span style="font-weight: bold; color: #000099">#cd /usr/local/www/data-dist</span> # 切換目錄到 www 的擺放目錄<br /> <span style="font-weight: bold; color: #000099">#mysqldump -p -l –add-drop-table cacti > mysql.cacti</span> # 將 mysql 的 cacti 資料庫備份出來<br /> <span style="font-weight: bold; color: #000099">#mv cacti cacti_old</span> # 改變舊的 cacti 目錄到 cacti_old 目錄<br /> <span style="font-weight: bold; color: #000099">#tar -xzvf cacti-new-version.tar.gz</span> # 抓到新版的 cacti 放置 /usr/local/www/data-dist 並解開壓縮<br /> <span style="font-weight: bold; color: #000099">#mv cacti-new-version cacti</span> # 更改新版的目錄名稱為 cacti<br /> <span style="font-weight: bold; color: #000099">#vi include/config.php</span> # 編輯新版的 config.php 檔</p>
<p>
<span style="color: #006600">$database_default = “cacti”;</span><br style="color: #006600" /> <span style="color: #006600">$database_hostname = “localhost”;</span><br style="color: #006600" /> <span style="color: #006600">$database_username = “cactiuser”;</span><br style="color: #006600" /> <span style="color: #006600">$database_password = “xxxxx”;</span>
</p>
<p>
<span style="font-weight: bold; color: #000099">#cp cacti_old/rra/* cacti/rra/</span> # copy 舊資料到新版本資料夾<br /> <span style="font-weight: bold; color: #000099">#cp cacti_old/scripts/* cacti/scripts/</span> # copy 舊的 scripts 到新資料夾<br /> </small><small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #000099">#cp cacti_old/resource/* cacti/resource/</span> # copy 舊的 resource 到新資料夾</small><br /> <small style="font-family: Helvetica,Arial,sans-serif"> <span style="font-weight: bold; color: #000099">#chown -R cactiuser rra/ log/</span> # 改變 rra log 兩目錄擁有者權限</p>
<p>
http://your-server/cacti/ # 開個瀏覽器進入 cacti 目錄就完成升級動作
</p>
<p>
</small><small style="font-family: Helvetica,Arial,sans-serif"><span style="font-weight: bold; color: #990000"></span></small><small><font class="content"><font style="color: #990000; font-family: Helvetica,Arial,sans-serif" class="content"><strong>補丁 CACTI – Patches CACTI</strong></font></font></small><br /> <small style="font-family: Helvetica,Arial,sans-serif"><br /> 沒有任何一套軟體開發出來就是完美的,而且沒有那一家公司敢說它們自家的軟體完全無漏洞及 Bug ,軟體並不是完全無漏洞才是優質軟體,而是要有好的後端不斷支援才能稱得上好軟體,所以持續不斷的補丁便成為一套完善軟體必備的,CACTI 同樣也提供 <a href="http://www.cacti.net/download_patches.php">Official Patches</a> 不斷的為自家軟體做問題及漏洞更新,也就是它們的用心我們才有這樣方便的軟體使用,真的太感謝這些為 Opensouce 一直努力開發奉獻的團隊。到今天為止我安裝的 cacti-0.8.6c Release 版本,官方已公告了 3 個 patches :</p>
<p>
<span style="font-weight: bold; color: #000099">#cd /usr/local/www/data-diste/cacti</span> # 切換到 cacti 的目錄
</p>
<p>
<span style="font-weight: bold; color: #000099">#fetch http://www.cacti.net/downloads/patches/0.8.6c/rrd_fetch_negative_numbers.patch</span><br /> Receiving rrd_fetch_negative_numbers.patch (601 bytes): 100%<br /> 601 bytes transferred in 0.0 seconds (1.76 MBps)<br /> <span style="font-weight: bold; color: #000099">#patch -p1 -N < rrd_fetch_negative_numbers.patch</span><br /> Hmm… Looks like a unified diff to me…<br /> The text leading up to this was:<br /> ————————–<br /> |— cacti-0.8.6c/lib/rrd.php 2004-12-29 15:56:08.000000000 -0500<br /> |+++ cacti-0.8.6c-new/lib/rrd.php 2004-12-29 15:56:48.000000000 -0500<br /> ————————–<br /> Patching file lib/rrd.php using Plan A…<br /> Hunk #1 succeeded at 368.<br /> done
</p>
<p>
以下兩個補丁做法同上:
</p>
<p>
#fetch http://www.cacti.net/downloads/patches/0.8.6c/no_auth_no_graphs_in_tree_bug.patch<br /> #fetch http://www.cacti.net/downloads/patches/0.8.6c/device_create_multiple_graphs.diff<br /> </small><small style="font-family: Helvetica,Arial,sans-serif">#patch -p1 -N < no_auth_no_graphs_in_tree_bug.patch</small><br /> <small style="font-family: Helvetica,Arial,sans-serif">#patch -p1 -N < device_create_multiple_graphs.diff</p>
<p>
</small><small><font class="content"><font style="color: #990000; font-family: Helvetica,Arial,sans-serif" class="content"><strong>外掛 CACTI – Script & Templates</strong></font></font></small><br /> <small style="font-family: Helvetica,Arial,sans-serif"><br /> 除了基本的 snmp 流量跟系統資訊監控外,cacti 也可外掛 Scripts 及加上 Templates 來作出各式各樣個監控圖,目前 cacti 官網已經開始進行官方版本的外掛開發收集,網址為:<a href="http://warehouse.cacti.net/index.php">http://warehouse.cacti.net/index.php</a> 如果等不及官方開發的套件的人,可到官網的討論區 <a href="http://forums.cacti.net/">http://forums.cacti.net/</a> 上面找尋,有很多使用者已經自己開發 scripts 跟 templates ,而且分享出來抓下來直接 Import Templates 即可。</p>
<p>
</small>
</p>
<pre></pre>
<div class="wp_plus_one_button" style="margin: 0 8px 8px 0; float:left; ">
<g:plusone href="https://blog.sd.idv.tw/archives/42" callback="wp_plus_one_handler"></g:plusone>
</div>