dmesg

package
v0.3.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package dmesg provides the functionality to poll the dmesg log.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseCtimeWithError

func ParseCtimeWithError(line []byte) (time.Time, []byte, error)

ParseCtimeWithError Parses the timestamp from "dmesg --ctime" output lines. Returns a zero time if the timestamp is not found or the timestamp is invalid. Returns an error if the timestamp is not found or the timestamp is invalid.

func ParseISOtimeWithError added in v0.1.9

func ParseISOtimeWithError(line []byte) (time.Time, []byte, error)

ParseISOtimeWithError parses the timestamp from "dmesg --time-format=iso" output lines. ref. "The definition of the iso timestamp is: YYYY-MM-DD<T>HH:MM:SS,<microseconds>←+><timezone offset from UTC>."

func ParseShortISOtimeWithError added in v0.3.8

func ParseShortISOtimeWithError(line []byte) (time.Time, []byte, error)

ParseShortISOtimeWithError parses the timestamp from "journalctl -o short-iso" output lines.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL