Entry questions
Every rated question at this level, grouped by topic and tagged with the company it came up at.
CI/CD 3 questions
- Environment-Gated Deployment
More
Scenario
A repository at
/home/interview/repocontains a deployment pipeline defined in.github/workflows/deploy.yml. Currently, the pipeline deploys to both Staging and Production environments automatically on every push. This is risky because unstable code could break the Production environment immediately.Task
Modify the workflow to implement a gated deployment strategy. Configure the
stagingjob to run automatically on push. Configure theproductionjob to require manual approval using GitHub Environments. Assign theproductionjob to an environment namedproduction. Ensure theproductionjob only runs afterstaginghas successfully completed. The pipeline execution can be verified with./github-ci push. - GitHub Actions Retry Logic
More
Scenario
A repository at
/home/interview/repocontains a deployment workflow that occasionally fails due to transient issues. A deployment step running./scripts/flaky-deploy.shfails on first attempt but succeeds on retry. The workflow needs automatic retry configuration to handle transient failures. A starter workflow file has been created at.github/workflows/deploy.ymlwith the basic structure.Task
Navigate to
/home/interview/repoand complete the GitHub Actions workflow at.github/workflows/deploy.ymlthat triggers on push events and implements automatic retry using thenick-fields/retry@v3action. The workflow should check out code and execute./scripts/flaky-deploy.shwith retry configuration(timeout_minutes: 2, max_attempts: 3). The workflow can be tested with./github-ci push. - GitHub Actions Timeout Enforcement
More
Scenario
A repository at
/home/interview/repocontains a deployment workflow that occasionally hangs due to network issues or unresponsive external services. Jobs must be automatically terminated if they exceed a time limit to prevent resource waste. A starter workflow file has been created at.github/workflows/deploy.ymlwith the basic structure.Task
Navigate to
/home/interview/repoand complete the GitHub Actions workflow at.github/workflows/deploy.ymlthat triggers on push events and enforces a job-level timeout of 2 minutes usingtimeout-minutes: 2. The deploy job should check out code and run./scripts/long-running-task.sh. The workflow can be tested with./github-ci push.
Cloud 7 questions
- Audit and Enforce Least-Privilege IAM Permissions
More
Scenario
A security audit has flagged the IAM user
app-deployerfor havingAdministratorAccesspolicy with far more permissions than needed. The user only needs access to:- S3: Read (GetObject) and Add objects (PutObject), list buckets (ListBucket).
- CloudWatch Logs: Create log groups (CreateLogGroup), log streams (CreateLogStream), and put log events (PutLogEvents).
Task
- Inspect the current policies attached to the
app-deployeruser - Remove the overly broad
AdministratorAccesspolicy - Create a custom managed policy named
AppDeployerPolicythat grants only the required permissions listed above - Attach the new policy to the
app-deployeruser
Note: You can use either the AWS Management Console or AWS CLI to complete this task.
๐น Video Solution
- Create a Hello World Lambda Function
More
Scenario
Your team needs a simple Lambda function for a greeting microservice.
Task
- Create a Lambda function named
hello-functionthat accepts anamefield from event input and returns the stringHello <name>(e.g., input{"name": "World"}returns"Hello World") - Use the pre-created IAM role
lambda-execution-role - Invoke the function with
{"name": "World"}and verify the output is"Hello World"
๐น Video Solution
- Create a Lambda function named
- Create AWS IAM Admin User with Group and Policy
More
Scenario
You need to set up a new administrative user account for regular use instead of using the root account.
Task
Create an IAM user named
devops-adminwith console password access. Add the user to theadmingroup (which should have theAdministratorAccesspolicy attached), and tag the user with keyRoleand valueDevOps.Note: You can use either the AWS Management Console or AWS CLI to complete this task.
๐น Video Solution
- Create IAM Role for EC2 with Full IAM Access
More
Scenario
Your team needs an EC2 instance to manage IAM resources programmatically. To follow AWS security best practices, you should use an IAM role instead of embedding credentials.
Task
Create an IAM role named
IAMFullAccessEC2that:- Allows the EC2 service to assume the role
- Has the
IAMFullAccessAWS managed policy attached
Note: You can use either the AWS Management Console or AWS CLI to complete this task.
๐น Video Solution
- Create Route 53 Health Checks
More
Scenario
Your infrastructure has two application endpoints requiring distinct monitoring strategies through Route 53 health checks, each with different protocols, ports, health check intervals, and failure thresholds.
Task
Configure two health checks:
- web-server at
10.0.1.10using HTTP on port 80 with a/healthpath, 3-failure threshold, and 30-second intervals - api-server at
10.0.2.10using HTTPS on port 443, 5-failure threshold, 10-second fast intervals, inverted status enabled, and monitoring from three specific AWS regions (US East, EU Ireland, Asia Pacific Singapore)
๐น Video Solution
- web-server at
- Create Route 53 Hosted Zone and DNS Records
More
Scenario
Your team is launching a new application and needs DNS configured in Route 53 for the domain
example.com.Task
- Create a hosted zone for
example.com - Create an A record for
app.example.compointing to10.20.30.40with TTL set to 60 seconds (1 minute caching)
๐น Video Solution
- Create a hosted zone for
- Launch an EC2 Web Server Instance
More
Scenario
A basic landing page needs to be delivered via an EC2 instance accessible over HTTP with its own security group.
Task
- Create a security group named
web-sgpermitting TCP port 80 from any IPv4 - Launch a
t2.microinstance tagged asweb-1using theweb-sgsecurity group - Automatically provision
/var/www/html/index.htmlcontaining "Hello from web-1" during startup using user data
๐น Video Solution
- Create a security group named
Containers 5 questions
- Container CPU Limit Configuration
More
Scenario:
You have a container named
cpu_testrunning from the imagemyapp:cputhat performs CPU-intensive computations. When monitoring with docker stats, the container regularly spikes to 150-200% CPU usage, consuming multiple CPU cores and impacting other services on the host.Task:
Update the container configuration to limit CPU usage so that
docker statsshows thecpu_testcontainer consistently using less than 60% CPU during validation; You need to assign500mCPU for that.
๐น Video Solution
- Docker Binary Architecture
More
Scenario
You have a container image
myapp:dualfixbuilt from/home/interview/Dockerfilethat fails during execution.Task
Identify the issue with image as
myapp:dualfixand verify it runs successfully with exit code 0.
๐น Video Solution
- Docker Multi Architecture Image
More
Scenario:
You have a Dockerfile at
/home/interview/Dockerfilethat needs to be built for multiple architectures to support different hardware platforms. Currently, building withdocker buildonly creates images for the host architecture.Task:
Configure Docker Buildx instance named
multiarchwithbuildx createto build the image for both amd64 and arm64 architectures using Push the multi-arch manifest tolocalhost:5000/myapp:multi.Example:
Building for linux/amd64 onlyBuilding for linux/amd64, linux/arm64 Pushing manifest list to localhost:5000/myapp:multi
๐น Video Solution
- Docker Volume Cross Platform Consistency
More
Scenario:
You need to create a Docker volume named
myvoland demonstrate cross-platform consistency - that data written from one container is readable by a different container using a different base image.Task:
Create a Docker volume named
myvol, mount it at/data, write a filehello.txtto it from anubuntu:latestcontainer, then read the same file from analpine:latestcontainer, ensuring the file exists at/var/lib/docker/volumes/myvol/_data/hello.txton the host during validation.Example:
# Writing from Ubuntu ubuntu@container:/# echo "Hello from Ubuntu!" > /data/hello.txt# Reading from Alpine / # cat /data/hello.txt Hello from Ubuntu!
๐น Video Solution
- Log Rotation Size Limit Configuration
More
Scenario
A container image
myapp:logappcontinuously writes logs to stdout. Without log rotation configured, Docker's log files grow unbounded, consuming disk space and potentially filling up the filesystem.Task
Run a container from the
myapp:logappimage with the namemyapp_container, enable Docker's built-in log rotation, configure the maximum size for individual log files to 10MB, retain maximum up to3log files during rotation, and verify the container is running successfully.Example
Multiple rotated log files, each โค10MB /var/lib/docker/containers/<id>/<id>-json.log: 8.5MB /var/lib/docker/containers/<id>/<id>-json.log.1: 10MB /var/lib/docker/containers/<id>/<id>-json.log.2: 10MB ... Docker automatically rotates logs at 10MB threshold
๐น Video Solution
Git 13 questions
- Apply Specific Stash from Multiple Stashes
More
Scenario
You have multiple work-in-progress states saved in your Git stash stack and need to retrieve code from an older snapshot.
Task
Navigate to
/home/interview/repo. Identify the third stash in the list, preview its contents, and apply it to your current working directory without removing it from the stack.
๐น Video Solution
- Checkout Single File from Another Branch
More
Scenario
You are working on the
mainbranch and need to updateconfig.jsonwith changes that currently exist only on thefeature-settingsbranch, without switching your current context.Task
Navigate to
/home/interview/repoand retrieve theconfig.jsonfile from thefeature-settingsbranch into your current working directory.Example
# Before (Old config on main) $ cat config.json { "version": "1.0.0" } # After (New config retrieved) $ cat config.json { "version": "2.0.0" }
๐น Video Solution
- Cherry Pick Specific Commit
More
Scenario:
You have a Git repository at
/home/interview/repoon the main branch. A commit on thefeaturebranch contains a bug fix you need onmain, but you don't want to merge the entire feature branch.Task:
Navigate to
/home/interview/repo, identify the bug fix commit on thefeaturebranch from the commit history, then apply it tomain.
๐น Video Solution
- Convert Remote from HTTPS to SSH
More
Scenario:
You have a Git repository at
/home/interview/repowhere the remote origin is currently configured with an HTTPS URL (https://github.com/user/repo.git).Task:
Change the remote URL from HTTPS to SSH and verify the connection.
Example:
# Before (using HTTPS) $ git remote -v origin https://github.com/user/repo.git (fetch) origin https://github.com/user/repo.git (push)# After (using SSH) $ git remote -v origin [email protected]:user/repo.git (fetch) origin [email protected]:user/repo.git (push)
๐น Video Solution
- Merge Feature Branch and Delete
More
Scenario:
You have a Git repository at
/home/interview/repowhere you've completed work on thefeature-loginbranch. The feature is ready to be integrated into themainbranch.Task:
Merge feature-login into main and delete the feature branch in
/home/interview/repo.Example:
# Before (feature branch exists) $ git branch feature-login * main $ git log --oneline -1 feature-login d4e5f6a Add login validation# After (feature merged and branch deleted) $ git log --oneline -1 main d4e5f6a Add login validation $ git branch * main
๐น Video Solution
- Rebase Branch with Reversed Commit Order
More
Scenario:
You have a Git repository at
/home/interview/repowhere yourfeature-refactorbranch has four commits in the wrong logical order. The commits should be reversed (oldest to newest becomes newest to oldest) to make more sense for code review. You need to rebase this branch onto the latestmainbranch while reversing the commit order.Task:
Navigate to
/home/interview/repo, rebasefeature-refactorontomainwhile reversing all commits using interactive rebase, and verify the commits appear in the correct reversed sequence with all changes preserved.
๐น Video Solution
- Rebase Feature Branch
More
Scenario:
You have a Git repository at
/home/interview/repowhere yourfeature-paymentbranch is 32 commits behind main. You need to rebase the feature branch onto the latest main and resolve conflicts that occur during the process.Task:
Navigate to
/home/interview/repo, rebasefeature-paymentontomain, resolve any conflicts that arise, and verify the feature branch is now based on the latest main with all feature commits preserved.
๐น Video Solution
- Rebase Feature Branch Onto Correct Base
More
Scenario
A Git repository at
/home/interview/repohas a feature branchfeature-loginwith several commits, but it was created from the wrong base branch.Task
Rebase
feature-loginontodevelop(it's currently based onmain) while preserving all commits.Example
# Before (feature branched from main) * d7e8f9a (develop) Configure database settings | * c2d3e4f (HEAD -> feature-login) Implement form validation | * a9b0c1d Create login component |/ * 3f4a5b6 (main) Initialize repository# After (feature rebased onto develop) * m8n9o0p (HEAD -> feature-login) Implement form validation * k6l7m8n Create login component * d7e8f9a (develop) Configure database settings * 3f4a5b6 (main) Initialize repository
๐น Video Solution
- Remove Last Commit and Discard Changes
More
Scenario
You have created a commit locally that contains incorrect changes and you want to completely erase it from history.
Task
Navigate to
/home/interview/repo. Remove the last commit entirely and discard all associated file changes.Example
# Before (Bad commit exists) $ git log --oneline -2 c3d4e5f (HEAD -> main) Bad commit - wrong changes b2c3d4e Add feature implementation # After (Clean history) $ git log --oneline -2 b2c3d4e (HEAD -> main) Add feature implementation
๐น Video Solution
- Shallow Clone Limited to Latest Commit
More
Scenario
A deployment pipeline is experiencing slow build times because it performs full history clones.
Task
Navigate to
/home/interview/workspaceand create a shallow clone of the repository (file:///tmp/source-repo/repo.git) namedshallow-repo, restricted to the latest commit only.Example
# Verify the clone is shallow (Has only 1 commit) $ cd shallow-repo $ git log --oneline a1b2c3d (HEAD -> main, origin/main, origin/HEAD) Update deployment config
๐น Video Solution
- Stage Only Specific Files
More
Scenario:
You have a Git repository at
/home/interview/repowhere you modified three files:app.js,style.css, andconfig.json.Task:
Stage only app.js and style.css for commit in the repository at
/home/interview/repo, leaving config.json unstaged.
๐น Video Solution
- Undo Commits but Keep Changes
More
Scenario:
You have a Git repository at
/home/interview/repowith three recent commits on themainbranch that were premature and need to be reorganized.Task:
Undo the last three commits while keeping all changes in your working directory so you can recommit them properly.
Example:
# Before (three commits exist) $ git log --oneline -4 d4e5f6a Third commit c3d4e5f Second commit b2c3d4e First commit a1b2c3d Initial commit# After (commits undone, changes kept) $ git log --oneline -2 a1b2c3d Initial commit $ git status On branch main Changes to be committed: modified: file1.txt modified: file2.txt modified: file3.txt
๐น Video Solution
- View Unique Commits Between Branch and Origin
More
Scenario
A Git repository at
/home/interview/repohas afeature-apibranch that was created fromorigin/mainsome time ago. The branch has your commits plus merge commits from pulling updates, making it difficult to identify which commits are unique to your branch.Task
Find commits unique to your branch compared to
origin/main, exclude merge commits, write the unique commits to/home/interview/unique-commits.txt, and verify the file contains only the unique commits.Note: The remote repository
originis already configured.Example
# After (unique commits saved to file) File created with unique commits from feature-api branch Merge commits excluded Only commits not present in origin/main are listed Example '/home/interview/unique-commits.txt' content: """ ree2ras Commit message cji29nc Commit message ch92uhd Commit message """
๐น Video Solution
Kubernetes 7 questions
- Create Namespace
More
Scenario
You need to create a new namespace for deploying applications.
Task
Create a namespace named
playground. - Dynamic Volume Expansion
More
Scenario
An application requires persistent storage that can be resized without downtime.
Task
Create a StorageClass, PVC, and Pod. Once the pod is running, expand the PVC to the expanded size without restarting the pod.
Property Value Namespace storageStorageClass expandable-scPVC name data-pvcInitial size 1GiExpanded size 5GiPod name app-podImage nginxMount path /dataTemplate files are available at
/home/interview/.
๐น Video Solution
- Job Failure
More
Scenario
A Job manifest at
/home/interview/fail-job.yamlis failing with a non-zero exit status. The Job has limited retries configured.Task
Fix the Job so it completes successfully.
Property Value Namespace batchJob name fail-jobbackoffLimit 1Command echo 'Success'; exit 0 - Multi Key ConfigMap
More
Scenario
An application requires multiple configuration values mounted as files.
Task
Create a ConfigMap and mount it into a pod so all keys are accessible as files.
Property Value ConfigMap name settingsKey 1 MODE=devKey 2 VERSION=1.0Pod name config-podImage busybox:latestMount path /etc/configCommand sleep 3600 - Pod Viewer Access
More
Scenario
A monitoring application needs read-only access to pods in the
demonamespace.Task
Set up RBAC so the ServiceAccount can only
get,list, andwatchPods in that namespace.Property Value Namespace demoServiceAccount name reader-saRole name pod-readerRoleBinding name pod-reader-bindingAllowed verbs get,list,watchResource pods - Pod With Readiness Probe
More
Scenario
You need to deploy a web application that only receives traffic when it's ready to serve requests.
Task
Create a pod with an HTTP readiness probe that checks if the service is responding on port
80at path/.Property Value Pod name web-readyImage nginx:latestProbe type HTTP GET Probe port 80Probe path / - Pod With Resource Limits
More
Scenario
An application needs guaranteed resources and limits to prevent overconsumption.
Task
Create a pod with resource requests and limits configured.
Property Value Pod name resource-podImage nginx:latestCPU request 100mMemory request 64MiCPU limit 200mMemory limit 128Mi
Linux 14 questions
- CPU Resource Management Priority
More
Scenario
During peak traffic hours, a background
data-processingjob that is started by userdevopsis consuming too much CPU and slowing down user-facing services. Stopping it isn't an option because it would interrupt ongoing workflows, but you need to limit its CPU usage temporarily.Task
Reduce the process's priority to
10while keeping it running.Example
# Before (high priority process) USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND devops 5432 85.3 12.4 2048576 256840 ? RN 14:35 8:23 /usr/bin/data-processor --batch# After (priority adjusted) USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND devops 5432 45.2 12.4 2048576 256840 ? RN 14:35 8:45 /usr/bin/data-processor --batch
๐น Video Solution
- Diagnose Nginx CPU Bottleneck
More
Scenario
The web server has become sluggish and users are experiencing timeout errors. Multiple worker processes are running under the
nginxuser, and one of them is consuming excessive CPU resources, causing the entire application to slow down.Task
Identify the process running under the
nginxuser that consumes the most CPU or memory, and write its PID to/home/devops/solution.txt.Example
# Before (multiple nginx processes, one consuming excessive resources) USER PID %CPU %MEM COMMAND nginx 12345 92.3 4.1 nginx: worker process nginx 12346 15.4 2.8 nginx: worker process nginx 12347 1.2 1.0 nginx: worker process python3 22310 45.7 6.2 python3 app.py java 19872 37.9 12.4 java -jar app.jar# After (PID of highest-consuming nginx process identified) 12345
๐น Video Solution
- Handling Large Log Archives
More
Scenario
During an incident investigation, you pulled a massive log export from
/var/log/app/access.logthat's several gigabytes in size. Your analysis tools and editors can't handle the entire file at once.Task
You need to split it into smaller, more manageable chunks for parallel review. Create a directory
/tmp/log_parts/to store the split files, split/var/log/app/access.loginto smaller files containing 100 lines each, name the output files sequentially with the prefixaccess_part_(e.g.,access_part_aa,access_part_ab, etc.), ensure the original log file remains untouched.Example
# Before (single large log file) /var/log/app/access.log: 375 lines, 2.5 GB Cannot be opened by standard analysis tools# After (log split into manageable chunks) 100 /tmp/log_parts/access_part_aa 100 /tmp/log_parts/access_part_ab 100 /tmp/log_parts/access_part_ac 75 /tmp/log_parts/access_part_ad 375 total Original file intact, 4 parts created for parallel analysis
๐น Video Solution
- Log File Volume Assessment
More
Scenario
The
/vardirectory contains logs from multiple applications, and cleanup planning is needed. Some applications create their own subdirectories with nested log files.Task
Find and count all files ending with the
.logextension anywhere under/varincluding subdirectories, save the total count to/home/devops/log_count.txt, and use standard Linux commands to output only the total number of.logfiles found. Additionally, identify.logfiles larger than 512 KB and save the count to/home/devops/large_log_count.txt
๐น Video Solution
- Managing High I/O Processes
More
Scenario
Users are complaining about slow file access. System metrics show high disk utilization.
Task
Reduce
I/Oactivity of top offender using I/O priorities toidle. Keep critical jobs (databases, message queues, applications) at high priority.Example
# Before (high I/O contention) Total DISK READ: 45.67 M/s | Total DISK WRITE: 123.45 M/s TID PRIO USER DISK READ DISK WRITE COMMAND 5678 be/4 backup 2.34 M/s 98.76 M/s rsync /data /backup 3421 be/4 postgres 15.23 M/s 12.45 M/s postgres: vacuum 8234 be/4 appuser 8.45 M/s 3.21 M/s /usr/bin/log-processor # After (non-critical jobs throttled) Total DISK READ: 18.34 M/s | Total DISK WRITE: 35.21 M/s TID PRIO USER DISK READ DISK WRITE COMMAND 5678 idle backup 0.50 M/s 2.10 M/s rsync /data /backup 3421 be/4 postgres 15.23 M/s 12.45 M/s postgres: vacuum 8234 idle appuser 1.20 M/s 0.80 M/s /usr/bin/log-processor
๐น Video Solution
- Port Conflict Resolution
More
Scenario
An application
/home/interview/server.shfails to start.Task
Find the cause of failure and resolve it so the server can start successfully.
๐น Video Solution
- Purge Empty Folders
More
Scenario
The
/tmpdirectory has accumulated numerous leftover folders from previous application runs and temporary scripts. Many of these directories are now empty and can be safely removed.Task
Write a command or short script that searches through
/tmp, finds all empty directories recursively, and deletes them without affecting any directories that contain files or subdirectories.Example
# Before (empty directories present) /tmp/old_build_cache/ /tmp/session_temp_1234/ /tmp/extract_workspace/ /tmp/app_tmp_5678/ /tmp/active_project/file.txt# After (empty directories removed) /tmp/active_project/file.txt
๐น Video Solution
- Recursive Database File Backup
More
Scenario
Before performing a system-wide database schema migration, you've been asked to ensure that all existing
.dbfiles are safely backed up. These files may be scattered across multiple subdirectories, and simply renaming them isn't enough. You must create backup copies with the.db.bakextension, preserving directory structure and permissions.Task
Recursively scan a given directory (
/opt/data/) and create backup copies of all files ending with.db. Each backup should have the same name but with the.baksuffix added (e.g.,app.dbโapp.db.bak) and remain in the same directory as the original file, ensuring the originals are left untouched.Example
# Before (only original .db files exist) /opt/data/apps/inventory.db /opt/data/logs/session.db /opt/data/config/settings.db# After (backup copies created alongside originals) /opt/data/apps/inventory.db /opt/data/apps/inventory.db.bak /opt/data/logs/session.db /opt/data/logs/session.db.bak /opt/data/config/settings.db /opt/data/config/settings.db.bak
๐น Video Solution
- Recursive Keyword Finder
More
Scenario
Multiple applications write logs under
/var/log, and you need to quickly check if any recent errors have been recorded.Task
Search recursively under
/var/logfor all files ending with.log, print every line that contains the textERROR, ensure the output includes both the filename and the matching line, and save the results to/home/devops/error_logs.txt.Example
# Before (multiple log files scattered across directories) /var/log/apache2/error.log /var/log/apache2/access.log /var/log/application.log /var/log/mysql/error.log /var/log/syslog# After (ERROR lines found and saved to /home/devops/error_logs.txt) /var/log/apache2/error.log:ERROR: Connection timeout to database server /var/log/application.log:ERROR: Unable to write to cache directory /var/log/mysql/error.log:ERROR: InnoDB: Cannot allocate memory for buffer pool /var/log/syslog:ERROR: Disk quota exceeded for user appuser
๐น Video Solution
- Sorted Log Aggregation
More
Scenario
You have a log file
/tmp/app_combined.logwith entries from multiple servers in mixed order. Each line contains: timestamp, hostname, and action.Task
Sort
/tmp/app_combined.logby timestamp (earliest first), then by hostname for identical timestamps. Save the output to/tmp/app_sorted.log.Example
# Before (mixed order) 2025-12-18 14:23:45 api02 POST /users/create 2025-12-18 14:22:10 cache01 CACHE_MISS key=session_abc 2025-12-18 14:22:55 api01 GET /products/list 2025-12-18 14:22:10 db02 INSERT INTO orders VALUES 2025-12-18 14:24:12 cache01 CACHE_SET key=user_profile# After (sorted by timestamp, then hostname) 2025-12-18 14:22:10 cache01 CACHE_MISS key=session_abc 2025-12-18 14:22:10 db02 INSERT INTO orders VALUES 2025-12-18 14:22:55 api01 GET /products/list 2025-12-18 14:23:45 api02 POST /users/create 2025-12-18 14:24:12 cache01 CACHE_SET key=user_profile
๐น Video Solution
- Throttle High I/O Process
More
Scenario
A server is experiencing latency spikes and intermittent timeouts. CPU and memory appear normal, suggesting a disk I/O bottleneck from a runaway process.
Task
Identify the process causing high disk I/O using real-time monitoring, then apply I/O throttling to reduce its disk priority to idle class without terminating it.
Example
# Before (high I/O process) Total DISK READ: 125.43 M/s | Total DISK WRITE: 89.32 M/s TID PRIO USER DISK READ DISK WRITE SWAPIN IO> COMMAND 5432 be/4 postgres 98.45 M/s 67.23 M/s 0.00 % 95.32 % postgres: autovacuum worker# After (I/O throttled) Total DISK READ: 12.34 M/s | Total DISK WRITE: 8.92 M/s TID PRIO USER DISK READ DISK WRITE SWAPIN IO> COMMAND 5432 idle postgres 9.12 M/s 6.45 M/s 0.00 % 12.34 % postgres: autovacuum worker
๐น Video Solution
- Tracing Log File Writes
More
Scenario
The
/var/log/messagesfile has been growing unusually fast, filling up disk space within hours.Task
Identify the process that is writing heavily to
/var/log/messagesby monitoring system activity in real time. Save the process details usingpsand last50lines of logs at/home/devops/excessive_log_process.txtExample
# Before (log file growing rapidly) /var/log/messages: 15 GB and increasing Disk usage: 92% and climbing# After (responsible process identified) Process identified: rsyslogd (PID 1234) Confirmed active writes to /var/log/messages
๐น Video Solution
- Track Forking Process Hierarchies
More
Scenario
System resources are being consumed by an unusually large process tree. You need to identify the parent process with the most children and document its hierarchy.
Task
Identify the process tree with the highest number of child processes and save its hierarchyโincluding PIDs and full command names (arguments)โto:
/home/devops/process_tree_report.txt.Linux provides the
pstreecommand to display full hierarchical process trees, including PIDs and command arguments.Example
The file
/home/devops/process_tree_report.txtshould look similar to this:spawn_many_workers.sh,159 /home/devops/spawn_many_workers.sh โโsleep,209 infinity โโspawn_many_workers.sh,190 /home/devops/spawn_many_workers.sh โ โโsleep,220 60 โโspawn_many_workers.sh,191 /home/devops/spawn_many_workers.sh ...
๐น Video Solution
- Uptime and Load Average Audit
More
Scenario
A Linux server is under review for stability and recent performance evaluation.
Task
Use the
uptimecommand to determine how long the server has been running and extract the 15-minute load average as a floating-point number (e.g., 0.45). Save the uptime to/home/devops/uptime.txtand the 15-minute load average to/home/devops/loadavg.txt.Example
Contents of `/home/devops/uptime.txt`: `2 days, 5:37` Contents of `/home/devops/loadavg.txt`: `0.45`
๐น Video Solution
Networking 5 questions
- Network Packet Loss Diagnosis
More
Scenario
Users are reporting random timeouts. You need to determine whether packet loss occurs on the local network, upstream gateway, or public internet.
Task
Find your default gateway IP, ping the gateway, DNS server (8.8.8.8), and google.com (5 times each), collect packet loss and average latency from each, and write results to
/tmp/network_diagnostics.txtshowing target name, IP/hostname, packet loss percentage, and average latency.Example
File: /tmp/network_diagnostics.txt
Gateway (192.168.1.1): loss=0% avg=1.2 ms DNS (8.8.8.8): loss=0% avg=15.8 ms Internet (google.com): loss=20% avg=83.5 ms
๐น Video Solution
- Network Port Service Cleanup
More
Scenario
A security audit found several unauthorized applications listening on high ports (range
8000-9000).Task
Scan the system for listening TCP/UDP ports between
8000and9000. Identify the Process IDs (PIDs) bound to these ports and terminate the associated services.
๐น Video Solution
- Network Socket Usage Analysis
More
Scenario
Network latency issues were reported due to opening too many TCP connections.
Task
Inspect active sockets along with the processes that own them to identify which application is responsible for the excessive connection count. Save all currently active TCP/UDP connections (ESTABLISHED, LISTEN, TIME_WAIT, etc.) output to
/tmp/active_tcp.txtExample
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 192.168.1.50:22 192.168.1.100:54321 ESTABLISHED 1234/sshd tcp 0 0 192.168.1.50:3306 192.168.1.75:41234 ESTABLISHED 5678/mysqld tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 9012/nginx tcp 0 0 127.0.0.1:6379 127.0.0.1:45678 ESTABLISHED 3456/redis-server tcp 0 0 192.168.1.50:443 203.0.113.45:12345 ESTABLISHED 9012/nginx
๐น Video Solution
- Temporary Route Configuration
More
Scenario
You need to reach a remote subnet that isn't covered by the default route, but you don't want to make any permanent configuration changes.
Task
Check the current routing table to confirm the
10.20.0.0/16subnet is not present, add a temporary static route for the10.20.0.0/16subnet via gateway192.168.1.1using interfaceveth0.Example
# Before (no route to remote subnet) 10.20.0.0/16 subnet not in routing table Cannot reach remote network Need temporary access without permanent changes# After (temporary route added) 10.20.0.0/16 via 192.168.1.1 dev veth0 Route active and verified Remote subnet accessible
๐น Video Solution
- Validating DNS Consistency
More
Scenario
Your monitoring alerts indicate that DNS resolution might be inconsistent across servers, and you need to confirm both IPv4 and IPv6 records for a given domain.
Task
Add IPv4 and IPv6 address entries for the domain
example.localto/etc/hostsusing the format<ip_address> <hostname>with each record on a separate line.Example
198.51.100.42 example.local 2001:db8:85a3::8a2e:370:7334 example.local
๐น Video Solution