Actually, you can use the
duration command-line parameter to collect data for a finite amount of time. You could then write a script that collects data for, say, 10 seconds, then dumps the results to the stdout and runs, again, in a loop. You will need to play with the view options to figure out how you want to display the results, but this would give you the kind of output that top does, for example, displaying data every n seconds.
For example,
> # create the activity
> vtl activity p1 -d 10 -c sampling
> # run the latest activity in the project
> vtl run
> vtl view -summary
> vtl delete p1::r1 -f
> # loop on these three commandsIf you put that in a loop, you can view the activity on a regular basis. Note that in order to keep the data from bloating the disk, I've included a delete of the activity results.
Here is an example script that collects data for 5 seconds that I threw together:
#!/bin/sh
vtl -q activity m$ -d 5 -c sampling
read -t 1 x
while [ $? -ne 0 ]
do
echo "...collecting data..."
vtl -q run
echo "...displaying data..."
vtl -q view -summary
vtl -q delete m$::r1 -f
read -t 1 x
doneHope that helps!
--------
Regards,
MrAnderson