Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Unified Diff: telemetry/telemetry/internal/platform/linux_platform_backend.py

Issue 2869483003: Implement GetSystemLog on Linux platform
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: telemetry/telemetry/internal/platform/linux_platform_backend.py
diff --git a/telemetry/telemetry/internal/platform/linux_platform_backend.py b/telemetry/telemetry/internal/platform/linux_platform_backend.py
index 7efb05db5e41c42e67aec7ad90442c6720a04362..01aa0b8bbc60b908811dbe2e622da1bc619d76e7 100644
--- a/telemetry/telemetry/internal/platform/linux_platform_backend.py
+++ b/telemetry/telemetry/internal/platform/linux_platform_backend.py
@@ -72,6 +72,11 @@ class LinuxPlatformBackend(
def GetOSVersionDetailString(self):
return '' # TODO(kbr): Implement this.
+ def GetSystemLog(self):
+ # Since the log file can be very large, only show the last 200 lines.
+ return subprocess.check_output(
+ ['tail', '-n', '200', '/var/log/syslog'])
+
def CanFlushIndividualFilesFromSystemCache(self):
return True

Powered by Google App Engine
This is Rietveld 408576698