Bird
0
0

You want to check the system load average and uptime but only want the load average values in a script. Which command and option combination is best?

hard📝 Application Q9 of 15
Linux CLI - System Administration
You want to check the system load average and uptime but only want the load average values in a script. Which command and option combination is best?
Afree -l | grep load
Buptime -l
Cvmstat -l
Duptime | awk -F'load average:' '{print $2}'
Step-by-Step Solution
Solution:
  1. Step 1: Identify command to extract load average

    uptime shows load average; using awk extracts the load average part.
  2. Step 2: Check other options

    free and vmstat do not have load average options; uptime -l is invalid.
  3. Final Answer:

    uptime | awk -F'load average:' '{print $2}' -> Option D
  4. Quick Check:

    Extract load average = uptime with awk [OK]
Quick Trick: Use awk to extract load average from uptime [OK]
Common Mistakes:
  • Using invalid uptime options
  • Trying free or vmstat for load average
  • Incorrect awk usage

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes