Win32OperatingSystem.st
changeset 10718 1c90fa042d79
parent 10712 157620d15512
child 10719 a899248de72c
equal deleted inserted replaced
10717:244d73ab8b55 10718:1c90fa042d79
 10440     PerformanceText isNil ifTrue:[
 10440     PerformanceText isNil ifTrue:[
 10441         PerformanceText := Win32OperatingSystem registryEntry key:'HKEY_PERFORMANCE_TEXT'.
 10441         PerformanceText := Win32OperatingSystem registryEntry key:'HKEY_PERFORMANCE_TEXT'.
 10442     ].
 10442     ].
 10443 
 10443 
 10444     ^ PerformanceText
 10444     ^ PerformanceText
       
 10445 ! !
       
 10446 
       
 10447 !Win32OperatingSystem::PerformanceData class methodsFor:'queries - memory'!
       
 10448 
       
 10449 getFreePageFileSizeInKB
       
 10450 
       
 10451     %{
       
 10452         MEMORYSTATUS mState;       
       
 10453         GlobalMemoryStatus (&mState);
       
 10454 
       
 10455         return __mkSmallInteger(mState.dwAvailPageFile / 1024);
       
 10456     %}.
       
 10457 
       
 10458     "
       
 10459         self getFreePageFileSizeInKB       
       
 10460     "
       
 10461 !
       
 10462 
       
 10463 getFreePageFileSizeInMB
       
 10464     ^ (self getFreePageFileSizeInKB / 1024) asInteger       
       
 10465 
       
 10466     "
       
 10467         self getFreePageFileSizeInMB        
       
 10468     "
       
 10469 !
       
 10470 
       
 10471 getFreePhysicalMemoryInKB
       
 10472 
       
 10473     %{
       
 10474         MEMORYSTATUS mState;       
       
 10475         GlobalMemoryStatus (&mState);
       
 10476 
       
 10477         return __mkSmallInteger(mState.dwAvailPhys / 1024);
       
 10478     %}.
       
 10479 
       
 10480     "
       
 10481         self getFreePhysicalMemoryInKB       
       
 10482     "
       
 10483 !
       
 10484 
       
 10485 getFreePhysicalMemoryInMB
       
 10486     ^ (self getFreePhysicalMemoryInKB / 1024) asInteger       
       
 10487 
       
 10488     "
       
 10489         self getFreePhysicalMemoryInMB        
       
 10490     "
       
 10491 !
       
 10492 
       
 10493 getPageFileSizeInKB
       
 10494     ^ self getPageFileSizeInMB * 1024
       
 10495 
       
 10496     "
       
 10497         self getPageFileSizeInKB       
       
 10498     "
       
 10499 !
       
 10500 
       
 10501 getPageFileSizeInMB
       
 10502 
       
 10503     %{
       
 10504         SYSTEM_INFO sInfo;       
       
 10505         GetSystemInfo(&sInfo);
       
 10506 
       
 10507         return __mkSmallInteger(sInfo.dwPageSize);
       
 10508     %}.
       
 10509 
       
 10510     "
       
 10511         self getPageFileSizeInMB        
       
 10512     "
       
 10513 !
       
 10514 
       
 10515 getPhysicalMemoryInKB
       
 10516 
       
 10517     %{
       
 10518         MEMORYSTATUS mState;       
       
 10519         GlobalMemoryStatus (&mState);
       
 10520 
       
 10521         return __mkSmallInteger(mState.dwTotalPhys / 1024);
       
 10522     %}.
       
 10523 
       
 10524     "
       
 10525         self getPhysicalMemoryInKB       
       
 10526     "
       
 10527 !
       
 10528 
       
 10529 getPhysicalMemoryInMB
       
 10530     ^ (self getPhysicalMemoryInKB / 1024) asInteger       
       
 10531 
       
 10532     "
       
 10533         self getPhysicalMemoryInMB        
       
 10534     "
       
 10535 !
       
 10536 
       
 10537 getUsedMemoryInPercentage
       
 10538 
       
 10539     %{
       
 10540         MEMORYSTATUS mState;       
       
 10541         GlobalMemoryStatus (&mState);
       
 10542 
       
 10543         return __mkSmallInteger(mState.dwMemoryLoad);
       
 10544     %}.
       
 10545 
       
 10546     "
       
 10547         self getUsedMemoryInPercentage   
       
 10548     "
       
 10549 !
       
 10550 
       
 10551 getVirtualMemoryInKB
       
 10552 
       
 10553     %{
       
 10554         MEMORYSTATUS mState;       
       
 10555         GlobalMemoryStatus (&mState);
       
 10556 
       
 10557         return __mkSmallInteger(mState.dwTotalVirtual / 1024);
       
 10558     %}.
       
 10559 
       
 10560     "
       
 10561         self getVirtualMemoryInKB       
       
 10562     "
       
 10563 !
       
 10564 
       
 10565 getVirtualMemoryInMB
       
 10566     ^ (self getVirtualMemoryInKB / 1024) asInteger       
       
 10567 
       
 10568     "
       
 10569         self getVirtualMemoryInMB
       
 10570     "
 10445 ! !
 10571 ! !
 10446 
 10572 
 10447 !Win32OperatingSystem::PerformanceData methodsFor:'accessing'!
 10573 !Win32OperatingSystem::PerformanceData methodsFor:'accessing'!
 10448 
 10574 
 10449 objectArray
 10575 objectArray
 11118 
 11244 
 11119 availableMBytes
 11245 availableMBytes
 11120     ^ self getValuesByCounter:1382     
 11246     ^ self getValuesByCounter:1382     
 11121 
 11247 
 11122     "
 11248     "
 11123         self current availableMBytes   
 11249         self current availableMBytes      
 11124     "
 11250     "
 11125 ! !
 11251 ! !
 11126 
 11252 
 11127 !Win32OperatingSystem::PerformanceData::Network class methodsFor:'accessing'!
 11253 !Win32OperatingSystem::PerformanceData::Network class methodsFor:'accessing'!
 11128 
 11254 
 14164 ! !
 14290 ! !
 14165 
 14291 
 14166 !Win32OperatingSystem class methodsFor:'documentation'!
 14292 !Win32OperatingSystem class methodsFor:'documentation'!
 14167 
 14293 
 14168 version
 14294 version
 14169     ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.307 2007-09-11 09:09:48 sr Exp $'
 14295     ^ '$Header: /cvs/stx/stx/libbasic/Win32OperatingSystem.st,v 1.308 2007-09-12 08:28:27 sr Exp $'
 14170 ! !
 14296 ! !
 14171 
 14297 
 14172 Win32OperatingSystem initialize!
 14298 Win32OperatingSystem initialize!
 14173 Win32OperatingSystem::PerformanceData initialize!
 14299 Win32OperatingSystem::PerformanceData initialize!
 14174 Win32OperatingSystem::RegistryEntry initialize!
 14300 Win32OperatingSystem::RegistryEntry initialize!