SolarisMachine.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. #ifndef HEADER_SolarisMachine
  2. #define HEADER_SolarisMachine
  3. /*
  4. htop - SolarisMachine.h
  5. (C) 2014 Hisham H. Muhammad
  6. (C) 2017,2018 Guy M. Broome
  7. Released under the GNU GPLv2+, see the COPYING file
  8. in the source distribution for its full text.
  9. */
  10. #include <kstat.h>
  11. #include <stdbool.h>
  12. #include <stdint.h>
  13. #include <sys/param.h>
  14. #include <sys/resource.h>
  15. #include <sys/swap.h>
  16. #include <sys/sysconf.h>
  17. #include <sys/sysinfo.h>
  18. #include <sys/uio.h>
  19. #include "Hashtable.h"
  20. #include "Machine.h"
  21. #include "UsersTable.h"
  22. #include "zfs/ZfsArcStats.h"
  23. #define ZONE_ERRMSGLEN 1024
  24. extern char zone_errmsg[ZONE_ERRMSGLEN];
  25. typedef struct CPUData_ {
  26. double userPercent;
  27. double nicePercent;
  28. double systemPercent;
  29. double irqPercent;
  30. double idlePercent;
  31. double systemAllPercent;
  32. double frequency;
  33. uint64_t luser;
  34. uint64_t lkrnl;
  35. uint64_t lintr;
  36. uint64_t lidle;
  37. bool online;
  38. } CPUData;
  39. typedef struct SolarisMachine_ {
  40. Machine super;
  41. kstat_ctl_t* kd;
  42. CPUData* cpus;
  43. int pageSize;
  44. int pageSizeKB;
  45. ZfsArcStats zfs;
  46. } SolarisMachine;
  47. #endif