This set of Unix Multiple Choice Questions & Answers (MCQs) focuses on “Performance Components and Tools”.
1. Which of the following resources are required to be managed and monitored?
a) CPU time
b) I/O time
c) Disk space
d) CPU time, I/O time, disk space
Explanation: A typical UNIX system has some major resources that are required to be monitored. These resources include CPU time, I/O time, disk space, network time. There are many tools available which provides us with guidelines on how to diagnose and fix performance problems.
2. System time comprises ____ components.
Explanation: There are five major components which take up the system time. These are -User state CPU, system state CPU, I/O time and network time, virtual memory performance, application program.
3. Which command is used to display all the running and active real-time processes?
Explanation: top command is system monitoring program which is used to display all the running and active real-time process. It displays CPU usage, memory usage, swap memory, cache size, buffer size, process PID and much more.
4. ____ command displays the list of all open files and processes.
Explanation: lsof command is a system monitoring program which displays the list of all open files and processes. The open file includes pipe, devices, network sockets, disk files, processes.
5. ____ is a simple tool that will collect and show system input and output storage device statistics.
Explanation: Iostat is a system monitoring tool which is used to display system input and output storage device statistics.
6. sar is a command line tool for collecting, viewing and recording performance data.
Explanation: sar is a command line tool for collecting, viewing and recording performance data. Sar (system activity report) is used to report on various system loads, including system loads, CPU activity, memory/paging, device load, network.
7. To override the default action and catch the signal ____ system call is used.
Explanation: The default disposition of a signal is to terminate the process. However, we can override the default action and catch the signal using system call using the signal system call. Using signal system call.
8. Which of the following functions can be performed using signal system call?
a) ignore the signal
b) restore the default
c) invoke a signal handling function
d) ignore the signal, restore the default and invoke a signal handling function
Explanation: signal system call doesn’t generate any signal but only specifies its disposition. Using signal call we can either ignore the signal, restore the default (if it was changed earlier) or invoke a signal handling function.
9. Which of the following signals can neither be ignored nor catch?
c) SIGKILL and SIGSTOP
Explanation: Irrespective of the action you take, there are two signals that we can neither ignore nor catch by invoking a signal handler. They are SIGKILL and SIGSTOP.
Sanfoundry Global Education & Learning Series – Unix.
To practice all areas of Unix, here is complete set of 1000+ Multiple Choice Questions and Answers.