This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<<<----------------------- MESSAGE RECIEVED: WAAS_PIM3_WAAS_AGC_LOG ------------------>>> | |
timestamp: 1032900009.7 | |
node_id: 45 | |
node_name: waas_wzlcwrsp2c1 | |
number of entries: 12 | |
CLK Temp Current. 39 | |
CLK Temp Minimum 39 | |
CLK Temp Maximum 39 | |
CLK Temp. Median 39 | |
CLK Power Current. 5.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def subprocess_sucks(): | |
""" This is what I want to do: | |
stdout = os.system("\ | |
tail --lines 5000 %s/%s_%s/SP1*rpt\ | |
| grep IDM-GIVE-X2 \ | |
| grep -v Metric \ | |
| tail --lines=39" % (path, month, day)) | |
This is what it looks like: | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# connecting and writting to round robin database today | |
from socket import socket | |
CARBON_SERVER = 'modok' | |
CARBON_PORT = 2003 | |
sock = socket() | |
try: | |
sock.connect( (CARBON_SERVER,CARBON_PORT) ) | |
except: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{'site': 'zse' | |
'wre': 'b' | |
'waas_second': 1046639304.0 | |
'header': {'current_wre_mode': 5, | |
'discarded_logs': 0, | |
'gps_crc': 2548719432, | |
'lru_status_flag': 0, | |
'number_of_geo_obs': 3, | |
'number_of_gps_obs': 11, | |
'rate_group_type': 2, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def objectify(frame): | |
""" yeilds one parsed object defined by the parsers in | |
the waas library. | |
""" | |
log_source = frame['log_type'] | |
parsers = {'SP': sp_log.parse, | |
'CP': cp_log.parse, | |
'WAAS': waas_log.parse} | |
try: | |
parsed = parsers[ log_source] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print f.recv() | |
('error.objectifier', {'line': ['NSNS_MAIN.c:8766 15:01:46 04/04/2013 NSNS AIX ', | |
' I-NS_LOST_MESSAGE "32 lost UDP messages from node id 228 on ring 2"', | |
'', 'NSNS_MAIN.c:8766 15:01:46 04/04/2013 NSNS AIX ', | |
' I-NS_LOST_MESSAGE "32 lost UDP messages from node id 229 on ring 2"', | |
'', 'NSNS_MAIN.c:8766 15:01:46 04/04/2013 NSNS AIX ', | |
' I-NS_LOST_MESSAGE "31 lost UDP messages from node id 230 on ring 2"', | |
'', 'NSNS_MAIN.c:8766 15:07:46 04/04/2013 NSNS AIX ', | |
' I-NS_LOST_MESSAGE "48 lost UDP messages from node id 228 on ring 2"', | |
'', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
error.MON_RDM_SAT_BUMP | |
{'line': 'DVIM->IMBP 1049650328 MT28 message has expired GEO 135 SV 15 ( 16 ) ', | |
'site': 'zdc', | |
'error': | |
'Traceback (most recent call last): | |
File "/opt/tools/lib/waas/parsers/sp_log.py", line 86, in _rdm_sat_bump | |
"cp": int(split_line[6]), | |
ValueError: invalid literal for int() with base 10: \'GEO\' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Path to your oh-my-zsh configuration. | |
ZSH=$HOME/.oh-my-zsh | |
ZSH_THEME="nanotech" | |
#ZSH_THEME="pixelplastic" | |
DISABLE_AUTO_UPDATE="false" | |
plugins=(git django) | |
source $ZSH/oh-my-zsh.sh | |
# source ~/.git-completion.sh | |
unsetopt correct_all |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
update_plot = (sdate, edate) -> | |
graphite = "/graphite/render? | |
&target=alias(summarize(maxSeries(chi2.*.*)%2C'5min'%2C'sum')%2C'') | |
&format=json | |
&from=#{sdate/1000} | |
&until=#{edate/1000}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://www.zeromq.org/bindings:clr | |
subscriber.Bind( address: "tcp://GLaDOS:8084" ); | |
subscriber.Subscribe( prefix: "" ); // subscribe to all messages | |
// Add a handler to the subscriber's OnReceive event | |
subscriber.OnReceive += () => { | |