← 返回 meta 的题目列表Write a Script to Monitor 'vmstat' Output
类型:online_judge
Please write a script to monitor the output of the 'vmstat' command in real-time. Requirements:
The script should run continuously and collect 'vmstat' data in real-time.
The script should alert when specific metrics exceed predefined thresholds.
Provide test cases to demonstrate the script's functionality.
Input:
No input required, continuously monitor the system.
Output:
Output alert messages when metrics exceed thresholds.
Points to consider:
Implement using a scripting language (e.g., Python, Shell).
Set customizable thresholds configurable via parameters.
Example
Input
No direct input as the script runs continuously.