DragonFlyBSDMachine.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #ifndef HEADER_DragonFlyBSDMachine
  2. #define HEADER_DragonFlyBSDMachine
  3. /*
  4. htop - DragonFlyBSDMachine.h
  5. (C) 2014 Hisham H. Muhammad
  6. (C) 2017 Diederik de Groot
  7. Released under the GNU GPLv2+, see the COPYING file
  8. in the source distribution for its full text.
  9. */
  10. #include <sys/types.h> // required for kvm.h
  11. #include <kvm.h>
  12. #include <osreldate.h>
  13. #include <stdbool.h>
  14. #include <sys/jail.h>
  15. #include <sys/param.h>
  16. #include <sys/resource.h>
  17. #include <sys/uio.h>
  18. #include "Hashtable.h"
  19. #include "Machine.h"
  20. #include "ProcessTable.h"
  21. #include "UsersTable.h"
  22. typedef struct CPUData_ {
  23. double userPercent;
  24. double nicePercent;
  25. double systemPercent;
  26. double irqPercent;
  27. double idlePercent;
  28. double systemAllPercent;
  29. } CPUData;
  30. typedef struct DragonFlyBSDMachine_ {
  31. Machine super;
  32. kvm_t* kd;
  33. Hashtable* jails;
  34. int pageSize;
  35. int pageSizeKb;
  36. int kernelFScale;
  37. CPUData* cpus;
  38. unsigned long* cp_time_o;
  39. unsigned long* cp_time_n;
  40. unsigned long* cp_times_o;
  41. unsigned long* cp_times_n;
  42. } DragonFlyBSDMachine;
  43. char* DragonFlyBSDMachine_readJailName(const DragonFlyBSDMachine* host, int jailid);
  44. #endif