in reply to termination of system command
In general one can use alarm (see also perlipc) to arrange for a signal to be delivered after a specified delay.
However in this specific case most implementations of vmstat should also take a count argument as well as a delay; start it with (say) vmstat 10 3 and you should only wait 20 seconds for 3 measurements (the first is immediate so you only get 2 delay periods).
The cake is a lie.
The cake is a lie.
The cake is a lie.
|
|---|