瀏覽模式: 普通 | 列表

expr計算指令

3=`expr 1 + 2`
6=`expr 7 - 1`
2=`expr 2 * 1`
3=`expr 6 / 2`
1=`expr 5 % 2`

MRTG + sysstat + cpu loading on linux

[1] apt-get install sysstat

[2] mkdir /var/www/mrtg/cpu

[3] 利用sysstat 的 sar程式,來作監測CPU的script
      
      安裝套件
      apt-get install sysstat

      vi mrtg-sar.sh

#!/bin/bash

cpuusr=`/usr/bin/sar -u 1 3 | grep Average | awk '{print $3}'`
cpusys=`/usr/bin/sar -u 1 3 | grep Average | awk '{print $5}'`
echo $cpuusr
echo $cpusys

      測式

[閱讀全文]

標籤: 監控 mrtg

MRTG + lm_sensors + CPU溫度 on linux

用 lm_sensors套件取得 cpu溫度

[1] apt-get install lm_sensors

[2] 執行 sensors-detect指令
     此用來偵測設定值,全Enter即可,
     之後它自已會將該要的module放於/etc/sysconfig/lm_sensors裡

[3] 載入/etc/sysconfig/lm_sensors裡的模組
      指令如下
         modprobe module1
         modprobe module2

     如果是 RPM安裝
        service lm_sensors start

     執行 sensors指令可看到溫度資訊

[閱讀全文]

標籤: 監控 mrtg

MRTG + net-snmp MIBs + cpu loading on linux

2007/09/xx 後來為了某方面的需要,再把mibs搬出來用結果發現有 Unknown SNMP var 的問題,但尚未找到解決方案。不過如果用OIDs的話就可以。還有如果畫不出圖來的話,把 Options 的 gauge 拿掉就ok了,真是怪哉!!!,我還更新至 mrtg 2.15.2 了還是無解。

ssCpuUser & ssCpuSystem

   vi mrtg-cpu.cfg
LoadMIBs: /usr/share/snmp/mibs/UCD-SNMP-MIB.txt
WorkDir: /var/www/mrtg/cpu
Target[10.1.1.254_sscpu]: ssCpuUser.0&ssCpuSystem.0:cross@10.1.1.254
RouterUptime[10.1.1.254_sscpu]: cross@10.1.1.254
MaxBytes[10.1.1.254_sscpu]: 100
Unscaled[10.1.1.254_sscpu]: dwmy
Directory[10.1.1.254_sscpu]: ssCpu
Options[10.1.1.254_sscpu]: growright, nopercent, gauge
YLegend[10.1.1.254_sscpu]: percentages.
ShortLegend[10.1.1.254_sscpu]: %
Legend1[10.1.1.254_sscpu]: percentages of user CPU time.
Legend2[10.1.1.254_sscpu]: percentages of system CPU time.
LegendI[10.1.1.254_sscpu]:  User:
LegendO[10.1.1.254_sscpu]:  System:

[閱讀全文]

標籤: 監控 mrtg

f2blog + 發表文章時標題不可加單引號

當前Blog程式版本:   F2Blog v1.0 build 08.20
在發表、或編輯文章時,有語法錯誤

Parse error: parse error, unexpected T_STRING, expecting ')' in /var/www/html/f2blog/cache/cache_autosave.php on line 6

原來是之前的文章發表,在標題上加了"'"單引號,
到 cache_autosave.php把單引號拿掉就 ok了

MySQL + FQA 常見問題

。cant find any matching row in the user table
      當將資料庫整個匯出入到另一系統時,存取資料庫連不上?
      帳號密碼都在,想說是不是 old_password的問題,
      指令一執行下去,出現can't find any matching row in the user table訊息,
      原來要 flush privileges;

。MySQL如何升級
      http://freesf.tnc.edu.tw/modules/newbb/viewtopic.php?topic_id=13&forum=1

。total memory等於 
      total memory = key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections

。匯入資料庫出現MySQL server has gone away錯誤訊息
      修正方式
         vi /etc/my.cnf

[閱讀全文]

snort-inline 2005/12/09 記錄

官網放出用 snort-2.4.3.tar.gz加上 patch方式,編譯 snort_inline-2.4.3RC2.diff

Quote:

Hi everyone!

Today is the day Will is getting married with his bride Lindsay. Thats
why todays release is dubbed "The Wedding Release". Before i tell you
guys about the release i want to wish William and Lindsay all the best
together! Congratulations and have fun on your honeymoon!

[閱讀全文]

標籤: snort