Ami script issue

Hi everyone!

I am using AMI script to show the realtime data from core show channels. But it increases the server load and httpd requests.
And there are multiple ports opened when executing this command.
netstat -lna | grep 5038

and also creating multiple log files like full.1,full2

Thank you in advance.
With regards, Sophia.

Hello Sophia,

I dont see a question …

Using AMI over http is going to be expensive.

You only need 5038 open if not using HTTP.

You control the logging level.

Polling for information is always going to be expensive. You may be better off monitoring events can creating your own model of channel states.

I am using 5038 port

but its showing infinite connection like

tcp 0 0 127.0.0.1:5038 127.0.0.1:57904 TIME_WAIT
tcp 0 0 127.0.0.1:5038 127.0.0.1:53642 TIME_WAIT
tcp 0 0 127.0.0.1:5038 127.0.0.1:60616 TIME_WAIT
tcp 0 0 127.0.0.1:5038 127.0.0.1:35822 TIME_WAIT
tcp 0 0 127.0.0.1:5038 127.0.0.1:56654 TIME_WAIT
tcp 0 0 127.0.0.1:5038 127.0.0.1:36896 TIME_WAIT
tcp 0 0 127.0.0.1:5038 127.0.0.1:43426 TIME_WAIT
tcp 0 0 127.0.0.1:5038 127.0.0.1:60406 TIME_WAIT
tcp 0 0 127.0.0.1:5038 127.0.0.1:50674 TIME_WAIT
tcp 0 0 127.0.0.1:5038 127.0.0.1:56390 TIME_WAIT
tcp 0 0 127.0.0.1:5038 127.0.0.1:59964 TIME_WAIT
tcp 0 0 127.0.0.1:5038 127.0.0.1:48952 TIME_WAIT
tcp 0 0 127.0.0.1:5038 127.0.0.1:45330 TIME_WAIT
tcp 0 0 127.0.0.1:5038 127.0.0.1:48818 TIME_WAIT
tcp 0 0 127.0.0.1:5038 127.0.0.1:55450 TIME_WAIT
tcp 0 0 127.0.0.1:5038 127.0.0.1:39896 TIME_WAIT
tcp 0 0 127.0.0.1:5038 127.0.0.1:36846 TIME_WAIT
tcp 0 0 127.0.0.1:5038 127.0.0.1:44472 TIME_WAIT
tcp 0 0 127.0.0.1:5038 127.0.0.1:59676 TIME_WAIT
tcp 0 0 127.0.0.1:5038 127.0.0.1:43832 TIME_WAIT
tcp 0 0 127.0.0.1:5038 127.0.0.1:38604 TIME_WAIT
tcp 0 0 127.0.0.1:5038 127.0.0.1:40574 TIME_WAIT
tcp 0 0 127.0.0.1:5038 127.0.0.1:33876 TIME_WAIT
tcp 0 0 127.0.0.1:5038 127.0.0.1:55602 TIME_WAIT
tcp 0 0 127.0.0.1:5038 127.0.0.1:49164 TIME_WAIT
tcp 0 0 127.0.0.1:5038 127.0.0.1:42702 TIME_WAIT
tcp 0 0 127.0.0.1:5038 127.0.0.1:39040 TIME_WAIT
tcp 0 0 127.0.0.1:5038 127.0.0.1:49376 TIME_WAIT
tcp 0 0 127.0.0.1:5038 127.0.0.1:48688 TIME_WAIT
tcp 0 0 127.0.0.1:5038 127.0.0.1:46414 TIME_WAIT
tcp 0 0 127.0.0.1:5038 127.0.0.1:34142 TIME_WAIT
tcp 0 0 127.0.0.1:5038 127.0.0.1:52926 TIME_WAIT
tcp 0 0 127.0.0.1:5038 127.0.0.1:42524 TIME_WAIT
tcp 0 0 127.0.0.1:5038 127.0.0.1:53658 TIME_WAIT

That’s a client coding issue. A well written client would set up one connection and hold it continuously.

1 Like