Exam 102-500 All QuestionsBrowse all questions from this exam
Question 69

On a system using systemd-journald, which of the following commands add the message Howdy to the system log? (Choose two.)

    Correct Answer: B, C

    To add a message to the system log on a system using systemd-journald, you can use the 'logger' and 'systemd-cat' commands. The 'logger Howdy' command sends the message 'Howdy' to the system log. The 'systemd-cat echo Howdy' command uses 'systemd-cat' to connect the command 'echo Howdy' to the system journal, thus sending 'Howdy' to the system log. Other options like 'journalctl add Howdy' and 'echo Howdy > /dev/journal' are incorrect and do not achieve this.

Discussion
hossem1998Options: BC

sorry b and c

nicolas97

bravo ragazzo

MchoetiOption: B

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.

Robert12

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.

Robert12

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

k3n_Option: B

Ok, i tested all the options B & C are correct. There is no ADD option in "journalctl"

drliu1202Option: C

"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

lucaverceOption: C

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

amindiashviliOption: C

B and C

LazylinuxOption: B

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):

jedrekOption: B

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

dpereiro4481Option: C

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.

MchoetiOption: B

it is B and C , please update

Stormy_Cloud

Why this answer is not fixed if its wrong?

carter_sladeOption: B

B. logger Howdy C. systemd-cat echo Howdy

drliu1202Option: B

"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.

TITI

correct are B and C

wvdw1962Option: B

I have tested on Ubuntu, its answer B + C. "journalctl add" : 'add' -Invalid argument