Search GimmeJob

Type at least 2 characters. Enter also searches by meaning.
QA interview question
InfrastructureMiddleOccasionalTroubleshooting

Which command-line checks help when a test machine is slow or running out of resources?

Answer

On Linux, `top` or `ps` help inspect CPU and memory consumers, `free -h` summarizes memory and `df -h` plus `du` help distinguish filesystem capacity from directory usage. On Windows, PowerShell can inspect processes with `Get-Process` and available drives with `Get-PSDrive` or storage-specific cmdlets. Start by measuring before killing processes or deleting files.

Strong answer includes

  • separates CPU, memory and disk investigation
  • df and du answer different disk questions
  • measures first before destructive remediation

Practical example

If CI starts failing with `No space left on device`, `df -h` confirms which filesystem is full and `du -sh` on candidate directories finds where space is consumed before logs or artifacts are removed.

#linux#windows#resources#disk#memory

Sources

GNU Coreutils manualGNU Project · Linux and Unix-like filesystem, text, disk-usage and shell utility behaviorLinux man-pages projectman7.org / Linux man-pages project · Linux processes, signals, networking and system-call-facing command behaviorPowerShell documentationMicrosoft · PowerShell cmdlets, object pipeline, processes, services, networking, event logs and environment handling50 Linux Interview Questions (With Answers)Toolmingo · Recurrence signal for Linux filesystem, permissions, processes, systemd, networking and shell-command interview topics