UNIX Question and Answer – UNIX’s Process Monitoring
UNIX MCQ – Multiple Choice Questions for exam, interview, and Entrance Test
1. What command is used to display the process status in real-time, updating every 5 seconds, in UNIX?
a) ps -r
b) ps -e
c) watch ps
d) pstree -d
Answer: c) watch ps
Explanation: The watch command is used to execute a command repeatedly and display its output in real-time.
2. Which signal is used to send a “stop” signal to a process, allowing it to be resumed later in UNIX?
a) SIGSTOP
b) SIGTSTP
c) SIGCONT
d) SIGINT
Answer: b) SIGTSTP
Explanation: The SIGTSTP signal is used to suspend a process temporarily in UNIX.
3. What command is used to display the CPU usage of each process and its threads in UNIX?
a) ps -eLf
b) top -p
c) pstat -c
d) htop
Answer: a) ps -eLf
Explanation: The ps command with the -eLf option is used to display the CPU usage of each process and its threads in UNIX.
4. What is the purpose of the iostat command in UNIX?
a) Display CPU statistics
b) Display disk I/O statistics
c) Display memory statistics
d) Display network statistics
Answer: b) Display disk I/O statistics
Explanation: The iostat command is used to display disk I/O statistics in UNIX.
5. Which command is used to display the processes currently being managed by the system in UNIX?
a) pstree
b) pmap
c) ps -a
d) top
Answer: d) top
Explanation: The top command displays the processes currently being managed by the system in UNIX.
6. What signal is used to send a “terminate” signal to a process, allowing it to perform cleanup tasks in UNIX?
a) SIGKILL
b) SIGTERM
c) SIGINT
d) SIGHUP
Answer: b) SIGTERM
Explanation: The SIGTERM signal is used to terminate a process gracefully and allow it to perform cleanup tasks in UNIX.
7. Which command is used to display a dynamic view of the system’s performance, including CPU, memory, and I/O statistics in UNIX?
a) prstat
b) vmstat
c) sar
d) top
Answer: d) top
Explanation: The top command provides a dynamic view of the system’s performance in UNIX.
8. What is the purpose of the renice command in UNIX?
a) Renaming processes
b) Adjusting process priority
c) Resuming suspended processes
d) Terminating processes by name
Answer: b) Adjusting process priority
Explanation: The renice command is used to adjust the priority of processes in UNIX.
9. Which command is used to display the list of processes along with their memory usage in UNIX?
a) ps -m
b) ps -mem
c) ps -rss
d) ps -aux
Answer: d) ps -aux
Explanation: The ps command with the -aux option displays a list of processes along with their memory usage in UNIX.
10. What is the purpose of the pgrep command in UNIX?
a) Display process groups
b) Find processes based on their attributes
c) Display process priority
d) Display process tree
Answer: b) Find processes based on their attributes
Explanation: The pgrep command is used to find processes based on their attributes in UNIX.
11. Which signal is used to send a “hangup” signal to a process, asking it to reload its configuration in UNIX?
a) SIGHUP
b) SIGTERM
c) SIGINT
d) SIGKILL
Answer: a) SIGHUP
Explanation: The SIGHUP signal is used to send a “hangup” signal to a process, asking it to reload its configuration in UNIX.
12. What command is used to display the CPU and memory utilization of each process in UNIX?
a) ps -eo
b) top -o
c) pstat -m
d) htop
Answer: a) ps -eo
Explanation: The ps command with the -eo option is used to display the CPU and memory utilization of each process in UNIX.
13. What is the purpose of the sar command in UNIX?
a) Display system information
b) Display swap space information
c) Display CPU utilization information
d) Display process information
Answer: c) Display CPU utilization information
Explanation: The sar command is used to display CPU utilization information in UNIX.
14. Which command is used to display information about the threads associated with each process in UNIX?
a) ps -T
b) ps -thread
c) ps -th
d) ps -LF
Answer: d) ps -LF
Explanation: The ps command with the -LF option is used to display information about the threads associated with each process in UNIX.
15. What is the purpose of the killall command in UNIX?
a) Terminate processes by name
b) Terminate processes by PID
c) Terminate all processes
d) Terminate background processes
Answer: a) Terminate processes by name
Explanation: The killall command is used to terminate processes by name in UNIX.
16. Which signal is used to send a “stop” signal to a process in UNIX?
a) SIGSTOP
b) SIGTSTP
c) SIGCONT
d) SIGINT
Answer: a) SIGSTOP
Explanation: The SIGSTOP signal is used to send a “stop” signal to a process in UNIX.
17. What command is used to display information about the disk I/O activities in UNIX?
a) dstat
b) iotop
c) lsof
d) iostat
Answer: d) iostat
Explanation: The iostat command is used to display information about the disk I/O activities in UNIX.
18. Which command is used to display information about the processes in a tree format in UNIX?
a) ptree
b) pstree
c) ps -tree
d) tree
Answer: b) pstree
Explanation: The pstree command is used to display information about the processes in a tree format in UNIX.
19. What is the purpose of the nice command in UNIX?
a) Adjust process priority
b) Terminate processes
c) Display CPU usage
d) Display memory usage
Answer: a) Adjust process priority
Explanation: The nice command is used to adjust the priority of processes in UNIX.
20. Which command is used to display information about the disk usage in UNIX?
a) df
b) du
c) fsusage
d) diskusage
Answer: a) df
Explanation: The df command is used to display information about the disk usage in UNIX.
21. What is the purpose of the pmap command in UNIX?
a) Display process memory map
b) Display process status
c) Display process priority
d) Display process tree
Answer: a) Display process memory map
Explanation: The pmap command is used to display the memory map of a process in UNIX.
22. Which signal is used to send a “continue” signal to a process in UNIX?
a) SIGCONT
b) SIGSTOP
c) SIGTSTP
d) SIGINT
Answer: a) SIGCONT
Explanation: The SIGCONT signal is used to send a “continue” signal to a process in UNIX.
23. What command is used to display information about the network connections in UNIX?
a) netstat
b) ifconfig
c) lsof
d) netinfo
Answer: a) netstat
Explanation: The netstat command is used to display information about the network connections in UNIX.
24. What is the purpose of the uptime command in UNIX?
a) Display system time
b) Display system load average
c) Display system version
d) Display system uptime
Answer: b) Display system load average
Explanation: The uptime command is used to display the system load average in UNIX.
25. Which command is used to display information about the kernel modules in UNIX?
a) kinfo
b) lsmod
c) modinfo
d) kernelinfo
Answer: b) lsmod
Explanation: The lsmod command is used to display information about the kernel modules in UNIX.
26. Which command is used to display the list of files opened by each process in UNIX?
a) lsof
b) pfiles
c) fstat
d) ps -f
Answer: a) lsof
Explanation: The lsof command is used to display the list of files opened by each process in UNIX.
27. What signal is used to send a “terminate” signal to a process, allowing it to perform cleanup tasks before termination in UNIX?
a) SIGTERM
b) SIGKILL
c) SIGINT
d) SIGQUIT
Answer: a) SIGTERM
Explanation: The SIGTERM signal is used to send a “terminate” signal to a process, allowing it to perform cleanup tasks before termination in UNIX.
28. Which command is used to display the system memory usage in UNIX?
a) memusage
b) free
c) memstat
d) vmusage
Answer: b) free
Explanation: The free command is used to display the system memory usage in UNIX.
29. What is the purpose of the kill command in UNIX?
a) Display process status
b) Terminate processes
c) Display CPU usage
d) Display memory usage
Answer: b) Terminate processes
Explanation: The kill command is used to terminate processes in UNIX.
30. Which command is used to display information about the system processes in a hierarchical tree format in UNIX?
a) ptree
b) ps -h
c) pstree
d) top -h
Answer: c) pstree
Explanation: The pstree command displays information about the system processes in a hierarchical tree format in UNIX.
31. What signal is used to send a “stop” signal to a process and its children, allowing them to be resumed later in UNIX?
a) SIGSTOP
b) SIGTSTP
c) SIGCONT
d) SIGINT
Answer: a) SIGSTOP
Explanation: The SIGSTOP signal is used to send a “stop” signal to a process and its children, allowing them to be resumed later in UNIX.
32. Which command is used to display the system-wide summary of memory usage in UNIX?
a) memstat
b) top -m
c) sar -m
d) free -m
Answer: d) free -m
Explanation: The free command with the -m option is used to display the system-wide summary of memory usage in UNIX.
33. What is the purpose of the sysstat package in UNIX?
a) Display system status
b) Monitor system resources
c) Manage system services
d) Configure system security
Answer: b) Monitor system resources
Explanation: The sysstat package is used to monitor system resources in UNIX.
34. Which command is used to display detailed information about a specific process, including its parent process ID and command line arguments, in UNIX?
a) ps -f
b) pinfo
c) pidinfo
d) pstree -p
Answer: a) ps -f
Explanation: The ps command with the -f option is used to display detailed information about a specific process in UNIX.
35. What is the purpose of the pgrep command in UNIX?
a) Display process groups
b) Find processes based on their attributes
c) Display process priority
d) Display process tree
Answer: b) Find processes based on their attributes
Explanation: The pgrep command is used to find processes based on their attributes in UNIX.
36. Which signal is used to send a “hangup” signal to a process, asking it to reload its configuration in UNIX?
a) SIGHUP
b) SIGTERM
c) SIGINT
d) SIGKILL
Answer: a) SIGHUP
Explanation: The SIGHUP signal is used to send a “hangup” signal to a process, asking it to reload its configuration in UNIX.
37. What command is used to display the CPU usage of each process and its threads in UNIX?
a) ps -eo
b) top -o
c) pstat -c
d) htop
Answer: a) ps -eo
Explanation: The ps command with the -eo option is used to display the CPU usage of each process and its threads in UNIX.
38. What is the purpose of the sar command in UNIX?
a) Display system information
b) Display swap space information
c) Display CPU utilization information
d) Display process information
Answer: c) Display CPU utilization information
Explanation: The sar command is used to display CPU utilization information in UNIX.
39. Which command is used to display information about the threads associated with each process in UNIX?
a) ps -T
b) ps -thread
c) ps -th
d) ps -LF
Answer: d) ps -LF
Explanation: The ps command with the -LF option is used to display information about the threads associated with each process in UNIX.
40. What is the purpose of the killall command in UNIX?
a) Terminate processes by name
b) Terminate processes by PID
c) Terminate all processes
d) Terminate background processes
Answer: a) Terminate processes by name
Explanation: The killall command is used to terminate processes by name in UNIX.
41. Which signal is used to send a “stop” signal to a process in UNIX?
a) SIGSTOP
b) SIGTSTP
c) SIGCONT
d) SIGINT
Answer: a) SIGSTOP
Explanation: The SIGSTOP signal is used to send a “stop” signal to a process in UNIX.
42. What command is used to display information about the disk I/O activities in UNIX?
a) dstat
b) iotop
c) lsof
d) iostat
Answer: d) iostat
Explanation: The iostat command is used to display information about the disk I/O activities in UNIX.
43. Which command is used to display information about the processes in a tree format in UNIX?
a) ptree
b) pstree
c) ps -tree
d) tree
Answer: b) pstree
Explanation: The pstree command is used to display information about the processes in a tree format in UNIX.
44. What is the purpose of the nice command in UNIX?
a) Adjust process priority
b) Terminate processes
c) Display CPU usage
d) Display memory usage
Answer: a) Adjust process priority
Explanation: The nice command is used to adjust the priority of processes in UNIX.
45. Which command is used to display information about the disk usage in UNIX?
a) df
b) du
c) fsusage
d) diskusage
Answer: a) df
Explanation: The df command is used to display information about the disk usage in UNIX.
46. What is the purpose of the pmap command in UNIX?
a) Display process memory map
b) Display process status
c) Display process priority
d) Display process tree
Answer: a) Display process memory map
Explanation: The pmap command is used to display the memory map of a process in UNIX.
47. Which signal is used to send a “continue” signal to a process in UNIX?
a) SIGCONT
b) SIGSTOP
c) SIGTSTP
d) SIGINT
Answer: a) SIGCONT
Explanation: The SIGCONT signal is used to send a “continue” signal to a process in UNIX.
48. What command is used to display information about the network connections in UNIX?
a) netstat
b) ifconfig
c) lsof
d) netinfo
Answer: a) netstat
Explanation: The netstat command is used to display information about the network connections in UNIX.
49. What is the purpose of the uptime command in UNIX?
a) Display system time
b) Display system load average
c) Display system version
d) Display system uptime
Answer: b) Display system load average
Explanation: The uptime command is used to display the system load average in UNIX.
50. Which command is used to display information about the kernel modules in UNIX?
a) kinfo
b) lsmod
c) modinfo
d) kernelinfo
Answer: b) lsmod
Explanation: The lsmod command is used to display information about the kernel modules in UNIX.