mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-22 11:13:58 +08:00
* cp msg to remove the space
* no orphans
* cleanup
* parse using istringstream
* add test
* split files
* cleanup
* add parser.cc to files_common
* add test for build message
* use > 0
* cleanup
* test proc/self/stat
* more test
* dd
* fix bug
* update test
* refactor pidStat
* cleanup
* test exe
* check procs size in message
* rename pidStat->ProcStat
* don't use util::format_string
* robust pids()
* catch conversion exception
* fix softirq
* udpate test
* use istringstream
* use REQUIRE_THAT&cleanup
* reserve vector of procStats
* use istream to parse cmdline
* cleanup
old-commit-hash: d0fa98931b
23 lines
403 B
C++
23 lines
403 B
C++
|
|
#include <sys/resource.h>
|
|
|
|
#include "selfdrive/common/util.h"
|
|
#include "selfdrive/proclogd/proclog.h"
|
|
|
|
ExitHandler do_exit;
|
|
|
|
int main(int argc, char **argv) {
|
|
setpriority(PRIO_PROCESS, 0, -15);
|
|
|
|
PubMaster publisher({"procLog"});
|
|
while (!do_exit) {
|
|
MessageBuilder msg;
|
|
buildProcLogMessage(msg);
|
|
publisher.send("procLog", msg);
|
|
|
|
util::sleep_for(2000); // 2 secs
|
|
}
|
|
|
|
return 0;
|
|
}
|