journalfile.ksy 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. meta:
  2. id: netdata_journalfile_v2
  3. endian: le
  4. seq:
  5. - id: journal_v2_header
  6. type: journal_v2_header
  7. size: 4096
  8. - id: extent_list
  9. type: journal_v2_extent_list
  10. repeat: expr
  11. repeat-expr: journal_v2_header.extent_count
  12. - id: extent_trailer
  13. type: journal_v2_block_trailer
  14. - id: metric_list
  15. type: journal_v2_metric_list
  16. repeat: expr
  17. repeat-expr: journal_v2_header.metric_count
  18. - id: metric_trailer
  19. type: journal_v2_block_trailer
  20. - id: page_blocs
  21. type: jounral_v2_page_blocs
  22. size: _root._io.size - _root._io.pos - 4
  23. - id: journal_file_trailer
  24. type: journal_v2_block_trailer
  25. types:
  26. journal_v2_metric_list:
  27. seq:
  28. - id: uuid
  29. size: 16
  30. - id: entries
  31. type: u4
  32. - id: page_offset
  33. type: u4
  34. - id: delta_start_s
  35. type: u4
  36. - id: delta_end_s
  37. type: u4
  38. instances:
  39. page_block:
  40. type: journal_v2_page_block
  41. io: _root._io
  42. pos: page_offset
  43. journal_v2_page_hdr:
  44. seq:
  45. - id: crc
  46. type: u4
  47. - id: uuid_offset
  48. type: u4
  49. - id: entries
  50. type: u4
  51. - id: uuid
  52. size: 16
  53. journal_v2_page_list:
  54. seq:
  55. - id: delta_start_s
  56. type: u4
  57. - id: delta_end_s
  58. type: u4
  59. - id: extent_idx
  60. type: u4
  61. - id: update_every_s
  62. type: u4
  63. - id: page_len
  64. type: u2
  65. - id: type
  66. type: u1
  67. - id: reserved
  68. type: u1
  69. instances:
  70. extent:
  71. io: _root._io
  72. type: journal_v2_extent_list
  73. pos: _root.journal_v2_header.extent_offset + (extent_idx * 16)
  74. journal_v2_header:
  75. seq:
  76. - id: magic
  77. contents: [ 0x19, 0x10, 0x22, 0x01 ] #0x01221019
  78. - id: reserved
  79. type: u4
  80. - id: start_time_ut
  81. type: u8
  82. - id: end_time_ut
  83. type: u8
  84. - id: extent_count
  85. type: u4
  86. - id: extent_offset
  87. type: u4
  88. - id: metric_count
  89. type: u4
  90. - id: metric_offset
  91. type: u4
  92. - id: page_count
  93. type: u4
  94. - id: page_offset
  95. type: u4
  96. - id: extent_trailer_offset
  97. type: u4
  98. - id: metric_trailer_offset
  99. type: u4
  100. - id: original_file_size
  101. type: u4
  102. - id: total_file_size
  103. type: u4
  104. - id: data
  105. type: u8
  106. instances:
  107. trailer:
  108. io: _root._io
  109. type: journal_v2_block_trailer
  110. pos: _root._io.size - 4
  111. journal_v2_block_trailer:
  112. seq:
  113. - id: checksum
  114. type: u4
  115. journal_v2_extent_list:
  116. seq:
  117. - id: datafile_offset
  118. type: u8
  119. - id: datafile_size
  120. type: u4
  121. - id: file_idx
  122. type: u2
  123. - id: page_cnt
  124. type: u1
  125. - id: padding
  126. type: u1
  127. journal_v2_page_block:
  128. seq:
  129. - id: hdr
  130. type: journal_v2_page_hdr
  131. - id: page_list
  132. type: journal_v2_page_list
  133. repeat: expr
  134. repeat-expr: hdr.entries
  135. - id: block_trailer
  136. type: journal_v2_block_trailer
  137. jounral_v2_page_blocs:
  138. seq:
  139. - id: blocs
  140. type: journal_v2_page_block
  141. repeat: eos