10 Little Ones: Memory and CPU Figures (#1)
ColdFusion 10 beta adds three new functions that provide system stats:
- getCPUUsage()
- getSystemFreeMemory()
- getSystemTotalMemory()
1<b>CPU Usage</b> #getCPUUsage()#<br><br>
2
3<b>System Memory</b><br>
4Total #getSystemTotalMemory()#<br>
5Free #getSystemFreeMemory()#<br>
6
7% Free: #numberFormat( ( getSystemFreeMemory()/getSystemTotalMemory() ) *100, "999.99")#
2
3<b>System Memory</b><br>
4Total #getSystemTotalMemory()#<br>
5Free #getSystemFreeMemory()#<br>
6
7% Free: #numberFormat( ( getSystemFreeMemory()/getSystemTotalMemory() ) *100, "999.99")#
Which produces
CPU Usage 24.875624
System Memory
Total 8589934592
Free 1640640512
% Free: 19.10
Pretty straightforward and information that would look good in the new charting functionality...
(This is the first in a series to show off some of the smaller additions to ColdFusion 10).
Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Add Comment
Subscribe to Comments
# Posted By Raymond Camden
| 3/1/12 7:58 AM
# Posted By Sam Farmer
| 3/1/12 9:03 AM
Add Comment
