1.
Error logging is provided through..
Correct Answer(s)
A. Alog
B. Errlog
C. Syslog
Explanation
Error logging is provided through three different mechanisms: alog, errlog, and syslog.
- alog is a system log that records hardware and software errors on AIX systems.
- errlog is a log file that contains information about system errors, hardware failures, and software failures on AIX systems.
- syslog is a standard logging mechanism used by many operating systems, including AIX, to record system events and errors. It provides a centralized logging system for collecting and storing logs from various sources.
The answer includes all three mechanisms, alog, errlog, and syslog, which are commonly used for error logging purposes.
2.
Which command displays the contents of the boot log ?
Correct Answer
C. Alog -o -t boot
Explanation
-o Lists the contents of the log file. Writes the contents of the log file to standard output in sequential order.
-t identifies a log defined in the alog configuration database. The alog command gets the log's file name and size from the alog configuration database. If LogFile does not exist, one is created.
3.
Which command displays the console log ?
Correct Answer
B. Alog -o -t console
Explanation
The command "alog -o -t console" is the correct answer because the "-o" option specifies that the output should be displayed on the console, and the "-t console" option filters the log entries to only show the console log.
4.
Lists all log types that alog knows..
Correct Answer
C. Alog -L
Explanation
The correct answer is "alog -L". This command is used to list all log types that alog knows. By running this command, the user can view a comprehensive list of available log types in the system.
5.
Which command displays the contents of system error log ?
Correct Answer(s)
A. Errpt -a
B. Errpt -A
Explanation
-a Displays information about errors in the error log file in detailed format.
-A Displays a shortened version of the detailed report produced by the -a flag.
6.
# errclear 5
The above command will clear errors up until 5 days ago.
Correct Answer
A. True
Explanation
The "errclear" command is used to clear errors. In this case, the command is followed by the number 5, indicating that it will clear errors up until 5 days ago. Therefore, the statement that the above command will clear errors up until 5 days ago is true.
7.
# errpt -aDj errorid
The above command lists particular error info.
Correct Answer
A. True
Explanation
-a Displays information about errors in the error log file in detailed format.
-D Consolidates duplicate errors. The detailed error report, obtained with the -a flag, reports the number, and first and last times of the duplicates.
-j Includes only the error-log entries specified by the ErrorID (error identifier) variable.
8.
Which command displays tail on the error log ?
Correct Answer
D. Errpt -c
Explanation
The command "errpt -c" displays the tail on the error log. This command is used to view the most recent entries in the error log file. The "-c" flag stands for "continuous" and it ensures that the output is continuously updated as new errors are logged. By using this command, users can easily monitor and troubleshoot any errors or issues that are being recorded in the error log.
9.
# errpt -s 'date +%m%d0000%y'
The above command displays all the errors that happened today
Correct Answer
A. True
Explanation
The given command "errpt -s 'date +%m%d0000%y'" will display all the errors that occurred today. The "-s" flag is used to specify the start time for the error report, and in this case, it is set to the current date using the "date" command with the specified format. Therefore, the command will filter and display all the errors that have occurred since the start of the day.
10.
# errpt -j hdisk0
The above command displays all errors on hdisk0
Correct Answer
B. False
Explanation
Use the -N option should be used instead of -j
-N Generates a report of resource names specified by the ResourceNameList variable. The ResourceNameList variable is a list of names of resources that have detected errors.
11.
To list details about the error log
Correct Answer
A. /usr/lib/errdemon -l
Explanation
The correct answer is "/usr/lib/errdemon -l" because the "-l" option is used to list details about the error log. The other options ("-n" and "-a") do not provide information about the error log.
12.
The command to change the size of errorlog by 2Mb is..
Correct Answer
B. /usr/lib/errdemon -s 2097152
Explanation
The correct answer is "/usr/lib/errdemon -s 2097152". This command is used to change the size of the errorlog by 2Mb. The "-s" flag is used to specify the size, followed by the desired size in bytes (2097152 bytes is equal to 2Mb).