Speading "2 PERIODIC" over time

Hello everyone!

My GenieACS was down last week for a few hours and after the service was restored, I am facing high CPU usage.

After a little debugging, I found that 80% of the CPEs are sending PERIODICS in the same minute.

root@genieacs:/opt/genieacs/docs# cat /var/log/genieacs/genieacs-cwmp-access.log | grep "2024-01-10T13" | grep PERIODIC | awk '{printf("%s:%s\n",$1,$4)}' |sed 's/\./:/g' | awk -F ":" '{printf("%s:%s\n",$1,$2)}' | sort -h | uniq -c 550 2024-01-10T13:00 50 2024-01-10T13:01 21 2024-01-10T13:02 14 2024-01-10T13:03 22 2024-01-10T13:04 561 2024-01-10T13:05 37 2024-01-10T13:06 19 2024-01-10T13:07 14 2024-01-10T13:08 22 2024-01-10T13:09 561 2024-01-10T13:10 34 2024-01-10T13:11 19 2024-01-10T13:12 14 2024-01-10T13:13 22 2024-01-10T13:14

What is the best way to spread the informs over the time?
I am trying to adjust “PeriodicInformInterval” but I didn’t manage to archive anything.

Thanks in advance!

The default GenieACS inform scripts aims to do just that. Does part of your inform script look like this?

const informInterval = 300;

// Refresh values daily
const daily = Date.now(86400000);

// Unique inform offset per device for better load distribution
const informTime = daily % 86400000;

declare("InternetGatewayDevice.ManagementServer.ConnectionRequestUsername", {value: daily}, {value: username});
declare("InternetGatewayDevice.ManagementServer.ConnectionRequestPassword", {value: daily}, {value: password});
declare("InternetGatewayDevice.ManagementServer.PeriodicInformEnable", {value: daily}, {value: true});
declare("InternetGatewayDevice.ManagementServer.PeriodicInformInterval", {value: daily}, {value: informInterval});
declare("InternetGatewayDevice.ManagementServer.PeriodicInformTime", {value: daily}, {value: informTime});

declare("Device.ManagementServer.ConnectionRequestUsername", {value: daily}, {value: username});
declare("Device.ManagementServer.ConnectionRequestPassword", {value: daily}, {value: password});
declare("Device.ManagementServer.PeriodicInformEnable", {value: daily}, {value: true});
declare("Device.ManagementServer.PeriodicInformInterval", {value: daily}, {value: informInterval});
declare("Device.ManagementServer.PeriodicInformTime", {value: daily}, {value: informTime});

I double checked and I was missing PeriodicInformInterval.
Probably, that was the problem.
I will give it a few hours to update and see what changes…
Is it a way to force it? For example change daily… to hourly?

Many thanks!!

Yes, edit the variables above.

// Sixty seconds/min * sixty mins/hr * 1000 because javascript uses milliseconds
const hourly = Date.now(60 * 60 * 1000); 

See this code to force an ACS inform for all currently online devices

Very nice script! I will keep it for future needs!

It seems that updating “PeriodicInformTime” on my modems (Fritz!box) totally breaks the CPE’s tr069 client. I have lost management of about 200 modems and they come back only by factory reset :frowning:

Probably, this was the reason I deleted it from the default script, but I didn’t remember it.

@vang1804 PeriodicInformTime should not break FRITZ!Box’es…
I have ISP’s using a lot of different Models and non of them have issues.
But maybe you need to set/create → Admin → Config → cwmp.datetimeMilliseconds = false

Additionally some devices do not respect the PeriodicInformTime + Interval after they could not connect to ACS during the specified time and you have to change PeriodicInformTime again in order that the device respects it again.