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.