Abstract


  • For Linux, we can view the process info in the form of file under /proc/PID in human-readable text format
  • It allows us to view and modify parameters, automate with shell scripts
  • We also feed these real-time system information to monitoring tools (like htop) without requiring special APIs

Key files

  • cmdline: Contains the command line arguments used to start the process
  • environ: Contains the environment variables for the process
  • fd: Directory containing symbolic links to files the process has open
  • maps: Memory mapping information, useful for debugging memory issues
  • status: General process status information (state, memory usage, etc.)
  • limits: Resource limits for the process
  • io: I/O statistics for the process

These files are useful for

  • Performance monitoring and troubleshooting
  • Resource usage of critical trading applications
  • Debugging latency issues by examining process states

Fast speed

/proc is memory-backed, so info retrieval is going to be very fast.

References