Commit graph

51 commits

Author SHA1 Message Date
Alfredo Cardigliano
9352d0cdcd Update copyright 2025-01-02 09:09:56 +01:00
Luca Deri
ab4e49939e Reworked periodic activities 2024-02-17 13:23:20 +01:00
Luca Deri
774e9d4244 Added ability to forxe daily script schedule (debug only) 2024-02-04 10:47:57 +01:00
Luca Deri
55870e97b9 (C) Update 2024-01-12 11:44:18 +01:00
lucaderi
d395deac4e Automated commit of clang-format CI changes. 2023-04-07 14:20:44 +00:00
Luca Deri
f726b867c7 Updated (C) 2023-01-01 16:37:57 +01:00
Luca Deri
fcaa071acb Added delayed scripts that are executed with minimal time drift to avoid all scripts to be executed at the same time and thus cause load spikes 2022-01-03 18:55:18 +01:00
Luca Deri
99425f3416 Reworked periodic activities 2022-01-03 13:34:49 +01:00
Alfredo Cardigliano
f2060f2488 Copyright update (C) 2022-01-03 09:35:09 +01:00
MatteoBiscosi
e92135e776 Reorganized periodic scripts 2021-12-28 15:41:28 +01:00
Simone Mainardi
815ba1fc91 Simplifies ThreadedActivity Lua scripts execution 2021-12-03 14:50:35 +01:00
Luca Deri
d8a1c63f48 Removed reusable VMs 2021-10-20 13:31:33 +02:00
Luca Deri
a1178a0791 Updated (C) 2021-01-02 12:08:23 +01:00
emanuele-f
1c7dabf247 Pass current periodic activity time from C
This prevents possible inconsistencies between the C and lua time
2020-03-05 17:09:40 +01:00
Simone Mainardi
1e82eb073b Adds and enforces periodic activities max duration
Implements #3477
2020-03-02 19:09:54 +01:00
Simone Mainardi
55cdb6c5ea Reworks slow rrd calc for periodic activites 2020-02-25 13:30:10 +01:00
Simone Mainardi
de0f321470 Fix to count dropped RRD points 2020-02-24 19:36:10 +01:00
emanuele-f
53c032f9f6 Add expected start/end time columns 2020-02-21 13:35:17 +01:00
emanuele-f
96299661b3 Implement periodic activities status monitor 2020-02-20 16:59:11 +01:00
Simone Mainardi
133f9e80bb Implements sleeping/queued/running states for threaded activities 2020-02-20 15:48:41 +01:00
Simone Mainardi
1cd375d756 Implements per-activity rrd writes duration 2020-02-19 15:34:29 +01:00
Simone Mainardi
214d9185d4 Implements variable deadlines depending on script periodicities 2020-02-18 19:27:57 +01:00
Simone Mainardi
7f449f8e64 Implements deadline-related ntopng methods 2020-02-18 15:47:28 +01:00
Simone Mainardi
583c34ea02 Fixes race conditions in ThreadPool enqueue/dequeue 2020-02-17 17:49:58 +01:00
Simone Mainardi
95bd9ace07 Implements duration stats for system periodic activities 2020-02-17 14:39:58 +01:00
Simone Mainardi
acffd2ea6f Adds in-progress stats to periodic activities
Attempts to add additional info for #3377
2020-02-13 17:02:51 +01:00
Luca Deri
57e6a93065 Improved scheduling algorithm to guarantee minimum service time when number of entries allow
Updated (C)
2020-01-06 23:36:36 +01:00
emanuele-f
458a773a93 Refactor internal scripts for cleaner code 2019-12-31 16:53:32 +01:00
emanuele-f
c74fa6e908 Implement reusable lua engine
The same Lua vm is now reused. After 5 minutes the vm is destroyed and
reloaded to prevent memory to grow too much. inotify is used to detected
changes in the filesystem (partially implemented, must implement a recursive
watch)

This optimizes periodic scripts calls by a 10x factor.
2019-12-24 18:35:58 +01:00
Simone Mainardi
ff09e5b61f Allows flow lua scripts to be run on pcap dump interfaces 2019-11-21 12:53:25 +01:00
Simone Mainardi
9cb566ed41 Computes lua scripts deadlines in C to prevent missing scheduled activities 2019-11-19 13:02:13 +01:00
emanuele-f
d44dad6f31 Fix shutdown crash in PeriodicActivities
A use-after-free occurred since ThreadedActivity where destroyed while their task was possibly
still running into the ThreadPool thread.
2019-11-06 11:46:22 +01:00
Luca Deri
84bf948f0f Reworked thread handling policy 2019-11-01 12:15:08 +01:00
Luca Deri
aee1b3defb Split threaded activities in high and standard priority tasks 2019-11-01 11:03:56 +01:00
Simone Mainardi
e8277e46ff Reworks view interfaces implementation 2019-10-30 11:47:56 +01:00
Simone Mainardi
dc748b1b6d Implements stats for periodic scripts duration 2019-10-28 17:10:03 +01:00
emanuele-f
e4a67824c1 Migrate slow periodic activity to alerts queue 2019-07-29 18:38:02 +02:00
emanuele-f
8a239f97f4 Trace periodic activities duration and generate an alert for long lasting ones 2019-06-21 11:41:38 +02:00
Luca Deri
bedff2c8e2 Updated (C) 2019-01-07 19:28:49 +01:00
Simone Mainardi
f30e042cfc Implements data cleanup for pcap interfaces
Implements #2092
2018-10-11 18:10:30 +02:00
Luca Deri
4a1c5c5696 Improved ntopng shutdown time/latency 2018-06-13 00:27:38 +02:00
Simone Mainardi
9f3f56999c Reworks shutdown to allow graceful periodic activ term 2018-06-01 12:38:31 +02:00
Simone Mainardi
078a0df62d Adds thread names on OS X 2018-04-13 18:35:09 +02:00
Luca Deri
f0c936c368 Updated (C) to 2018 2018-03-22 21:59:42 +01:00
emanuele-f
8ad7b4ce08 Quotas fixes and improvements
- Fix concurrency issue while resetting quotas
  - Fix quota serialization issues
  - Add missing total stats serialization
  - Add per-pool quotas reset
  - Fix missing string cast on cross application quotas
  - Fix quota reset after midnight when ntopng is restarted
2018-01-05 10:16:50 +01:00
emanuele-f
0288d5f0f4 Fix concurrent periodic scripts logic
The isRunning check is now performed on a per-interface basis
2017-11-29 16:26:14 +01:00
Luca
e1749daa23 Reworked callback scripts to make them concurrent and thus tackle issues related to slow execution on machines with many interfaces 2017-11-23 19:03:46 +01:00
Luca
2e8be3ee97 Added check to avoid race condition on periodic scripts 2017-10-20 08:07:51 +02:00
emanuele-f
ccb4c2cf19 Fix pthread_join on invalid pthread_t 2017-10-19 12:04:24 +02:00
Luca Deri
7f8bddcff1 Implemented thread pool to be used for splitting callback scripts 2017-10-18 22:32:00 +02:00