Skip to content

Instantly share code, notes, and snippets.

View jhaubrich's full-sized avatar

Jesse Haubrich jhaubrich

View GitHub Profile
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\'
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"',
'',
@jhaubrich
jhaubrich / reclog_objectifier.py
Last active December 15, 2015 18:39
Help me make this beautiful.
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]
{'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,
@jhaubrich
jhaubrich / gist:5032764
Last active December 14, 2015 05:08
Example API call for graphite
# 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:
@jhaubrich
jhaubrich / gist:4195747
Created December 3, 2012 15:33
subprocess sucks!
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:
"""
<<<----------------------- 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
@jhaubrich
jhaubrich / gist:3914618
Created October 18, 2012 20:47
Another Traceback (qsize fixed)
pcaptools/pcap_parser [ ./read_feed.py -i test/example_seqn_bad.pcap --enable-reclogs master * ] 3:41 PM
INFO: Tool started at 2012-10-18 20:46:06.962011U.
Please do not close this window
Process frame_retriever:
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
@jhaubrich
jhaubrich / traceback.py
Created October 18, 2012 14:40
./read_feed.py --enable-agclog -i test/example_seqn_bad.pcap
INFO: Tool started at 2012-10-18 14:35:49.714750U.
Please do not close this window
Process frame_retriever:
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/process.py", line 114, in run
self._target(*self._args, **self._kwargs)
File "/Users/jhau/Dropbox/src/pcaptools/pcap_parser/frameRetriever.py", line 121, in GFIN_getFrames
@jhaubrich
jhaubrich / routes.json
Created September 27, 2012 19:40
notam effected routes yaml
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.