home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 2000 April / VPR0004B.BIN / DRIVER / COMPAQ / SP12255 / sp12255.exe / DMWEBC1.CAB / CPU.TPL < prev    next >
Text File  |  1999-06-22  |  5KB  |  190 lines

  1. <HTML>
  2. <!-- $Id: SB-INFO.TPL 1.10 1998/03/17 22:32:54 cboeker Q/A $ -->
  3. <!-- Copyright (C) 1998 Compaq Computer Corporation -->
  4.  
  5. <HEAD>
  6.  
  7. <SCRIPT LANGUAGE="JavaScript">
  8. <!--
  9. <!#COND.JS>
  10. <!#TABLES.JS>
  11.  
  12. //-->
  13. </SCRIPT>
  14.  
  15. <!#CPU.JS>
  16.  
  17. </HEAD>
  18. <SCRIPT LANGUAGE="JavaScript">
  19.  
  20. <!*, DMTF|FRU|*, 1, FRUIndex>
  21. <!*, DMTF|Operational State|*, 1, OsIndex>
  22.  
  23.  
  24.     <!-- ==================== CPU ==================== -->
  25.     writeTableLabel(sCPUs);
  26.     writeTableHead();
  27.  
  28.     <!*, DMTF|Processor|*, 4, Cpu>
  29.     <!*, DMTF|Processor|*, 5, CpuSpeed>
  30.     <!*, DMTF|Processor|*, 7, CpuUpgrade>
  31.     <!*, DMTF|Processor|*, 2, CpuType>
  32.         <!*, DMTF|Processor|*, 8, CpuFruIndex>
  33.     <!*, DMTF|Processor|*, 9, CpuOs>
  34.     <!*, DMTF|Processor|*, 10, CpuL1Cache>
  35.     <!*, DMTF|Processor|*, 11, CpuL2Cache>
  36.     <!*, DMTF|Processor|*, 12, CpuL3Cache>
  37.  
  38.     <!*, DMTF|System Cache|*, 4, CacheSize>
  39.  
  40.     <!*, DMTF|Operational State|*, 10, OsCurrentErrorStatus>
  41.     ErrCond = new Array();
  42.     ErrCond[0] = "Other";
  43.     ErrCond[1] = "Unknown";
  44.     ErrCond[2] = "OK";
  45.     ErrCond[3] = "Non-critical";
  46.     ErrCond[4] = "Critical";
  47.     ErrCond[5] = "Non-recoverable";
  48.  
  49.     cpuSocket = 0;
  50.         for (x = 0; x < Cpu.length; x++)
  51.         {
  52.         TempCond = 1;
  53.  
  54.         if (CpuOs[x] > 0)
  55.         {
  56.             ActualOsIndex = -1;
  57.             for (k = 0; k < OsIndex.length; k++)
  58.             {
  59.                 if (CpuOs[x] == OsIndex[k])
  60.                 {
  61.                     ActualOsIndex = k;
  62.                     break;
  63.                 }
  64.             }
  65.  
  66.             if (ActualOsIndex >= 0)
  67.             {
  68.                 for (j = 0; j <= ErrCond.length - 1; j++)
  69.                 {
  70.                     if (OsCurrentErrorStatus[ActualOsIndex] == ErrCond[j])
  71.                     {
  72.                         if (j < 2)
  73.                             TempCond = 1;
  74.                         else
  75.                             TempCond = j;
  76.                         break;
  77.                     }
  78.                 }
  79.             }
  80.         }
  81.  
  82.         CpuStatus = new cpqCondition(TempCond);
  83.  
  84.                 proc = "";
  85.                 proc = proc + CpuStatus.imageSmall() + Cpu[x] + " /" + CpuSpeed[x] + "Mhz";
  86.  
  87.         action = ActionArray[TempCond - 1];
  88.  
  89.             cache = "";
  90.         
  91.         if (CpuL1Cache[x] > 0)
  92.         {
  93.             if (CacheSize[CpuL1Cache[x] -1] > 1024)
  94.                 cache = "L1 " + CacheSize[CpuL1Cache[x] -1]/1024 + "MB";
  95.             else
  96.                 cache = "L1 " + CacheSize[CpuL1Cache[x] -1] + "KB";
  97.         }
  98.  
  99.         if (CpuL2Cache[x] > 0)
  100.         {
  101.             if (cache == "")
  102.             {
  103.                 if (CacheSize[CpuL2Cache[x] -1] > 1024)
  104.                     cache = "L2 " + CacheSize[CpuL2Cache[x] -1]/1024 + "MB";
  105.                 else
  106.                     cache = "L2 " + CacheSize[CpuL2Cache[x] -1] + "KB";
  107.             }
  108.             else
  109.             {
  110.                 if (CacheSize[CpuL2Cache[x] -1] > 1024)
  111.                     cache = cache + ", L2 " + CacheSize[CpuL2Cache[x] -1]/1024 + "MB";
  112.                 else
  113.                     cache = cache + ", L2 " + CacheSize[CpuL2Cache[x] -1] + "KB";
  114.             }
  115.         }
  116.  
  117.         if (CpuL3Cache[x] > 0)
  118.         {
  119.             if (cache == "")
  120.             {
  121.                 if (CacheSize[CpuL3Cache[x] -1] > 1024)
  122.                     cache = "L3 " + CacheSize[CpuL3Cache[x] -1]/1024 + "MB";
  123.                 else
  124.                     cache = "L3 " + CacheSize[CpuL3Cache[x] -1] + "KB";
  125.             }
  126.             else
  127.             {
  128.                 if (CacheSize[CpuL3Cache[x] -1] > 1024)
  129.                     cache = cache + ", L3 " + CacheSize[CpuL3Cache[x] -1]/1024 + "MB";
  130.                 else
  131.                     cache = cache + ", L3 " + CacheSize[CpuL3Cache[x] -1] + "KB";
  132.             }
  133.         }
  134.  
  135.             if("" == cache)
  136.                 cache = "none";
  137.  
  138.         Version = "N/A";
  139.         CpuSerialNumber = "";
  140.         CpuSerialNumberLabel = "";
  141.         if (CpuFruIndex[x] > 0)
  142.         {
  143.                     ActualFRUIndex = -1;
  144.                     for (k = 0; k < FRUIndex.length; k++)
  145.                     {
  146.                         if (CpuFruIndex[x] == FRUIndex[k])
  147.                         {
  148.                                 ActualFRUIndex = k;
  149.                                     break;
  150.                             }
  151.                     }
  152.                     if (ActualFRUIndex >= 0)
  153.                     {
  154.                         <!*, DMTF|FRU|*, 7, FRUSerialNumber>
  155.                             <!*, DMTF|FRU|*, 8, FRURevisionLevel>
  156.                     CpuSerialNumber = FRUSerialNumber[ActualFRUIndex];
  157.                             Version = FRURevisionLevel[ActualFRUIndex];
  158.                     }
  159.                 }
  160.         if (CpuSerialNumber != "")
  161.                     CpuSerialNumberLabel = sSerialNumber + ":";
  162.  
  163.  
  164.         if (x > 0)
  165.                        writeDoubleTableRow("","","","");
  166.  
  167.         if (CpuType[x] == "Central Processor")
  168.             cpuSocket = cpuSocket + 1;
  169.  
  170.  
  171.         writeDoubleTableRow( sProcessor  + ":",  proc,    sCache + ":",   cache);
  172.         writeDoubleTableRow( sSocket + ":",     cpuSocket,  sVersion + ":", Version);
  173.         writeDoubleTableRow( sType + ":",       CpuType[x], sUpgrade + ":",  CpuUpgrade[x]);
  174.  
  175.         if (CpuSerialNumber != "")
  176.             writeDoubleTableRow( CpuSerialNumberLabel,  CpuSerialNumber, "", "");
  177.             
  178.         writeDoubleTableRow( "", "", "", "");
  179.                 
  180.         writeSingleTableRowInDoubleTable(sAction + ":", action);
  181.  
  182.     }
  183.     writeTableTail();
  184.  
  185.     document.write("<BR>");
  186.  
  187. </SCRIPT>
  188. </HTML>
  189.  
  190.