← IBM Interview Insights

IBM·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
May 2026

Summary

IBM DevSecOps interview that leaned heavily into Linux process inspection. One question but it went pretty deep, covering a bunch of different tools and what each one actually tells you.

Questions Asked (1)

Q1

Given a running process with a known PID, what Linux commands would you use to inspect it, and what information does each one give you?

System DesignTechnical Trade-offsRoot Cause Analysis
Author's notes

I started with ps and top because those are the obvious ones, but the follow-up pushed me toward /proc and that's where I got a bit shaky.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Structure your answer by grouping commands into categories: process overview, resource usage, system calls, and open files/network. For each command, briefly state what it does and the key information it reveals, emphasizing how you'd use it in a real debugging scenario.

Pro tip: Mention that you'd start with `ps` and `top` for a quick overview, then drill down with `strace` or `lsof` only if needed, to avoid performance overhead. This shows you understand the trade-offs between quick checks and deep inspection.

1. Start with process overview

Use `ps -p <PID> -o pid,ppid,user,%cpu,%mem,stat,start,time,cmd` to get basic details like parent PID, user, CPU/memory usage, state, start time, and command. This gives a snapshot without heavy overhead.

2. Check real-time resource usage

Use `top -p <PID>` or `htop -p <PID>` to monitor CPU and memory usage in real time. This helps identify if the process is resource-bound or behaving abnormally.

3. Inspect system calls and signals

Use `strace -p <PID>` to trace system calls and signals, which reveals what the process is doing at a low level (e.g., file I/O, network calls). Be cautious: it can slow down the process.

4. Examine open files and network connections

Use `lsof -p <PID>` to list open files, sockets, and pipes. This shows which files and network ports the process is using, useful for diagnosing file descriptor leaks or network issues.

5. Analyze memory and threads

Use `pmap <PID>` for memory mapping, `cat /proc/<PID>/status` for detailed memory and thread info, and `ps -T -p <PID>` to list threads. This helps in diagnosing memory leaks or thread contention.

Key Points to Mention

  • `ps` and `top` for quick process status and resource usage.
  • `strace` for system call tracing and debugging.
  • `lsof` for open files and network connections.
  • `/proc/<PID>` filesystem for detailed process information (e.g., status, limits, environment).
  • `pmap` and `ps -T` for memory and thread analysis.
  • Consideration of overhead and when to use each tool (e.g., strace can slow down the process).

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.