Managing Implementation and Ensuring Solution and Operations Reliability →easyMultiple ChoiceObjective-mapped
Google PCA Practice Question: Managing Implementation and Ensuring Solution and Operations Reliability
A developer needs to view the last 100 lines of logs from a specific Compute Engine instance in real time to debug an application issue. Which command should they use?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
gcloud logging read "resource.type=gce_instance AND resource.labels.instance_id=INSTANCE_ID" --limit=100 --freshness=1h
The gcloud logging read command can filter logs and tail them with the --freshness flag. gcloud compute instances get-serial-port-output retrieves serial console output, not application logs. gcloud app logs read is for App Engine. gcloud beta logging tail streams logs in real time.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
gcloud beta logging tail
Why it's wrong here
Tail streams logs but does not limit to the last 100 lines; it shows new logs as they arrive.
- ✗
gcloud app logs read --limit=100
Why it's wrong here
This reads logs from App Engine, not Compute Engine.
- ✓
gcloud logging read "resource.type=gce_instance AND resource.labels.instance_id=INSTANCE_ID" --limit=100 --freshness=1h
Why this is correct
This reads up to 100 log entries from the instance in the last hour. For real time, add --freshness=0m or use tail.
- ✗
gcloud compute instances get-serial-port-output INSTANCE_NAME
Why it's wrong here
This retrieves serial port output (boot logs), not application logs.
Go deeper
Related to this question
Learn chapter
Google Cloud Compute Options Overview
Key term
View
A view is a saved query in a database that acts like a virtual table, letting you see specific data without storing it separately.
Key term
Compute Engine
Compute Engine is Google Cloud's Infrastructure-as-a-Service (IaaS) offering that lets you create and run virtual machines on Google's infrastructure.
About these practice questions
Courseiva writes every PCA question from scratch — 955 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PCA practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCA exam.