daily system check and send mail

真的太懶了…XDD,基本上當系統多到一定程度的時候,就因該進化到異常管理與通知….
人在怎麼勤快,一定會有懶散的時候…
這時候就是想想辦法讓電腦幫我們檢查個個系統的狀態與回報的時候,

前提:你已經裝好Nagios….:P
因Nagios…沒有report的功能…所以我就用python做了一個把網頁轉寄出去的功能…以應付老闆XDD

#!/usr/bin/env python
#-*- coding: utf-8 -*-
”’
===== Check Spam Report Script =====
Log:
2009/12/20 10:42 ver 0.1 Create Script “The mail system daily check”
2009/12/20 15:40 ver 0.5 add css in the daily report
2010/01/04 14:00 ver 1.0 fix all html link in mail
====================================
”’
from subprocess import call
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
from email.MIMEImage import MIMEImage

import os
import sys
import urllib
import smtplib
import time
import . . . → Read More: daily system check and send mail

rman error

在有些Linux下會發生RMAN就給你錯誤訊息….rman: can’t open . . . → Read More: rman error

Oracle Client for Win7 64bit

這幾天苦惱於如何將Oracle Client裝在Win7上…
在Google大神的幫助下,終於找到方法可以安裝,不過….
這個方法只是pass他的檢查機制…並不是原廠所出的軟體…

作法如下…

修改refhost.xml檔案
<!–Microsoft Windows . . . → Read More: Oracle Client for Win7 64bit

Check Spam Report

今天寫了一個script來協助daily check…

沒用到太高級的方法,只是把事情搞定而已….

python,真是一個好物啊…:D

#!/usr/bin/env python
#-*- coding: utf-8 -*-
”’
===== Check Spam Report Script =====
Log:
2009/12/09 21:58 ver 1.0 Create Script
2009/12/10 13:30 ver 1.1 add localtime
2009/12/11 ver 1.5 add if spam reboot count is equal 0 send massage
2009/12/12 16:02 ver 2.0 The spam report state sent to system
2009/12/29 11:20 ver 2.1 improve send mail in python function
2010/02/02 11:00 ver 2.2 . . . → Read More: Check Spam Report

FreeBSD 8 Released

稍早在網路上知道FreeBSD Released了…
也就順手把一台beta,升到released…

步驟如下,
setp 1
#cp /usr/share/examples/cvsup/stable-supfile /root/8release
#vi /root/8release

setp 2
*default host=cvsup.tw.FreeBSD.org
*default release=cvs . . . → Read More: FreeBSD 8 Released

Protected: One Year…

There is no excerpt because this is a protected post.

祝我生日快樂!!

. . . → Read More: 祝我生日快樂!!

終於…

主機爆炸好幾天了(約一個多月吧)XDD
剛剛把他先轉到Virtualbox上了…

因為之前VM與Virtualbox會打架….
而我又熱愛OPEN Source….
所以, 當然, 肯定是, Virtualbox….XDD

ps. . . . → Read More: 終於…

釋放VIM的威力

c9s用Perl寫了一個幫助調整安裝的程式….

超讚~~!!

# cpan Vimana
# vimana search [keyword] [keyword]
# vimana info xml.vim
# vimana . . . → Read More: 釋放VIM的威力

Python compile

#!/usr/bin/python
import py_compile
import sys

file=raw_input(“Please enter your . . . → Read More: Python compile