CProcessStatisticsReader.h 500 B

1234567891011121314151617181920212223242526
  1. #pragma once
  2. #include <AK/AKString.h>
  3. #include <AK/HashMap.h>
  4. struct CProcessStatistics {
  5. pid_t pid;
  6. unsigned nsched;
  7. String name;
  8. String state;
  9. String username;
  10. uid_t uid;
  11. String priority;
  12. size_t virtual_size;
  13. size_t physical_size;
  14. unsigned syscalls;
  15. };
  16. class CProcessStatisticsReader {
  17. public:
  18. static HashMap<pid_t, CProcessStatistics> get_all();
  19. private:
  20. static String username_from_uid(uid_t);
  21. static HashMap<uid_t, String> s_usernames;
  22. };