Hawk128 Опубликовано 20 марта, 2017 (изменено) · Жалоба Смотрите в каком виде прилетают пакеты на extfilter. А как посмотреть? tcpdump? Или есть средства просмотра что именно через DPDK прилетает? Должен прилетать обычный тэгированный трафик. Туннелей нет. По tcpdump вот что: 09:38:01.103750 IP (tos 0x0, ttl 64, id 20264, offset 0, flags [DF], proto TCP (6), length 1476) 91.18.84.134.60337 > 138.201.70.178.1206: Flags [.], cksum 0xb237 (correct), seq 18691:20115, ack 4369, win 1496, options [nop,nop,TS val 2373117893 ecr 24297710], length 1424 09:38:01.103751 IP (tos 0x0, ttl 127, id 21141, offset 0, flags [DF], proto TCP (6), length 1492) 10.104.3.99.17983 > 171.25.166.130.16881: Flags [.], cksum 0x011e (correct), seq 55176:56628, ack 1, win 16698, length 1452 09:38:01.103768 IP (tos 0x0, ttl 128, id 20353, offset 0, flags [none], proto UDP (17), length 1452) 10.50.85.114.17729 > 189.46.149.42.47161: [udp sum ok] UDP, length 1424 09:38:01.103776 IP (tos 0x0, ttl 63, id 19197, offset 0, flags [DF], proto TCP (6), length 52) 91.18.87.12.13643 > 87.248.118.24.443: Flags [.], cksum 0x97db (correct), seq 668726612, ack 4108638534, win 4085, options [nop,nop,TS val 2017442 ecr 206702208], length 0 09:38:01.103791 IP (tos 0x0, ttl 63, id 17712, offset 0, flags [DF], proto TCP (6), length 52) 91.18.87.12.13640 > 87.248.118.24.443: Flags [.], cksum 0xd949 (correct), seq 1008902451, ack 847691647, win 4085, options [nop,nop,TS val 2017442 ecr 361945044], length 0 09:38:01.103799 IP (tos 0x0, ttl 63, id 6051, offset 0, flags [DF], proto TCP (6), length 52) 91.18.87.12.13639 > 87.248.118.24.443: Flags [.], cksum 0x46a5 (correct), seq 308725622, ack 1543837681, win 4085, options [nop,nop,TS val 2017445 ecr 361950207], length 0 09:38:01.103807 IP (tos 0x0, ttl 63, id 49901, offset 0, flags [DF], proto TCP (6), length 52) 91.18.87.12.13638 > 87.248.118.24.443: Flags [.], cksum 0x811e (correct), seq 0, ack 1449, win 4085, options [nop,nop,TS val 2017446 ecr 2045322822], length 0 09:38:01.103825 IP (tos 0x0, ttl 63, id 52469, offset 0, flags [DF], proto TCP (6), length 64) 10.51.4.202.50945 > 188.18.14.26.25144: Flags [sEW], cksum 0xff6e (correct), seq 2660318449, win 65535, options [mss 1460,nop,wscale 5,nop,nop,TS val 897000305 ecr 0,sackOK,eol], length 0 09:38:01.103851 IP (tos 0x0, ttl 62, id 1488, offset 0, flags [DF], proto TCP (6), length 1420) 91.18.86.148.59725 > 173.194.222.95.443: Flags [.], cksum 0x1ec2 (correct), seq 21888:23256, ack 1, win 387, options [nop,nop,TS val 4725804 ecr 465817001], length 1368 09:38:01.103876 IP (tos 0x0, ttl 127, id 16308, offset 0, flags [none], proto UDP (17), length 1466) 10.50.80.126.1024 > 5.18.205.38.27678: [udp sum ok] UDP, length 1438 09:38:01.103886 IP (tos 0x0, ttl 63, id 58782, offset 0, flags [DF], proto TCP (6), length 52) Изменено 20 марта, 2017 пользователем Hawk128 Вставить ник Цитата Ответить с цитированием Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах More sharing options...
Hawk128 Опубликовано 20 марта, 2017 · Жалоба Случайно такого в логах нет? Warning Application - Link down on port 0 Просто у меня такая же проблемы была с версией 0.41 Да, есть. Как решили? Хм. Смотрю еще никак... Вставить ник Цитата Ответить с цитированием Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах More sharing options...
Hawk128 Опубликовано 20 марта, 2017 · Жалоба Спасибо за помощь. А то свой мозг заклинило слегка... 2017-03-20 13:09:48.699 [64217] Information Application - Thread seen packets: 4181038, IP packets: 4120249 (IPv4 packets: 4173558, IPv6 packets: 192), seen bytes: 992479623, Average packet size: 240 bytes, Traffic throughput: 165.92 K pps В моем случае банально не хватало времени на поднятие порта. Х.з. сетевая или свитч, но надо чуть бельше времени. diff --git a/src/main.cpp b/src/main.cpp index 838d49d..46e4f25 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -103,7 +103,7 @@ int extFilter::initPort(int port, struct rte_mempool *mbuf_pool, struct ether_ad rte_eth_link_get_nowait(port, &link); if (!link.link_status) { - sleep(1); + sleep(5); rte_eth_link_get_nowait(port, &link); } Вставить ник Цитата Ответить с цитированием Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах More sharing options...
oborot.bolta Опубликовано 20 марта, 2017 · Жалоба Случаем не 2-х сокетная мамка? Двух. NUMA но проц один Вставить ник Цитата Ответить с цитированием Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах More sharing options...
Hawk128 Опубликовано 20 марта, 2017 · Жалоба Похоже отсутствующие для второго проца зарезервированы. Вставить ник Цитата Ответить с цитированием Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах More sharing options...
Antares Опубликовано 20 марта, 2017 · Жалоба Спасибо за помощь. А то свой мозг заклинило слегка... 2017-03-20 13:09:48.699 [64217] Information Application - Thread seen packets: 4181038, IP packets: 4120249 (IPv4 packets: 4173558, IPv6 packets: 192), seen bytes: 992479623, Average packet size: 240 bytes, Traffic throughput: 165.92 K pps В моем случае банально не хватало времени на поднятие порта. Х.з. сетевая или свитч, но надо чуть бельше времени. diff --git a/src/main.cpp b/src/main.cpp index 838d49d..46e4f25 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -103,7 +103,7 @@ int extFilter::initPort(int port, struct rte_mempool *mbuf_pool, struct ether_ad rte_eth_link_get_nowait(port, &link); if (!link.link_status) { - sleep(1); + sleep(5); rte_eth_link_get_nowait(port, &link); } А проц и сетевуха какие?? Вставить ник Цитата Ответить с цитированием Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах More sharing options...
passilka Опубликовано 20 марта, 2017 · Жалоба Подключил к ВМ сетевую карту Intel e1000 (виртуализированна ESXi). И пробросил Broadcom BCM5719 напрямую в ВМ через DirectPath I/O. Как узнать, поддерживает ли DPDK BCM5719? [root@extFilter ~]# /usr/src/dpdk-stable-16.11.1/tools/dpdk-devbind.py --status Network devices using DPDK-compatible driver ============================================ 0000:02:00.0 '82545EM Gigabit Ethernet Controller (Copper)' drv=igb_uio unused=e1000 0000:0b:00.0 'NetXtreme BCM5719 Gigabit Ethernet PCIe' drv=igb_uio unused=tg3 Network devices using kernel driver =================================== 0000:03:00.0 'VMXNET3 Ethernet Controller' if=ens160 drv=vmxnet3 unused=igb_uio *Active* Other network devices ===================== <none> Crypto devices using DPDK-compatible driver =========================================== <none> Crypto devices using kernel driver ================================== <none> Other crypto devices ==================== <none> Собрал extFilter. При проверке доступных портов показывает что их нет /usr/src/extfilter/src/extFilter -l Setting mbuf size to 8191 DPDK ports not specified! Exception: DPDK ports not specified! [root@extFilter ~]# Вставить ник Цитата Ответить с цитированием Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах More sharing options...
max1976 Опубликовано 20 марта, 2017 · Жалоба Собрал extFilter. При проверке доступных портов показывает что их нет В последней версии эта опция не работает. Вставить ник Цитата Ответить с цитированием Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах More sharing options...
passilka Опубликовано 20 марта, 2017 · Жалоба ОК. Сделал так: [root@extFilter ~]# /usr/src/dpdk-stable-16.11.1/tools/dpdk-devbind.py --status Network devices using DPDK-compatible driver ============================================ 0000:02:00.0 '82545EM Gigabit Ethernet Controller (Copper)' drv=igb_uio unused=e1000 Network devices using kernel driver =================================== 0000:03:00.0 'VMXNET3 Ethernet Controller' if=ens160 drv=vmxnet3 unused=igb_uio *Active* 0000:0b:00.0 'NetXtreme BCM5719 Gigabit Ethernet PCIe' if=ens192 drv=tg3 unused=igb_uio Other network devices ===================== <none> Crypto devices using DPDK-compatible driver =========================================== <none> Crypto devices using kernel driver ================================== <none> Other crypto devices ==================== <none> [root@extFilter ~]# При попытке запуска ошибка /usr/src/extfilter/src/extFilter --config-file=/usr/src/extfilter/etc/extfilter.ini ... EAL: Error reading from file descriptor 14: Input/output error EAL: Error reading from file descriptor 14: Input/output error EAL: Error reading from file descriptor 14: Input/output error ... Конфиг [root@extFilter ~]# cat /usr/src/extfilter/etc/extfilter.ini ; Переводить имя хоста в прописные буквы. Если url_normalization установлен в true, то не имеет значения. lower_host = true domainlist = /root/domains urllist = /root/urls ssllist = /root/ssl_host hostlist = /root/hosts ; Файл с портами для nDPI. ;protocols = /root/protos ; Список ip адресов/сетей для блокировки ssl если нет server_name в ssl hello пакете. Загружается если block_undetected_ssl = true. sslips = /root/ssl_ips ; если false, то будет послан rst пакет вместо редиректа. Default: false http_redirect = true redirect_url = http://gsglobalcom.ru/block.html ; HTTP код ответа. default: 302 Moved Temporarily http_code = 302 Found ; Что добавлять в redirect_url, line - строка из файла url, url - запрещенный url, none - ничего url_additional_info=none ; посылать tcp rst в сторону сервера от имени клиента. Default: false rst_to_server = true ; Default: 0 - disable statistic_interval = 300 ; Default: false match_url_exactly = false ; Default: false block_undetected_ssl = false ; dpdk порт, где анализировать трафик dpdk_port = 0 ; dpdk порт(ы), где анализировать трафик ;dpdk_ports = 0,1 ; размер пула mbuf. Default: 8191 ;mbuf_pool_size = 8191 ; количество потоков по анализу трафика ;num_of_workers=1 ; Какие ядра использовать. Default: все ядра, кроме management. core_mask = 3 ; файл статистики (для extfilter-cacti) statisticsfile = /var/run/extFilter_stat ; mtu на интерфейсе для отправки пакетов в сторону абонентов. Default: 1500 ; out_mtu = 1500 ; Количество flow, обрабатываемых программой. Должно быть кратно 2. ; flowhash_size = 1048576 ; количество тредов для отсылки уведомлений о блокировке ; num_of_senders = 1 ; делать ли нормализацию url url_normalization = true ; удалять ли точку в конце имени хоста remove_dot = true [logging] loggers.root.level = information ;loggers.root.level = debug loggers.root.channel = fileChannel channels.fileChannel.class = FileChannel channels.fileChannel.path = /var/log/extFilter.log channels.fileChannel.rotation = 1 M channels.fileChannel.purgeCount = 4 channels.fileChannel.archive = timestamp channels.fileChannel.formatter.class = PatternFormatter channels.fileChannel.formatter.pattern = %Y-%m-%d %H:%M:%S.%i [%P] %p %s - %t channels.fileChannel.formatter.times = local[root@extFilter ~]# В логе: [root@extFilter ~]# cat /var/log/extFilter.log 2017-03-20 16:04:46.384 [1126] Information Application - Setting mbuf size to 8191 2017-03-20 16:04:46.544 [1126] Information Application - Master core is 0 2017-03-20 16:04:46.544 [1126] Fatal Application - Minimum number of required cores is 3 2017-03-20 16:27:38.812 [1181] Information Application - Setting mbuf size to 8191 2017-03-20 16:27:39.942 [1181] Information Application - Master core is 0 2017-03-20 16:27:39.942 [1181] Fatal Application - Minimum number of required cores is 3 2017-03-20 16:40:45.857 [2296] Information Application - Setting mbuf size to 8191 2017-03-20 16:41:35.596 [2297] Information Application - Setting mbuf size to 8191 2017-03-20 16:41:36.403 [2297] Information Application - Master core is 0 2017-03-20 16:41:36.403 [2297] Fatal Application - Minimum number of required cores is 3 2017-03-20 16:59:45.074 [2360] Information Application - Setting mbuf size to 8191 2017-03-20 16:59:46.338 [2360] Information Application - Master core is 0 2017-03-20 16:59:46.338 [2360] Fatal Application - Minimum number of required cores is 3 [root@extFilter ~]# В моей ВМ 2 vCPU. Это занчит надо: 1). добавить ядра в ВМ? 2). переделать маску core_mask? Вставить ник Цитата Ответить с цитированием Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах More sharing options...
hsvt Опубликовано 20 марта, 2017 (изменено) · Жалоба Вам нужно 4 ядра хотя бы. Коллеги, кто подскажет из-за чего может быть игнорирование сервером настроек tuned связанных с выделением памяти под страницы? cat /proc/cmdline BOOT_IMAGE=/vmlinuz-4.4.52-1.el7.elrepo.x86_64 root=/dev/mapper/cl-root ro crashkernel=auto rd.lvm.lv=cl/root rd.lvm.lv=cl/swap isolcpus=1,2,3 default_hugepagesz=1G hugepagesz=1G hugepages=4 После активации tuned профиля и ребута - фильтр не стартует, стартует только через ручное выделение с помощью echo. Изменено 20 марта, 2017 пользователем hsvt Вставить ник Цитата Ответить с цитированием Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах More sharing options...
tavx Опубликовано 20 марта, 2017 · Жалоба Вам нужно 4 ядра хотя бы. Коллеги, кто подскажет из-за чего может быть игнорирование сервером настроек tuned связанных с выделением памяти под страницы? cat /proc/cmdline BOOT_IMAGE=/vmlinuz-4.4.52-1.el7.elrepo.x86_64 root=/dev/mapper/cl-root ro crashkernel=auto rd.lvm.lv=cl/root rd.lvm.lv=cl/swap isolcpus=1,2,3 default_hugepagesz=1G hugepagesz=1G hugepages=4 После активации tuned профиля и ребута - фильтр не стартует, стартует только через ручное выделение с помощью echo. Проверьте, поддерживает ли процессор 1gb hugepages. Возможно вы выделяете 4 страницы по 2 мегабайта, вместо 1gb. grep pdpe1gb /proc/cpuinfo | uniq Вставить ник Цитата Ответить с цитированием Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах More sharing options...
hsvt Опубликовано 20 марта, 2017 · Жалоба Вам нужно 4 ядра хотя бы. Коллеги, кто подскажет из-за чего может быть игнорирование сервером настроек tuned связанных с выделением памяти под страницы? cat /proc/cmdline BOOT_IMAGE=/vmlinuz-4.4.52-1.el7.elrepo.x86_64 root=/dev/mapper/cl-root ro crashkernel=auto rd.lvm.lv=cl/root rd.lvm.lv=cl/swap isolcpus=1,2,3 default_hugepagesz=1G hugepagesz=1G hugepages=4 После активации tuned профиля и ребута - фильтр не стартует, стартует только через ручное выделение с помощью echo. Проверьте, поддерживает ли процессор 1gb hugepages. Возможно вы выделяете 4 страницы по 2 мегабайта, вместо 1gb. grep pdpe1gb /proc/cpuinfo | uniq Похоже так и есть, по вашей команде и этой - вывод пустой. NOTE Most x86_64 systems support various sizes of hugepages. It is possible for your system not to have 1GB support. Check by running the following: # if grep pdpe1gb /proc/cpuinfo >/dev/null 2>&1; then echo "1GB supported."; fi Как тогда выделять правильно через tuned? Вставить ник Цитата Ответить с цитированием Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах More sharing options...
Hawk128 Опубликовано 20 марта, 2017 · Жалоба А проц и сетевуха какие?? Intel® Xeon® CPU E31270 @ 3.40GHz S1200BTL Ethernet controller [0200]: Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection [8086:10fb] (rev 01) (X520-DA2) Вставить ник Цитата Ответить с цитированием Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах More sharing options...
LKr Опубликовано 20 марта, 2017 · Жалоба Приветствую! Кто-нибудь возился с extfilter и VLAN'ами на mirror'е? Есть ощущение, что не отрабатывает strip_vlan на dpdk... Без dpdk tcpdump прекрасно видит тегированные пакеты mirror'а, а при запуске extfilter в логах нули. Трафика на входе на сетевуху около 150Мбит/с 03:00.0 Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03) 2017-03-21 00:21:07.663 [25883] Information Application - All worker threads seen packets: 176, IP packets: 0 (IPv4 packets: 0, IPv6 packets: 0), seen bytes: 0, traffic throughtput: 0.10 pps 2017-03-21 00:21:07.663 [25883] Information Application - All worker IPv4 fragments: 0, IPv6 fragments: 0, IPv4 short packets: 0 2017-03-21 00:21:07.663 [25883] Information Application - All worker threads matched by ip/port: 0, matched by ssl: 0, matched by ssl/ip: 0, matched by domain: 0, matched by url: 0 2017-03-21 00:21:07.663 [25883] Information Application - All worker threads redirected domains: 0, redirected urls: 0, rst sended: 0 2017-03-21 00:21:07.663 [25883] Information Application - All worker threads active flows: 0(IPv4 flows: 0 IPv6 flows: 0), expired flows: 0 Сетевуха встроенная в сервак, завтра буду пытаться внешнюю запихать для пробы... Вставить ник Цитата Ответить с цитированием Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах More sharing options...
Hawk128 Опубликовано 21 марта, 2017 (изменено) · Жалоба У вас та де ситуация что была у меня. проверьте в логах такое: Warning Application - Link down on port 0 Изменено 21 марта, 2017 пользователем Hawk128 Вставить ник Цитата Ответить с цитированием Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах More sharing options...
passilka Опубликовано 21 марта, 2017 · Жалоба При запуске множество ошибок: EAL: Error reading from file descriptor 18: Input/output error EAL: Error reading from file descriptor 18: Input/output error EAL: Error reading from file descriptor 18: Input/output error EAL: Error reading from file descriptor 18: Input/output error EAL: Error reading from file descriptor 18: Input/output error EAL: Error reading from file descriptor 18: Input/output error EAL: Error reading from file descriptor 18: Input/output error Лог extFilter: 2017-03-21 08:34:55.727 [2403] Information Application - Setting mbuf size to 8191 2017-03-21 08:34:56.773 [2403] Information Application - Master core is 0 2017-03-21 08:34:57.047 [2403] Information Application - Port 0 MAC: 00:0c:29:26:ee:03 2017-03-21 08:34:57.050 [2403] Warning Application - Pattern 'xn--80aeshrfifdjb.xn--p1ai' already present in the database from file /root/domains 2017-03-21 08:34:57.071 [2403] Warning Application - Pattern 'new.xn--1---7cdbcb4aca7cbbcxxqb5ahnnpk8b2t.xn--p1acf' already present in the database from file /root/domains 2017-03-21 08:34:57.077 [2403] Warning Application - Pattern 'igrovyeavtomatyvulkan.org' already present in the database from file /root/domains 2017-03-21 08:34:57.094 [2403] Warning Application - Pattern 'flibusta.is' already present in the database from file /root/domains 2017-03-21 08:34:57.096 [2403] Warning Application - Pattern 'bkrbet.top' already present in the database from file /root/domains 2017-03-21 08:34:57.099 [2403] Warning Application - Pattern 'xn--e1awew.xn--p1ai' already present in the database from file /root/domains 2017-03-21 08:34:57.102 [2403] Warning Application - Pattern 'kontorafonbet.ru' already present in the database from file /root/domains 2017-03-21 08:34:57.102 [2403] Warning Application - Pattern 'xn--80aafc2bcqz.xn--p1ai' already present in the database from file /root/domains 2017-03-21 08:34:57.118 [2403] Warning Application - Pattern 'xn---888-93d8c.xn--p1acf' already present in the database from file /root/domains 2017-03-21 08:34:57.118 [2403] Warning Application - Pattern 'fbmetrix.club' already present in the database from file /root/domains 2017-03-21 08:34:57.121 [2403] Warning Application - Pattern 'bk-leon2.ru' already present in the database from file /root/domains 2017-03-21 08:34:57.124 [2403] Warning Application - Pattern 'bk3.xn--1--blcqqatr5b1a2j.xn--p1acf' already present in the database from file /root/domains 2017-03-21 08:34:57.126 [2403] Warning Application - Pattern 'tennisi.kz' already present in the database from file /root/domains 2017-03-21 08:34:57.127 [2403] Warning Application - Pattern 'proxy.flibusta.is' already present in the database from file /root/domains 2017-03-21 08:34:57.133 [2403] Warning Application - Pattern 'betcity.rs' already present in the database from file /root/domains 2017-03-21 08:34:57.133 [2403] Warning Application - Pattern 'bkrbet.ru' already present in the database from file /root/domains 2017-03-21 08:34:57.134 [2403] Warning Application - Pattern 'www2.xn--90ahbfg3a0bc.com' already present in the database from file /root/domains 2017-03-21 08:34:57.134 [2403] Warning Application - Pattern 'xn---1-6kcgqeizk4as6azb.xn--p1ai' already present in the database from file /root/domains 2017-03-21 08:34:57.135 [2403] Warning Application - Pattern 'xn--4-7sbagbdpv5bpes5ad1ki.xn--80asehdb' already present in the database from file /root/domains 2017-03-21 08:34:57.135 [2403] Warning Application - Pattern 'xn--1---7cdbcc3adabx4bp1biwi1a1d9b.xn--p1acf' already present in the database from file /root/domains 2017-03-21 08:34:57.136 [2403] Warning Application - Pattern 'xn-----8kcledd0aci4aj1cb3o.xn--p1ai' already present in the database from file /root/domains 2017-03-21 08:34:57.138 [2403] Warning Application - Pattern 'fbwebdn.net' already present in the database from file /root/domains 2017-03-21 08:34:57.211 [2403] Warning Application - Pattern 'mixslots.com' already present in the URL database from file /root/urls 2017-03-21 08:34:57.270 [2403] Warning Application - Pattern 'ru-nur.com/▒▒▒▒▒-▒▒▒▒.html' already present in the URL database from file /root/urls 2017-03-21 08:34:57.273 [2403] Warning Application - Pattern 'nurr.ru/content/▒▒▒▒▒▒▒▒▒▒▒▒-▒▒▒▒▒▒▒▒-▒▒▒▒▒▒▒▒▒▒▒-▒▒▒▒-▒▒-▒▒▒▒▒▒-▒▒-▒▒▒▒▒▒▒-▒▒▒▒-▒▒-▒▒▒▒▒-▒▒-▒▒-▒▒▒▒▒▒-▒-▒▒▒' already present in the URL database from file /root/urls 2017-03-21 08:34:57.284 [2403] Warning Application - Pattern 'high-stone-forum.info/index.php/topic/1809-▒▒▒▒▒▒▒▒▒▒▒▒▒-▒▒▒▒▒▒-▒▒▒▒▒/' already present in the URL database from file /root/urls 2017-03-21 08:34:57.289 [2403] Warning Application - Pattern 'ru.videosection.com/▒▒▒▒▒▒▒▒▒.html' already present in the URL database from file /root/urls 2017-03-21 08:34:57.292 [2403] Warning Application - Pattern 'shadow-biz.com/topic/408-▒▒▒▒▒▒-▒▒▒▒▒-▒▒▒▒▒▒▒▒▒▒▒▒-▒▒-▒▒▒▒-▒▒▒▒▒▒▒▒▒▒▒/' already present in the URL database from file /root/urls 2017-03-21 08:34:57.296 [2403] Warning Application - Pattern 'song5.ru/text/▒▒▒▒▒-▒▒▒▒▒▒▒▒-▒▒-▒▒▒▒▒-▒▒▒▒▒▒-▒▒▒▒▒▒▒' already present in the URL database from file /root/urls 2017-03-21 08:34:57.323 [2403] Warning Application - Pattern 'song5.ru/text/warriors-of-zion-▒-▒▒-▒▒▒▒▒' already present in the URL database from file /root/urls 2017-03-21 08:34:57.325 [2403] Warning Application - Pattern 'intpharm.ru/▒▒▒▒▒▒▒▒/' already present in the URL database from file /root/urls 2017-03-21 08:34:57.326 [2403] Warning Application - Pattern 'gslot-home.com' already present in the URL database from file /root/urls 2017-03-21 08:34:57.343 [2403] Warning Application - Pattern 'mp3-muzyka.com/skachat-music-besplatno/▒▒▒▒▒▒▒▒+▒▒▒▒▒+▒▒▒▒▒▒' already present in the URL database from file /root/urls 2017-03-21 08:34:57.346 [2403] Warning Application - Pattern 'antanartia.tumblr.com/post/85745447369/▒▒▒▒▒▒▒▒-▒▒▒-▒▒▒▒▒▒▒▒▒▒-▒▒▒▒▒-▒▒-▒▒▒▒' already present in the URL database from file /root/urls 2017-03-21 08:34:57.351 [2403] Warning Application - Pattern 'high-stone-forum.info/index.php/topic/1609-▒▒▒-▒▒▒▒▒▒▒▒▒-▒▒▒▒▒▒▒▒▒▒▒▒▒▒-▒▒▒▒▒/' already present in the URL database from file /root/urls 2017-03-21 08:34:57.366 [2403] Warning Application - Pattern '7pik.com/top/4290-▒▒▒-10-▒▒▒▒▒▒▒▒-▒▒▒▒▒▒▒▒▒-▒-▒▒▒▒▒.html' already present in the URL database from file /root/urls 2017-03-21 08:34:57.377 [2403] Warning Application - Pattern 'diplom-kazan-tut.com' already present in the URL database from file /root/urls 2017-03-21 08:34:57.381 [2403] Warning Application - Pattern 'song5.ru/text/▒▒▒▒▒▒▒▒▒-▒▒▒▒▒▒▒▒-▒▒▒▒▒-▒▒▒▒▒-▒▒▒-▒▒▒▒▒▒▒▒▒▒▒▒-▒▒▒▒' already present in the URL database from file /root/urls 2017-03-21 08:34:57.385 [2403] Warning Application - Pattern 'melody24.net/search/▒▒▒▒▒▒▒▒▒+▒+▒▒▒▒▒▒▒▒/▒▒▒▒▒▒+▒▒+▒▒▒' already present in the URL database from file /root/urls 2017-03-21 08:34:57.387 [2403] Warning Application - Pattern 'muzogig.net/gig/▒▒▒%20▒▒▒▒▒▒' already present in the URL database from file /root/urls 2017-03-21 08:34:57.448 [2403] Warning Application - Pattern 'mp3-centr.ru/music/▒▒▒▒▒▒▒▒/' already present in the URL database from file /root/urls 2017-03-21 08:34:57.451 [2403] Warning Application - Pattern 'vkmp3.su/mp3/▒▒▒▒▒%20▒▒▒▒▒%20▒▒▒▒▒%20▒▒▒▒▒/' already present in the URL database from file /root/urls 2017-03-21 08:34:57.455 [2403] Warning Application - Pattern 'gigmuziki.com/search/▒▒▒%20▒▒▒▒▒▒' already present in the URL database from file /root/urls 2017-03-21 08:34:57.463 [2403] Warning Application - Pattern 'kriminall.biz/index.php?/topic/90-▒▒▒▒▒▒-▒▒▒▒▒▒▒▒▒-▒▒▒▒▒▒-▒▒▒▒▒▒▒▒▒▒-▒▒▒▒▒▒/' already present in the URL database from file /root/urls 2017-03-21 08:34:57.469 [2403] Warning Application - Pattern 'lurklurk.com/Encyclopedia_Dramatica/▒▒▒▒▒▒' already present in the URL database from file /root/urls 2017-03-21 08:34:57.497 [2403] Warning Application - Pattern 'song5.ru/text/▒▒▒▒▒▒-▒▒-▒▒▒▒▒' already present in the URL database from file /root/urls 2017-03-21 08:34:57.546 [2403] Warning Application - Pattern 'freemuzichka.com/tunes/▒▒▒▒▒▒▒▒%20-%20▒▒▒▒%20▒%20▒▒▒▒▒▒' already present in the URL database from file /root/urls 2017-03-21 08:34:57.574 [2403] Warning Application - Pattern 'freemuzichka.com/tunes/▒▒▒▒▒▒▒▒▒%20▒▒▒▒%20▒▒▒▒▒' already present in the URL database from file /root/urls 2017-03-21 08:34:57.589 [2403] Warning Application - Pattern 'freemuzichka.com/tunes/▒▒▒▒▒▒▒▒▒▒▒▒' already present in the URL database from file /root/urls 2017-03-21 08:34:57.614 [2403] Warning Application - Pattern 'sneg.audio/show/▒▒▒▒▒▒▒▒-▒▒▒▒▒▒▒▒▒▒▒-▒▒▒▒▒' already present in the URL database from file /root/urls 2017-03-21 08:34:57.615 [2403] Warning Application - Pattern 'song5.ru/text/▒▒▒▒▒▒-▒▒▒▒▒▒▒▒-▒▒▒▒▒▒▒-▒▒▒-▒▒▒▒▒-▒▒▒▒▒▒▒▒▒▒▒▒▒▒' already present in the URL database from file /root/urls 2017-03-21 08:34:57.625 [2403] Warning Application - Pattern 'song5.ru/text/▒▒▒▒▒▒▒▒▒-▒▒▒▒▒▒▒▒-▒▒▒▒▒-▒▒▒▒▒-▒▒▒-▒▒▒▒▒▒▒▒▒▒▒▒-▒▒▒▒' already present in the URL database from file /root/urls 2017-03-21 08:34:57.630 [2403] Warning Application - Pattern 'en.osmannuritopbas.com/portfolio/▒▒-▒▒▒▒-▒▒▒▒▒▒▒▒▒▒▒' already present in the URL database from file /root/urls 2017-03-21 08:34:57.631 [2403] Warning Application - Pattern '76▒▒▒▒▒▒▒.▒▒/' already present in the URL database from file /root/urls Конфиг extFilter: ; Переводить имя хоста в прописные буквы. Если url_normalization установлен в true, то не имеет значения. lower_host = true domainlist = /root/domains urllist = /root/urls ssllist = /root/ssl_host hostlist = /root/hosts ; Файл с портами для nDPI. ;protocols = /root/protos ; Список ip адресов/сетей для блокировки ssl если нет server_name в ssl hello пакете. Загружается если block_undetected_ssl = true. sslips = /root/ssl_ips ; если false, то будет послан rst пакет вместо редиректа. Default: false http_redirect = true redirect_url = http://gsglobalcom.ru/block.html ; HTTP код ответа. default: 302 Moved Temporarily http_code = 302 Found ; Что добавлять в redirect_url, line - строка из файла url, url - запрещенный url, none - ничего url_additional_info=none ; посылать tcp rst в сторону сервера от имени клиента. Default: false rst_to_server = true ; Default: 0 - disable statistic_interval = 300 ; Default: false match_url_exactly = false ; Default: false block_undetected_ssl = false ; dpdk порт, где анализировать трафик dpdk_port = 0 ; dpdk порт(ы), где анализировать трафик ;dpdk_ports = 0 ; размер пула mbuf. Default: 8191 ;mbuf_pool_size = 8191 ; количество потоков по анализу трафика num_of_workers=1 ; Какие ядра использовать. Default: все ядра, кроме management. core_mask = 7 ; файл статистики (для extfilter-cacti) statisticsfile = /var/run/extFilter_stat ; mtu на интерфейсе для отправки пакетов в сторону абонентов. Default: 1500 out_mtu = 1500 ; Количество flow, обрабатываемых программой. Должно быть кратно 2. ;flowhash_size = 1048576 ; количество тредов для отсылки уведомлений о блокировке ;num_of_senders = 1 ; делать ли нормализацию url url_normalization = true ; удалять ли точку в конце имени хоста remove_dot = true [logging] loggers.root.level = information ;loggers.root.level = debug loggers.root.channel = fileChannel channels.fileChannel.class = FileChannel channels.fileChannel.path = /var/log/extFilter.log channels.fileChannel.rotation = 1 M channels.fileChannel.purgeCount = 4 channels.fileChannel.archive = timestamp channels.fileChannel.formatter.class = PatternFormatter channels.fileChannel.formatter.pattern = %Y-%m-%d %H:%M:%S.%i [%P] %p %s - %t channels.fileChannel.formatter.times = local Проц такой ============================================================ Core and Socket Information (as reported by '/proc/cpuinfo') ============================================================ cores = [0, 1, 2, 3] sockets = [0] Socket 0 -------- Core 0 [0] Core 1 [1] Core 2 [2] Core 3 [3] Есть вопросы: Как высчитать flowhash_size для трафа в 200Мбит/с? Поддерждивает ли extFilter num_of_workers отличный от 1? В моём случае процессора core_mask используется по умолчанию (закоментировано в конфиге), а 7(10)=0111(2), и поэтому заранее в tuned.conf isolcpus=1,2,3, т.е. зарезервировано три ядра для dpdk. Так? Вставить ник Цитата Ответить с цитированием Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах More sharing options...
Hawk128 Опубликовано 21 марта, 2017 · Жалоба Забыл сказать большое спасибо мах1976 за труды! И еще вопросик, может кто в курсе, почему статистика по блокировке ip/port все на 0-ле? М.б. что не так настроил? Вставить ник Цитата Ответить с цитированием Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах More sharing options...
tavx Опубликовано 21 марта, 2017 · Жалоба Вам нужно 4 ядра хотя бы. Коллеги, кто подскажет из-за чего может быть игнорирование сервером настроек tuned связанных с выделением памяти под страницы? cat /proc/cmdline BOOT_IMAGE=/vmlinuz-4.4.52-1.el7.elrepo.x86_64 root=/dev/mapper/cl-root ro crashkernel=auto rd.lvm.lv=cl/root rd.lvm.lv=cl/swap isolcpus=1,2,3 default_hugepagesz=1G hugepagesz=1G hugepages=4 После активации tuned профиля и ребута - фильтр не стартует, стартует только через ручное выделение с помощью echo. Проверьте, поддерживает ли процессор 1gb hugepages. Возможно вы выделяете 4 страницы по 2 мегабайта, вместо 1gb. grep pdpe1gb /proc/cpuinfo | uniq Похоже так и есть, по вашей команде и этой - вывод пустой. NOTE Most x86_64 systems support various sizes of hugepages. It is possible for your system not to have 1GB support. Check by running the following: # if grep pdpe1gb /proc/cpuinfo >/dev/null 2>&1; then echo "1GB supported."; fi Как тогда выделять правильно через tuned? У меня только isolcpus=1,2,3 Думаю можно добавить hugepages=2048. Я выделяю командой: echo 2048 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages Вставить ник Цитата Ответить с цитированием Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах More sharing options...
Antares Опубликовано 21 марта, 2017 · Жалоба Забыл сказать большое спасибо мах1976 за труды! +100500 И еще вопросик, может кто в курсе, почему статистика по блокировке ip/port все на 0-ле? М.б. что не так настроил? у меня так же Вставить ник Цитата Ответить с цитированием Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах More sharing options...
myth Опубликовано 21 марта, 2017 · Жалоба А никто не менял скрипт zapret.pl с целью возможности добавления своих ip для блокировки по ip? Накостылил на коленке для себя, но не нравится... или как еще бороться с пропусками ресурсов https://91.202.63.33/m7s32/cgi/free.Welcome?lang=rus https://93.189.57.38/mtg2/cgi/free.Welcome?lang=rus https://52.50.87.120:16869/ru/odds-list/ https://52.50.87.120:16869/en/ https://176.227.213.19/ https://52.28.27.206:16869/ru/odds/match/baseball/usa/mlb https://52.29.64.231:16869/en/odds-list/countries/Entertainment https://52.28.27.206:16869/en/odds-list/countries/Entertainment В браузере они блокируются. А по мнению Ревизора - нет. Костыли с ipset не хочу. Только как крайний вариант Вставить ник Цитата Ответить с цитированием Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах More sharing options...
hsvt Опубликовано 21 марта, 2017 · Жалоба Вам нужно 4 ядра хотя бы. Коллеги, кто подскажет из-за чего может быть игнорирование сервером настроек tuned связанных с выделением памяти под страницы? cat /proc/cmdline BOOT_IMAGE=/vmlinuz-4.4.52-1.el7.elrepo.x86_64 root=/dev/mapper/cl-root ro crashkernel=auto rd.lvm.lv=cl/root rd.lvm.lv=cl/swap isolcpus=1,2,3 default_hugepagesz=1G hugepagesz=1G hugepages=4 После активации tuned профиля и ребута - фильтр не стартует, стартует только через ручное выделение с помощью echo. Проверьте, поддерживает ли процессор 1gb hugepages. Возможно вы выделяете 4 страницы по 2 мегабайта, вместо 1gb. grep pdpe1gb /proc/cpuinfo | uniq Похоже так и есть, по вашей команде и этой - вывод пустой. NOTE Most x86_64 systems support various sizes of hugepages. It is possible for your system not to have 1GB support. Check by running the following: # if grep pdpe1gb /proc/cpuinfo >/dev/null 2>&1; then echo "1GB supported."; fi Как тогда выделять правильно через tuned? У меня только isolcpus=1,2,3 Думаю можно добавить hugepages=2048. Я выделяю командой: echo 2048 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages Большое спасибо за наводку! Вставить ник Цитата Ответить с цитированием Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах More sharing options...
LKr Опубликовано 21 марта, 2017 · Жалоба проверьте в логах такое: Warning Application - Link down on port 0 Спасибо! Действительно оно. Смотрел же вчера на пост про sleep, но как-то на тегах переклинило. Вставить ник Цитата Ответить с цитированием Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах More sharing options...
Antares Опубликовано 21 марта, 2017 · Жалоба мне тоже помогло sleep(5) Вставить ник Цитата Ответить с цитированием Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах More sharing options...
hsvt Опубликовано 21 марта, 2017 (изменено) · Жалоба В общем всё равно не могу победить выделение 2MB страничек huge. cat /lib/tuned/dpdk-tune/tuned.conf [main] include=latency-performance [bootloader] cmdline=isolcpus=1,2,3 hugepages=1024 grep Huge /proc/meminfo AnonHugePages: 14336 kB HugePages_Total: 512 HugePages_Free: 0 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB [code]cat /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages 256 2017-03-21 20:04:13.859 [1178] Debug Application - Preparing thread 'WorkerThread 1' 2017-03-21 20:04:13.859 [1178] Debug WorkerThread 1 - Allocating 251658240 bytes for flow pool 2017-03-21 20:04:13.900 [1178] Fatal WorkerThread 1 - Not enough memory for flows pool. Tried to allocate 251658240 bytes 2017-03-21 20:04:13.900 [1178] Error Application - Exception: Not enough memory for flows pool 2017-03-21 20:04:13.900 [1178] Debug Application - Shutting down 2017-03-21 20:04:13.900 [1178] Debug Application - Uninitializing subsystem: Logging Subsystem Из документации к DPDK: 2.3.2.1. Reserving Hugepages for DPDK Use The allocation of hugepages should be done at boot time or as soon as possible after system boot to prevent memory from being fragmented in physical memory. To reserve hugepages at boot time, a parameter is passed to the Linux kernel on the kernel command line. For 2 MB pages, just pass the hugepages option to the kernel. For example, to reserve 1024 pages of 2 MB, use: hugepages=1024 For other hugepage sizes, for example 1G pages, the size must be specified explicitly and can also be optionally set as the default hugepage size for the system. For example, to reserve 4G of hugepage memory in the form of four 1G pages, the following options should be passed to the kernel: default_hugepagesz=1G hugepagesz=1G hugepages=4 Изменено 21 марта, 2017 пользователем hsvt Вставить ник Цитата Ответить с цитированием Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах More sharing options...
Hawk128 Опубликовано 21 марта, 2017 · Жалоба У вас, как и у меня нет поддержки 1G страниц памяти: The hugepage sizes that a CPU supports can be determined from the CPU flags on Intel architecture. If pse exists, 2M hugepages are supported; if pdpe1gb exists, 1G hugepages are supported. http://dpdk.org/doc/guides/linux_gsg/sys_reqs.html Проверить можно так: cat /proc/cpuinfo | grep pdpe1gb В таком случае default_hugepagesz=1G hugepagesz=1G hugepages=4 бесполезны. Нужно после старта добавить 2М страничек. Я делаю это через /etc/rc.local: echo 2048 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages Вставить ник Цитата Ответить с цитированием Поделиться сообщением Ссылка на сообщение Поделиться на других сайтах More sharing options...