Instance health check.

Hi All,
DB - 8.1.7.4.0
OS - HPUX
I am trying to do a quick health check of my instance. Since, I am running on oracle 8i, I believe, the time_waited column captured in ms, I might be wrong here.
Also, after seeing this stats, I though to concentrate on latch free wait events, but the major issue with these figure are, they can not tell, which session
suffered the most for latch free wait event and what time it happened ? Here, I am bit skeptical on how should, I go about this? I mean , where to look what in order to troubleshoot the issue. I know, few of you might recommend me to pullinmg out the statspack report and look out for top 5 wait events.
Yes, that can also, one of the way to see this problem. But , I would really appriciate, if somone could offer their valuable advise on below query excerpt, on how and where to look what in order to troubleshoot the issue.
EVENT                           TOTAL_WAITS TOTAL_TIMEOUTS      TIME_WAITED     AVERAGE_WAIT STARTUP_T
latch free                      268,587,645    265,844,237      490,153,615                2 30-JUL-11
library cache pin                   498,520        448,744      138,260,354              277 30-JUL-11
db file sequential read        ############              0      122,786,385                0 30-JUL-11
db file scattered read         ############              0       42,772,372                0 30-JUL-11
buffer busy waits                68,630,560            867       16,099,828                0 30-JUL-11
enqueue                             101,818         27,690        8,854,320               87 30-JUL-11
log file parallel write           7,259,914              0        4,255,326                1 30-JUL-11
SQL*Net message from dblink      13,694,040              0        2,478,069                0 30-JUL-11
PX Deq: Execute Reply               346,367          1,720        1,908,973                6 30-JUL-11
log file sync                     1,872,565          1,256        1,445,419                1 30-JUL-11

user12021994 wrote:
Hi All,
DB - 8.1.7.4.0
OS - HPUX
I am trying to do a quick health check of my instance. Since, I am running on oracle 8i, I believe, the time_waited column captured in ms, I might be wrong here.
Also, after seeing this stats, I though to concentrate on latch free wait events, but the major issue with these figure are, they can not tell, which session
suffered the most for latch free wait event and what time it happened ? Here, I am bit skeptical on how should, I go about this? I mean , where to look what in order to troubleshoot the issue. I know, few of you might recommend me to pullinmg out the statspack report and look out for top 5 wait events.
Yes, that can also, one of the way to see this problem. But , I would really appriciate, if somone could offer their valuable advise on below query excerpt, on how and where to look what in order to troubleshoot the issue.
EVENT                           TOTAL_WAITS TOTAL_TIMEOUTS      TIME_WAITED     AVERAGE_WAIT STARTUP_T
latch free                      268,587,645    265,844,237      490,153,615                2 30-JUL-11
library cache pin                   498,520        448,744      138,260,354              277 30-JUL-11
db file sequential read        ############              0      122,786,385                0 30-JUL-11
db file scattered read         ############              0       42,772,372                0 30-JUL-11
buffer busy waits                68,630,560            867       16,099,828                0 30-JUL-11
enqueue                             101,818         27,690        8,854,320               87 30-JUL-11
log file parallel write           7,259,914              0        4,255,326                1 30-JUL-11
SQL*Net message from dblink      13,694,040              0        2,478,069                0 30-JUL-11
PX Deq: Execute Reply               346,367          1,720        1,908,973                6 30-JUL-11
log file sync                     1,872,565          1,256        1,445,419                1 30-JUL-11
Hi All,
DB - 8.1.7.4.0
OS - HPUX
I am trying to do a quick health check of my instance. Since, I am running on oracle 8i, I believe, the time_waited column captured in ms, I might be wrong here.
Also, after seeing this stats, I though to concentrate on latch free wait events, but the major issue with these figure are, they can not tell, which session
suffered the most for latch free wait event and what time it happened ? Here, I am bit skeptical on how should, I go about this? I mean , where to look what in order to troubleshoot the issue. I know, few of you might recommend me to pullinmg out the statspack report and look out for top 5 wait events.
Yes, that can also, one of the way to see this problem. But , I would really appriciate, if somone could offer their valuable advise on below query excerpt, on how and where to look what in order to troubleshoot the issue.
EVENT                           TOTAL_WAITS TOTAL_TIMEOUTS      TIME_WAITED     AVERAGE_WAIT STARTUP_T
latch free                      268,587,645    265,844,237      490,153,615                2 30-JUL-11
library cache pin                   498,520        448,744      138,260,354              277 30-JUL-11
db file sequential read        ############              0      122,786,385                0 30-JUL-11
db file scattered read         ############              0       42,772,372                0 30-JUL-11
buffer busy waits                68,630,560            867       16,099,828                0 30-JUL-11
enqueue                             101,818         27,690        8,854,320               87 30-JUL-11
log file parallel write           7,259,914              0        4,255,326                1 30-JUL-11
SQL*Net message from dblink      13,694,040              0        2,478,069                0 30-JUL-11
PX Deq: Execute Reply               346,367          1,720        1,908,973                6 30-JUL-11
log file sync                     1,872,565          1,256        1,445,419                1 30-JUL-11There is no "issue"; only your imagination at work.
It appears you suffer from Compulsive Tuning Disorder.
What value would you deem acceptable & why that value and not some other value that is higher or lower?

Similar Messages

  • Instance health check failing with errors

    Hi
    One of the instance showing " Agent connection is Instance is unavailable". How ever it is collecting and showing instance performance when I go to Performance pane.
    When I check in emagent.trc file it is saying either agent/instance are running with different user than ORACLE or group not DBA.
    Actually, in my case both are same.. l mean Oracle:dba.
    I have bounce many times agent but no luck.
    Your valuble comments helps greatly.
    Here is error message
    Target TARGET_NAME_INST1
    Type Database Instance
    Metric Health Check
    Collection Timestamp Jul 16, 2007 10:45:28 AM
    Error Type Collection Failure
    Message Instance Health Check initialization failed due to one of the following causes: the owner of the EM agent process is not same as the owner of the Oracle instance processes; the owner of the EM agent process is not part of the dba group; or the database version is not 10g (10.1.0.2) and above.
    ________________________________________________________________

    Use metalink - its your friend...
    Symptoms
    Caution:
    The scope of this note is limited to Agents 10.2.x monitoring Oracle Databases running on HP-UX.
    By default, the Agent 10.2.x is collecting the Healthcheck metric every 15 seconds. This metric basically gives an indication whether the monitored database is up and running.
    On some circumstances, the Healthcheck metric cannot be collected. This results in such entries being added every 15 seconds to the $AGENT_HOME/sysman/log/emagent.trc log file:
    2007-05-09 09:21:36 Thread-81 ERROR fetchlets.healthCheck: Error: process context is not initialized
    2007-05-09 09:21:36 Thread-81 ERROR engine: [oracle_database,EMI10104_rmtdchp4,health_check] : nmeegd_GetMetricData failed : Instance Health Check initialization failed due to one of the following causes: the owner of the EM agent process is not same as the owner of the Oracle instance processes; the owner of the EM agent process is not part of the dba group; or the database version is not 10g (10.1.0.2) and above.
    2007-05-09 09:21:36 Thread-81 WARN collector: <nmecmc.c> Error exit. Error message: Instance Health Check initialization failed due to one of the following causes: the owner of the EM agent process is not same as the owner of the Oracle instance processes; the owner of the EM agent process is not part of the dba group; or the database version is not 10g (10.1.0.2) and above.
    or
    Solution
    There are several steps to solve this problem:
    1. If the Agent Release is 10.2.0.1 or 10.2.0.2, upgrade the Agent to 10.2.0.3 and follow the steps below.
    2. For HP-UX 10.2.0.3 Agent, here are the instructions to fix the problem while keeping the Healthcheck metric enabled. This section takes place in the Agent Oracle Home.
    2.1. Download Patch 5854190 from Metalink.
    2.2. Setup the Agent environment and shutdown the Agent by doing:

  • SAP Central Instance Health check

    Hello all,
    We have ECC6.0 running on Oracle 10.2.0.2 on SLES10 SP2. We are using Oracle clusterware(11g release 1) and the database is stand-alone. In other words we are using active/passive cluster.
    Our requirment is as follows:
    We need to create a Linux script that checks if the SAP Central Instance is up or not. If it is not up, then we need to start it. We will then create an Oracle clusterware application resource based on this script. My question is there any SAP binary/utility that checks the status of the Central Instance?
    Thanks,
    Shilpa

    You should be able to ping Message server (ASCS) if there is a repsonse then no need to do anything.
    dpmon pf=/sapmnt/<SID>/profile/<CI_profile> -p  | grep alive
    and you can also use below command to check whether your message server is up or not.
    lgtst name=<SID>

  • Health check for load balancing ALSB/OSB instances

    What is the standard practice for a load balancer sitting in front of ALSB/OSB instances as far as a health check? I'm working with our IS department to implement a valid health check. Currently the load balancer (older model cisco device) is just checking for an active port which is generating excessive logging on the ALSB side. As a workaround I'm just going to have the loadbalancer check for a http 200 response and a greater than zero body size.
    thanks in advance...

    it depends on the type of load balancer what it can do. I suggest create a 'empty' proxy service that does not have logging or auditing. Publish the prox and use this webservice in your load balancer to check if the service is available.
    Marc

  • How can I support a health check, from a load balancer?

    My company has load balancers which use health checks to determine if the end point is available for client traffic. The basic health check is a tcp ping, and will tell you if the device is on the network. The next level of health check is an http request. This request, and the response are static, you can’t create your own version of the request and response. The standard request is this:
         http://host:port/healthcheck/hc.html
    The standard response is this:
         “The server is available”
    I want to use the load balancer as part of my total deployment. The problem is that I am not seeing how to support this health check request and response in the MDEX engine. What I see is this request
         http://host:port/admin?op=ping
    Will return this response
         dgraph <host>: <port> responding at <day month year time>
    It is nice that there is a built in ping, but I am not able to make use of it. I am new to Endeca and still poking around. The dgraph process listens on a port set up in <…>/config/script/AppContext.xml
    <dgraph id="Dgraph1" host-id="MDEXHost" port="3281">
    <properties>
    <property name="restartGroup" value="A" />
    <property name="updateGroup" value="a" />
    </properties>
    <log-dir>./logs/dgraphs/Dgraph1</log-dir>
    <input-dir>./data/dgraphs/Dgraph1/dgraph_input</input-dir>
    <update-dir>./data/dgraphs/Dgraph1/dgraph_input/updates</update-dir>
    </dgraph>
    (I am not using the default port, as I only have an instance on a shared server and have to worry about port clashing. But that is a different thread.)
    In a standard tc Server install I can support this health check by doing this:
    * Create a directory named “healthcheck”, in the “webapps” directory.
    * Place a file name “hc.html” in that directory, which contains “The server is available”
    The one hack which comes to mind is to write a servlet which would be able to be a smart proxy for the load balancer health check. It would pass along any regular traffic to the MDEX engine. But if the request was a health check it would send “admin?op=ping” to the MDEX engine, and for a good response from the engine, create and pass back the correct response to the load balancer.
    Ideas, comments, flames, …
    Thanks

    Hi, we are using following String to test the MDEX ping response but we get the invalid version formation on dgraph.log -
    following is on F5
    GET /admin?op=ping HTTP/1.1/r/nHost:myhost.endeca.com:19000/r/nConnection:close/r/n/r/n
    Following gets logged on Dgraph.log
    WARN 09/05/12 05:30:03.799 UTC (1346823003799) DGRAPH {dgraph} Invalid version format in 'HTTP/1.1/r/nHost:myhost.endeca.com:19000/r/nConnection:close/r/n/r/n'
    Please let me know - if you have any suggestions to solve this issue.
    I know that it works from browser and wget from unix with following commands.
    wget http://myhost.endeca.com:19000/admin?op=ping - from unix command line
    from browser:
    http://myhost.endeca.com:19000/admin?op=ping
    Thanks,
    Ram

  • Database health check

    Hello Gurus,
    I have got an opportunity to do database health check in a concern.
    Is there any tool or script to do health check commonly in an organization?
    Is there any procedure to follow?
    Kindly help in this issue.
    Best,
    Balu.

    Database health check or Sanity check covers following topics (learnt from Niall Litchfield) :
    1 Space Management
    2 Backup Management
    3 Security
    4 Transaction Management
    5 Statistics Management
    6 Errors
    7 Performance Management
    8 CONCLUSIONS
    Please check below documentation link also :
    http://download.oracle.com/docs/cd/B28359_01/server.111/b28310/diag007.htm
    Database health check is nothing other than organizing all your monitoring scripts to display at the same time such as (buffer cache hit, library, dictionary, parse, soft parse, hard parse, iostats etc etc.) If you have OEM with performance pack, there is a module there that is captioned database health check. You can use it to get a bird's eye view of your instance.
    Source:http://www.lazydba.com/oracle/0__99797.html
    Hth
    Girish Sharma

  • Alerts - All Metrics Errors - Health Check - Collection Failure

    I have database instances with Health Check - Collection Failures.
    These errors are almost 30 days old. I originally received the Health Check errors because the credentials were not set properly. I then set them but the errors have not aged out.
    Does anyone know how can I clear out the Health Check errors?
    When I look at All Metrics, Health Check for one of these databases, the Last Upload date is very old.
    Maybe I can I force a re-collection?

    Hi ,
    I had the same problem and posted the same ...question...
    So , the link will help you to solve the problem
    Clear the Alert list
    unless somebody else has another idea...!!!!!!!!!!!
    Regards and hope this will help,
    Simon

  • CSS and Oracle10gAS webcache health check

    Both CSS LBR's HEAD and GET health check requests failed for http://ip.address.for.the.server/_oracle_http_server_webcache_static_.html, a magic URL from Oracle10gAS webcache that only resides in memory (no file exists on disk). But I can use browser or gui-less browser 'elinks' and access it via IP to that URL with no problem.
    Has anyone here encountered this issue? Does anyone have solution for this?
    Many thanks,

    WCCP Version 2 enables a series of Content Engines, called a Content Engine cluster, to connect to multiple routers. This feature provides redundancy and a more distributed architecture for instances when a Content Engine needs to connect to a large number of interfaces. This strategy also has the benefit of keeping all the Content Engines in a single cluster, avoiding unnecessary duplication of web pages across several clusters.
    http://www.cisco.com/univercd/cc/td/doc/product/webscale/webcache/ce31/config31/appx_b.htm

  • Powershell - Daily Health Check

    Hi all,
    I have a number of different w8k and w12k servers in different sites and I wanted create a daily health check to check services are up. For instance I can write a ps script to check run at 6am daily and check various services on a windows server and then
    generate a html report and mail it to a distribution list. However on some of my servers I only have one service that needs to be checked I wanted a was to check the services and collate all the reports into one place and output just one html report?
    So for example could I output the results to a text file, run an ftp job to send the result to a central location and then run a ps to scrap all the results and output to html, or could the text files be scrapped from an email, this method makes better sense
    for me as some of these servers will have ACLs between then and getting send via smtp will be easier then ftp.
    Would like to know if anyone has any ideas or experience with doing something like this?

    Are the servers on the same domain? If so use "Enter-PSSession" or if your just checking if a service is running use the "-Computer" switch to execute it on the remote server.
    You could also use WMI "Get-WMIObject"
    Using the above methods will let you run it from a central location. 
    My suggestion for performing your health checks is to define in a csv file: Server Name, IP, Heath Check Level
    So have an initial Ping for the host name, if that fails then use the IP as DNS might have an issue (record results into file)
    Heath Ckeck level determines if your just checking full server health or just checking for a specif service is running (ie Full, Service, ect... you define it for your requirements)
    I would use WMI as there could be different versions of powershell installed and take the compatibility issues away when writing the script.
    Below is a good starting script for you to use where it queries via WMI and generates a html report that is emailed out.
    https://gallery.technet.microsoft.com/scriptcenter/Powershell-Script-to-Get-78687c5e  
    Cheers,
    Martin
    Blog:
    http://sustaslog.wordpress.com 
    LinkedIn:
    Note: Posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

  • Health Check in Exchange 2007 Scripting

    Hi All,
    I have been looking around for scripts which would help me perform regularised health checks in my enviornment. After lot of googling i was able to get a script which would meet my requirements. However i have a few challenges involved in extracting some
    more information:
    1. Mailbox Store Size, Free Diskspace percentage for mailbox servers
    2. Remote Mail flow Tests & Mailflow test to every exchange 2007 mailbox servers in org.
    3. Automating Email of collected data (in HTML) to Administrator.
    4. Executing the script Automatically without triggering it from Exchange Management Shell.
    Script Below
    param( [string] $auditlist)
    Function Get-CustomHTML ($Header){
    $Report = @"
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
    <html><head><title>$($Header)</title>
    <META http-equiv=Content-Type content='text/html; charset=windows-1252'>
    <meta name="save" content="history">
    <style type="text/css">
    DIV .expando {DISPLAY: block; FONT-WEIGHT: normal; FONT-SIZE: 8pt; RIGHT: 8px; COLOR: #ffffff; FONT-FAMILY: Arial; POSITION: absolute; TEXT-DECORATION: underline}
    TABLE {TABLE-LAYOUT: fixed; FONT-SIZE: 100%; WIDTH: 100%}
    *{margin:0}
    .dspcont { display:none; BORDER-RIGHT: #B1BABF 1px solid; BORDER-TOP: #B1BABF 1px solid; PADDING-LEFT: 16px; FONT-SIZE: 8pt;MARGIN-BOTTOM: -1px; PADDING-BOTTOM: 5px; MARGIN-LEFT: 0px; BORDER-LEFT: #B1BABF 1px solid; WIDTH: 95%; COLOR: #000000; MARGIN-RIGHT:
    0px; PADDING-TOP: 4px; BORDER-BOTTOM: #B1BABF 1px solid; FONT-FAMILY: Tahoma; POSITION: relative; BACKGROUND-COLOR: #f9f9f9}
    .filler {BORDER-RIGHT: medium none; BORDER-TOP: medium none; DISPLAY: block; BACKGROUND: none transparent scroll repeat 0% 0%; MARGIN-BOTTOM: -1px; FONT: 100%/8px Tahoma; MARGIN-LEFT: 43px; BORDER-LEFT: medium none; COLOR: #ffffff; MARGIN-RIGHT: 0px; PADDING-TOP:
    4px; BORDER-BOTTOM: medium none; POSITION: relative}
    .save{behavior:url(#default#savehistory);}
    .dspcont1{ display:none}
    a.dsphead0 {BORDER-RIGHT: #B1BABF 1px solid; PADDING-RIGHT: 5em; BORDER-TOP: #B1BABF 1px solid; DISPLAY: block; PADDING-LEFT: 5px; FONT-WEIGHT: bold; FONT-SIZE: 8pt; MARGIN-BOTTOM: -1px; MARGIN-LEFT: 0px; BORDER-LEFT: #B1BABF 1px solid; CURSOR: hand; COLOR:
    #FFFFFF; MARGIN-RIGHT: 0px; PADDING-TOP: 4px; BORDER-BOTTOM: #B1BABF 1px solid; FONT-FAMILY: Tahoma; POSITION: relative; HEIGHT: 2.25em; WIDTH: 95%; BACKGROUND-COLOR: #CC0000}
    a.dsphead1 {BORDER-RIGHT: #B1BABF 1px solid; PADDING-RIGHT: 5em; BORDER-TOP: #B1BABF 1px solid; DISPLAY: block; PADDING-LEFT: 5px; FONT-WEIGHT: bold; FONT-SIZE: 8pt; MARGIN-BOTTOM: -1px; MARGIN-LEFT: 0px; BORDER-LEFT: #B1BABF 1px solid; CURSOR: hand; COLOR:
    #ffffff; MARGIN-RIGHT: 0px; PADDING-TOP: 4px; BORDER-BOTTOM: #B1BABF 1px solid; FONT-FAMILY: Tahoma; POSITION: relative; HEIGHT: 2.25em; WIDTH: 95%; BACKGROUND-COLOR: #7BA7C7}
    a.dsphead2 {BORDER-RIGHT: #B1BABF 1px solid; PADDING-RIGHT: 5em; BORDER-TOP: #B1BABF 1px solid; DISPLAY: block; PADDING-LEFT: 5px; FONT-WEIGHT: bold; FONT-SIZE: 8pt; MARGIN-BOTTOM: -1px; MARGIN-LEFT: 0px; BORDER-LEFT: #B1BABF 1px solid; CURSOR: hand; COLOR:
    #ffffff; MARGIN-RIGHT: 0px; PADDING-TOP: 4px; BORDER-BOTTOM: #B1BABF 1px solid; FONT-FAMILY: Tahoma; POSITION: relative; HEIGHT: 2.25em; WIDTH: 95%; BACKGROUND-COLOR: #7BA7C7}
    a.dsphead1 span.dspchar{font-family:monospace;font-weight:normal;}
    td {VERTICAL-ALIGN: TOP; FONT-FAMILY: Tahoma}
    th {VERTICAL-ALIGN: TOP; COLOR: #CC0000; TEXT-ALIGN: left}
    BODY {margin-left: 4pt}
    BODY {margin-right: 4pt}
    BODY {margin-top: 6pt}
    </style>
    <script type="text/javascript">
    function dsp(loc){
       if(document.getElementById){
          var foc=loc.firstChild;
          foc=loc.firstChild.innerHTML?
             loc.firstChild:
             loc.firstChild.nextSibling;
          foc.innerHTML=foc.innerHTML=='hide'?'show':'hide';
          foc=loc.parentNode.nextSibling.style?
             loc.parentNode.nextSibling:
             loc.parentNode.nextSibling.nextSibling;
          foc.style.display=foc.style.display=='block'?'none':'block';}} 
    if(!document.getElementById)
       document.write('<style type="text/css">\n'+'.dspcont{display:block;}\n'+ '</style>');
    </script>
    </head>
    <body>
    <b><font face="Arial" size="5">$($Header)</font></b><hr size="8" color="#CC0000">
    <font face="Arial" size="1"><b>Version 1  |M & C | <A HREF='http://mail.exchange.com'>mail.exchange.com</A></b></font><br>
    <font face="Arial" size="1">Report created on $(Get-Date)</font>
    <div class="filler"></div>
    <div class="filler"></div>
    <div class="filler"></div>
    <div class="save">
    Return $Report
    Function Get-CustomHeader0 ($Title){
    $Report = @"
     <div class="dspcont0">
     <h1><a href="javascript:void(0)" class="dsphead0" onclick="dsp(this)">
     <span class="expando">show</span>$($Title)</a></h1>
     <div class="dspcont0">
    Return $Report
    Function Get-CustomHeader ($Num, $Title){
    $Report = @"
     <h2><a href="javascript:void(0)" class="dsphead$($Num)" onclick="dsp(this)">
     <span class="expando">show</span>$($Title)</a></h2>
     <div class="dspcont">
    Return $Report
    Function Get-CustomHeaderClose{
     $Report = @"
      </DIV>
      <div class="filler"></div>
    Return $Report
    Function Get-CustomHeader0Close{
     $Report = @"
      </DIV>
      <div class="filler"></div>
    Return $Report
    Function Get-CustomHTMLClose{
     $Report = @"
    </div>
    </body>
    </html>
    Return $Report
    Function Get-HTMLTable{
     param([array]$Content)
     $HTMLTable = $Content | ConvertTo-Html
     $HTMLTable = $HTMLTable -replace '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">', ""
     $HTMLTable = $HTMLTable -replace '<html xmlns="http://www.w3.org/1999/xhtml">', ""
     $HTMLTable = $HTMLTable -replace '<head>', ""
     $HTMLTable = $HTMLTable -replace '<title>HTML TABLE</title>', ""
     $HTMLTable = $HTMLTable -replace '&lt;', "<"
     $HTMLTable = $HTMLTable -replace '&gt;', ">"
     $HTMLTable = $HTMLTable -replace '</head><body>', ""
     $HTMLTable = $HTMLTable -replace '</body></html>', ""
     Return $HTMLTable
    Function Get-HTMLLink ($activeURL){
    $Report = @"
    <a href=$activeURL>$activeURL</a>
    Return $Report
    Function Get-Ink ([String]$inData){
    [String]$inclPercentage = @(35..100)
    $positive = ($inclPercentage, 'Success', 'Ready', 'Running', 'OK', 'True', 'Information')
    If ($positive -match $inData)
    $Report = @"
    <font color='#009900'>$inData</font>
    Else
    $Report = @"
    <font color='#FF0000'>$inData</font>
    Return $Report
    Function Get-HTMLBasic ($Detail){
    $Report = @"
    <TABLE>
     <tr>
      <td width='75%'>$($Detail)</td>
     </tr>
    </TABLE>
    Return $Report
    Function Get-HTMLDetail ($Heading, $Detail){
    $Report = @"
    <TABLE>
     <tr>
     <th width='25%'><b>$Heading</b></font></th>
     <td width='75%'>$($Detail)</td>
     </tr>
    </TABLE>
    Return $Report
    $input | foreach {$targets += @($_)}
    If ((Test-Path variable:\targets) -eq $True){
       Write-Host "Server list input detected on pipeline" -ForegroundColor Yellow
    Else{
     if ($auditlist -eq ""){
       Write-Host "No server list specified, getting all Exchange 2007 servers" -ForegroundColor Yellow
       $targets = Get-ExchangeServer | Where-Object {$_.IsExchange2007OrLater -eq $True}
      else
       if ((Test-Path $auditlist) -eq $false)
        Write-Host "Invalid server list specified: $auditlist" -ForegroundColor DarkRed
        exit
       else
        Write-Host "Using Audit list: $auditlist" -ForegroundColor Cyan
        $Targets = Get-Content $auditlist
    $now = Get-Date
    #Custom Expressions
    $latencyMS = @{Name="Latency(MS)";expression={[Math]::Round(([TimeSpan] $_.Latency).TotalMilliSeconds)}}
    $MessageLatencyTime = @{Name="MessageLatencyTime";expression={[Math]::Round(([TimeSpan] $_.Latency).TotalMilliSeconds)}}
    $hotLink = @{Name="URL";expression={Get-HTMLLink ($_.URL)}}
    $colourResult = @{Name="Result";expression={Get-Ink ($_.Result)}}
    $colourStatus = @{Name="Status";expression={Get-Ink ($_.Status)}}
    $colourType = @{Name="Status";expression={Get-Ink ($_.Type)}}
    $newResult = @{Name="Result";expression={If ($_.Result.ToString() -ne 'Success'){Get-Ink ('Failure')} Else {Get-Ink ('Success') }}}
    $fullReport = Get-CustomHTML "Exchange 2007 "
    $fullReport += Get-CustomHTMLClose
    Foreach ($Target in $Targets){
    Write-Host "Collating Detail for $Target" -ForegroundColor Yellow
     Write-Host "..getting basic computer configuration"
     $ComputerSystem = Get-WmiObject -computername $Target Win32_ComputerSystem
     switch ($ComputerSystem.DomainRole){
      0 { $ComputerRole = "Standalone Workstation" }
      1 { $ComputerRole = "Member Workstation" }
      2 { $ComputerRole = "Standalone Server" }
      3 { $ComputerRole = "Member Server" }
      4 { $ComputerRole = "Domain Controller" }
      5 { $ComputerRole = "Domain Controller" }
      default { $ComputerRole = "Information not available" }
     $OperatingSystems = Get-WmiObject -computername $Target Win32_OperatingSystem
     $TimeZone = Get-WmiObject -computername $Target Win32_Timezone
     $Keyboards = Get-WmiObject -computername $Target Win32_Keyboard
     $SchedTasks = Get-WmiObject -computername $Target Win32_ScheduledJob
     $BootINI = $OperatingSystems.SystemDrive + "boot.ini"
     $RecoveryOptions = Get-WmiObject -computername $Target Win32_OSRecoveryConfiguration
     $exServer = Get-ExchangeServer | where {$_.Name -eq "$Target"}
     $exVersion = "Version " + $exServer.AdminDisplayVersion.Major + "." + $exServer.AdminDisplayVersion.Minor + " (Build " + $exServer.AdminDisplayVersion.Build + "." + $exServer.AdminDisplayVersion.Revision + ")"
     switch ($ComputerRole){
      "Member Workstation" { $CompType = "Computer Domain"; break }
      "Domain Controller" { $CompType = "Computer Domain"; break }
      "Member Server" { $CompType = "Computer Domain"; break }
      default { $CompType = "Computer Workgroup"; break }
     $LBTime=$OperatingSystems.ConvertToDateTime($OperatingSystems.Lastbootuptime)
     $MyReport += Get-CustomHeader0  "$Target - Role(s): $($exServer.ServerRole)"
     $MyReport += Get-CustomHeader "2" "Basic Server Information"
      $MyReport += Get-HTMLDetail "Computer Name" ($ComputerSystem.Name)
      $MyReport += Get-HTMLDetail "Computer Role" ($ComputerRole)
      $MyReport += Get-HTMLDetail "Exchange Role(s)" ($exServer.ServerRole)
      $MyReport += Get-HTMLDetail "Last System Boot" ($LBTime)
      $MyReport += Get-CustomHeaderClose
      Write-Host "..getting logical disk configuration"
      $Disks = Get-WmiObject -ComputerName $Target Win32_LogicalDisk
      $MyReport += Get-CustomHeader "2" "Logical Disk Configuration"
       $LogicalDrives = @()
       Foreach ($LDrive in ($Disks | Where {$_.DriveType -eq 3})){
        $Details = "" | Select "Drive Letter", Label, "File System", "Disk Size (GB)", "Disk Free Space", "% Free Space"
        $Details."Drive Letter" = $LDrive.DeviceID
        $Details.Label = $LDrive.VolumeName
        $Details."File System" = $LDrive.FileSystem
        $Details."Disk Size (GB)" = [math]::round(($LDrive.size / 1GB))
        $Details."Disk Free Space" = [math]::round(($LDrive.FreeSpace / 1GB))
        $Details."% Free Space" = Get-Ink ([Math]::Round(($LDrive.FreeSpace /1GB) / ($LDrive.Size / 1GB) * 100))
        $LogicalDrives += $Details
       $MyReport += Get-HTMLTable ($LogicalDrives)
      $MyReport += Get-CustomHeaderClose
      if ($exServer.ServerRole -like "*ClientAccess*")
      {$MyReport += Get-CustomHeader "2" "OWA Connectivity"
       Write-Host "..performing OWA connectivity test"
       $colOWAResults = Test-OwaConnectivity -ClientAccessServer $Target
       $MyReport += Get-HTMLTable ($colOWAResults | select MailboxServer, $hotLink, Scenario, $colourResult, $latencyMS, Error)
       $MyReport += Get-CustomHeaderClose
    Write-Host "..getting queue details"
      if ($exServer.ServerRole -like "*HubTransport*")
      $MyReport += Get-CustomHeader "2" "Queue Information"
      $colQs = Get-Queue -server $Target
      $MyReport += Get-HTMLTable ($colQs | Select-Object NextHopDomain, $colourStatus, MessageCount, NextRetryTime)
      $MyReport += Get-CustomHeaderClose
      Write-Host "..getting mailbox database information"
      $spaceLog=[System.Diagnostics.EventLog]::GetEventLogs($target) | where {($_.LogDisplayName -eq "Application")}
      $db = @{Name="database";Expression={$_.ReplacementStrings[1]}}
      $freeMB = @{Name="MB";Expression={[int]$_.ReplacementStrings[0]}}
      $whiteSpace = $spaceLog.entries | where {($_.TimeWritten -ge $now.AddDays(-1))} | where {($_.EventID -eq "1221")} | select $db,$freeMB
      $ws = @{Name="White Space";expression={}}
      if ($exServer.ServerRole -like "*Mailbox*")
       $MyReport += Get-CustomHeader "2" "Mailbox Stores"
       $colMailboxStores = Get-MailboxDatabase -Server $Target -Status | Sort-Object Name
       $storeTable = @()
       Foreach ($objMailboxStore in $colMailboxStores)
        [string]$totalUsers = (get-mailbox -database $objMailboxStore).count
        [string]$empty = $totalUsers.Length -eq 0
        if ($empty -eq 'True')
         [string]$totalUsers = "0"
        $storeDetails = "" | Select Name, Mounted, "Total Users", "White Space", LastFullBackup
        $storeDetails.Name = $objMailboxStore.Name
        $storeDetails.Mounted = Get-Ink ($objMailboxStore.Mounted)
        $storeDetails."Total Users" = $totalUsers
        $storeDetails."White Space" = (($whitespace | where {$_.database -match $objMailboxStore.Name} | select -last 1).mb)
        $storeDetails.LastFullBackup = $objMailboxStore.LastFullBackup
        $storeTable += $storeDetails
        $MyReport += Get-HTMLTable ($storeTable)
       $MyReport += Get-CustomHeaderClose
       $MyReport += Get-CustomHeader "2" "MAPI Connectivity"
       Write-Host "..performing MAPI connectivity test"
       $colMAPIResults = Test-MAPIConnectivity -Server $Target
        $MyReport += Get-HTMLTable ($colMAPIResults | select Database, $newResult, $latencyMS, Error)
       $MyReport += Get-CustomHeaderClose
       $MyReport += Get-CustomHeader "2" "Mailflow Test"
       Write-Host "..performing Mailflow test"
       $colMailflowResults = Test-Mailflow -Server $Target
        $MyReport += Get-HTMLTable ($colMailflowResults | select TestMailflowResult, $MessageLatencyTime)
       $MyReport += Get-CustomHeaderClose
      Write-Host "..getting Exchange services"
      $ListOfServices = (gwmi -computer $Target -query "select * from win32_service where Name like 'MSExchange%' or Name like 'IIS%' or Name like 'SMTP%' or Name like 'POP%' or Name like 'W3SVC%'")
      $MyReport += Get-CustomHeader "2" "Exchange Services"
       $Services = @()
       Foreach ($Service in $ListOfServices){
        $Details = "" | Select Name,Account,"Start Mode",State,"Expected State"
        $Details.Name = $Service.Caption
        $Details.Account = $Service.Startname
        $Details."Start Mode" = $Service.StartMode
        If ($Service.StartMode -eq "Auto")
          if ($Service.State -eq "Stopped")
           $Details.State = $Service.State
           $Details."Expected State" = Get-Ink ("Unexpected")
         If ($Service.StartMode -eq "Auto")
          if ($Service.State -eq "Running")
           $Details.State = $Service.State
           $Details."Expected State" = Get-Ink ("OK")
         If ($Service.StartMode -eq "Disabled")
          If ($Service.State -eq "Running")
           $Details.State = $Service.State
           $Details."Expected State" = Get-Ink ("Unexpected")
         If ($Service.StartMode -eq "Disabled")
          if ($Service.State -eq "Stopped")
           $Details.State = $Service.State
           $Details."Expected State" = Get-Ink ("OK")
         If ($Service.StartMode -eq "Manual")
          $Details.State = $Service.State
          $Details."Expected State" = Get-Ink ("OK")
         If ($Service.State -eq "Paused")
          $Details.State = $Service.State
          $Details."Expected State" = Get-Ink ("OK")
        $Services += $Details
        $MyReport += Get-HTMLTable ($Services)
       $MyReport += Get-CustomHeaderClose
        $eventLogs=[System.Diagnostics.EventLog]::GetEventLogs($Target) | where {($_.LogDisplayName -eq "Application") -OR ($_.LogDisplayName -eq "System")}
        $warningEvents = @()
        $errorEvents = @()
        $LogSettings = @()
     $MyReport += Get-CustomHTMLClose
     $fullReport += $MyReport
     $MyReport = $null
     $Date = Get-Date
     $Filename = ".\" + "Exchange_Health" + "_" + $date.Hour + $date.Minute + "_" + $Date.Day + "-" + $Date.Month + "-" + $Date.Year + ".htm"
     $fullReport | out-file -encoding ASCII -filepath $Filename
     Write "Audit saved as $Filename"
    Invoke-Item $Filename

    please refer to my scripts below, it should get you started.
    http://www.myexchangeworld.com/2010/03/powershell-disk-space-html-email-report/
    http://www.myexchangeworld.com/2010/07/powershell-script-to-monitor-exchange-server-2010-services-email-report/
    you can customsise this to your needs and add relevant information.
    cheers
    thiyagu
    Thiyagu | MCTS/MCITP - Exchange 2007 | MCSE 2003[Messaging] | http://www.myExchangeWorld.com. This posting is provided "AS IS" with no warranties, and confers no rights.

  • 1:N Replication Health Check

    Hello,
    When we run the check of 1:N Replication Health Check  We are getting the following:
    We cant replicate the tables mentioned in this report.
    How should we proceed to fix this issue?
    Thanks,
    Amir

    Hi Roy,
    look at this note. it describes how to setup 1:n once you already created the config without "multiple usage" flagged.
    Best,
    Tobias
    SAP Note 1898479:
    SLT replication: Redefinition of existing DB triggers

  • In TOAD, Need to Enable DB Health check option

    Hi,
    I am using TOAD 10.1.1.8 DBA Suite.
    As my TOAD DBA Suite, DB Health check option should be there under
    Database -> Diagnose -> DB Health Check.
    But its not showing this option.
    Kindly guide me as How to enable DB Health check.
    Expecting your valuable reply.
    Thanks in advance,
    Orahar.
    Edited by: Orahar on Feb 10, 2010 3:06 PM

    Sure.
    As I didn't get any valuable response from TOAD Forum, I have posted here.
    I hope, I will get the solution here at OTN.
    Thanks.

  • How to health check time capsule disk

    how to health check time capsule disk?
    when doing time machine backuping and copying files into time capsule, it would take ages and very long time.. is the disk going to die soon?
    is there anyway i can check the disk?
    my time capsule is 2TB current model.
    please help.
    thank you.

    Time Machine automatically checks the backups on the disk.  It does a quick check (a few seconds) before every backup, and periodically (every month, I think) does a much more thorough check.
    You can do that yourself, by holding the Alt/Option key while selecting the TM icon in your menubar, and selecting Verify Backups.  That may take quite a while, if you have a lot of data.  I'd recommend connecting via Ethernet, as it will still be slow, but 2-3 times faster than WIFI.

  • Turning Off The Alert - Notebook PC Battery Replacement Program Alert in Health Check.

    I want to turn off the Notebook PC Battery Replacement Program Alert in Health Check. It continues to alert me for months now. This is driving me batty since I have checked it 3 times and it is not included in the recall! I have a HP Pavillion dv6000 running Windows Vista Home Premium Edition. Any help to turn this darn alert off permanently would be very helpful. Thanks.

    Thank you to all who have read this post so far.  Please continue to contact HP directly using the above information.
    Matthew|Community Advocate | Best Buy® Corporate
    Visit our Channel on
     Private Message

  • Health Check on 11.5.9

    Hi Friends,
    I want to do Health check on my E-Business suite 11.5.9(both Database and Application) please suggest how to do?
    Regards,
    Arun

    Hi,
    Hi Arun,
    You can refer the following ML doc,
    [Oracle Application Object Library Best Practices: E-Business Suite Diagnostic Tests Health Check Test|https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=471667.1]
    Thanks,
    Anchorage :)Do NOT use this document and install the script since it is for R12 (you are on 11.5.9).
    Regards,
    Hussein

Maybe you are looking for

  • How can I delete my Adobe Account?

    How can I delete my Adobe Account?

  • Macbook Pro 13 (mid-2009) dust behind glass

    Hi there, I bought my MBP 13 just 2 weeks ago and while cleaning the glass panel today I discovered dust behind the glass. So there is dust between glass and LCD. Is this normal? Should I be worried? Should I return my MBP? I mean if it is a common p

  • Queue loses messages during JMS Module untargeting.

    Hello,           I have JMS Module with a Queue. I use persistent store for the queue.           I send some messages to the Queue and i can see them present in monitoring window in Administration console, as well as in WLStore table in db.          

  • ABAP Sending Email in Bcc

    Friends, I'm using below code to send an email , But problem is , After using the Bcc field , People whose name used in Bcc filed are still appering in 'To' field when they receive the email, Actually the people who added in Bcc field must be disabll

  • Help option not working in photoshop element

    hi, I have photoshop element 8 installed on windows XP. when i go to help->photoshop element help or press F1 nothing happens. I have uninstalled nad reinstalled it two times. PLZ help