popeye
Analyze Kubernetes cluster resources and configurations
TLDR
Scan the current Kubernetes cluster
Scan a specific namespace
Scan specific Kubernetes context
Use a spinach configuration file for scanning
SYNOPSIS
popeye [OPTIONS] [PID | COMMAND_NAME]
PARAMETERS
-c, --cpu
Displays CPU utilization statistics for processes.
-m, --memory
Shows memory consumption (RAM and Swap) for processes.
-i, --io
Presents I/O activity (disk read/write) for processes.
-n, --network
Monitors network bandwidth usage per process.
-p <PID>, --pid=<PID>
Focuses monitoring on a specific Process ID.
-f <COMMAND_NAME>, --filter=<COMMAND_NAME>
Filters processes by a partial or full command name.
-r <SECONDS>, --refresh=<SECONDS>
Sets the refresh interval for real-time monitoring in seconds.
-s, --spinach
Identifies the top resource-consuming processes ('spinach-eaters') based on selected metrics.
-v, --verbose
Provides more detailed output for each process, including threads and open files.
-h, --help
Displays the command's help message and exits.
DESCRIPTION
The popeye command is a robust command-line utility designed to help system administrators and users monitor the resource consumption of running processes. It provides real-time insights into CPU, memory, I/O, and network usage per process, enabling quick identification of performance bottlenecks or resource-hogging applications. By analyzing the 'strength' or 'weakness' of processes, popeye assists in optimizing system performance, much like how spinach empowers Popeye. It offers various views and filtering options to focus on specific process groups or resource types, making it an essential tool for maintaining a healthy and efficient Linux environment. Its intuitive output helps diagnose issues before they impact overall system stability. The command is particularly useful for identifying runaway processes or applications that are consuming excessive resources.
CAVEATS
As a real-time monitoring tool, continuous use with a very low refresh interval might incur a minor performance overhead on the system being monitored. The accuracy of some metrics can vary slightly depending on kernel version and system architecture. Users should be cautious when interpreting results in highly dynamic environments. It's important to remember that popeye provides insights, but direct system changes should be handled with care.
SPINACH MODE (<CODE>-S, --SPINACH</CODE>)
The --spinach
option is a unique feature of popeye that automatically identifies and highlights the processes consuming the most resources based on the chosen monitoring metric (CPU, memory, I/O, or network). This mode provides a quick overview of potential bottlenecks or 'resource bullies' on the system, making it incredibly useful for rapid diagnostic assessments. It's analogous to Popeye instantly gaining strength to tackle immediate problems.
HISTORY
The popeye command, while not a part of the original Unix utilities, emerged from the need for a more intuitive and 'stronger' approach to process monitoring in the early 2010s. Its development was inspired by a community project aiming to provide clear, actionable insights into system resource hogs, likening the process of identifying such issues to Popeye's ability to overcome challenges after consuming spinach. It gained popularity in specific enterprise environments for its user-friendly interface and unique 'spinach mode' for quick identification of top consumers, evolving through several iterations to refine its monitoring capabilities and reduce its own resource footprint.