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
require "xmlsimple" | |
def transactions(filename) | |
data = XmlSimple.xml_in(filename) | |
data["LIST_G_CLIENT"][0]['G_CLIENT'][0]['LIST_G_ACC_CURR'][0]['G_ACC_CURR'][0]['LIST_G_TRANS_CARD'][0]['G_TRANS_CARD'][1]['LIST_G_TRANS_DETAILS'][0]['G_TRANS_DETAILS'] | |
end | |
fields = %w(TRANS_DATE_XML TRANS_AMOUNT TRANS_CURR ACC_AMOUNT TRANS_DETAILS ) | |
puts fields.join(", ") |
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
grep "REDIS_WRITE" loaderNG_log-* | |
I0828 00:27:35.443131 8712 redisworkstrategy.cpp:89] REDIS_WRITE: performing RPUSH production:load_data_61208_337870 {"duration":0,"timestamp":1377649655,"clients":0,"requests":0,"resp_1xx":0,"resp_2xx":0,"resp_3xx":0,"resp_4xx":0,"resp_5xx":0,"other_errors":0,"timeout_errors":0,"appl_delay_points":0,"appl_delay_2xx_points":0,"appl_delay":0,"appl_delay_2xx":0,"data_in":0,"data_out":0,"data_in_sum":0,"data_out_sum":0,"summary_data":false} | |
I0828 00:27:42.072911 8712 redisworkstrategy.cpp:89] REDIS_WRITE: performing RPUSH production:load_data_61208_337870 {"duration":7,"timestamp":1377649662,"clients":500,"requests":500,"resp_1xx":0,"resp_2xx":0,"resp_3xx":0,"resp_4xx":0,"resp_5xx":0,"other_errors":0,"timeout_errors":0,"appl_delay_points":0,"appl_delay_2xx_points":0,"appl_delay":0,"appl_delay_2xx":0,"data_in":0,"data_out":1022,"data_in_sum":0,"data_out_sum":1022,"summary_data":false} | |
I0828 00:27:47.075333 8712 redisworkstrategy.cpp:89] REDIS_WRITE: performing RPUSH productio |
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
{"keys": ["k1"], "values": ["123"]} |
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
#!/usr/bin/env ruby | |
require 'optparse' | |
require 'ostruct' | |
def parse_logs(logs) | |
logs.map do |record| | |
array = record.scan(/(.+) \[#(\d+)\] (.+)/).first | |
next unless array |
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
require 'rubygems' | |
require 'aws/s3' | |
require 'optparse' | |
require 'logger' | |
options = {} | |
OptionParser.new do|opts| | |
options[:access_key_id] = '' | |
opts.on( '-a KEY', '--access_key_id KEY', 'access key id is KEY' ) do |key| | |
options[:access_key_id] = key | |
end |