rrd based system stats
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

36 lines
824 B

  1. #ifndef _MYSQL_HELPER_H_
  2. #define _MYSQL_HELPER_H_
  3. #include <stdint.h>
  4. struct mysql_stats {
  5. uint64_t bytes_received;
  6. uint64_t bytes_sent;
  7. uint64_t com_delete;
  8. uint64_t com_insert;
  9. uint64_t com_select;
  10. uint64_t com_update;
  11. uint64_t connections;
  12. uint64_t qc_free_blocks;
  13. uint64_t qc_free_memory;
  14. uint64_t qc_hits;
  15. uint64_t qc_inserts;
  16. uint64_t qc_lowmem_prunes;
  17. uint64_t qc_not_cached;
  18. uint64_t qc_queries_in_cache;
  19. uint64_t qc_total_blocks;
  20. uint64_t questions;
  21. uint64_t threads_cached;
  22. uint64_t threads_connected;
  23. uint64_t threads_created;
  24. uint64_t threads_running;
  25. };
  26. void * init_connection(const char *host, const char *user, const char *pass);
  27. int ping_connection(void *mysql);
  28. int close_connection(void *mysql);
  29. int get_stats(void *mysql, struct mysql_stats *stats);
  30. #endif /* _MYSQL_HELPER_H_ */