sysInfo.windowsdir
A read only variable to get the Windows directory as a <string> value.
sysInfo.systemdir
A read only variable to get the Windows System directory as a <string> value.
sysInfo.tempdir
A read only variable to get the Temp directory as a <string> value.
sysInfo.currentdir
Variable to get/set the current directory as a <string> value.
sysInfo.username
A read only variable to get the user name as a <string> value.
sysInfo.computername
A read only variable to get the computer name as a <string> value.
sysInfo.cpucount
A read only variable to get the number of CPUs as a <integer> value.
Returns a 7 element array containing system memory status data. The array elements contain the following, respectively:
percent of memory in use
bytes of physical memory
free physical memory bytes
bytes of paging file
free bytes of paging file
user bytes of address space
free user bytes
Example:
(
r=sysinfo.getSystemMemoryInfo()
for i=2 to 7 do r[i] /= (1024*1024.)
format "percent of memory in use:\t%\n" r[1]
format "total physical memory:\t% MB\n" r[2]
format "free physical memory:\t% MB\n" r[3]
format "used physical memory:\t% MB\n" (r[2]-r[3])
format "total paging file size:\t% MB\n" r[4]
format "free paging file size:\t% MB\n" r[5]
format "used paging file size:\t% MB\n" (r[4]-r[5])
format "total virtual memory:\t% MB\n" r[6]
format "free virtual memory:\t\t% MB\n" r[7]
format "used virtual memory:\t\t% MB\n" (r[6]-r[7])
ok
)
Returns:
percent of memory in use: 0
total physical memory: 255.359 MB
free physical memory: 16.5156 MB
used physical memory: 238.844 MB
total paging file size: 1016.3 MB
free paging file size: 757.898 MB
used paging file size: 258.398 MB
total virtual memory: 2047.88 MB
free virtual memory: 1846.55 MB
used virtual memory: 201.328 MB
OK
Returns a 9 element array containing 3ds max memory status data. The array elements contain the following, respectively:
Page Fault Count
Peak Working Set Size
Working Set Size
Quota Peak Paged Pool Usage
Quota Paged Pool Usage
Quota Peak NonPaged Pool Usage
Quota NonPaged Pool Usage
Pagefile Usage
Peak Pagefile Usage
Example:
(
r=sysinfo.getMAXMemoryInfo()
for i=2 to 9 do r[i] /= (1024*1024.)
format "Page Fault Count:\t\t\t%\n" r[1]
format "Peak Working Set Size:\t\t% MB\n" r[2]
format "Working Set Size:\t\t\t% MB\n" r[3]
format "Quota Peak Paged Pool Usage:\t% MB\n" r[4]
format "Quota Paged Pool Usage:\t\t% MB\n" r[5]
format "Quota Peak NonPaged Pool Usage:\t% MB\n" r[6]
format "Quota NonPaged Pool Usage:\t\t% MB\n" r[7]
format "Pagefile Usage:\t\t\t% MB\n" r[8]
format "Peak Pagefile Usage:\t\t\t% MB\n" r[9]
ok
)
Returns:
Page Fault Count: 32948
Peak Working Set Size: 70.3594 MB
Working Set Size: 70.3594 MB
Quota Peak Paged Pool Usage: 0.166186 MB
Quota Paged Pool Usage: 0.161236 MB
Quota Peak NonPaged Pool Usage: 0.0213509 MB
Quota NonPaged Pool Usage: 0.0213509 MB
Pagefile Usage: 58.9023 MB
Peak Pagefile Usage: 58.9219 MB
See also