Log last 1000 lines of tmux output in bootlog (#2149)

* log last 1000 lines of tmux output in bootlog

* add to bootlog

* fix tmux capture
old-commit-hash: 6b4957cba1
This commit is contained in:
Adeeb Shihadeh
2020-10-20 21:07:12 -07:00
committed by GitHub
parent e9d58939d2
commit a4f4f1d828
3 changed files with 7 additions and 1 deletions

2
cereal

Submodule cereal updated: 5c7e91abb7...7128f46571

View File

@@ -113,6 +113,9 @@ function launch {
ln -sfn $(pwd) /data/pythonpath
export PYTHONPATH="$PWD"
# write tmux scrollback to a file
tmux capture-pane -pq -S-1000 > /tmp/launch_log
# start manager
cd selfdrive
./manager.py

View File

@@ -593,6 +593,9 @@ static void bootlog() {
std::string lastPmsg = util::read_file("/sys/fs/pstore/pmsg-ramoops-0");
boot.setLastPmsg(capnp::Data::Reader((const kj::byte*)lastPmsg.data(), lastPmsg.size()));
std::string launchLog = util::read_file("/tmp/launch_log");
boot.setLaunchLog(capnp::Text::Reader(launchLog.data(), launchLog.size()));
auto bytes = msg.toBytes();
logger_log(&s.logger, bytes.begin(), bytes.size(), false);
}