我有一个 bash 脚本来记录 cpu 负载和内存使用的 sar 输出,它以 csv 格式输出记录的统计信息。但是我将如何从 csv 输出创建一个 gnuplot 图表,并且仅从命令行执行此操作而没有交互式命令/输入?
基本上,我想扩展我的 bash 脚本来记录 sar 输出、输出到 csv 并通过运行 bash 脚本来创建 gnuplot 图表。
目前的
sar cpu 加载 csv 输出
Time,runq-sz,plist-sz,ldavg-1,ldavg-5,ldavg-15
02:04:36AM,0,171,0.00,0.00,0.00
02:04:37AM,0,171,0.00,0.00,0.00
02:04:38AM,0,171,0.00,0.00,0.00
sar mem csv 输出
Time,kbmemfree,kbmemused,%memused,kbbuffers,kbcached,kbcommit,%commit
02:11:38AM,1501736,811188,35.07,38852,101808,2628024,49.03
02:11:39AM,1501488,811436,35.08,38852,101808,2628024,49.03
02:11:40AM,1501364,811560,35.09,38852,101808,2628024,49.03
任何意见是极大的赞赏 :)