- name: System logs | |
member: | |
- name: View kernel logs | |
description: 'Views the last k lines of the kernel logs.' | |
inputs: | |
- prompt: 'Number of lines to show: ' | |
var_id: 1 | |
type: number | |
min: 1 | |
max: 3000 | |
step: 1 | |
unit: 'lines' | |
steps: | |
- command: 'tail -n "$1" /var/log/messages' | |
- name: View kernel crash logs | |
description: 'Views the last k lines of the kernel crash logs.' | |
inputs: | |
- prompt: 'Number of lines to show: ' | |
var_id: 1 | |
type: number | |
min: 1 | |
max: 3000 | |
step: 1 | |
unit: 'lines' | |
steps: | |
- command: "tr -cd '\\11\\12\\15\\40-\\176' < /dev/pstore/console-ramoops | tail -n $1" | |
- name: Rotate logs | |
description: 'Rotates the system logs.' | |
steps: | |
- command: 'rm -f /var/lib/cleanup_logs_paused' | |
- command: '/usr/sbin/chromeos-cleanup-logs' | |
- name: View FW logs (x86 only) | |
steps: | |
- command: 'cbmem -c' | |
- name: View EC logs | |
inputs: | |
- prompt: 'Which one? ' | |
var_id: 1 | |
type: choices | |
choices: ['console', 'panicinfo', 'port80read', 'event log'] | |
- prompt: 'Number of lines to show: ' | |
var_id: 2 | |
type: number | |
min: 1 | |
max: 3000 | |
step: 1 | |
unit: 'lines' | |
steps: | |
- command: 'if [ "$1" = "event log" ]; then mosys eventlog list | tail -n $2; else ectool $1 | tail -n $2; fi' | |
- name: View Chrome logs | |
inputs: | |
- prompt: 'Which log file to view? ' | |
var_id: 1 | |
type: choices | |
choices: "!echo $(ls /var/log/ui | sed -e 's/ui\\.//g' | sort -n) older" | |
steps: | |
- command: 'if [ "$1" = "older" ]; then | |
cat /var/log/Xorg.0.log; | |
else | |
cat /var/log/ui/ui.$1; | |
fi' |