proclogd: fix wrong type for rss (#25923)

rss is long
pull/25956/head
Dean Lee 3 years ago committed by GitHub
parent cd40652e64
commit 379b7cf8b6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      system/proclogd/proclog.cc
  2. 4
      system/proclogd/proclog.h

@ -95,7 +95,7 @@ std::optional<ProcStat> procStat(std::string stat) {
.num_threads = stol(v[StatPos::num_threads - 1]),
.starttime = stoull(v[StatPos::starttime - 1]),
.vms = stoul(v[StatPos::vsize - 1]),
.rss = stoul(v[StatPos::rss - 1]),
.rss = stol(v[StatPos::rss - 1]),
.processor = stoi(v[StatPos::processor - 1]),
};
return p;

@ -20,8 +20,8 @@ struct ProcCache {
struct ProcStat {
int pid, ppid, processor;
char state;
long cutime, cstime, priority, nice, num_threads;
unsigned long utime, stime, vms, rss;
long cutime, cstime, priority, nice, num_threads, rss;
unsigned long utime, stime, vms;
unsigned long long starttime;
std::string name;
};

Loading…
Cancel
Save