123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- #ifndef BASE_PROCESS_INTERNAL_AIX_H_
- #define BASE_PROCESS_INTERNAL_AIX_H_
- #include <stddef.h>
- #include <stdint.h>
- #include <unistd.h>
- #include "base/files/file_path.h"
- namespace base {
- namespace internalAIX {
- extern const char kProcDir[];
- extern const char kStatFile[];
- base::FilePath GetProcPidDir(pid_t pid);
- pid_t ProcDirSlotToPid(const char* d_name);
- bool ReadProcStats(pid_t pid, std::string* buffer);
- bool ParseProcStats(const std::string& stats_data,
- std::vector<std::string>* proc_stats);
- enum ProcStatsFields {
- VM_COMM = 1,
-
- VM_PPID = 3,
- VM_PGRP = 4,
-
-
-
-
-
-
- };
- int64_t GetProcStatsFieldAsInt64(const std::vector<std::string>& proc_stats,
- ProcStatsFields field_num);
- size_t GetProcStatsFieldAsSizeT(const std::vector<std::string>& proc_stats,
- ProcStatsFields field_num);
- int64_t ReadProcStatsAndGetFieldAsInt64(pid_t pid, ProcStatsFields field_num);
- size_t ReadProcStatsAndGetFieldAsSizeT(pid_t pid, ProcStatsFields field_num);
- }
- }
- #endif
|