I haven’t posted in a while because I’ve got a job; I am now a full time website developer!
After being in the job a month, I have learnt so much more about developing websites and web based systems; enough in fact that I am currently redeveloping gg-sim to be mobile friendly and display some prettiness!
I have an aim to redevelop ldir to be more useful depending on how people wish to implement it. This will mean that the function will have some major changes but I will also develop a wrapper for it so it can function like before if people have utilised it but with to update.
As part of a project, I have utilised PHPs SNMP functions and after some testing, I have found that SNMPWalk is considerably slower than multiple SNMPGet.
I was aiming to retrieve 6 Objects from a MIB; the device being polled was attached via a 100mbps network link.
I decided to run SNMPGet within a loop to retrieve each Object from the specified OID’s.
As these OID’s were within the same tree, I then thought about using walk as this would consolidate the data into a single request. I then walked the tree to get the same result.
I subsequently tested the time it took to retrieve this information via microtime().
As a result, you can retrieve 1 walk containing 6 OID’s within the same time as requesting 18 OIDs via get.
I hope this helps someone whom is looking to speed up their SNMP requests.
Every now and then I want to make my batch scripts pause or wait for x amount of time. Most solutions seem to utilise ping to make it wait as natively Windows doesn’t include a sleep or wait feature and pause only accepts a user input.
Here comes the timeout command!
TIMEOUT /NOBREAK /T 10 >NUL
will make your scripts wait for 10 seconds and display no output, without the >NUL it will display a countdown.