proc GetPacketCaptureCsvFileHlt { port localDirectory {stopTime 300} } { # $port = 1/1/2. Not 1/2. # $directory is the local Linux path to save the csv file at. # For example: /home/hgee/IxiaScripts # Return: The path + filename of the csv file of the packet capture. puts "\nGetPacketCaptureCsvFile: Generate a CSV format packet capture file..." set flag 0 for {set counter 1} {$counter <= $stopTime} {incr counter} { if {$flag == 0 && $counter < $stopTime} { set statStatus [::ixia::packet_stats \ -port_handle $port \ -format csv \ -dirname $localDirectory \ ] if {[keylget statStatus status] != $::SUCCESS} { puts "\nGetPacketCaptureCsvFile: IxNetwork is still processing all the buffered captured packets." puts "Not ready yet. Retrying $counter/$stopTime seconds" after 1000 continue } else { set flag 1 } } if {$flag == 1 && $counter < $stopTime} { puts "\nGetPacketCaptureCsvFile: Successfully generated a csv packet capture file." return $statStatus break } if {$flag == 0 && $counter == $stopTime} { puts "\nError GetPacketCaptureCsvFile: It has been $stopTime seconds and IxNetwork packet capture didn't have enough time to generate the csv file. Please run test again and watch the IxNetwok gui to verify the amount of time for the \"Packets\" to finish processing your traffic load." return 1 } } }