ebpf_mdflush.h 1010 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // SPDX-License-Identifier: GPL-3.0-or-later
  2. #ifndef NETDATA_EBPF_MDFLUSH_H
  3. #define NETDATA_EBPF_MDFLUSH_H 1
  4. // Module name
  5. #define NETDATA_EBPF_MODULE_NAME_MDFLUSH "mdflush"
  6. // charts
  7. #define NETDATA_MDFLUSH_GLOBAL_CHART "mdflush"
  8. // configuration file
  9. #define NETDATA_DIRECTORY_MDFLUSH_CONFIG_FILE "mdflush.conf"
  10. // copy of mdflush types from kernel-collectors repo.
  11. typedef uint32_t mdflush_ebpf_key_t;
  12. typedef uint64_t mdflush_ebpf_val_t;
  13. typedef struct netdata_mdflush {
  14. // must be at top for simplified AVL tree usage.
  15. // if it's not at the top, we need to use `containerof` for almost all ops.
  16. avl_t avl;
  17. // key & name of device.
  18. // the name is generated by the key, usually as `md<unit>`.
  19. uint32_t unit;
  20. char disk_name[32];
  21. // have we defined the dimension for this device yet?
  22. bool dim_exists;
  23. // incremental flush count value.
  24. uint64_t cnt;
  25. } netdata_mdflush_t;
  26. void *ebpf_mdflush_thread(void *ptr);
  27. extern struct config mdflush_config;
  28. #endif