Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I'm doing about 30 snmpwalk/snmpget commands in one perl script to find the config on Cisco boxes and throw them into an html page. The problem is, each router/switch takes about 13 minutes to complete because of the amount of time these walks/gets take to complete. Having about 40-50 pieces of Cisco network equipment means that it would take this script about 10 hours to complete (yeah, unexceptable).

I've been reading up on the "system" function, but it looks like it "waits until that process is done" before it moves on to the next command.

I just need a way to multithread this script in a very simple manner -- none of the threads _ever_ have to communicate with each other -- they just should run simultaneously and return what they get.

Any simple ways to do this? Am I misunderstanding the "system" function?


Thanks for any help I can get!
Justin

In reply to Multithreading 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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2024-04-25 16:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found