Module show (use count) question

In order to perhaps improve Asterisk performance (use less memory, etc.) I’d like to “noload” the modules not being used.

If I let asterisk run for a while (and all functionality is tested), is it safe to assume that if the module use count (from CLI command module show) is 0 that I can no-load that module? (Which is easily automated vs. manually going through and checking modules one by one against dial plan, etc.)

So that means the only modules in use are ones with use count > 0?

Generally, yes. You have to be careful with dialplan applications and functions though, they can be executed quickly and appear to have a use count of 0 when you check but in reality your dialplan may require them.

Are you saying that Asterisk does not always increment the use count?

No. He is saying that Asterisk increments the use count, then 50 microseconds later decrements it. Modules only show a use count when a call or something else is executing in them.


Understood. Thanks! Then there is no good way to know from that command which modules are actually not used.