mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-18 21:14:01 +08:00
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:
2
cereal
2
cereal
Submodule cereal updated: 5c7e91abb7...7128f46571
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user