I've an odd need to collect stats from the cli by way of wafltop.
This is what I'm working with
date=`date +%y_%m_%d_%H"h"_%M"m"`
touch ~/logs/$date.log
( ssh user@host 'rows 0;date;qos statistics volume latency show;qos statistics volume resource cpu show -iterations 25 -node local ode;qos statistics volume resource cpu show -iterations 25 -node localnode2;security session kill-cli -vserver host -username user -application ssh -session-id *;date' >> ~/logs/$date.log )&
( ssh user@host 'rows 0;date;node run -node <local node>; priv set advanced;options stats.wafltop.config volume,message,process;wafltop start;wafltop show -v cpu -i 10 -n 10;wafltop stop;options stats.wafltop.config volume,process;security session kill-cli -vserver host -username user -application ssh -session-id *;date' >> ~/logs/$date.log )&
sleep 6000
for PID in $(pgrep -P $$) ; do echo die ; kill -HUP $PID ; done
The goal is to gather stats in a big dump to send to support for review, they want them at an ungodly hour that frankly I don't want to provide my butt being up for that time.
Getting beyond the "node run -node node1" is breaking the command inputs.
Additionally I can't feed these through the ssh pipeline via grepping a file into it or using the ssh user@node < input_file method.
In short. Is there a method in which I can automate this collection of WAFLTOP stats?