Si hacemos la prueba en cualquier sistema linux ejecutando tanto la opciĂłn B loogger Howdy como la opciĂłn C systemd-cat echo Howdy, luego podemos ver con journalctl | grep Howdy como nos aparece una nueva lĂnea con el mensaje o etiqueta que hemos indicado.
Por lo tanto B y C son mis elecciones.
The right solution is B and C
logger Howdy is used to send a message to the system log from the command line.
systemd-cat is used to connect a command to the journal, and echo Howdy sends the message "Howdy" to systemd-cat, which in turn sends it to the journal.
"while we send a log manually from our Debian clien"
https://learning.lpi.org/en/learning-materials/102-500/108/108.2/108.2_01/#:~:text=while%20we%20send%20a%20log%20manually%20from%20our%20Debian%20client
"Just like how the logger command is used to send messages from the command line to the system log (as we saw in the previous lesson), the systemd-cat command serves a similar — but more well-rounded — purpose with the system journal."
https://learning.lpi.org/en/learning-materials/102-500/108/108.2/108.2_02/#:~:text=Just%20like%20how%20the%20logger%20command%20is%20used%20to%20send%20messages%20from%20the%20command%20line%20to%20the%20system%20log%20(as%20we%20saw%20in%20the%20previous%20lesson)%2C%20the%20systemd%2Dcat%20command%20serves%20a%20similar%E2%80%89%E2%80%94%E2%80%89but%20more%20well%2Drounded%E2%80%89%E2%80%94%E2%80%89purpose%20with%20the%20system%20journal.
B and C - tested on Red Hat and worked.
E is WRONG, give error:
[root@xxxxx ~]# journalctl add TEST
Failed to add match 'add': Invalid argument
Failed to add filters: Invalid argument
BC are correct below is why
systemd-cat and logger commands: are used to send messages from the command line to the system log.
The systemd-cat command serves a similar — but more well-rounded — purpose with the system journal. It allows us to send standard input (stdin), output (stdout) and error (stderr) to the journal.
If invoked with no parameters, it will send everything it reads from stdin to the journal. Once you are done, press Ctrl+C:.
The logger command comes in handy for shell scripting or for testing purposes. logger will append any message it receives to /var/log/syslog (or to /var/log/messages when logging to a remote central log server as you will see later in this lesson):
This answer is incorrect. It says select two but only one is provided as correct answer
Correct answer is B and C
Test it:
1. On one tab listen to journal logs
journalctl -f
2. On another tab do
logger Howdy
systemd-cat echo Howdy
Both will appear in the output of journalctl -f command
Hence the correct answer is B,C
In the first 60 questions of this test there is approximately 8 questions that can cause confusion when choosing the correct options. This one is the worst , it asks you to choose 2 options but only reports 1 answer. The answer it reports is way out.
There is no -add option within the man page for journalctl so option D must be incorrect.
systemd-cat is definitely correct. The question asks for 2 choices so the only other option left for me is logger . My answers would be B & C
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
hossem1998
Highly Voted 4Â years agonicolas97
3Â years, 8Â months agodpereiro4481
Most Recent 3Â months, 3Â weeks agoMchoeti
1Â year, 4Â months agoMchoeti
1Â year, 5Â months agoStormy_Cloud
1Â year, 6Â months agok3n_
1Â year, 7Â months agocarter_slade
2Â years agodrliu1202
2Â years agodrliu1202
2Â years agoTITI
2Â years, 1Â month agolucaverce
2Â years, 3Â months agoamindiashvili
2Â years, 4Â months agoLazylinux
2Â years, 4Â months agojedrek
2Â years, 4Â months agowvdw1962
2Â years, 6Â months agoRobert12
2Â years, 6Â months agoRobert12
2Â years, 6Â months ago