in reply to Im I forking properly ?

You have encountered a fairly common design pattern, where you have a relatively quick "work supplier" in "tail"in the file, and a relatively slow "consumer" process, which does the snmpget.

The usual solution to this is to run multiple, parallel "consumer" processes, such that, on the average, consumption rate matches generation rate.

One solution to this uses threads to run worker processes, and queues to communicate with them.

This site contains many such queries, and implementations of this pattern, this one being the most recent. Please review the techniques, and I recommend following BrowserUk's brilliant responses.

        This is not an optical illusion, it just looks like one.

Replies are listed 'Best First'.
Re^2: Im I forking properly ?
by leostereo (Beadle) on Apr 18, 2016 at 14:47 UTC

    Thanks!! I will read those pappers as you suggested