Не сходится контрольный пример kp.pl

Технические вопросы по UTM 5.0
Ответить
wabbit
Сообщения: 3
Зарегистрирован: Чт авг 25, 2011 18:21

Не сходится контрольный пример kp.pl

Сообщение wabbit »

Добрый день! Тестирую демку и никак не получается чтобы нормально отработал контрольный пример kp.pl

ОС: Ubuntu Server 10.04 x64
Версия UTM5: utm5-2.1.007

Легче всего заметить что что-то не так, если посмотреть отчет за апрель-июнь 2003 пользователя cli5
По идее, у него должно быть по 40 МБ в сутки и получится за три месяца 4550МБ. Итого сходится , а вот распределение по дням явно не в порядке:
Во-первых, в некоторые дни не 40,а 20 МБ или 80МБ. А Весь трафик за май-июнь вообще записан на 30 апреля!
У остальных пользователей cli1,cli2,cli3,cli4 такая же картина


ID аккаунта Логин Класс трафика Кол-во МБ Цена за МБ Сумма Дата
5 cli5 Incoming (10) 40.000 0.000 0.000 02.04.2003 0:00
5 cli5 Incoming (10) 40.000 0.000 0.000 03.04.2003 0:00
5 cli5 Incoming (10) 40.000 0.000 0.000 04.04.2003 0:00
5 cli5 Incoming (10) 40.000 0.000 0.000 05.04.2003 0:00
5 cli5 Incoming (10) 40.000 0.000 0.000 06.04.2003 0:00
5 cli5 Incoming (10) 40.000 0.000 0.000 07.04.2003 0:00
5 cli5 Incoming (10) 40.000 0.000 0.000 08.04.2003 0:00
5 cli5 Incoming (10) 40.000 0.000 0.000 09.04.2003 0:00
5 cli5 Incoming (10) 40.000 0.000 0.000 10.04.2003 0:00
5 cli5 Incoming (10) 40.000 0.000 0.000 11.04.2003 0:00
5 cli5 Incoming (10) 40.000 0.000 0.000 12.04.2003 0:00
5 cli5 Incoming (10) 40.000 0.000 0.000 13.04.2003 0:00
5 cli5 Incoming (10) 20.000 0.000 0.000 14.04.2003 0:00
5 cli5 Incoming (10) 20.000 0.150 3.000 14.04.2003 0:00
5 cli5 Incoming (10) 40.000 0.150 6.000 15.04.2003 0:00
5 cli5 Incoming (10) 40.000 0.150 6.000 16.04.2003 0:00
5 cli5 Incoming (10) 40.000 0.150 6.000 17.04.2003 0:00
5 cli5 Incoming (10) 40.000 0.150 6.000 18.04.2003 0:00
5 cli5 Incoming (10) 40.000 0.150 6.000 19.04.2003 0:00
5 cli5 Incoming (10) 40.000 0.150 6.000 20.04.2003 0:00
5 cli5 Incoming (10) 40.000 0.150 6.000 21.04.2003 0:00
5 cli5 Incoming (10) 40.000 0.150 6.000 22.04.2003 0:00
5 cli5 Incoming (10) 40.000 0.150 6.000 23.04.2003 0:00
5 cli5 Incoming (10) 40.000 0.150 6.000 24.04.2003 0:00
5 cli5 Incoming (10) 40.000 0.150 6.000 25.04.2003 0:00
5 cli5 Incoming (10) 40.000 0.150 6.000 26.04.2003 0:00
5 cli5 Incoming (10) 40.000 0.150 6.000 27.04.2003 0:00
5 cli5 Incoming (10) 80.000 0.150 12.000 28.04.2003 0:00
5 cli5 Incoming (10) 3430.000 0.150 514.500 30.04.2003 0:00
Итого 4550.000 607.500


Подскажите, в чем может быть причина?


Напишу некоторую дополнительную инфу:
- пытался менять время аггрегации traffic_agregation_interval с 900 на 30, но все равно картина такая же
- ОС пустая, специально ставилась для теста

Как запускал контрольный пример:
1. Стопил ядро и rfw, radius
Далее по манулу:
2. date 0401000003
3. mysqladmin -uroot -p drop UTM5
mysqladmin -uroot -p create UTM5
mysql -uroot -p UTM5 < UTM5_MYSQL_kp.sql
mysql -uroot -p -f UTM5 < UTM5_MYSQL_update.sql
4. Лицензионный ключик
mysql -uroot -p -f UTM5 < reg.sql
4. Стартовал ядро
5. Запускал контрольный пример:
perl kp.pl

Конфиг utm5.cfg

Код: Выделить всё

database_type=mysql
database=UTM5
#database_host=localhost
database_login=root
database_password=password
database_sock_path=/var/run/mysqld/mysqld.sock
database_port=3306

## dbcount
##  Description&#58; Number of database connections.
##  Possible values&#58; an integer from 2 to 64
##  Default value&#58; 6
#dbcount=6

## database_reconnect_count
##  Description&#58; Number of connection retries.
##  Default value&#58; 5
#database_reconnect_count=5

## database_reconnect_sleep
##  Description&#58; Reconnect timeout in seconds.
##  Default value&#58; 2
#database_reconnect_sleep=2

database_charset=utf8

## =============================================================================
## URFA SERVER
## =============================================================================

## urfa_bind_host
##  Description&#58; Listening IP address. Several values can be set.
##  Possible values&#58; interface IP address or 0.0.0.0.
##  Default value&#58; disabled
urfa_bind_host=0.0.0.0

## urfa_bind_port
##  Description&#58; Listening port.
##  Possible values&#58; an integer from 1 to 65534
##  Default value&#58; 11758

## urfa_lib_file
##  Description&#58; Dynamic modules that will be loaded at system start-up. Several
##   values can be set.
##  Possible values&#58; both absolute and relative paths may be used
##  Default value&#58; <empty>
urfa_lib_file=/netup/utm5/lib/utm5_core/liburfa-utils.so
urfa_lib_file=/netup/utm5/lib/utm5_core/liburfa-std.so
urfa_lib_file=/netup/utm5/lib/utm5_core/liburfa-reports.so
urfa_lib_file=/netup/utm5/lib/utm5_core/liburfa-card.so
urfa_lib_file=/netup/utm5/lib/utm5_core/liburfa-graph.so
urfa_lib_file=/netup/utm5/lib/utm5_radius/liburfa-radius.so
urfa_lib_file=/netup/utm5/lib/utm5_hotspot/liburfa-hotspot.so

## =============================================================================
## STREAM TRANSPORT SERVER
## =============================================================================

## stream_bind_host
##  Description&#58; Listening IP address.
##  Possible values&#58; interface IP address or 0.0.0.0
##  Default value&#58; 0.0.0.0 &#40;listen all interfaces&#41;

## stream_bind_port
##  Description&#58; Listening port.
##  Possible values&#58; an integer from 1 to 65534
##  Default value&#58; 12758




## =============================================================================
## NETFLOW BUFFER
## =============================================================================

## nfbuffer_host
##  Description&#58; Listening IP address.
##  Possible values&#58; IP address
##  Default value&#58; 0.0.0.0
nfbuffer_host=127.0.0.1
nfbuffer_port=9996

## nbuffer_bufsize
##  Description&#58; UDP socket buffer size &#40;set as SO_RCVBUF&#41;
##   in FreeBSD you can change maximum bufsize limit with command&#58;
##   sysctl -w kern.ipc.maxsockbuf=20485760
##   in Linux you can change maximum bufsize limit with command&#58;
##   sysctl -w net.core.rmem_max=20485760
##  Possible values&#58; an integer
##  Default value&#58; set in OS
#nfbuffer_bufsize=10485760

## =============================================================================
## LOGGING
## =============================================================================

## log_level
##  Description&#58; Logging level.
##  Possible values&#58; 0, 1, 2, 3
##  Default value&#58; 1
log_level=3

## log_file_main
##  Description&#58; Main logfile path.
##  Possible values&#58; <filename>
##  Default value&#58; STDERR
log_file_main=/netup/utm5/log/main.log


## log_file_debug
##  Description&#58; Debug logfile path.
##  Possible values&#58; <filename>
##  Default value&#58; STDERR
log_file_debug=/netup/utm5/log/debug.log

## log_file_critical
##  Description&#58; Critical logfile path.
##  Possible values&#58; <filename>
##  Default value&#58; STDERR

## log_file_verificator
##  Description&#58; Database verifier logfile path.
##  Possible values&#58; <filename>
##  Default value&#58; /netup/utm5/log/verificator.sql
log_file_verificator=/netup/utm5/log/verificator.log

## rotate_logs
##  Description&#58; Enables logfile rotation
##  Possible values&#58; yes, on, enable
##  Default value&#58; disabled

## max_logfile_count
##  Description&#58; Maximum number of logfiles to retain. Valid if logfile rotation
##   is on.
##  Default value&#58; not limited

## max_logfile_size
##  Description&#58; Maximum logfile size. When logfile size reaches this limit, a
##   rotation is performed. Valid if logfile rotation is on.
##  Default value&#58; 10485760

## core_pid_file
##  Description&#58; Path to PID file
##  Possible values&#58; <filename>
##  Default value&#58; /var/run/utm5_core.pid
#core_pid_file=/var/run/utm5_core.pid

## =============================================================================
## CERTIFICATE SETTINGS
## =============================================================================

## ssl_cert_file
##  Description&#58; Path to SSL certificate file
##  Default value&#58; /netup/utm5/cert.crt

## ssl_privkey_file
##  Description&#58; Path to SSL private key file
##  Default value&#58; /netup/utm5/privkey.pem

## ssl_privkey_passphrase
##  Description&#58; SSL private key passphrase
##  Default value&#58; <empty>

## =============================================================================
## THREADS SETTINGS
## =============================================================================

## thread_stack_size
##  Description&#58; Thread stack size for business logic threads.
##  Possible values&#58; size in bytes, more than 65536
##  Default value&#58; 8388608

## rpc_stack_size
##  Description&#58; Thread stack size for threads of URFA server.
##  Possible values&#58; size in bytes, more than 65536
##  Default value&#58; <unset>

в /netup/utm5/log/main.log
присутствует вот такой кусок во время отработки скрипта:

Код: Выделить всё

 Info  &#58; Apr 12 00&#58;00&#58;00 UTM5 Logger&#58; New `?Debug &#58; ' stream&#58; /netup/utm5/log/debug.log
 Notice&#58; Apr 12 00&#58;00&#58;00 ModMap&#58; Log file reopened
 Info  &#58; Apr 12 00&#58;00&#58;06 UTM5 Logger&#58; New ` Info  &#58; ' stream&#58; /netup/utm5/log/main.log
 Info  &#58; Apr 12 00&#58;00&#58;06 UTM5 Logger&#58; New `?Debug &#58; ' stream&#58; /netup/utm5/log/debug.log
 Notice&#58; Apr 12 00&#58;00&#58;06 ModMap&#58; Log file reopened
 Info  &#58; Apr 13 00&#58;00&#58;00 UTM5 Logger&#58; New ` Info  &#58; ' stream&#58; /netup/utm5/log/main.log
 Info  &#58; Apr 13 00&#58;00&#58;00 UTM5 Logger&#58; New `?Debug &#58; ' stream&#58; /netup/utm5/log/debug.log
 Notice&#58; Apr 13 00&#58;00&#58;00 ModMap&#58; Log file reopened
 Info  &#58; Apr 13 00&#58;00&#58;06 UTM5 Logger&#58; New ` Info  &#58; ' stream&#58; /netup/utm5/log/main.log
 Info  &#58; Apr 13 00&#58;00&#58;06 UTM5 Logger&#58; New `?Debug &#58; ' stream&#58; /netup/utm5/log/debug.log
 Notice&#58; Apr 13 00&#58;00&#58;06 ModMap&#58; Log file reopened
 Info  &#58; Apr 13 10&#58;00&#58;00 UTM5 DBA&#58; user 3 reached balance -0.400000
 ERROR &#58; Apr 13 10&#58;00&#58;00 RfwPlugin&#58; rules list is empty, nothing to exec
 Info  &#58; Apr 14 00&#58;00&#58;00 UTM5 DBA&#58; user 1 reached balance -1.218750
 Info  &#58; Apr 14 00&#58;00&#58;00 UTM5 DBA&#58; user 2 reached balance -1.265625
 ERROR &#58; Apr 14 00&#58;00&#58;00 RfwPlugin&#58; rules list is empty, nothing to exec
 Info  &#58; Apr 14 00&#58;00&#58;00 UTM5 DBA&#58; user 3 reached balance -1.665625
 Info  &#58; Apr 14 00&#58;00&#58;00 UTM5 DBA&#58; user 4 reached balance -42.187500
 Info  &#58; Apr 14 00&#58;00&#58;00 UTM5 Logger&#58; New ` Info  &#58; ' stream&#58; /netup/utm5/log/main.log
 Info  &#58; Apr 14 00&#58;00&#58;00 UTM5 Logger&#58; New `?Debug &#58; ' stream&#58; /netup/utm5/log/debug.log
 Notice&#58; Apr 14 00&#58;00&#58;00 ModMap&#58; Log file reopened
 ERROR &#58; Apr 14 00&#58;00&#58;00 RfwPlugin&#58; rules list is empty, nothing to exec
 Info  &#58; Apr 14 00&#58;00&#58;00 UTM5 DBA&#58; user 5 reached balance -3.000000
 ERROR &#58; Apr 14 00&#58;00&#58;00 RfwPlugin&#58; rules list is empty, nothing to exec
 ERROR &#58; Apr 14 00&#58;00&#58;00 RfwPlugin&#58; rules list is empty, nothing to exec
 ERROR &#58; Apr 14 00&#58;00&#58;00 RfwPlugin&#58; rules list is empty, nothing to exec
 ERROR &#58; Apr 14 00&#58;00&#58;00 RfwPlugin&#58; rules list is empty, nothing to exec
 Info  &#58; Apr 14 00&#58;00&#58;06 UTM5 Logger&#58; New ` Info  &#58; ' stream&#58; /netup/utm5/log/main.log
 Info  &#58; Apr 14 00&#58;00&#58;06 UTM5 Logger&#58; New `?Debug &#58; ' stream&#58; /netup/utm5/log/debug.log
 Notice&#58; Apr 14 00&#58;00&#58;06 ModMap&#58; Log file reopened
 Info  &#58; Apr 15 00&#58;00&#58;00 UTM5 Logger&#58; New ` Info  &#58; ' stream&#58; /netup/utm5/log/main.log


Очень надеюсь на ваши советы!

wabbit
Сообщения: 3
Зарегистрирован: Чт авг 25, 2011 18:21

Сообщение wabbit »

Скажите, кто-нибудь вообще пробовал эти примеры в последних версиях, они рабочие?

Ответить