Laravel Save ssh Connection to use it again

180 Views Asked by At

I am working on a system that setup ssh connection remotely to another server, to get resources usage info like (CPU, ram, disk ), I am able to get these detail through an ssh connection, but my problem is I want to get CPU usage every 5 sec, to show it on my system, but every request the system creates a new connection to the server, are there any ways to save my connection so I can use that connection again in the other requests, I am using the collective package to ssh in my server

1

There are 1 best solutions below

1
Mouhssine Soumairi On

take a look at this Laravel Envoy package