System Information Class for Windows

버전 1.1.0.0 (45.9 KB) 작성자: Xin Zhao
This class will query the current system information in MATLAB. Works with R2009a and up.
다운로드 수: 1.6K
업데이트 날짜: 2010/2/20

라이선스 보기

Recently, we just got an interesting question about how to measure the CPU usage of current MATLAB process.

Frankly speaking, during my more than 5 years working in The MathWorks, I never thought we can do it inside MATLAB. But with the recent and excellent .Net support, this is actually quite easy and straightforward.

This class, wrapping all the basic information regarding to you Windows machine, gives you full knowledge of the performance you may want to know.

the detailed information includes:
1. Machine Name, Total Physical Memory, Processor(CPU) information
2. CPU usage in %
3. Memory usage in MB

the class has one important public method called 'measure', every time you call it, it will measure and store the CPU usage and memory usage.

the class has been tested in Winxp, Vista(SP1), Windows 7, but feel free to send me fix requests.

At the end there is a demo of using this class.
1. run startRecordPerformance
2. do what ever you want to do, (don't use clear all, of course)
3. run stopRecordAndDisplay
4. do your clean up, say 'delete(perfData), delete(t)'

Note: I am working on a GUI version for performance measurement purpose(using this class of course), so I need the processor information.
But this info needs to read the registry of windows, and it makes the class initialization slow. Unfortunately that's the only easy way I know in MATLAB, so if you don't need it, delete the specific lines in the class.

인용 양식

Xin Zhao (2025). System Information Class for Windows (https://kr.mathworks.com/matlabcentral/fileexchange/26662-system-information-class-for-windows), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2009b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 C Shared Library Integration에 대해 자세히 알아보기
도움

도움 준 파일: System Resource Monitor for Windows

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.1.0.0

UPDATE-FEB 20, 2010
This class does not work the R2008b and previous MATLAB versions. For R2009a, there is a new syntax in R2009b not supported, just made the changes to use the old syntax.
now it works fine with R2009a and up.

1.0.0.0