2018-02-13 18:23:53 +01:00
|
|
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
|
|
|
# Licensed under the MIT License.
|
|
|
|
|
2016-08-17 21:07:12 +02:00
|
|
|
Import-Module $PSScriptRoot/SystemD/SystemD.psm1
|
2016-07-25 22:51:37 +02:00
|
|
|
|
|
|
|
#list recent journal events
|
2016-08-17 21:07:12 +02:00
|
|
|
Write-host -Foreground Blue "Get recent SystemD journal messages"
|
|
|
|
Get-SystemDJournal -args "-xe" |Out-Host
|
2016-07-25 22:51:37 +02:00
|
|
|
|
|
|
|
#Drill into SystemD unit messages
|
2016-08-31 20:05:35 +02:00
|
|
|
Write-host -Foreground Blue "Get recent SystemD journal messages for services and return Unit, Message"
|
2017-07-22 06:03:49 +02:00
|
|
|
Get-SystemDJournal -args "-xe" | Where-Object {$_._SYSTEMD_UNIT -like "*.service"} | Format-Table _SYSTEMD_UNIT, MESSAGE | Select-Object -first 10 | Out-Host
|