Hello. I am programming web interface which communicates with cisco switches via telnet. I want to make such system which will be storing one telnet connection per switch and every script (web interface, cron jobs, etc.) will have access to it. This is needed to make a single query queue for each device and prevent huge cisco processor load caused by several concurent telnet connections. How do I can do this?
updated
Option with connection handling daemon is good and will work in the best way. Sharing telnet connection object between scripts may be difficult to implement and debug. But this option is interesting because interface is using only by couple of operators and cron jobs.