in reply to Re^5: Win32::Process output
in thread Win32::Process output
Pretty much and much more succinct, except by 'already using threads' i meant that the solution seems to be using threads (as per your demonstration). Originally I was just going to run each executable one at a time and I'm pretty sure I could do that in the way you've explained, but I think it would be possible to speed up the process with threads. 20 was just a guesstimate, and really what I need is 'run the number of simultaneous threads that won't make my little laptop choke and die'
I have anywhere from 1000 to 5000 (ballpark) commands to run. Each is the same command just with a different workstation name passed as a command line option each time. The application itself doesn't provide any sort of facility that i know of for passing multiple hostnames at once and the timeout option it provides doesn't actually work.
The executable is marimba's runchannel.exe and the result is one of: 1) timeout (check with Net::Ping prior to trying and I'm assured ICMP doesn't bounce anywhere) 2) Success 3) Successful Connection, Operation Unnecessary 4) Unable to connect 5) Completely hang and never respond. I need to be able to report the first 4 results along with the workstation name, and the small number that fall into #5 I can safely ignore for the time being, but those are the ones that are causing me difficulties to script because they never return (and I've run this from commandline manually and using another tool and the same thing happens). I was able to run this once using Win32::Process->Wait() but all of the output went to stdout and I couldn't find a way to log it with the workstation name (i.e. if i change the process to cmd /c foo.exe all it outputs to file is a list without the workstation names)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Win32::Process output
by BrowserUk (Patriarch) on Nov 04, 2010 at 03:24 UTC | |
by tawnos (Novice) on Nov 04, 2010 at 16:14 UTC | |
by BrowserUk (Patriarch) on Nov 04, 2010 at 16:46 UTC | |
by tawnos (Novice) on Nov 14, 2010 at 17:11 UTC |