As originally posted, your script has the "DoOneEvent" call outside of the inner-most "for" loop, running the range of numbers in the fourth part of the IP addresses. If you have been trying the script with the default values for the start and stop IP addresses (1.1.1.1 - 1.1.1.255), this means that you run 255 iterations of the inner-most loop (calling Net::SNMP->session each time, with a 2-sec time-out) before you get to the first "DoOneEvent" call.

Have you allowed the script to run for at least 8 min. 30 sec, to let that inner loop finish? How about putting the DoOneEvent call inside that loop, rather than after it? Better yet, you might want to add a label widget with a "-textvariable =>\$status_string option, update that variable with the ip address being scanned, and call that widget's update method within the inner-most loop, so you can see what's happening inside that loop as it happens.

A few other comments about your code:


In reply to Re: perl/tk script freezes by graff
in thread perl/tk script freezes by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.