You are not logged in.

#1 2015-04-11 14:01:20

Sanjeev K Sharma
Member
Registered: 2013-08-14
Posts: 72

[SOLVED] netconsole working great - local journal's now almost empty

the kernel command line never worked for me.

I realized I had network init disabled in the bios.  Enabling bios init did not let netconsole start either at the boot parameters, or  the entry in   /etc/modules-load.d/

The service that loads the module after the network comes up works (additional note at end)

[Unit]
Description= kernel kmsg to network
Description=/etc/systemd/system/netconsole.service
#wants maybe more appropriate; I didn't want to add stop handling to this; Requires would try to stop this if the network goes down 
Wants=network.target

[Service]
ExecStart=-/usr/bin/modprobe netconsole

[Install]
WantedBy=multi-user.target

are these (observations on netconsole setup) candidates to include on the wiki?



to the question at hand, the local log's almost empty - no entries for USB device insertions (these go to the target machine), udev/dbus stuff that I used to get from mozilla  ... tons of stuff that used to be in there.

I had to reinstall Arch, I'm still recovering so that complicates matters: I may have had an old systemd setup that wrote too much.

this does write to the local log

/usr/bin/systemd-cat -t "sams systemd log test" /usr/bin/echo "WORKING DIR CHANGED TO"
/usr/bin/systemd-cat -t "sams systemd log test" /usr/bin/pwd
/usr/bin/systemd-cat -t "sams systemd log test" /usr/bin/echo "STARTING TAR"
/usr/bin/systemd-cat -t "sams systemd log test" /usr/bin/printf "\033[1;35mSTARTING TAR TEST END COLOR\033[0m COLOR ENDED"
/usr/bin/systemd-cat -t "sams systemd log test" /usr/bin/printf "\033[1;35mSTARTING TAR"
/usr/bin/systemd-cat -t "sams systemd log test" /bin/tar cf $TARfile 
/usr/bin/systemd-cat -t "sams systemd log test" echo "failed, exiting"
/usr/bin/systemd-cat -t "sams systemd log test" /usr/bin/printf "\033[0m"
/usr/bin/systemd-cat -t "sams systemd log test" \
/usr/bin/systemd-cat -t "sams systemd log test" \
/usr/bin/systemd-cat -t "sams systemd log test" /usr/bin/ls -x --color=always /home/sam/bin 
/usr/bin/stat * -c '%s %Y %n' | sort -n -k 2 |/usr/bin/tail -n3 | /usr/bin/systemd-cat -t "sams systemd log test"
/usr/bin/systemd-cat -t "sams systemd log test" /usr/bin/echo "backup filenames: "

the issue now is, the local journal's empty of a lot of stuff that used to show up.


this page's solution
http://www.burtonini.com/wordpress/2013 … o-project/

Update: when the journal starts up systemd will stop logging to the console, so if you want to get all systemd messages also pass systemd.log_target=kmsg.

(I may have misunderstood; that sentence may have meant ... "if you want to get all systemd messages"  TO THE REMOTE machine)

did not work (to restore the local entries), neither did these (taken from the systemd man page, SIGRTMIN+26, SIGRTMIN+27, SIGRTMIN+28)

sync;sync;kill -60 1
sync;sync;kill -61 1
sync;sync;kill -62 1

these latter command do report (on the netconsole'd remote machine) that the journal target has changed but nothing in the local journal.

anything else to try to restore the local entries?


the promised end note;

cat /etc/modprobe.d/netconsole.conf
options netconsole netconsole=@192.168.12.101/eno1,@192.168.12.51/00:03:29:d9:6f:2c

Last edited by Sanjeev K Sharma (2015-04-25 10:43:34)

Offline

#2 2015-04-25 10:43:00

Sanjeev K Sharma
Member
Registered: 2013-08-14
Posts: 72

Re: [SOLVED] netconsole working great - local journal's now almost empty

I got stuck on thinking about netconsole - finally I realized it was indeed the reinstall I had done

That reinstall took away the users added to the systemd-journal group.

Offline

Board footer

Powered by FluxBB