0

我一直在使用 WMI 从服务器获取信息,并且我得到了很好的结果(虽然像处理器状态、硬盘、登录用户、进程列表等通用)

现在我有一项特定任务来查询 Exchange Server 2010 数据中的一些特定数据,例如您可能从性能监视器和运行状况检查中获得的数据,例如 Active Mailbox Delivery Queue、发送队列大小、接收队列大小、SMTP 当前连接和列表继续下去。

现在我一直在做一些研究,我找到了一些文章,发现这个类应该有我需要的数据:root\MicrosoftExchangeV2 我很难编码这个,我发现了一些 vb 示例我试图在 perl 模块中进行转换,但似乎没有任何效果。任何启动示例都值得赞赏

ps:在交换服务器上,wmi 似乎无法从远程访问(所以我在本地运行)

#!/usr/bin/perl

use Win32::OLE('in');
use constant bFlagReturnImmediately => 0x10;
use constant bFlagForwardOnly => 0x20;
#use warnings;

use Win32::OLE::Enum;

my $comp = ".";
my $oWMIService_ = Win32::OLE->GetObject( "winmgmts:impersonationLevel=impersonate}!\\\\$comp\\ROOT\\MicrosoftExchangeV2") or die "problem";
my $colItems_ = $oWMIService_->ExecQuery ( "Select * from Exchange_Link", "WQL",     bFlagReturnImmediately | bFlagForwardOnly);

foreach my $objItem_ (in $colItems_){

print $objItem_->{StateRemote};

}
4

1 回答 1

0

在深入研究了微软的文档并监控 wmi 之后,我设法找到了具体的性能计数器,如下所示:

ExchangePop3_MSExchangePop3ConnectionsCurrent => 0
TransportQueues_MSExchangeTransportQueuesLargestDeliveryQueueLength => 0
TransportQueues_MSExchangeTransportQueuesRetryMailboxDeliveryQueueLength => 0
IS_MSExchangeISMailboxActiveClientLogons => 193
TransportQueues_MSExchangeTransportQueuesUnreachableQueueLength => 0
TransportSmtpSend_MSExchangeTransportSmtpSendMessagesSentPerSec => 0
TransportSMTPReceive_MSExchangeTransportSMTPReceiveConnectionsTotal => 190
TransportQueues_MSExchangeTransportQueuesMessagesQueuedForDelivery => 0
TransportQueues_MSExchangeTransportQueuesRetryNonSmtpDeliveryQueueLength => 0
Imap4_MSExchangeImap4CurrentConnections => 0
ActiveSync_MSExchangeActiveSyncRequestsPersec => 0
TransportQueues_MSExchangeTransportQueuesActiveMailboxDeliveryQueueLength => 0
TransportQueues_MSExchangeTransportQueuesSubmissionQueueLength => 0
TransportQueues_MSExchangeTransportQueuesActiveRemoteDeliveryQueueLength => 0
TransportSmtpSend_MSExchangeTransportSmtpSendConnectionsTotal => 92
MailSubmission_MSExchangeMailSubmissionFailedSubmissionsPerSecond => 0
MSExchangeISActiveUserCount => 0
TransportQueues_MSExchangeTransportQueuesActiveNonSmtpDeliveryQueueLength => 0
TransportQueues_MSExchangeTransportQueuesRetryRemoteDeliveryQueueLength => 0
TransportQueues_MSExchangeTransportQueuesAggregateDeliveryQueueLengthAllQueues => 0
OWA_MSExchangeOWAAverageResponseTime => 120
ActiveConnectionCount => 101

我希望有人可以得到这些有用的任何监控工具,他们可能正在编写监控任何繁忙的交换服务器

于 2014-06-21T17:50:50.780 回答