Problems of virtual machine traffic statistics

the 'status' api call contains a field for each nic with 'netin' and 'netout' e.g.

Code:
qm status 100 --verbose

Code:
nics:
        tap100i0:
                netin: 115745307
                netout: 482164

note that this field resets when the vm is shutdown
 
the 'status' api call contains a field for each nic with 'netin' and 'netout' e.g.

Code:
qm status 100 --verbose

Code:
nics:
        tap100i0:
                netin: 115745307
                netout: 482164

note that this field resets when the vm is shutdown
Can we not reset it?
 
Can we not reset it?
You might want to build a queue with two values. One for longterm and one for last boot. In the last boot queue you always overwrite with the currently measured value. If the last measured value is zero or lower than whats stored in the last boot queue, add last boot to the longterm qeue and reset the last boot queue to zero.
Your grand total will then be the sum of the last boot and longterm value.