|
|
| Author |
Message |
validan Contributor
Joined: 12 May 2004 Posts: 37
|
Posted: Wed May 26, 2004 5:43 pm Post subject: Script hanging |
|
|
I have written a small script that outputs some information from a snmpget about qmails mailstats from a remote box. HOWEVER, this script and any like it seem to cause netmrg-gatherer to hang.
The Script:
| Code: |
#!/usr/bin/perl
$ip = "10.0.0.10";
$comm = "blah";
$result = `/usr/local/bin/snmpget -v 1 -c $comm $ip .1.3.6.1.4.1.2021.8.1.101.1 2>/dev/null`;
@temp = split(/=/, $result);
@out = split(/\n/, $temp[1]);
$out[0] =~ s/STRING://g;
$out[0] =~ s/\s+//g;
print "$out[0]\n";
|
And the last few lines of the hanging log:
| Code: |
[Dev: 0013] Trimming device event log.
[Dev: 0013] Ending device thread.
Thread Ended.
[PASSIVE] Last: 2, Now: 1
|
This causes MANY netmrg-gatherers to be open at a given time, like one for everytime the cron runs.
Am I fubaring the code on the script (I used a working script as a template) or is the gatherer not getting something it wants? |
|
| Back to top |
|
 |
validan Contributor
Joined: 12 May 2004 Posts: 37
|
Posted: Wed May 26, 2004 5:53 pm Post subject: |
|
|
Its wierd I am only using 2 active script tests currently. But NO matter what the 3rd one is that I place in the Device configuration it hangs up.
Am I missing something?
Last edited by validan on Wed May 26, 2004 5:55 pm; edited 1 time in total |
|
| Back to top |
|
 |
validan Contributor
Joined: 12 May 2004 Posts: 37
|
Posted: Wed May 26, 2004 5:54 pm Post subject: |
|
|
| Double post! |
|
| Back to top |
|
 |
balleman Site Admin
Joined: 20 Jan 2003 Posts: 282
|
Posted: Wed May 26, 2004 10:41 pm Post subject: |
|
|
| It seems like the script kills the thread that calls it, causing the main thread to wait forever for the last thread to finish. I'm not sure what would cause that, but we'll look into it. |
|
| Back to top |
|
 |
|