File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change
1
+ flow_table_dump_part=log.AllFlowsreg
2
+ n_flow_key=any # any value is needed to start the extraction procedure
3
+ stop_flow_key=" 0-0-0-0-0-0.0.0.0-0.0.0.0"
4
+ i_part=0
5
+ curl http://127.0.0.1:8085/Snh_FetchAllFlowRecords? > $flow_table_dump_part -$i_part
6
+ n_flow_key=` xmllint --xpath " string(//FlowRecordsResp/flow_key)" $flow_table_dump_part -$i_part `
7
+ while [ " $n_flow_key " != " " ] && [ " $n_flow_key " != " $stop_flow_key " ]
8
+ do
9
+ i_part=` expr $i_part + 1`
10
+ curl http://127.0.0.1:8085/Snh_NextFlowRecordsSet? flow_key=$n_flow_key > $flow_table_dump_part -$i_part
11
+ n_flow_key=` xmllint --xpath " string(//FlowRecordsResp/flow_key)" $flow_table_dump_part -$i_part `
12
+ done
13
+ echo $n_flow_key
Original file line number Diff line number Diff line change
1
+ flow_table_dump_part=log.AllKFlowsreg
2
+ n_records=1 # any value is needed to start the extraction procedure
3
+ i_part=0
4
+ curl http://127.0.0.1:8085/Snh_KFlowReq? > $flow_table_dump_part -$i_part
5
+ n_records=` xmllint --xpath " string(//KFlowResp/flow_handle)" $flow_table_dump_part -$i_part `
6
+ while [ " $n_records " != " " ] && [ " $n_records " -gt 0 ]
7
+ do
8
+ i_part=` expr $i_part + 1`
9
+ curl http://127.0.0.1:8085/Snh_NextKFlowReq? flow_handle=$n_records > $flow_table_dump_part -$i_part
10
+ n_records=` xmllint --xpath " string(//KFlowResp/flow_handle)" $flow_table_dump_part -$i_part `
11
+ done
You can’t perform that action at this time.
0 commit comments