Monitor-traffic problem with using php api

Hello, I’m working with php API, my problem is that when I get the data from monitor-traffic these are different from real!

example …

from mikrotik console…

rx-packets-per-second: 315
rx-drops-per-second: 0
rx-errors-per-second: 0
rx-bits-per-second: 368.9kbps
tx-packets-per-second: 369
tx-drops-per-second: 0
tx-errors-per-second: 0
tx-bits-per-second: 3.2Mbps

from API PHP

tx-bits-per-second=3874178
rx-bits-per-second=4106455

My php code

$API = new routeros_api();

$API->debug = false;

if ($API->connect(‘10.10.10.1’, ‘admin’, ‘ADRIAN81’)) {

$API->write(‘/interface/monitor-traffic’);
$API->write(‘=interface=lan’);
$API->write(‘=once=’);

$ARRAY = $API->read(false);

print_r($ARRAY);


$API->disconnect();

}

?>

thanks for your help!

don’t try it.. api connections won’t disconnect correctly on 4.x and the uptime of your router will decrease significantly :-/

what version? for me, all works fine with v4.*

http://forum.mikrotik.com/t/4-6-api-session-user-not-removed-from-active-user-list/37232/1