LFCS Certification Process and Job Scheduling 3 — Questions and Answers
Question 1: Which command displays the real-time CPU and memory usage of processes, updating every few seconds?
- top (Correct answer)
- ps aux
- vmstat
- lsof
Correct answer: top
`top` provides an interactive, continuously refreshing view of system processes and resource utilization.
Question 2: What does `at now + 2 hours` do when entered in an `at` session?
- Schedules the subsequent commands to run 2 hours from the current time (Correct answer)
- Runs the command immediately and repeats it in 2 hours
- Creates a cron entry for 2 hours from now
- Delays a running process by 2 hours
Correct answer: Schedules the subsequent commands to run 2 hours from the current time
`at now + 2 hours` opens an at-job prompt; commands typed are queued to execute once, 2 hours later.
Question 3: Which signal number corresponds to SIGKILL?
- 9 (Correct answer)
- 15
- 1
- 19
Correct answer: 9
SIGKILL is signal number 9; it immediately terminates a process and cannot be caught or blocked.
Question 4: How do you list all pending `at` jobs for the current user?
- atq (Correct answer)
- at -l
- at --list
- atrm -l
Correct answer: atq
`atq` lists all pending at jobs, showing job number, execution time, and queue for the current user.
Question 5: What is the purpose of the `/proc/[PID]/status` file?
- It provides detailed status information about a specific process including memory, UID, and signal masks (Correct answer)
- It stores the command-line arguments used to start the process
- It contains the environment variables of the process
- It maps the process's virtual memory regions
Correct answer: It provides detailed status information about a specific process including memory, UID, and signal masks
`/proc/[PID]/status` exposes human-readable process metadata including state, memory usage, and signal handling info.
Question 6: Which command can be used to run a command immune to hangup signals, keeping it running after logout?
- nohup (Correct answer)
- disown
- screen
- bg
Correct answer: nohup
`nohup` runs a command that ignores the SIGHUP signal, allowing it to persist after the user logs out.
Question 7: In the context of `cron`, what does the special string `@reboot` mean in a crontab entry?
- The command runs once at system startup (Correct answer)
- The command runs every time a user reboots their session
- The command runs hourly starting from boot
- The command runs only during scheduled maintenance reboots
Correct answer: The command runs once at system startup
`@reboot` is a non-standard cron shortcut that executes the command once when the cron daemon starts at boot.
Which command displays the real-time CPU and memory usage of processes, updating every few seconds?