SpQuerySysInfo
From EDM2
Returns values of static system variables.
Syntax: value = spQuerySysInfo (valueID)
Parameter: valueID – identifier of system variable to be queried.
valueID | description |
---|---|
QSV_MAX_PATH_LENGTH | Maximum length, in bytes, of a path name. |
QSV_MAX_TEXT_SESSIONS | Maximum number of text sessions. |
QSV_MAX_PM_SESSIONS | Maximum number of PM sessions. |
QSV_MAX_VDM_SESSIONS | Maximum number of DOS sessions. |
QSV_BOOT_DRIVE | Drive from which the system was started (1 means drive A, 2 means drive B, and so on). |
QSV_DYN_PRI_VARIATION | Dynamic priority variation flag (0 means absolute priority, 1means dynamic priority). |
QSV_MAX_WAIT | Maximum wait in seconds. |
QSV_MIN_SLICE | Minimum time slice in milliseconds. |
QSV_MAX_SLICE | Maximum time slice in milliseconds. |
QSV_PAGE_SIZE | Memory page size in bytes. This value is 4096 for the 80386 processor. |
QSV_VERSION_MAJOR | Major version number. |
QSV_VERSION_MINOR | Minor version number. |
QSV_VERSION_REVISION | Revision number. |
QSV_MS_COUNT | Value of a 32-bit, free-running millisecond counter. This value is zero when the system is started. |
QSV_TIME_LOW | Low-order 32 bits of the time in seconds since January 1, 1970 at 0:00:00. |
QSV_TIME_HIGH | High-order 32 bits of the time in seconds since January 1, 1970 at 0:00:00. |
QSV_TOTPHYSMEM | Total number of bytes of physical memory in the system. |
QSV_TOTRESMEM | Total number of bytes of resident memory in the system. |
QSV_TOTAVAILMEM | Maximum number of bytes of memory that can be allocated by all processes in the system. This number is advisory and is not guaranteed, since system conditions change constantly. |
QSV_MAXPRMEM | Maximum number of bytes of memory that this process can allocate in its private arena. This number is advisory and is not guaranteed, since system conditions change constantly. |
QSV_MAXSHMEM | Maximum number of bytes of memory that a process can allocate in the shared arena. This number is advisory and is not guaranteed, since system conditions change constantly. |
QSV_TIMER_INTERVAL | Timer interval in tenths of a millisecond. |
QSV_MAX_COMP_LENGTH | Maximum length, in bytes, of one component in a path name. |
QSV_FOREGROUND_FS_SESSION | Session ID of the current foreground full-screen session. Note that this only applies to full-screen sessions. The Presentation Manager session (which displays Viowindowed, PM, and windowed DOS Sessions) is full-screen session ID 1. |
QSV_FOREGROUND_PROCESS | Process ID of the current foreground process. |
Returns: Value of system variable.
Example Code:
/* uptime.cmd (spUtils Example Code) */ /* writes the time since last IPL to stdout */ CALL RXFUNCADD 'spLoadFuncs','spUtils','spLoadFuncs' CALL spLoadFuncs sec=spQuerySysInfo('QSV_MS_COUNT')%1000 SAY sec%86400 || ' day(s) ' ||, (sec%3600)//24 || ' hour(s) ' ||, (sec%60)//60 || ' minute(s) ' ||, sec//60 || ' second(s)'