# Speading "2 PERIODIC" over time

**URL:** <https://forum.genieacs.com/t/speading-2-periodic-over-time/4991>\
**Category:** Uncategorized\
**Created:** [January 10, 2024, 1:55pm UTC](https://forum.genieacs.com/t/speading-2-periodic-over-time/4991 "2024-01-10T13:55:01Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![vang1804](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/vang1804/32/1003_2.png) [@vang1804](https://forum.genieacs.com/u/vang1804)\
**Post date:** [January 10, 2024, 1:55pm UTC](https://forum.genieacs.com/t/speading-2-periodic-over-time/4991/1 "2024-01-10T13:55:01Z")

</div>

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!  
Vangelis

---

<div class="post-metadata">

**Author:** ![akcoder](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/akcoder/32/11_2.png) [@akcoder](https://forum.genieacs.com/u/akcoder)\
**Post date:** [January 10, 2024, 5:46pm UTC](https://forum.genieacs.com/t/speading-2-periodic-over-time/4991/2 "2024-01-10T17:46:52Z")

</div>

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

```auto
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});

```

---

<div class="post-metadata">

**Author:** ![vang1804](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/vang1804/32/1003_2.png) [@vang1804](https://forum.genieacs.com/u/vang1804)\
**Post date:** [January 11, 2024, 9:14am UTC](https://forum.genieacs.com/t/speading-2-periodic-over-time/4991/3 "2024-01-11T09:14:12Z")

</div>

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!!

---

<div class="post-metadata">

**Author:** ![akcoder](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/akcoder/32/11_2.png) [@akcoder](https://forum.genieacs.com/u/akcoder)\
**Post date:** [January 11, 2024, 5:56pm UTC](https://forum.genieacs.com/t/speading-2-periodic-over-time/4991/4 "2024-01-11T17:56:35Z")

</div>

> [@vang1804](#):
>
> For example change daily… to hourly?

Yes, edit the variables above.

```auto
// 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](https://pastebin.com/BQutvhNu) for all currently online devices

---

<div class="post-metadata">

**Author:** ![vang1804](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/vang1804/32/1003_2.png) [@vang1804](https://forum.genieacs.com/u/vang1804)\
**Post date:** [January 13, 2024, 9:03pm UTC](https://forum.genieacs.com/t/speading-2-periodic-over-time/4991/5 "2024-01-13T21:03:57Z")

</div>

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 ☹

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

---

<div class="post-metadata">

**Author:** ![simon](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@simon](https://forum.genieacs.com/u/simon)\
**Post date:** [January 16, 2024, 7:03pm UTC](https://forum.genieacs.com/t/speading-2-periodic-over-time/4991/6 "2024-01-16T19:03:54Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![manyendok](https://avatars.discourse-cdn.com/v4/letter/m/a9a28c/32.png) [@manyendok](https://forum.genieacs.com/u/manyendok)\
**Post date:** [October 19, 2024, 11:33am UTC](https://forum.genieacs.com/t/speading-2-periodic-over-time/4991/7 "2024-10-19T11:33:46Z")

</div>

how to solve the problem, i also have the same problem
