exam questions

Exam XK0-004 All Questions

View all questions & answers for the XK0-004 exam

Exam XK0-004 topic 1 question 148 discussion

Actual exam question from CompTIA's XK0-004
Question #: 148
Topic #: 1
[All XK0-004 Questions]

An administrator needs to look at a log for an application on a systemd-based system. There is no log for this application in /var/log. Which of the following is another way to view the application log on this system?

  • A. tail -f /var/log/secure
  • B. journalctl ג€"u application
  • C. systemctl application.service
  • D. watch /var/lib/application/
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
jahute27
Highly Voted 4 years, 5 months ago
Answer is B https://www.digitalocean.com/community/tutorials/how-to-use-journalctl-to-view-and-manipulate-systemd-logs
upvoted 18 times
...
alfre
Highly Voted 4 years, 4 months ago
B. journalctl ""u application
upvoted 6 times
...
DiaaEmara
Most Recent 2 years, 5 months ago
Let's go ahead and review some log files in the plaintext format. Run the command below to print the contents of the /var/log/syslog file with the tail utility: sudo tail /var/log/syslog
upvoted 1 times
DiaaEmara
2 years, 5 months ago
journalctl may be used to query the contents of the systemd(1) journal as written by systemd-journald.service(8). If called without parameters, it will show the full contents of the journal, starting with the oldest entry collected
upvoted 1 times
DiaaEmara
2 years, 5 months ago
Basic Log Viewing To see the logs that the journald daemon has collected, use the journalctl command. When used alone, every journal entry that is in the system will be displayed within a pager (usually less) for you to browse
upvoted 1 times
...
DiaaEmara
2 years, 5 months ago
https://books.google.com.eg/books?id=kuJMEAAAQBAJ&pg=PA410&lpg=PA410&dq=An+administrator+needs+to+look+at+a+log+for+an+application+on+a+systemd-based+system.+There+is+no+log+for+this+application+in+/var/log.+Which+of+the+following+is+another+way+to+view+the+application+log+on+this+system&source=bl&ots=OHuj1yNNoZ&sig=ACfU3U3FWKFrkmgg49tk9YznIeT9z37Eqg&hl=en&sa=X&ved=2ahUKEwilnqPExt37AhXBSPEDHdrvCCsQ6AF6BAgSEAM#v=snippet&q=JOURNALCTL&f=false
upvoted 1 times
...
...
DiaaEmara
2 years, 5 months ago
systemctl may be used to introspect and control the state of the "systemd" system and service manager. Please refer to systemd(1) for an introduction into the basic concepts and functionality this tool manages.
upvoted 1 times
DiaaEmara
2 years, 5 months ago
https://man7.org/linux/man-pages/man1/systemctl.1.html
upvoted 1 times
...
...
DiaaEmara
2 years, 5 months ago
Short one that I've been unable to find a decent answer for. Centos 5.10 server, trying to trawl through all the logs I can to see what IPs successfully accessed the server. I've been mucking about with /var/log/secure and /var/log/audit/audit.log. Most interesting thing I found was from the /root/.bash_history, grepping through a few suspect directories and files for a specific IP but I want to be sure exactly what IPs have accessed the server via ssh. TL;DR: Does /var/log/secure log ssh successes or is there some other file on centos systems that do?
upvoted 1 times
...
...
examtopics_htc
2 years, 6 months ago
Selected Answer: B
Journalctl most definitely
upvoted 1 times
...
giannisae
4 years, 4 months ago
B is correct
upvoted 5 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
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.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago