looking for a nice way to generate kernel log updates

Soldato
Joined
9 Dec 2006
Posts
9,284
Location
@ManCave
Hey,

Looking for a nice easy way to generate kernel log updates.

This is for a test script to ensure syslog is logging correctly. so want a test script that will generate logs for all sources so we can ensure host is setup correctly.

currently the current implementation created by an old employee just used modprobe to remove & re-add a module which works well. However its not exactly safe method (stripping out modules & re-adding on a live system)

any thoughts on how to generate kernel log updates?
(ive tried echoing to /dev/kmsg that does not work :(
 
Associate
Joined
4 Jun 2021
Posts
461
Location
Yorkshire
Echoing to /dev/kmsg should work in that the message will get written to the kernel log, but you must be root.

When you say it doesn't work, do you mean you get an error when running the echo command, the message doesn't appear in the output from dmesg or that it doesn't appear in the configured syslog log file?
 
Back
Top Bottom