ntop / n2disk

Open source components and extensions for n2disk

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Changing to 1g binary from 10g

Claireshan opened this issue · comments

I recently got a license but its only supporting the 1g binary yet i have 10g binary. how do i change the binary to 1g

If you install the n2disk package, you get both the 10g (n2disk) and the 1g (n2disk1g) binaries

yes i do have all of them but its seems link the 10g is the one being used, i would 1g to be used instead
tempsnip

The systemd script selects the correct binary based on the installed license

when i check the version this what they say
Capture

i had added the license from the interface . do i need to create a file

Capture1

Please check n2disk1g --version

It seems it is working

i dnt think it is because when i run it disk its fails with code 255
n2disk@ens3.service - n2disk ultra-high-speed traffic recorder with realtime indexing on ens3
Loaded: loaded (/etc/systemd/system/n2disk@.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2020-07-01 06:43:51 UTC; 42s ago
Process: 23974 ExecStopPost=/bin/sh -c /bin/echo "$(/bin/date) n2disk %i StopPost" >> /var/log/ntop-systemd.log (code= Process: 23970 ExecStopPost=/bin/rm -rf /run/n2disk-%i.conf (code=exited, status=0/SUCCESS)
Process: 23966 ExecStopPost=/bin/rm -rf /run/n2disk-%i.env (code=exited, status=0/SUCCESS)
Process: 23945 ExecStartPost=/bin/sh -c /bin/echo "$(/bin/date) n2disk %i StartPost" >> /var/log/ntop-systemd.log (cod Process: 23942 ExecStart=/usr/bin/stdbuf -oL /usr/local/bin/${N2DISK_BINARY} /run/n2disk-%i.conf (code=exited, status= Process: 23937 ExecStartPre=/bin/sh -c /bin/sed "/-P.$|--daemon.|--pid.*/s/^/#/" /etc/n2disk/n2disk-%i.conf > /run Process: 23927 ExecStartPre=/bin/sh -c /usr/local/bin/n2disk --check-license | /bin/grep "Ok|Time-Limited" && /bin/ec Process: 23896 ExecStartPre=/bin/sh -c /usr/local/bin/n2disk5g --check-license | /bin/grep "Ok|Time-Limited" && /bin/ Process: 23887 ExecStartPre=/bin/sh -c /usr/local/bin/n2disk1g --check-license | /bin/grep "Ok|Time-Limited" && /bin/ Process: 23882 ExecStartPre=/bin/sh -c /bin/echo "N2DISK_BINARY=n2disk" > /run/n2disk-%i.env (code=exited, status=0/SU Process: 23876 ExecStartPre=/bin/sh -c /bin/echo "$(/bin/date) n2disk %i StartPre" >> /var/log/ntop-systemd.log (code= Main PID: 23942 (code=exited, status=255)

Jul 01 06:43:51 nprobe n2disk[23942]: 01/Jul/2020 06:43:51 [n2disk.c:6779] Storage #0 directory: /storage/n2disk/pcap
Jul 01 06:43:51 nprobe n2disk[23942]: 01/Jul/2020 06:43:51 [n2disk.c:6797] Up to 100 files will be written per folder
Jul 01 06:43:51 nprobe n2disk[23942]: 01/Jul/2020 06:43:51 [n2disk.c:6803] Dump files max duration is set to 60 sec
Jul 01 06:43:51 nprobe n2disk[23942]: 01/Jul/2020 06:43:51 [n2disk.c:6835] Dumping data in 0.1 MB chunks
Jul 01 06:43:51 nprobe n2disk[23942]: 01/Jul/2020 06:43:51 [n2disk.c:6846] Index processing memory is set to 415 MB (x 2Jul 01 06:43:51 nprobe n2disk[23942]: 01/Jul/2020 06:43:51 [n2disk.c:6919] ERROR: Unable to allocate requested memory
Jul 01 06:43:51 nprobe n2disk[23942]: 01/Jul/2020 06:43:51 [n2disk.c:1298] Caught termination signal -1...
Jul 01 06:43:51 nprobe systemd[1]: n2disk@ens3.service: Main process exited, code=exited, status=255/n/a
Jul 01 06:43:51 nprobe systemd[1]: n2disk@ens3.service: Unit entered failed state.
Jul 01 06:43:51 nprobe systemd[1]: n2disk@ens3.service: Failed with result 'exit-code'.
lines 1-26/26 (END)...skipping...
n2disk@ens3.service - n2disk ultra-high-speed traffic recorder with realtime indexing on ens3
Loaded: loaded (/etc/systemd/system/n2disk@.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2020-07-01 06:43:51 UTC; 42s ago
Process: 23974 ExecStopPost=/bin/sh -c /bin/echo "$(/bin/date) n2disk %i StopPost" >> /var/log/ntop-systemd.log (code=exited, status=0/SUCCESS)
Process: 23970 ExecStopPost=/bin/rm -rf /run/n2disk-%i.conf (code=exited, status=0/SUCCESS)
Process: 23966 ExecStopPost=/bin/rm -rf /run/n2disk-%i.env (code=exited, status=0/SUCCESS)
Process: 23945 ExecStartPost=/bin/sh -c /bin/echo "$(/bin/date) n2disk %i StartPost" >> /var/log/ntop-systemd.log (code=exited, status=0/SUCCESS)
Process: 23942 ExecStart=/usr/bin/stdbuf -oL /usr/local/bin/${N2DISK_BINARY} /run/n2disk-%i.conf (code=exited, status=255)
Process: 23937 ExecStartPre=/bin/sh -c /bin/sed "/-P.$|--daemon.|--pid.*/s/^/#/" /etc/n2disk/n2disk-%i.conf > /run/n2disk-%i.conf (code=exited, status=0/SUCCESS)
Process: 23927 ExecStartPre=/bin/sh -c /usr/local/bin/n2disk --check-license | /bin/grep "Ok|Time-Limited" && /bin/echo "N2DISK_BINARY=n2disk" > /run/n2disk-%i.env | Process: 23896 ExecStartPre=/bin/sh -c /usr/local/bin/n2disk5g --check-license | /bin/grep "Ok|Time-Limited" && /bin/echo "N2DISK_BINARY=n2disk5g" > /run/n2disk-%i.e Process: 23887 ExecStartPre=/bin/sh -c /usr/local/bin/n2disk1g --check-license | /bin/grep "Ok|Time-Limited" && /bin/echo "N2DISK_BINARY=n2disk1g" > /run/n2disk-%i.e Process: 23882 ExecStartPre=/bin/sh -c /bin/echo "N2DISK_BINARY=n2disk" > /run/n2disk-%i.env (code=exited, status=0/SUCCESS)
Process: 23876 ExecStartPre=/bin/sh -c /bin/echo "$(/bin/date) n2disk %i StartPre" >> /var/log/ntop-systemd.log (code=exited, status=0/SUCCESS)
Main PID: 23942 (code=exited, status=255)

Jul 01 06:43:51 nprobe n2disk[23942]: 01/Jul/2020 06:43:51 [n2disk.c:6779] Storage #0 directory: /storage/n2disk/pcap
Jul 01 06:43:51 nprobe n2disk[23942]: 01/Jul/2020 06:43:51 [n2disk.c:6797] Up to 100 files will be written per folder
Jul 01 06:43:51 nprobe n2disk[23942]: 01/Jul/2020 06:43:51 [n2disk.c:6803] Dump files max duration is set to 60 sec
Jul 01 06:43:51 nprobe n2disk[23942]: 01/Jul/2020 06:43:51 [n2disk.c:6835] Dumping data in 0.1 MB chunks
Jul 01 06:43:51 nprobe n2disk[23942]: 01/Jul/2020 06:43:51 [n2disk.c:6846] Index processing memory is set to 415 MB (x 2 x 4 index files)
Jul 01 06:43:51 nprobe n2disk[23942]: 01/Jul/2020 06:43:51 [n2disk.c:6919] ERROR: Unable to allocate requested memory
Jul 01 06:43:51 nprobe n2disk[23942]: 01/Jul/2020 06:43:51 [n2disk.c:1298] Caught termination signal -1...
Jul 01 06:43:51 nprobe systemd[1]: n2disk@ens3.service: Main process exited, code=exited, status=255/n/a
Jul 01 06:43:51 nprobe systemd[1]: n2disk@ens3.service: Unit entered failed state.
Jul 01 06:43:51 nprobe systemd[1]: n2disk@ens3.service: Failed with result 'exit-code'.

ExecStart=/usr/bin/stdbuf -oL /usr/local/bin/${N2DISK_BINARY} /run/n2disk-%i.conf (code=exited, status=255)

it's not a matter of license, there is a problem with memory allocation:
"ERROR: Unable to allocate requested memory"
How much memory do you have?

Actually it is also selecting the wrong version, please update the package and provide "n2disk1g --check-license"

Available (472.04 GB) - Total: 484.64 GB

I meant RAM, please also provide the output of "free"

Actually it is also selecting the wrong version, please update the package and provide "n2disk1g --check-license"

am still updating

It seems you rally have little ram, you cannot run n2disk under that condition, please also provide "cat /proc/meminfo" to doublecheck

MemTotal: 8174132 kB
MemFree: 4591888 kB
MemAvailable: 5306096 kB
Buffers: 144320 kB
Cached: 793720 kB
SwapCached: 0 kB
Active: 2693620 kB
Inactive: 623672 kB
Active(anon): 2383732 kB
Inactive(anon): 80680 kB
Active(file): 309888 kB
Inactive(file): 542992 kB
Unevictable: 3652 kB
Mlocked: 3652 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 92 kB
Writeback: 0 kB
AnonPages: 2382932 kB
Mapped: 61020 kB
Shmem: 82724 kB
Slab: 197884 kB
SReclaimable: 165660 kB
SUnreclaim: 32224 kB
KernelStack: 3216 kB
PageTables: 10628 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
WritebackTmp: 0 kB
CommitLimit: 4087064 kB
Committed_AS: 1389544 kB
VmallocTotal: 34359738367 kB
VmallocUsed: 0 kB
VmallocChunk: 0 kB
HardwareCorrupted: 0 kB
AnonHugePages: 0 kB
CmaTotal: 0 kB
CmaFree: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
DirectMap4k: 116584 kB
DirectMap2M: 8271872 kB

Actually it is also selecting the wrong version, please update the package and provide "n2disk1g --check-license"

Invalid license

Please provide
cat /etc/n2disk/n2disk-ens3.conf
cat /etc/n2disk.license

--interface=ens3
--dump-directory=/storage/n2disk/pcap
--timeline-dir=/storage/n2disk/timeline
--disk-limit=80%
--max-file-len=1000
--buffer-len=4000
--max-file-duration=60
--index
--snaplen=1536
--writer-cpu-affinity=0
--reader-cpu-affinity=1
--compressor-cpu-affinity=2,3
--index-on-compressor-threads
-u=ntopng
--zmq=tcp://127.0.0.1:5556
--zmq-probe-mode
--zmq-export-flows

cat /etc/n2disk.license
This has the license

cat /etc/n2disk.license

.......................................9IEkt3TOqIxqS13E7lXoMqMD8byrD4uCNPDxSJureBn1HD8+lmRbQzjxaCXoQQA/v6a8WGtLr0yTOo0qkKCuSwuECu7/0uFx83l0NYpqIrz+CVeaSjuTiEBVEO0VUKbqhKE2M0Y6KEsvGx7Z3V9JfKdueSpfLvc1i+rZoIyDfFQ6QuMHp1EhpylZ9gl18FV1E4DU8eQMuUKuWDvNAijABiphgE/YAR5lkTJ..................................................

It seems you configured a wrong n2disk license, please send me a direct mail with the orderid to cardigliano at ntop.org
Please try changing the lines below in /etc/n2disk/n2disk-ens3.conf

--max-file-len=500
--buffer-len=2000

alright