青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

socketref,再見!高德

https://github.com/adoggie

  C++博客 :: 首頁 :: 聯(lián)系 :: 聚合  :: 管理
  246 Posts :: 4 Stories :: 312 Comments :: 0 Trackbacks

常用鏈接

留言簿(54)

我參與的團隊

搜索

  •  

最新評論

閱讀排行榜

評論排行榜

監(jiān)控讀取AWS,6466磁帶設(shè)備的事件通知郵件,進行過濾壓制之后傳送給ovou系統(tǒng)

Telmail.sh,telmail.pl為兩個郵件發(fā)送例程


  1 # -*- coding: gb2312 -*-
  2 
  3 '''
  4 summary:    
  5     1.6466磁帶庫報警處理
  6     2.AWS報警處理
  7     傳輸接口:    smtp
  8     過濾郵件內(nèi)容,生成事件到ovo
  9 author :    zhangbin
 10 date:        2006.03.04
 11 company:    ultrapower.com.cn
 12 '''
 13 
 14 
 15 import os
 16 import sys
 17 import socket
 18 import time
 19 import poplib
 20 import base64
 21 import string
 22 import re
 23 from conf import *
 24 
 25 
 26 
 27 aws_field_map={'Information':'normal',
 28             'Warning':'warning',
 29             'Degraded':'major',
 30             'Critical':'critical',
 31             'Fatal':'critical'
 32             }
 33 ME='szmail'
 34 this = modlist[ME]
 35 
 36 host=this['host']
 37 user=this['user']
 38 passwd =this['passwd']
 39 
 40 
 41 def Print(msg):
 42     lp(ME,msg)
 43 
 44 
 45 def process_AWS(title,msg):
 46     try:
 47         app='AWS'
 48         node=''
 49         obj=''
 50         severity=''
 51         msg_text=''
 52         
 53         print '>>>',msg
 54         title.index('CSF Fault Detected')
 55         lines = msg.split('\n')
 56         
 57         for l in lines:
 58             r = re.match('.*Fault id.*?:\s*(.*)/(.*)',l)
 59             if r:
 60                 node = r.group(1)
 61                 obj = r.group(2)
 62                 continue
 63             r = re.match('.*Severity.*?:\s*(\w+)',l)
 64             if r:
 65                 f= r.group(1).strip()
 66                 if aws_field_map.has_key(f):
 67                     severity = aws_field_map[f]
 68                 continue
 69             r =  re.match('.*Synopsis.*?:\s*([\w|\s]+)',l)
 70             if r :
 71                 msg_text=r.group(1)
 72         cmd = "opcmsg app=AWS "
 73         if node:
 74             cmd = cmd+ " node=%s "%node
 75         if obj:
 76             cmd = cmd+ " obj=%s "%obj
 77         if severity:
 78             cmd= cmd + " severity=%s "%severity
 79         if msg_text:
 80             cmd = cmd + ' msg_text="%s" '%msg_text
 81         print "execute command:%s"%cmd
 82     except:
 83         return False
 84     return True
 85     
 86     
 87     
 88 def process_TAPE(title,msg):
 89     ''' for 6466 tape monitor '''
 90     
 91 
 92 def mail_sender(body):
 93     pass
 94     
 95 def mail_hdr_section(section,body):    
 96     title=''
 97     try:
 98         n = body.index('')
 99         for i in range(n):
100             try:
101                 occ = body[i].index(section+':')
102                 title= body[i][ (occ+len(section+':')):]
103             except:
104                 continue
105     except:
106         pass
107     return title
108     
109 def mail_context(encode,body):
110     ''' extract mail body text from string-list
111         multiple charset will be encoded to base64,but plain text will not
112     '''
113     context =''
114     try:
115         n = body.index('')
116         lines = body[n:]
117         if encode.find('base64'>= 0 :
118             context = base64.decodestring(context)
119         else :
120             context = string.join(lines,'\n'#maybe 7bit
121     except:
122         pass
123     return context
124 
125 def process(c,m):
126     ''' c    -- mail number,
127         m    -- mail object
128         提取郵件標(biāo)題和郵件內(nèi)容
129     '''
130     for i in range(1):
131         print ">>>>Process %d"%(i+1)
132         list = m.retr(i+1)
133         title = mail_hdr_section('Subject',list[1])
134         encode = mail_hdr_section('Content-Transfer-Encoding',list[1])
135         print list[1]
136         context = mail_context(encode.strip(),list[1])
137         if not process_AWS(title,context):
138             process_TAPE(title,context)
139         #m.dele(i+1)
140 
141 def main_entry():
142     Print('OK+,%s start up!'%ME)
143     while True:
144         try:
145             m = poplib.POP3(host)
146             m.user(user)
147             m.pass_(passwd)
148             c = m.stat()[0]
149             if  c :
150                 print ">> Detected %s Letters!"%(c)
151                 process(c,m)
152             m.quit()
153         except:
154             pass
155         time.sleep(this['wait'])    
156     
157 if __name__=='__main__':
158     main_entry()
159 
160 

posted on 2009-11-15 18:07 放屁阿狗 閱讀(2917) 評論(16)  編輯 收藏 引用 所屬分類: unix/linux/solaris/sco-unix/novell

Feedback

# re: 郵件監(jiān)控 2009-12-31 04:59 Kimrb
Lastly, We have found super release about this good post? We advice to search the <a href="http://www.topdissertations.com">custom thesis</a> or order dissertation subject, because this aid for getting the best grade if you have <a href="http://www.topdissertations.com">custom dissertation</a>.   回復(fù)  更多評論
  

# re: 郵件監(jiān)控 2010-01-05 09:55 Geena20
It's not so simply to bring a professional already written essay, essentially if you are occupied. I give advice you to set <a href=" http://www.qualityessay.com">buy an essay</a> and to be void from distrust that your work will be done by writing service  回復(fù)  更多評論
  

# re: 郵件監(jiān)控 2010-06-18 21:33 Medyum
It's not so simply to bring a professional already written essay, essentially if you are occupied. I give advice you to  回復(fù)  更多評論
  

# WTY 2010-06-21 16:52 cosplay
Cosplay Costumes Cosplay Wigs Movie TV Cosplay School Uniform Uniform Cosplay Cosplay Accessories . cosplay costumes cosplay wigs cosplay Professional cosplay costumes store - best choice to buy cosplay costumes online, 100% hand made to fit your body. naruto cosplay, Naruto costumes supply in stock and custom lace front wigs, full lace wigs, lace wigs, human hair wigs, remy lace front wigs, cheap wigs, cheap, buy, celebrity full lace wigs lace wigs lace wigs sale lace front wigs this is a professional online lace wigs store. Happy shopping for human wigs,full lace wigs,Front Wigs, party wigs.  回復(fù)  更多評論
  

# re: 郵件監(jiān)控 2010-07-15 15:22 research paper writing
I am sure that good students should make better their academic grades ordering term paper titles at buy an essay service. Just because an experienced essays writing service would be able to write custom research papers on every field of study.   回復(fù)  更多評論
  

# re: 郵件監(jiān)控 2010-07-21 13:34 long wigs
High quality <a href=http://www.wigsrika.com>long wigs</a>,
<a href=http://www.wigsrika.com>curly wigs</a> and cheap wigs,
<a href=http://www.wigsrika.com>straight wigs</a> from us at favorable prices.
<a href=http://www.wigsrika.com/curly-hair-wigs-wholesale-997.html>curly hair wigs</a>
<a href=http://www.wigsrika.com/straight-hair-wigs-wholesale-996.html>stright hair wigs</a> Full selection,
<a href=http://www.wigsrika.com/costume-wigs-wholesale-1002.html>Costume wigs</a>, online wig shop have
<a href=http://www.wigsrika.com/straight-bob-hair-wig-girls-flaxen-wigs-children-s-party-wigs-product-302.html>straight bob</a> best wholesale.
etc. <a href=http://www.wigsrika.com/beehive-hairstyle-mixed-blonde-long-tousled-curly-wig-product-162.html>long blonde wig</a>
<a href=http://www.wigsrika.com/medium-curly-wigs-wholesale-997_1009.html>curly blonde wig</a>  回復(fù)  更多評論
  

# re: 郵件監(jiān)控 2010-08-08 11:36 essays
Custom essays writing firm would propose the fact and people know that should be no problem to purchase custom essay also if you would like toget custom term papers just about that stuff!   回復(fù)  更多評論
  

# medyum 2010-11-12 02:26 infomedyum@gmail.com
thanks for admin wonderfull blog and dissenger  回復(fù)  更多評論
  

# re: 郵件監(jiān)控 2011-07-06 10:01 essay writing services uk
I hesitate if it is worth to order research essays uk in the internet! A lot of my fellows utilize some essay writing uk service. They commonly have great results. Thus, credibly, I will do the same!   回復(fù)  更多評論
  

# re: 郵件監(jiān)控 2013-05-23 18:15 PremiumQualityEssays.com rewiew
Trying to find essay writing service review? View Best Writing Services company (best-writing-services.com) and select out the most suitable service.  回復(fù)  更多評論
  

# re: 郵件監(jiān)控 2013-05-28 20:00 over here
Don’t have the faintest idea which firm to select to receive aid from? Look through Essayontime testimonials, and come to a good choice.  回復(fù)  更多評論
  

# re: 郵件監(jiān)控 2013-05-28 20:00 resume company
If you try to find place where you can get resume company here is very masterly place for you about this topic, which keep examples and gives an hope to learn how make great CV resumes . But this site is more amusing, and more favorable.  回復(fù)  更多評論
  

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            亚洲欧洲精品一区二区| 国产乱码精品一区二区三区av| 国产美女搞久久| 久久国产婷婷国产香蕉| 久久精精品视频| 亚洲电影欧美电影有声小说| 亚洲电影免费观看高清完整版在线| 欧美成年人在线观看| 99在线精品观看| 亚洲视频在线观看三级| 国产午夜精品理论片a级探花 | 亚洲美女视频网| 日韩一区二区精品视频| 国产伦精品一区二区三区照片91 | 国产香蕉久久精品综合网| 久久综合九色九九| 欧美精品在线极品| 久久大逼视频| 欧美激情精品久久久久久黑人 | 亚洲国产精品视频一区| 国产精品网站在线播放| 美女久久网站| 国产精品久久久久久久久久直播| 久久综合久久综合久久综合| 欧美精品在线观看91| 久久综合五月天婷婷伊人| 欧美日本三区| 欧美成人午夜激情在线| 国产精品日韩欧美大师| 欧美激情一区在线| 国产亚洲成av人片在线观看桃| 亚洲国产欧美日韩另类综合| 国产手机视频精品| 中文亚洲视频在线| 亚洲欧洲一区二区三区在线观看 | 久久天堂精品| 亚洲欧美日韩一区二区| 欧美电影专区| 久久综合久久久| 国产香蕉久久精品综合网| 99国内精品久久久久久久软件| 亚洲缚视频在线观看| 先锋影音网一区二区| 亚洲一二三级电影| 欧美韩日亚洲| 亚洲电影免费在线| 好吊成人免视频| 午夜精品一区二区三区在线播放 | 亚洲性感激情| 欧美日韩国产不卡| 亚洲国产视频直播| 91久久国产综合久久| 久久一区二区精品| 麻豆九一精品爱看视频在线观看免费| 国产欧美91| 午夜精品国产更新| 久久福利影视| 国内精品视频666| 欧美一站二站| 久久一区免费| 依依成人综合视频| 久久人人精品| 亚洲电影免费观看高清完整版在线| 加勒比av一区二区| 久久午夜视频| 欧美激情91| 99视频精品| 欧美日韩岛国| 亚洲一本大道在线| 欧美一区二区视频97| 国产日韩欧美在线视频观看| 欧美专区日韩专区| 欧美国产先锋| 在线午夜精品| 国产精品专区h在线观看| 亚洲欧美制服中文字幕| 老司机午夜精品视频| 在线免费精品视频| 欧美久久一级| 亚洲免费在线看| 美女999久久久精品视频| 亚洲精品专区| 国产精品入口夜色视频大尺度| 欧美一区日韩一区| 欧美激情一区| 亚洲欧美色婷婷| 在线成人h网| 欧美日韩在线播放| 欧美一区二区三区在线视频| 亚洲第一区色| 欧美一区二区三区久久精品| 在线观看欧美日韩| 欧美三级网页| 久久久久一区| 在线视频欧美一区| 欧美高清视频在线观看| 亚洲一区二区视频在线| 国产一二三精品| 欧美日韩高清在线| 欧美在线免费视频| 亚洲另类黄色| 美女露胸一区二区三区| 亚洲综合欧美| 亚洲精一区二区三区| 国产无遮挡一区二区三区毛片日本| 欧美成人四级电影| 欧美一区二区三区免费看| 亚洲国产日韩在线| 久久嫩草精品久久久精品一 | 国产午夜精品理论片a级探花| 欧美精品日韩精品| 久久午夜羞羞影院免费观看| 亚洲制服av| 亚洲免费久久| 亚洲高清影视| 欧美xx69| 久久久久国色av免费看影院 | 国产精品99久久久久久久女警| 一区二区三区在线视频播放 | 欧美日韩在线视频一区| 久热精品视频在线观看一区| 欧美一级视频免费在线观看| 夜夜躁日日躁狠狠久久88av| 亚洲国产精品一区二区第四页av| 久久精品综合一区| 欧美一区激情| 性欧美1819性猛交| 亚洲综合三区| 亚洲一区影院| 亚洲一区二区精品视频| 99精品欧美| 夜夜精品视频| 中文欧美字幕免费| 一区二区三区久久| 一区二区高清在线| av成人黄色| 国产精品99久久久久久白浆小说| 亚洲三级电影全部在线观看高清 | 国产精品综合| 国产一区二区精品久久99| 国产精品系列在线播放| 国产精品亚洲人在线观看| 国产精品视频九色porn| 国产精品乱码| 国产网站欧美日韩免费精品在线观看| 国产精品亚洲综合色区韩国| 国产欧美日韩免费| 国产亚洲人成a一在线v站 | 国产区在线观看成人精品| 国产精品激情电影| 国产精品视频yy9299一区| 国产免费观看久久| 激情综合色丁香一区二区| 亚洲国产合集| 一本久久a久久精品亚洲| 亚洲一区图片| 久久亚洲电影| 亚洲国产裸拍裸体视频在线观看乱了中文 | 国产日韩欧美不卡在线| 狠狠综合久久| 亚洲狼人精品一区二区三区| 一区二区三区四区国产精品| 亚洲欧美日韩精品在线| 久久精品视频在线观看| 欧美高清在线视频| 日韩视频在线你懂得| 欧美亚洲免费在线| 免费观看成人网| 国产精品久久久久久久app| 国产主播精品在线| 亚洲精品乱码久久久久久按摩观| 亚洲一区二区三区在线| 另类尿喷潮videofree| 亚洲老司机av| 久久精品二区三区| 欧美日本韩国一区二区三区| 国产欧美日韩在线视频| 亚洲精品美女在线观看播放| 欧美一级播放| 亚洲国产精品第一区二区 | 女人色偷偷aa久久天堂| 亚洲无玛一区| 欧美岛国激情| 国内揄拍国内精品少妇国语| 一本色道久久综合狠狠躁的推荐| 久久精品国产亚洲精品| 99www免费人成精品| 久久久久久久综合狠狠综合| 欧美私人啪啪vps| 亚洲国产精品第一区二区三区| 亚洲欧美色婷婷| 亚洲青涩在线| 久久这里只有精品视频首页| 国产精品羞羞答答xxdd| 99re66热这里只有精品3直播| 玖玖玖免费嫩草在线影院一区| 亚洲夜晚福利在线观看| 欧美日韩视频| 亚洲美女av在线播放| 男女精品网站|