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

socketref,再見!高德

https://github.com/adoggie

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

常用鏈接

留言簿(54)

我參與的團隊

搜索

  •  

最新評論

閱讀排行榜

評論排行榜

監控讀取AWS,6466磁帶設備的事件通知郵件,進行過濾壓制之后傳送給ovou系統

Telmail.sh,telmail.pl為兩個郵件發送例程


  1 # -*- coding: gb2312 -*-
  2 
  3 '''
  4 summary:    
  5     1.6466磁帶庫報警處理
  6     2.AWS報警處理
  7     傳輸接口:    smtp
  8     過濾郵件內容,生成事件到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         提取郵件標題和郵件內容
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 放屁阿狗 閱讀(2939) 評論(16)  編輯 收藏 引用 所屬分類: unix/linux/solaris/sco-unix/novell

Feedback

# re: 郵件監控 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>.   回復  更多評論
  

# re: 郵件監控 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  回復  更多評論
  

# re: 郵件監控 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  回復  更多評論
  

# 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.  回復  更多評論
  

# re: 郵件監控 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.   回復  更多評論
  

# re: 郵件監控 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>  回復  更多評論
  

# re: 郵件監控 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!   回復  更多評論
  

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

# re: 郵件監控 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!   回復  更多評論
  

# re: 郵件監控 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.  回復  更多評論
  

# re: 郵件監控 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.  回復  更多評論
  

# re: 郵件監控 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.  回復  更多評論
  

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <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>
            一区二区成人精品| 久久亚洲一区二区| 亚久久调教视频| 亚洲精品自在久久| 嫩草国产精品入口| 精品999日本| 久久精品欧洲| 一本一本久久a久久精品综合麻豆| 蜜臀av性久久久久蜜臀aⅴ四虎 | 亚洲香蕉网站| 久久久久久一区二区| 亚洲天堂黄色| 国产精品久久久久久久久久尿 | 亚洲国产精品电影| 美女亚洲精品| 亚洲国产欧美一区二区三区久久| 麻豆精品视频在线观看| 国产一区二区三区免费不卡| 亚洲美女精品久久| 91久久精品www人人做人人爽| 女女同性女同一区二区三区91| 在线观看欧美成人| 亚洲大片av| 欧美极品在线播放| 亚洲午夜久久久久久久久电影院| 99精品欧美| 国产日韩精品一区二区浪潮av| 欧美专区中文字幕| 久久精品中文字幕一区| 亚洲国产精品一区二区久| 亚洲高清色综合| 欧美日韩成人网| 亚洲欧美一区二区激情| 欧美一二三视频| 亚洲大片精品永久免费| 亚洲大片在线| 国产精品爱久久久久久久| 欧美专区亚洲专区| 蜜臀99久久精品久久久久久软件| 99re6热只有精品免费观看 | 国产精品久久久久秋霞鲁丝| 欧美一区二区三区的| 久久本道综合色狠狠五月| 亚洲电影免费观看高清| 亚洲美女视频在线免费观看| 国产精品亚洲综合| 欧美激情一区二区三区全黄| 欧美日韩在线一二三| 久久精品国产第一区二区三区最新章节 | 国产精品福利av| 久久久噜噜噜久久人人看| 欧美成人精品三级在线观看| 亚洲主播在线观看| 久久精品国产99国产精品| 久久精品天堂| 制服丝袜亚洲播放| 久久国产精品毛片| 99精品欧美| 久久激情婷婷| 亚洲砖区区免费| 麻豆久久婷婷| 久久精品国产欧美激情| 欧美片在线播放| 久色婷婷小香蕉久久| 欧美吻胸吃奶大尺度电影| 欧美成人情趣视频| 国产一区二区你懂的| av72成人在线| 亚洲黄色影片| 久久精品一区二区三区中文字幕 | 亚洲综合色婷婷| 亚洲三级免费观看| 欧美日韩dvd在线观看| 欧美一区二区三区的| 欧美区一区二| 欧美国产视频在线观看| 国产一区二区三区高清| 亚洲视频日本| 一区二区激情小说| 美女视频网站黄色亚洲| 久久天天综合| 国产综合久久| 欧美一级二级三级蜜桃| 亚洲欧美视频在线观看视频| 欧美精品国产一区二区| 欧美搞黄网站| 在线欧美电影| 免费的成人av| 欧美激情女人20p| 亚洲国产精品视频一区| 久久人体大胆视频| 蜜臀av性久久久久蜜臀aⅴ四虎| 国产麻豆视频精品| 亚洲尤物精选| 亚洲欧美另类国产| 国产精品久久久久毛片软件| 一区二区日本视频| 亚洲影院在线观看| 国产精品久久久久影院色老大 | 免费不卡视频| 欧美成人免费在线观看| 亚洲国产一区在线观看| 欧美本精品男人aⅴ天堂| 极品少妇一区二区三区| 久久精品一级爱片| 欧美高潮视频| 在线视频你懂得一区| 欧美日韩国产限制| 宅男噜噜噜66国产日韩在线观看| 亚洲无人区一区| 国产精品ⅴa在线观看h| 亚洲在线中文字幕| 久久免费99精品久久久久久| 影音国产精品| 欧美精品在线视频| 亚洲一品av免费观看| 欧美一区二区三区精品 | 美女啪啪无遮挡免费久久网站| 一区二区视频免费完整版观看| 久久婷婷国产综合精品青草| 亚洲黄色免费| 午夜精品福利一区二区蜜股av| 国产麻豆日韩| 欧美不卡视频一区| 亚洲五月六月| 欧美激情bt| 午夜亚洲视频| 亚洲大片av| 国产精品一区二区女厕厕| 久久青草久久| 宅男精品导航| 欧美国产综合视频| 亚洲欧美视频在线观看| 亚洲国产欧美在线人成| 国产精品一级| 欧美大成色www永久网站婷| 亚洲视频在线观看免费| 欧美高清在线精品一区| 中文精品视频一区二区在线观看| 一区二区日韩伦理片| 国产日韩精品在线| 欧美日韩国产不卡在线看| 欧美一区免费| 日韩亚洲欧美高清| 欧美成人高清| 久久精品国语| 亚洲一区二区三区免费视频| 在线国产日韩| 国产午夜亚洲精品羞羞网站 | 激情六月综合| 国产精品成人v| 免费观看成人| 欧美在线不卡视频| 亚洲天堂av综合网| 亚洲精品久久久久久久久久久久| 国产欧美一区二区三区沐欲| 欧美激情1区2区3区| 久久国产精品久久久久久久久久 | 欧美激情第二页| 久久久福利视频| 亚洲男女自偷自拍| 日韩视频欧美视频| 亚洲国产精品成人综合| 久久综合成人精品亚洲另类欧美| 午夜精品久久久久99热蜜桃导演| 99成人精品| 日韩视频精品在线观看| 在线观看中文字幕亚洲| 国模套图日韩精品一区二区| 国产精品一区二区三区免费观看 | 亚洲一区二区三区四区五区午夜| 亚洲国产一区在线| 亚洲国产精品成人| 亚洲国产成人久久综合| 国产揄拍国内精品对白| 国内精品久久久久久久影视麻豆 | 欧美在线亚洲综合一区| 亚洲欧美日韩精品久久久久| 亚洲午夜精品视频| 国产精品99久久99久久久二8 | 这里只有精品丝袜| 99国产精品视频免费观看一公开| 91久久精品一区二区别| 亚洲黄色av| 一区二区黄色| 亚洲欧美影音先锋| 欧美与黑人午夜性猛交久久久| 午夜精品福利一区二区三区av| 欧美亚洲一级片| 久久精品视频va| 美女黄网久久| 亚洲人精品午夜| 99综合电影在线视频| 亚洲一区免费网站| 欧美制服丝袜第一页| 裸体歌舞表演一区二区| 免费在线成人| 国产精品成人在线| 国产日韩欧美电影在线观看| 国内精品一区二区三区|