troubleshooting no response to wmi query on remote server
From: Jim Lancaster (jlancaster_at_sagiss.com)
Date: 06/13/04
- Previous message: Ivan Brugiolo [MSFT]: "Re: WMI connection problem"
- Next in thread: Jim Lancaster: "Re: troubleshooting no response to wmi query on remote server"
- Reply: Jim Lancaster: "Re: troubleshooting no response to wmi query on remote server"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 13 Jun 2004 09:19:28 -0500
I've written a perl script to query the event logs on remote servers.
It works pretty flawlessly except on a few servers, from which I
receive no response at all--the script just appears to hang.
I tried adding ",,48" to the end of the ExecQuery statement to convert
it to a semi-synchronous query. The script no longer hangs on the
problematic servers, but closer inspection revealed the query no
longer returned any data either, even on the previously working
remotes. (Not optimal. <g>)
The pertinent bits of code follow:
if (my $wmi =
Win32::OLE->GetObject("WinMgmts:{impersonationLevel=impersonate}!//$value->{'Registration'}->{'Hostname'}"))
{
foreach my $log (in $wmi->InstancesOf("Win32_NTEventlogFile")) {
my $query = "Select * from Win32_NTLogEvent where Logfile =
'".
$log->{'Name'}.
"' AND RecordNumber > ".
$value->{'LogfileName'}->{'LastRecordRead'};
my $list = $wmi->ExecQuery($query,,48);
...do something with the results here...
}
}
In checking the wbemcore.log on a problematic remote server, I see
many instances of the following:
(Sun Jun 13 08:55:57 2004) : Loading provider(Sun Jun 13 08:55:57
2004) : Error 1 occured executing queued request
These are the trouble-shooting steps I've tried so far based on info
gleaned from various sources: (Note: These changes were made on the
remote server and NOT the one running the query.)
1. Stopped WMI service, deleted repository directory & cleared log
directory and restarted.
2. Increased values for keys in
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WBEM\CIMOM as follows:
"Low Threshold On Client Objects (B)"="40000000"
"High Threshold On Client Objects (B)"="80000000"
3. Checked to make sure DCOM was turned on at
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Ole as follows:
"EnableDCOM"="Y"
4. Cleared all event logs.
I'm inclined to think the problem lies with the format of the
semi-synchronous query (i.e., ",,48"). From what I've read, I really
need this option to keep from sending some W2K servers into permanent
high utilization states. I've tried using ",,48" as in my example,
and at the end of the $query string. Neither worked.
Help anyone?
Thanks,
Jim
- Previous message: Ivan Brugiolo [MSFT]: "Re: WMI connection problem"
- Next in thread: Jim Lancaster: "Re: troubleshooting no response to wmi query on remote server"
- Reply: Jim Lancaster: "Re: troubleshooting no response to wmi query on remote server"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|