Reputation: 183
I am thinking of writing my own code (in order to practice and also to serve my company need) to monitor my 300 routers. I want to do the following
1) icmp monitoring. Email when packet loss is above 60% 2) Latency monitoring, email when latency is above 30 ms.
Now quite a time ago, when i asked similar question on cisco forum, they recommended me perl and freebsd. From that time it was in my mind that perl can do it. But i am just confused what approach shall i take. Do i need to do some multi threaded programming here ? as you know i am a little noob here, so if someone can pls guide me a little how to do it. I know there are enterprise class NMS for this but still i thought writing my own would be a good learning experience for me. Also perl is not must but i just thought perl would do it.
EDIT: I am sorry but a dear friend pointed me my mistake. Can someone tell me can i use multithreaded programming in perl ?
Thanks
Upvotes: 1
Views: 372
Reputation: 39158
Yes, multi-threaded programming is possible with e.g. threads, threads::lite and Coro.
Threads are not the only means of concurrent programming.
Perl is much stronger with the traditional Unix mechanisms building on the fork system call. Nice wrapper modules include Proc::Fork, Forks::Super and Parallel::ForkManager.
Another way to solve your problem is employing an event loop, such as AnyEvent, Reflex or POE.
Upvotes: 4