DragonFlyBSDMachine.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. unsigned long long int memWire;
  38. unsigned long long int memActive;
  39. unsigned long long int memInactive;
  40. unsigned long long int memFree;
  41. CPUData* cpus;
  42. unsigned long* cp_time_o;
  43. unsigned long* cp_time_n;
  44. unsigned long* cp_times_o;
  45. unsigned long* cp_times_n;
  46. } DragonFlyBSDMachine;
  47. char* DragonFlyBSDMachine_readJailName(const DragonFlyBSDMachine* host, int jailid);
  48. #endif