kmsg_dump_get_line(9)
π kmsg_dump_get_line(9) π
okay bestie, welcome to the Kernel API Manual page for kmsg_dump_get_line β itβs giving βretrieve exactly one kmsg log lineβ energy and honestly it ate. no cap, every single detail is staying, so letβs go. π
β¨ NAME β¨
kmsg_dump_get_line - retrieve one kmsg log line
πΈ SYNOPSIS πΈ
bool kmsg_dump_get_line (struct kmsg_dump_iter *iter , bool syslog ,
char *line , size_t size , size_t *len );
π ARGUMENTS π
iterβ kmsg dump iterator. itβs the little buddy keeping track of where we are.syslogβ include the"<4>"prefixes.lineβ buffer to copy the line to.sizeβ maximum size of the buffer.lenβ length of line placed into buffer.
π¦ DESCRIPTION π¦
okay so hereβs the vibe: start at the beginning of the kmsg buffer, with the oldest kmsg record, and copy one record into the provided buffer. very βfirst day of school, oldest message gets picked firstβ of it all. π
Consecutive calls will return the next available record moving towards the end of the buffer with the youngest messages. itβs literally walking down the log line by line, bestie. iykyk.
A return value of FALSE indicates that there are no more records to read. thatβs your βweβre done hereβ signal β not me refreshing the group chat hoping for more. π
π SEE ALSO π
the kernel file ./kernel/printk/printk.c is main character energy here, and these functions are all in the group chat:
console_list_lock(9)console_list_unlock(9)console_srcu_read_lock(9)console_srcu_read_unlock(9)console_lock_spinning_enable(9)console_lock_spinning_disable_and_check(9)console_trylock_spinning(9)printk_parse_prefix(9)add_preferred_console(9)match_devname_and_update_preferred_console(9)console_suspend_all(9)console_cpu_notify(9)console_lock(9)console_trylock(9)console_unlock(9)console_flush_on_panic(9)printk_kthreads_shutdown(9)console_force_preferred_locked(9)pr_flush(9)wake_up_klogd(9)defer_console_output(9)printk_trigger_flush(9)printk_timed_ratelimit(9)kmsg_dump_register(9)kmsg_dump_unregister(9)kmsg_dump_desc(9)kmsg_dump_get_buffer(9)kmsg_dump_rewind(9)console_try_replay_all(9)__printk_cpu_sync_wait(9)__printk_cpu_sync_try_get(9)__printk_cpu_sync_put(9)
xoxo, your kernel bestie π«Άπ
β source/version: ./kernel/printk; date: October 2026; manual page: kmsg_dump_get_line(9). periodt. β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms