Unix Questions and Answers – Performance Components and Tools

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
View Answer

Answer: d
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.
a) 5
b) 4
c) 3
d) 8
View Answer

Answer: a
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?
a) tp
b) top
c) vmstat
d) lsof
View Answer

Answer: b
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.
advertisement
advertisement

4. ____ command displays the list of all open files and processes.
a) top
b) lsof
c) vmstat
d) pipe
View Answer

Answer: b
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.
a) top
b) lsof
c) vmstat
d) Iostat
View Answer

Answer: d
Explanation: Iostat is a system monitoring tool which is used to display system input and output storage device statistics.
Note: Join free Sanfoundry classes at Telegram or Youtube

6. sar is a command line tool for collecting, viewing and recording performance data.
a) True
b) False
View Answer

Answer: a
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.
a) sig
b) SIGKILL
c) signal
d) SIGINT
View Answer

Answer: c
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.
advertisement

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
View Answer

Answer: d
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?
a) SIGKILL
b) SIGSTOP
c) SIGKILL and SIGSTOP
d) SIGALR
View Answer

Answer: c
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.
advertisement

Sanfoundry Global Education & Learning Series – Unix.

To practice all areas of Unix, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.