SHARE
TWEET

Untitled

a guest Jul 17th, 2017 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. I have two files with ~200000 entries:
  2.  
  3. $ head /var/tmp/mytrace.2.txt
  4.           mystat-21804 [013] d...  1658.516592: : lstat! 1658084763437 ; /etc/hosts/_foo_0_
  5.           mystat-21804 [013] d...  1658.516608: : lstat! 1658084781621 ; (kretprobe) err=-20
  6.           mystat-21804 [013] d...  1658.516615: : lstat! 1658084790043 ; /etc/hosts/_foo_1_
  7.           mystat-21804 [013] d...  1658.516617: : lstat! 1658084791395 ; (kretprobe) err=-20
  8.           mystat-21804 [013] d...  1658.516618: : lstat! 1658084792796 ; /etc/hosts/_foo_2_
  9.           mystat-21804 [013] d...  1658.516619: : lstat! 1658084793781 ; (kretprobe) err=-20
  10.           mystat-21804 [013] d...  1658.516620: : lstat! 1658084794971 ; /etc/hosts/_foo_3_
  11.           mystat-21804 [013] d...  1658.516621: : lstat! 1658084795939 ; (kretprobe) err=-20
  12.           mystat-21804 [013] d...  1658.516622: : lstat! 1658084797105 ; /etc/hosts/_foo_4_
  13.           mystat-21804 [013] d...  1658.516623: : lstat! 1658084798066 ; (kretprobe) err=-20
  14.  
  15. $ head /var/tmp/mytrace.3.txt
  16. 1658084756883 1658084783171 /etc/hosts/_foo_0_
  17. 1658084789726 1658084791983 /etc/hosts/_foo_1_
  18. 1658084792636 1658084794306 /etc/hosts/_foo_2_
  19. 1658084794817 1658084796461 /etc/hosts/_foo_3_
  20. 1658084796951 1658084798523 /etc/hosts/_foo_4_
  21. 1658084799041 1658084800503 /etc/hosts/_foo_5_
  22. 1658084800996 1658084804412 /etc/hosts/_foo_6_
  23. 1658084804943 1658084806443 /etc/hosts/_foo_7_
  24. 1658084806931 1658084808383 /etc/hosts/_foo_8_
  25. 1658084808899 1658084810514 /etc/hosts/_foo_9_
  26.  
  27. I want:
  28. 1. a .csv with 5 columns:
  29.  
  30. index;timestamp_before;timestamp_kprobe;timestamp_kretprobe;timestamp_after
  31. 0;1658084756883;1658084763437;1658084781621;1658084783171
  32. 1;1658084789726;1658084790043;1658084791395;1658084791983
  33.  
  34. 2. check that each line of the csv has timestamps strictly increasing.
RAW Paste Data
Top