Press "Enter" to skip to content

Read and Search logs with SSH & PowerCLI

SSH – Read a content of a file

more <LOG_FILE>One page at a time
spacebar to go to the next page
cat <LOG_FILE>
tail <LOG_FILE>Display the last part of the file
-n Display the last <n> lines
-f see the data appended to it

SSH – Search in a file

cat <LOG_FILE> | grep <search word>

get location of logs

esxcli system syslog config get

PowerCLI

Event Log types

get-logtype

Search for a log entry

$hostd = get-log hostd | Select -ExpandProperty Entries
$hostd | select-string "volume"

Was this page helpful?