LFCS · Question #495
Which of the following commands is used on the command line to send messages to the syslog systems.
The correct answer is C. logger. This question asks for the command-line utility used to send custom messages to the syslog system. The logger command is specifically designed for this purpose.
Question
Options
- Alastlog
- Bklog
- Clogger
- Dslog
- Esyslog
How the community answered
(45 responses)- A4% (2)
- B2% (1)
- C91% (41)
- D2% (1)
Why each option
This question asks for the command-line utility used to send custom messages to the syslog system. The `logger` command is specifically designed for this purpose.
`lastlog` displays the recent login information for all users or a specified user.
`klog` is not a standard Linux command for sending messages to syslog; `dmesg` is used to view kernel messages.
The `logger` command provides a shell command interface to the system log module, allowing users and scripts to send messages to the syslog daemon. These messages are then processed and stored according to the syslog configuration (e.g., in `/var/log/messages`).
`slog` is not a standard Linux command for interacting with syslog.
`syslog` is the daemon or service responsible for logging, not a command-line tool to send messages to it.
Concept tested: Sending messages to syslog
Source: https://linux.die.net/man/1/logger
Topics
Community Discussion
No community discussion yet for this question.