Out of memory lors d'un scan

Tags: #<Tag:0x00007fcba9f0d120>

Hello,

J’ai récemment ajouté un switch Unifi au controleur, j’ai une 20ene de devices actifs en plus (env. 40 actifs, mais 80 dans l’historique du controleur). Et le scan du plugin ne passe plus :
PHP Fatal error: Allowed memory size of 268435456 bytes exhausted

J’ai vérifié, j’ai la config php memory-limit à -1 (sans limite donc)…
Je fais quoi docteur :smiley:

hello,

désactiver le log je dirais…

Ceux du plugin? ok, j’essaye, mais y’a rien dedans…

Pas mieux…

je sais pas alors… faudrait voir ce qui prend de la mémoire

Je ne sais pas comment on peut le monitorer…
Tiens, je me rends compte que je ne t’ai pas mis le log complet :

[Thu Feb 11 12:04:10.091765 2021] [php7:error] [pid 29006] [client 192.168.1.208:63278] PHP Fatal error:  Allowed memory size of 268435456 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/core/php/utils.inc.php on line 924, referer: http://192.168.x.x/index.php?v=d&m=unifi&p=unifi&id=unifi

ah mais c’est lors de l’ajout… j’ai pas de solution pour ça… le core fait ca quand on lui donne trop de commandes… j’ai vu que Lunarok avait trouvé un contournement pour le faire en différé mais pas encore implémenté

Lors du scan oui. Ok. ben je patiente alors. Merci à toi.

Trop de commande? c-a-d que tu envois un seul ordre de creation de tout les nouveaux devices? y’a pas moyen de le faire un a un si il y en a trop?

Hum… autre truc étrange : deja, j’avais pas vu, mais les equipements lié au switch ainsi que le switch ont bien été créés dans le plugin.
Mais le simple enregistrement de l’équipement du switch (pour cocher la case visible) génère la même erreur…

Mais l’enregistrement se fait quand meme…
Les equipements eux, s’enregistrent instantanément si je les modifie.
Tu fais qqch de particulier à l’enregistrement d’un switch?

Est-ce que le probleme ne viendrais pas du trop grand nombre de commandes de l’equipement du switch? (7 commandes par port, x24… plus celles du switch)

Oui c’est exactement ça, trop de commandes comme je dis plus haut, quand on fait un postSave sur l’équipement, ça crée les commandes de celui-ci… et c’est là que le core s’en sort pas… donc il faut faire une tache pour créer les commandes dans un autre process (c’est ce que fait Lunarok)

Ok, compris. Eh ben heureusement que j’ai pas pris un switch 48 ports! :smiley:
Tiens d’ailleurs, y’a des commandes pour le POE alors que le switch ne l’est pas… Peut-etre serait-il interessant de ne pas creer ces commandes pour les ports ou isPOE = 0 ?

c’est quoi ton modèle ? tu peux m’envoyer le json d’update ?

Avec plaisir.
C’est un US24P250
Tu parles du json de la config?

{"type":"usw","serial":"XXXX","device_id":"602423f64cedfd0010b7e26a","oui":"Unifi","mac":"XXXX","has_fan":true,"has_temperature":true,"model":"US24P250","modelName":"UniFi Switch 24","image":"plugins\/unifi\/core\/config\/usw\/US24P250\/grid@2x.png","ip":"192.168.1.99","version":"5.43.23.12533","createtime":"2021-02-11 00:01:17","sw_port":"","sw_mac":"","ap_mac":"","gw_mac":"","updatetime":"2021-02-11 14:26:46"}

non de la ligne update du log qui contient tout le json de ton switch

Et voila :

{
	"_id": "602423f64cedfd0010b7e26a",
	"ip": "192.168.1.99",
	"mac": "xxxxxxxxxxxxx",
	"model": "US24",
	"model_in_lts": false,
	"model_in_eol": false,
	"type": "usw",
	"version": "5.43.23.12533",
	"adopted": true,
	"site_id": "5793b44ee4b0350f3e02ab9a",
	"x_authkey": "xxxxxxxx",
	"cfgversion": "5aa5cea470ae3be1",
	"syslog_key": "xxxxxxxx",
	"config_network": {
		"type": "dhcp",
		"ip": "192.168.1.99"
	},
	"setup_id": "95f40971-b449-4b4c-80e9-d123b59a0ab0",
	"jumboframe_enabled": false,
	"flowctrl_enabled": false,
	"stp_version": "rstp",
	"stp_priority": "32768",
	"dot1x_portctrl_enabled": false,
	"power_source_ctrl_enabled": false,
	"license_state": "registered",
	"x_ssh_hostkey_fingerprint": "xxxxxxxx",
	"x_aes_gcm": true,
	"x_fingerprint": "xxxxxxxx",
	"inform_url": "http://192.168.1.9:18080/inform",
	"inform_ip": "192.168.1.9",
	"required_version": "4.3.17",
	"kernel_version": "3.6.5",
	"architecture": "armv7l",
	"gateway_mac": "xxxxxxxx",
	"board_rev": 7,
	"manufacturer_id": 4,
	"internet": true,
	"model_incompatible": false,
	"ethernet_table": [
		{
			"mac": "xxxxxxxx",
			"num_port": 26,
			"name": "eth0"
		},
		{
			"mac": "xxxxxxxx",
			"name": "srv0"
		}
	],
	"port_table": [
		{
			"port_idx": 1,
			"media": "GE",
			"port_poe": false,
			"poe_caps": 0,
			"speed_caps": 1048623,
			"op_mode": "switch",
			"portconf_id": "5793b454e4b0350f3e02aba3",
			"anomalies": 0,
			"autoneg": true,
			"dot1x_mode": "unknown",
			"dot1x_status": "disabled",
			"enable": true,
			"flowctrl_rx": false,
			"flowctrl_tx": false,
			"full_duplex": true,
			"is_uplink": true,
			"jumbo": false,
			"rx_broadcast": 111612,
			"rx_bytes": 327352207,
			"rx_dropped": 34460,
			"rx_errors": 0,
			"rx_multicast": 64233,
			"rx_packets": 5027324,
			"satisfaction": 90,
			"satisfaction_reason": 1,
			"speed": 1000,
			"stp_pathcost": 20000,
			"stp_state": "forwarding",
			"tx_broadcast": 2100,
			"tx_bytes": 13336012,
			"tx_dropped": 0,
			"tx_errors": 0,
			"tx_multicast": 36778,
			"tx_packets": 60763,
			"up": true,
			"tx_bytes-r": 230,
			"rx_bytes-r": 3526,
			"bytes-r": 3756,
			"name": "Port 1",
			"masked": false,
			"aggregated_by": false
		},
		{
			"port_idx": 2,
			"media": "GE",
			"port_poe": false,
			"poe_caps": 0,
			"speed_caps": 1048623,
			"op_mode": "switch",
			"portconf_id": "5793b454e4b0350f3e02aba3",
			"anomalies": 0,
			"autoneg": true,
			"dot1x_mode": "unknown",
			"dot1x_status": "disabled",
			"enable": true,
			"flowctrl_rx": false,
			"flowctrl_tx": false,
			"full_duplex": false,
			"is_uplink": false,
			"jumbo": false,
			"rx_broadcast": 0,
			"rx_bytes": 0,
			"rx_dropped": 0,
			"rx_errors": 0,
			"rx_multicast": 0,
			"rx_packets": 0,
			"satisfaction": 100,
			"satisfaction_reason": 0,
			"speed": 0,
			"stp_pathcost": 0,
			"stp_state": "disabled",
			"tx_broadcast": 0,
			"tx_bytes": 0,
			"tx_dropped": 0,
			"tx_errors": 0,
			"tx_multicast": 0,
			"tx_packets": 0,
			"up": false,
			"tx_bytes-r": 0,
			"rx_bytes-r": 0,
			"bytes-r": 0,
			"name": "Port 2",
			"masked": false,
			"aggregated_by": false
		},
		{
			"port_idx": 3,
			"media": "GE",
			"port_poe": false,
			"poe_caps": 0,
			"speed_caps": 1048623,
			"op_mode": "switch",
			"portconf_id": "5793b454e4b0350f3e02aba3",
			"anomalies": 0,
			"autoneg": true,
			"dot1x_mode": "unknown",
			"dot1x_status": "disabled",
			"enable": true,
			"flowctrl_rx": false,
			"flowctrl_tx": false,
			"full_duplex": false,
			"is_uplink": false,
			"jumbo": false,
			"rx_broadcast": 0,
			"rx_bytes": 0,
			"rx_dropped": 0,
			"rx_errors": 0,
			"rx_multicast": 0,
			"rx_packets": 0,
			"satisfaction": 100,
			"satisfaction_reason": 0,
			"speed": 0,
			"stp_pathcost": 0,
			"stp_state": "disabled",
			"tx_broadcast": 0,
			"tx_bytes": 0,
			"tx_dropped": 0,
			"tx_errors": 0,
			"tx_multicast": 0,
			"tx_packets": 0,
			"up": false,
			"tx_bytes-r": 0,
			"rx_bytes-r": 0,
			"bytes-r": 0,
			"name": "Port 3",
			"masked": false,
			"aggregated_by": false
		},
		{
			"port_idx": 4,
			"media": "GE",
			"port_poe": false,
			"poe_caps": 0,
			"speed_caps": 1048623,
			"op_mode": "switch",
			"portconf_id": "5793b454e4b0350f3e02aba3",
			"anomalies": 0,
			"autoneg": true,
			"dot1x_mode": "unknown",
			"dot1x_status": "disabled",
			"enable": true,
			"flowctrl_rx": false,
			"flowctrl_tx": false,
			"full_duplex": false,
			"is_uplink": false,
			"jumbo": false,
			"rx_broadcast": 0,
			"rx_bytes": 0,
			"rx_dropped": 0,
			"rx_errors": 0,
			"rx_multicast": 0,
			"rx_packets": 0,
			"satisfaction": 100,
			"satisfaction_reason": 0,
			"speed": 0,
			"stp_pathcost": 0,
			"stp_state": "disabled",
			"tx_broadcast": 0,
			"tx_bytes": 0,
			"tx_dropped": 0,
			"tx_errors": 0,
			"tx_multicast": 0,
			"tx_packets": 0,
			"up": false,
			"tx_bytes-r": 0,
			"rx_bytes-r": 0,
			"bytes-r": 0,
			"name": "Port 4",
			"masked": false,
			"aggregated_by": false
		},
		{
			"port_idx": 5,
			"media": "GE",
			"port_poe": false,
			"poe_caps": 0,
			"speed_caps": 1048623,
			"op_mode": "switch",
			"portconf_id": "5793b454e4b0350f3e02aba3",
			"anomalies": 0,
			"autoneg": true,
			"dot1x_mode": "unknown",
			"dot1x_status": "disabled",
			"enable": true,
			"flowctrl_rx": false,
			"flowctrl_tx": false,
			"full_duplex": false,
			"is_uplink": false,
			"jumbo": false,
			"rx_broadcast": 0,
			"rx_bytes": 0,
			"rx_dropped": 0,
			"rx_errors": 0,
			"rx_multicast": 0,
			"rx_packets": 0,
			"satisfaction": 100,
			"satisfaction_reason": 0,
			"speed": 0,
			"stp_pathcost": 0,
			"stp_state": "disabled",
			"tx_broadcast": 0,
			"tx_bytes": 0,
			"tx_dropped": 0,
			"tx_errors": 0,
			"tx_multicast": 0,
			"tx_packets": 0,
			"up": false,
			"tx_bytes-r": 0,
			"rx_bytes-r": 0,
			"bytes-r": 0,
			"name": "Port 5",
			"masked": false,
			"aggregated_by": false
		},
		{
			"port_idx": 6,
			"media": "GE",
			"port_poe": false,
			"poe_caps": 0,
			"speed_caps": 1048623,
			"op_mode": "switch",
			"portconf_id": "5793b454e4b0350f3e02aba3",
			"anomalies": 0,
			"autoneg": true,
			"dot1x_mode": "unknown",
			"dot1x_status": "disabled",
			"enable": true,
			"flowctrl_rx": false,
			"flowctrl_tx": false,
			"full_duplex": false,
			"is_uplink": false,
			"jumbo": false,
			"rx_broadcast": 0,
			"rx_bytes": 0,
			"rx_dropped": 0,
			"rx_errors": 0,
			"rx_multicast": 0,
			"rx_packets": 0,
			"satisfaction": 100,
			"satisfaction_reason": 0,
			"speed": 0,
			"stp_pathcost": 0,
			"stp_state": "disabled",
			"tx_broadcast": 0,
			"tx_bytes": 0,
			"tx_dropped": 0,
			"tx_errors": 0,
			"tx_multicast": 0,
			"tx_packets": 0,
			"up": false,
			"tx_bytes-r": 0,
			"rx_bytes-r": 0,
			"bytes-r": 0,
			"name": "Port 6",
			"masked": false,
			"aggregated_by": false
		},
		{
			"port_idx": 7,
			"media": "GE",
			"port_poe": false,
			"poe_caps": 0,
			"speed_caps": 1048623,
			"op_mode": "switch",
			"portconf_id": "5793b454e4b0350f3e02aba3",
			"anomalies": 0,
			"autoneg": true,
			"dot1x_mode": "unknown",
			"dot1x_status": "disabled",
			"enable": true,
			"flowctrl_rx": false,
			"flowctrl_tx": false,
			"full_duplex": false,
			"is_uplink": false,
			"jumbo": false,
			"rx_broadcast": 0,
			"rx_bytes": 0,
			"rx_dropped": 0,
			"rx_errors": 0,
			"rx_multicast": 0,
			"rx_packets": 0,
			"satisfaction": 100,
			"satisfaction_reason": 0,
			"speed": 0,
			"stp_pathcost": 0,
			"stp_state": "disabled",
			"tx_broadcast": 0,
			"tx_bytes": 0,
			"tx_dropped": 0,
			"tx_errors": 0,
			"tx_multicast": 0,
			"tx_packets": 0,
			"up": false,
			"tx_bytes-r": 0,
			"rx_bytes-r": 0,
			"bytes-r": 0,
			"name": "Port 7",
			"masked": false,
			"aggregated_by": false
		},
		{
			"port_idx": 8,
			"media": "GE",
			"port_poe": false,
			"poe_caps": 0,
			"speed_caps": 1048623,
			"op_mode": "switch",
			"portconf_id": "5793b454e4b0350f3e02aba3",
			"anomalies": 0,
			"autoneg": true,
			"dot1x_mode": "unknown",
			"dot1x_status": "disabled",
			"enable": true,
			"flowctrl_rx": false,
			"flowctrl_tx": false,
			"full_duplex": false,
			"is_uplink": false,
			"jumbo": false,
			"rx_broadcast": 0,
			"rx_bytes": 0,
			"rx_dropped": 0,
			"rx_errors": 0,
			"rx_multicast": 0,
			"rx_packets": 0,
			"satisfaction": 100,
			"satisfaction_reason": 0,
			"speed": 0,
			"stp_pathcost": 0,
			"stp_state": "disabled",
			"tx_broadcast": 0,
			"tx_bytes": 0,
			"tx_dropped": 0,
			"tx_errors": 0,
			"tx_multicast": 0,
			"tx_packets": 0,
			"up": false,
			"tx_bytes-r": 0,
			"rx_bytes-r": 0,
			"bytes-r": 0,
			"name": "Port 8",
			"masked": false,
			"aggregated_by": false
		},
		{
			"port_idx": 9,
			"media": "GE",
			"port_poe": false,
			"poe_caps": 0,
			"speed_caps": 1048623,
			"op_mode": "switch",
			"portconf_id": "5793b454e4b0350f3e02aba3",
			"anomalies": 0,
			"autoneg": true,
			"dot1x_mode": "unknown",
			"dot1x_status": "disabled",
			"enable": true,
			"flowctrl_rx": false,
			"flowctrl_tx": false,
			"full_duplex": false,
			"is_uplink": false,
			"jumbo": false,
			"rx_broadcast": 0,
			"rx_bytes": 0,
			"rx_dropped": 0,
			"rx_errors": 0,
			"rx_multicast": 0,
			"rx_packets": 0,
			"satisfaction": 100,
			"satisfaction_reason": 0,
			"speed": 0,
			"stp_pathcost": 0,
			"stp_state": "disabled",
			"tx_broadcast": 0,
			"tx_bytes": 0,
			"tx_dropped": 0,
			"tx_errors": 0,
			"tx_multicast": 0,
			"tx_packets": 0,
			"up": false,
			"tx_bytes-r": 0,
			"rx_bytes-r": 0,
			"bytes-r": 0,
			"name": "Port 9",
			"masked": false,
			"aggregated_by": false
		},
		{
			"port_idx": 10,
			"media": "GE",
			"port_poe": false,
			"poe_caps": 0,
			"speed_caps": 1048623,
			"op_mode": "switch",
			"portconf_id": "5793b454e4b0350f3e02aba3",
			"anomalies": 0,
			"autoneg": true,
			"dot1x_mode": "unknown",
			"dot1x_status": "disabled",
			"enable": true,
			"flowctrl_rx": false,
			"flowctrl_tx": false,
			"full_duplex": false,
			"is_uplink": false,
			"jumbo": false,
			"rx_broadcast": 0,
			"rx_bytes": 0,
			"rx_dropped": 0,
			"rx_errors": 0,
			"rx_multicast": 0,
			"rx_packets": 0,
			"satisfaction": 100,
			"satisfaction_reason": 0,
			"speed": 0,
			"stp_pathcost": 0,
			"stp_state": "disabled",
			"tx_broadcast": 0,
			"tx_bytes": 0,
			"tx_dropped": 0,
			"tx_errors": 0,
			"tx_multicast": 0,
			"tx_packets": 0,
			"up": false,
			"tx_bytes-r": 0,
			"rx_bytes-r": 0,
			"bytes-r": 0,
			"name": "Port 10",
			"masked": false,
			"aggregated_by": false
		},
		{
			"port_idx": 11,
			"media": "GE",
			"port_poe": false,
			"poe_caps": 0,
			"speed_caps": 1048623,
			"op_mode": "switch",
			"portconf_id": "5793b454e4b0350f3e02aba3",
			"anomalies": 0,
			"autoneg": true,
			"dot1x_mode": "unknown",
			"dot1x_status": "disabled",
			"enable": true,
			"flowctrl_rx": false,
			"flowctrl_tx": false,
			"full_duplex": false,
			"is_uplink": false,
			"jumbo": false,
			"rx_broadcast": 0,
			"rx_bytes": 0,
			"rx_dropped": 0,
			"rx_errors": 0,
			"rx_multicast": 0,
			"rx_packets": 0,
			"satisfaction": 100,
			"satisfaction_reason": 0,
			"speed": 0,
			"stp_pathcost": 0,
			"stp_state": "disabled",
			"tx_broadcast": 0,
			"tx_bytes": 0,
			"tx_dropped": 0,
			"tx_errors": 0,
			"tx_multicast": 0,
			"tx_packets": 0,
			"up": false,
			"tx_bytes-r": 0,
			"rx_bytes-r": 0,
			"bytes-r": 0,
			"name": "Port 11",
			"masked": false,
			"aggregated_by": false
		},
		{
			"port_idx": 12,
			"media": "GE",
			"port_poe": false,
			"poe_caps": 0,
			"speed_caps": 1048623,
			"op_mode": "switch",
			"portconf_id": "5793b454e4b0350f3e02aba3",
			"anomalies": 0,
			"autoneg": true,
			"dot1x_mode": "unknown",
			"dot1x_status": "disabled",
			"enable": true,
			"flowctrl_rx": false,
			"flowctrl_tx": false,
			"full_duplex": false,
			"is_uplink": false,
			"jumbo": false,
			"rx_broadcast": 0,
			"rx_bytes": 0,
			"rx_dropped": 0,
			"rx_errors": 0,
			"rx_multicast": 0,
			"rx_packets": 0,
			"satisfaction": 100,
			"satisfaction_reason": 0,
			"speed": 0,
			"stp_pathcost": 0,
			"stp_state": "disabled",
			"tx_broadcast": 0,
			"tx_bytes": 0,
			"tx_dropped": 0,
			"tx_errors": 0,
			"tx_multicast": 0,
			"tx_packets": 0,
			"up": false,
			"tx_bytes-r": 0,
			"rx_bytes-r": 0,
			"bytes-r": 0,
			"name": "Port 12",
			"masked": false,
			"aggregated_by": false
		},
		{
			"port_idx": 13,
			"media": "GE",
			"port_poe": false,
			"poe_caps": 0,
			"speed_caps": 1048623,
			"op_mode": "switch",
			"portconf_id": "5793b454e4b0350f3e02aba3",
			"anomalies": 0,
			"autoneg": true,
			"dot1x_mode": "unknown",
			"dot1x_status": "disabled",
			"enable": true,
			"flowctrl_rx": false,
			"flowctrl_tx": false,
			"full_duplex": false,
			"is_uplink": false,
			"jumbo": false,
			"rx_broadcast": 0,
			"rx_bytes": 0,
			"rx_dropped": 0,
			"rx_errors": 0,
			"rx_multicast": 0,
			"rx_packets": 0,
			"satisfaction": 100,
			"satisfaction_reason": 0,
			"speed": 0,
			"stp_pathcost": 0,
			"stp_state": "disabled",
			"tx_broadcast": 0,
			"tx_bytes": 0,
			"tx_dropped": 0,
			"tx_errors": 0,
			"tx_multicast": 0,
			"tx_packets": 0,
			"up": false,
			"tx_bytes-r": 0,
			"rx_bytes-r": 0,
			"bytes-r": 0,
			"name": "Port 13",
			"masked": false,
			"aggregated_by": false
		},
		{
			"port_idx": 14,
			"media": "GE",
			"port_poe": false,
			"poe_caps": 0,
			"speed_caps": 1048623,
			"op_mode": "switch",
			"portconf_id": "5793b454e4b0350f3e02aba3",
			"anomalies": 0,
			"autoneg": true,
			"dot1x_mode": "unknown",
			"dot1x_status": "disabled",
			"enable": true,
			"flowctrl_rx": false,
			"flowctrl_tx": false,
			"full_duplex": false,
			"is_uplink": false,
			"jumbo": false,
			"rx_broadcast": 0,
			"rx_bytes": 0,
			"rx_dropped": 0,
			"rx_errors": 0,
			"rx_multicast": 0,
			"rx_packets": 0,
			"satisfaction": 100,
			"satisfaction_reason": 0,
			"speed": 0,
			"stp_pathcost": 0,
			"stp_state": "disabled",
			"tx_broadcast": 0,
			"tx_bytes": 0,
			"tx_dropped": 0,
			"tx_errors": 0,
			"tx_multicast": 0,
			"tx_packets": 0,
			"up": false,
			"tx_bytes-r": 0,
			"rx_bytes-r": 0,
			"bytes-r": 0,
			"name": "Port 14",
			"masked": false,
			"aggregated_by": false
		},
		{
			"port_idx": 15,
			"media": "GE",
			"port_poe": false,
			"poe_caps": 0,
			"speed_caps": 1048623,
			"op_mode": "switch",
			"portconf_id": "5793b454e4b0350f3e02aba3",
			"anomalies": 0,
			"autoneg": true,
			"dot1x_mode": "unknown",
			"dot1x_status": "disabled",
			"enable": true,
			"flowctrl_rx": false,
			"flowctrl_tx": false,
			"full_duplex": false,
			"is_uplink": false,
			"jumbo": false,
			"rx_broadcast": 0,
			"rx_bytes": 0,
			"rx_dropped": 0,
			"rx_errors": 0,
			"rx_multicast": 0,
			"rx_packets": 0,
			"satisfaction": 100,
			"satisfaction_reason": 0,
			"speed": 0,
			"stp_pathcost": 0,
			"stp_state": "disabled",
			"tx_broadcast": 0,
			"tx_bytes": 0,
			"tx_dropped": 0,
			"tx_errors": 0,
			"tx_multicast": 0,
			"tx_packets": 0,
			"up": false,
			"tx_bytes-r": 0,
			"rx_bytes-r": 0,
			"bytes-r": 0,
			"name": "Port 15",
			"masked": false,
			"aggregated_by": false
		},
		{
			"port_idx": 16,
			"media": "GE",
			"port_poe": false,
			"poe_caps": 0,
			"speed_caps": 1048623,
			"op_mode": "switch",
			"portconf_id": "5793b454e4b0350f3e02aba3",
			"anomalies": 0,
			"autoneg": true,
			"dot1x_mode": "unknown",
			"dot1x_status": "disabled",
			"enable": true,
			"flowctrl_rx": false,
			"flowctrl_tx": false,
			"full_duplex": false,
			"is_uplink": false,
			"jumbo": false,
			"rx_broadcast": 0,
			"rx_bytes": 0,
			"rx_dropped": 0,
			"rx_errors": 0,
			"rx_multicast": 0,
			"rx_packets": 0,
			"satisfaction": 100,
			"satisfaction_reason": 0,
			"speed": 0,
			"stp_pathcost": 0,
			"stp_state": "disabled",
			"tx_broadcast": 0,
			"tx_bytes": 0,
			"tx_dropped": 0,
			"tx_errors": 0,
			"tx_multicast": 0,
			"tx_packets": 0,
			"up": false,
			"tx_bytes-r": 0,
			"rx_bytes-r": 0,
			"bytes-r": 0,
			"name": "Port 16",
			"masked": false,
			"aggregated_by": false
		},
		{
			"port_idx": 17,
			"media": "GE",
			"port_poe": false,
			"poe_caps": 0,
			"speed_caps": 1048623,
			"op_mode": "switch",
			"portconf_id": "5793b454e4b0350f3e02aba3",
			"anomalies": 0,
			"autoneg": true,
			"dot1x_mode": "unknown",
			"dot1x_status": "disabled",
			"enable": true,
			"flowctrl_rx": false,
			"flowctrl_tx": false,
			"full_duplex": false,
			"is_uplink": false,
			"jumbo": false,
			"rx_broadcast": 0,
			"rx_bytes": 0,
			"rx_dropped": 0,
			"rx_errors": 0,
			"rx_multicast": 0,
			"rx_packets": 0,
			"satisfaction": 100,
			"satisfaction_reason": 0,
			"speed": 0,
			"stp_pathcost": 0,
			"stp_state": "disabled",
			"tx_broadcast": 0,
			"tx_bytes": 0,
			"tx_dropped": 0,
			"tx_errors": 0,
			"tx_multicast": 0,
			"tx_packets": 0,
			"up": false,
			"tx_bytes-r": 0,
			"rx_bytes-r": 0,
			"bytes-r": 0,
			"name": "Port 17",
			"masked": false,
			"aggregated_by": false
		},
		{
			"port_idx": 18,
			"media": "GE",
			"port_poe": false,
			"poe_caps": 0,
			"speed_caps": 1048623,
			"op_mode": "switch",
			"portconf_id": "5793b454e4b0350f3e02aba3",
			"anomalies": 0,
			"autoneg": true,
			"dot1x_mode": "unknown",
			"dot1x_status": "disabled",
			"enable": true,
			"flowctrl_rx": false,
			"flowctrl_tx": false,
			"full_duplex": false,
			"is_uplink": false,
			"jumbo": false,
			"rx_broadcast": 0,
			"rx_bytes": 0,
			"rx_dropped": 0,
			"rx_errors": 0,
			"rx_multicast": 0,
			"rx_packets": 0,
			"satisfaction": 100,
			"satisfaction_reason": 0,
			"speed": 0,
			"stp_pathcost": 0,
			"stp_state": "disabled",
			"tx_broadcast": 0,
			"tx_bytes": 0,
			"tx_dropped": 0,
			"tx_errors": 0,
			"tx_multicast": 0,
			"tx_packets": 0,
			"up": false,
			"tx_bytes-r": 0,
			"rx_bytes-r": 0,
			"bytes-r": 0,
			"name": "Port 18",
			"masked": false,
			"aggregated_by": false
		},
		{
			"port_idx": 19,
			"media": "GE",
			"port_poe": false,
			"poe_caps": 0,
			"speed_caps": 1048623,
			"op_mode": "switch",
			"portconf_id": "5793b454e4b0350f3e02aba3",
			"anomalies": 0,
			"autoneg": true,
			"dot1x_mode": "unknown",
			"dot1x_status": "disabled",
			"enable": true,
			"flowctrl_rx": false,
			"flowctrl_tx": false,
			"full_duplex": false,
			"is_uplink": false,
			"jumbo": false,
			"rx_broadcast": 0,
			"rx_bytes": 0,
			"rx_dropped": 0,
			"rx_errors": 0,
			"rx_multicast": 0,
			"rx_packets": 0,
			"satisfaction": 100,
			"satisfaction_reason": 0,
			"speed": 0,
			"stp_pathcost": 0,
			"stp_state": "disabled",
			"tx_broadcast": 0,
			"tx_bytes": 0,
			"tx_dropped": 0,
			"tx_errors": 0,
			"tx_multicast": 0,
			"tx_packets": 0,
			"up": false,
			"tx_bytes-r": 0,
			"rx_bytes-r": 0,
			"bytes-r": 0,
			"name": "Port 19",
			"masked": false,
			"aggregated_by": false
		},
		{
			"port_idx": 20,
			"media": "GE",
			"port_poe": false,
			"poe_caps": 0,
			"speed_caps": 1048623,
			"op_mode": "switch",
			"portconf_id": "5793b454e4b0350f3e02aba3",
			"anomalies": 0,
			"autoneg": true,
			"dot1x_mode": "unknown",
			"dot1x_status": "disabled",
			"enable": true,
			"flowctrl_rx": false,
			"flowctrl_tx": false,
			"full_duplex": false,
			"is_uplink": false,
			"jumbo": false,
			"rx_broadcast": 0,
			"rx_bytes": 0,
			"rx_dropped": 0,
			"rx_errors": 0,
			"rx_multicast": 0,
			"rx_packets": 0,
			"satisfaction": 100,
			"satisfaction_reason": 0,
			"speed": 0,
			"stp_pathcost": 0,
			"stp_state": "disabled",
			"tx_broadcast": 0,
			"tx_bytes": 0,
			"tx_dropped": 0,
			"tx_errors": 0,
			"tx_multicast": 0,
			"tx_packets": 0,
			"up": false,
			"tx_bytes-r": 0,
			"rx_bytes-r": 0,
			"bytes-r": 0,
			"name": "Port 20",
			"masked": false,
			"aggregated_by": false
		},
		{
			"port_idx": 21,
			"media": "GE",
			"port_poe": false,
			"poe_caps": 0,
			"speed_caps": 1048623,
			"op_mode": "switch",
			"portconf_id": "5793b454e4b0350f3e02aba3",
			"anomalies": 0,
			"autoneg": true,
			"dot1x_mode": "unknown",
			"dot1x_status": "disabled",
			"enable": true,
			"flowctrl_rx": false,
			"flowctrl_tx": false,
			"full_duplex": false,
			"is_uplink": false,
			"jumbo": false,
			"rx_broadcast": 0,
			"rx_bytes": 0,
			"rx_dropped": 0,
			"rx_errors": 0,
			"rx_multicast": 0,
			"rx_packets": 0,
			"satisfaction": 100,
			"satisfaction_reason": 0,
			"speed": 0,
			"stp_pathcost": 0,
			"stp_state": "disabled",
			"tx_broadcast": 0,
			"tx_bytes": 0,
			"tx_dropped": 0,
			"tx_errors": 0,
			"tx_multicast": 0,
			"tx_packets": 0,
			"up": false,
			"tx_bytes-r": 0,
			"rx_bytes-r": 0,
			"bytes-r": 0,
			"name": "Port 21",
			"masked": false,
			"aggregated_by": false
		},
		{
			"port_idx": 22,
			"media": "GE",
			"port_poe": false,
			"poe_caps": 0,
			"speed_caps": 1048623,
			"op_mode": "switch",
			"portconf_id": "5793b454e4b0350f3e02aba3",
			"anomalies": 0,
			"autoneg": true,
			"dot1x_mode": "unknown",
			"dot1x_status": "disabled",
			"enable": true,
			"flowctrl_rx": false,
			"flowctrl_tx": false,
			"full_duplex": false,
			"is_uplink": false,
			"jumbo": false,
			"rx_broadcast": 0,
			"rx_bytes": 0,
			"rx_dropped": 0,
			"rx_errors": 0,
			"rx_multicast": 0,
			"rx_packets": 0,
			"satisfaction": 100,
			"satisfaction_reason": 0,
			"speed": 0,
			"stp_pathcost": 0,
			"stp_state": "disabled",
			"tx_broadcast": 0,
			"tx_bytes": 0,
			"tx_dropped": 0,
			"tx_errors": 0,
			"tx_multicast": 0,
			"tx_packets": 0,
			"up": false,
			"tx_bytes-r": 0,
			"rx_bytes-r": 0,
			"bytes-r": 0,
			"name": "Port 22",
			"masked": false,
			"aggregated_by": false
		},
		{
			"port_idx": 23,
			"media": "GE",
			"port_poe": false,
			"poe_caps": 0,
			"speed_caps": 1048623,
			"op_mode": "switch",
			"portconf_id": "5793b454e4b0350f3e02aba3",
			"anomalies": 0,
			"autoneg": true,
			"dot1x_mode": "unknown",
			"dot1x_status": "disabled",
			"enable": true,
			"flowctrl_rx": false,
			"flowctrl_tx": false,
			"full_duplex": false,
			"is_uplink": false,
			"jumbo": false,
			"rx_broadcast": 0,
			"rx_bytes": 0,
			"rx_dropped": 0,
			"rx_errors": 0,
			"rx_multicast": 0,
			"rx_packets": 0,
			"satisfaction": 100,
			"satisfaction_reason": 0,
			"speed": 0,
			"stp_pathcost": 0,
			"stp_state": "disabled",
			"tx_broadcast": 0,
			"tx_bytes": 0,
			"tx_dropped": 0,
			"tx_errors": 0,
			"tx_multicast": 0,
			"tx_packets": 0,
			"up": false,
			"tx_bytes-r": 0,
			"rx_bytes-r": 0,
			"bytes-r": 0,
			"name": "Port 23",
			"masked": false,
			"aggregated_by": false
		},
		{
			"port_idx": 24,
			"media": "GE",
			"port_poe": false,
			"poe_caps": 0,
			"speed_caps": 1048623,
			"op_mode": "switch",
			"portconf_id": "5793b454e4b0350f3e02aba3",
			"anomalies": 0,
			"autoneg": true,
			"dot1x_mode": "unknown",
			"dot1x_status": "disabled",
			"enable": true,
			"flowctrl_rx": false,
			"flowctrl_tx": false,
			"full_duplex": false,
			"is_uplink": false,
			"jumbo": false,
			"rx_broadcast": 0,
			"rx_bytes": 0,
			"rx_dropped": 0,
			"rx_errors": 0,
			"rx_multicast": 0,
			"rx_packets": 0,
			"satisfaction": 100,
			"satisfaction_reason": 0,
			"speed": 0,
			"stp_pathcost": 0,
			"stp_state": "disabled",
			"tx_broadcast": 0,
			"tx_bytes": 0,
			"tx_dropped": 0,
			"tx_errors": 0,
			"tx_multicast": 0,
			"tx_packets": 0,
			"up": false,
			"tx_bytes-r": 0,
			"rx_bytes-r": 0,
			"bytes-r": 0,
			"name": "Port 24",
			"masked": false,
			"aggregated_by": false
		},
		{
			"port_idx": 25,
			"media": "SFP",
			"port_poe": false,
			"poe_caps": 0,
			"speed_caps": 1048608,
			"op_mode": "switch",
			"portconf_id": "5793b454e4b0350f3e02aba3",
			"anomalies": 0,
			"autoneg": true,
			"dot1x_mode": "unknown",
			"dot1x_status": "disabled",
			"enable": true,
			"flowctrl_rx": false,
			"flowctrl_tx": false,
			"full_duplex": false,
			"is_uplink": false,
			"jumbo": false,
			"rx_broadcast": 0,
			"rx_bytes": 0,
			"rx_dropped": 0,
			"rx_errors": 0,
			"rx_multicast": 0,
			"rx_packets": 0,
			"satisfaction": 100,
			"satisfaction_reason": 0,
			"sfp_found": false,
			"speed": 0,
			"stp_pathcost": 0,
			"stp_state": "disabled",
			"tx_broadcast": 0,
			"tx_bytes": 0,
			"tx_dropped": 0,
			"tx_errors": 0,
			"tx_multicast": 0,
			"tx_packets": 0,
			"up": false,
			"tx_bytes-r": 0,
			"rx_bytes-r": 0,
			"bytes-r": 0,
			"name": "SFP 1",
			"masked": false,
			"aggregated_by": false
		},
		{
			"port_idx": 26,
			"media": "SFP",
			"port_poe": false,
			"poe_caps": 0,
			"speed_caps": 1048608,
			"op_mode": "switch",
			"portconf_id": "5793b454e4b0350f3e02aba3",
			"anomalies": 0,
			"autoneg": true,
			"dot1x_mode": "unknown",
			"dot1x_status": "disabled",
			"enable": true,
			"flowctrl_rx": false,
			"flowctrl_tx": false,
			"full_duplex": false,
			"is_uplink": false,
			"jumbo": false,
			"rx_broadcast": 0,
			"rx_bytes": 0,
			"rx_dropped": 0,
			"rx_errors": 0,
			"rx_multicast": 0,
			"rx_packets": 0,
			"satisfaction": 100,
			"satisfaction_reason": 0,
			"sfp_found": false,
			"speed": 0,
			"stp_pathcost": 0,
			"stp_state": "disabled",
			"tx_broadcast": 0,
			"tx_bytes": 0,
			"tx_dropped": 0,
			"tx_errors": 0,
			"tx_multicast": 0,
			"tx_packets": 0,
			"up": false,
			"tx_bytes-r": 0,
			"rx_bytes-r": 0,
			"bytes-r": 0,
			"name": "SFP 2",
			"masked": false,
			"aggregated_by": false
		}
	],
	"switch_caps": {
		"feature_caps": 1022,
		"max_mirror_sessions": 1,
		"max_aggregate_sessions": 6,
		"max_l3_intf": 0,
		"max_reserved_routes": 0,
		"max_static_routes": 0
	},
	"has_fan": true,
	"has_temperature": true,
	"hw_caps": 0,
	"fw_caps": 55238181,
	"satisfaction": 97,
	"anomalies": -1,
	"sys_error_caps": 0,
	"connected_at": 1612982017,
	"provisioned_at": 1612986857,
	"device_id": "602423f64cedfd0010b7e26a",
	"state": 1,
	"start_disconnected_millis": 1612982348763,
	"unsupported": false,
	"unsupported_reason": 0,
	"two_phase_adopt": false,
	"last_seen": 1613051331,
	"serial": "xxxxxxxx",
	"hash_id": "60bc74ba00236c03",
	"anon_id": "dc967cd8-2aa7-4216-80bc-74ba00236c03",
	"known_cfgversion": "5aa5cea470ae3be1",
	"start_connected_millis": 1612982348862,
	"x_inform_authkey": "xxxxxxxx",
	"upgradable": false,
	"adoptable_when_upgraded": false,
	"rollupgrade": false,
	"prev_non_busy_state": 5,
	"uptime": 69041,
	"_uptime": 69041,
	"locating": false,
	"connect_request_ip": "172.17.0.1",
	"connect_request_port": "59176",
	"sys_stats": {
		"loadavg_1": "1.75",
		"loadavg_15": "1.68",
		"loadavg_5": "1.69",
		"mem_buffer": 0,
		"mem_total": 262397952,
		"mem_used": 131661824
	},
	"system-stats": {
		"cpu": "58.0",
		"mem": "30.7",
		"uptime": "69041"
	},
	"ssh_session_table": [],
	"fan_level": 0,
	"general_temperature": 63,
	"overheating": false,
	"total_max_power": 0,
	"downlink_table": [],
	"uplink": {
		"full_duplex": true,
		"ip": "192.168.1.99",
		"mac": "xxxxxxxx",
		"name": "eth0",
		"netmask": "255.255.255.0",
		"num_port": 26,
		"rx_bytes": 327352207,
		"rx_dropped": 34460,
		"rx_errors": 0,
		"rx_multicast": 0,
		"rx_packets": 5027324,
		"speed": 1000,
		"tx_bytes": 13336012,
		"tx_dropped": 0,
		"tx_errors": 0,
		"tx_packets": 60763,
		"up": true,
		"port_idx": 1,
		"media": "GE",
		"max_speed": 1000,
		"type": "wire",
		"tx_bytes-r": 230,
		"rx_bytes-r": 3526
	},
	"dhcp_server_table": [],
	"uplink_depth": 1,
	"led_override": "default",
	"led_override_color": "#0000ff",
	"led_override_color_brightness": 100,
	"outdoor_mode_override": "default",
	"lcm_brightness_override": false,
	"lcm_idle_timeout_override": false,
	"name": "Switch",
	"next_interval": 30,
	"next_heartbeat_at": 1613051371,
	"considered_lost_at": 1613051451,
	"stat": {
		"sw": {
			"site_id": "5793b44ee4b0350f3e02ab9a",
			"o": "sw",
			"oid": "xxxxxxxx",
			"sw": "xxxxxxxx",
			"time": 1612981800000,
			"datetime": "2021-02-10T18:30:00Z",
			"rx_packets": 5027299,
			"rx_bytes": 327349049,
			"rx_errors": 0,
			"rx_dropped": 34457,
			"rx_crypts": 0,
			"rx_frags": 0,
			"tx_packets": 60748,
			"tx_bytes": 13334106,
			"tx_errors": 0,
			"tx_dropped": 0,
			"tx_retries": 0,
			"rx_multicast": 64227,
			"rx_broadcast": 111602,
			"tx_multicast": 36771,
			"tx_broadcast": 2094,
			"bytes": 340683155,
			"duration": 69271000,
			"port_1-rx_packets": 5027299,
			"port_1-rx_bytes": 327349049,
			"port_1-rx_dropped": 34457,
			"port_1-tx_packets": 60748,
			"port_1-tx_bytes": 13334106,
			"port_1-rx_multicast": 64227,
			"port_1-rx_broadcast": 111602,
			"port_1-tx_multicast": 36771,
			"port_1-tx_broadcast": 2094
		}
	},
	"tx_bytes": 327352207,
	"rx_bytes": 13336012,
	"bytes": 340688219,
	"num_sta": 16,
	"user-num_sta": 16,
	"guest-num_sta": 0,
	"x_has_ssh_hostkey": true
}

je viens de publier une mise à jour en beta :

  1. création des commandes décallées de 90secondes dans un CRON pour éviter les problèmes php mémoire
  2. création conditionnelle des commandes POE si le port est POE uniquement.

Testé, et ca semble fonctionner nickel. Enregistrement rapide, et ca s’applique bien par la suite. Merci à toi.
Bon, comme j’ai deja les commandes POE que tu ne créé plus, je vais les supprimer à la main.
Tu peux juste me dire celles que tu ne créé plus stp?
MErci