12.  Obtaining System Information  

(unix-system-info)

This procedure returns a system-record with these fields:

+---------+--------+-----------------------------------+
| Field   |  Type  |             Contents              |
+---------+--------+-----------------------------------+
|hostname | string | the system's hostname             |
+---------+--------+-----------------------------------+
|sysname  | string | type of hardware platform         |
+---------+--------+-----------------------------------+
|osname   | string | operating system type and version |
+---------+--------+-----------------------------------+

The hostname is determined by a call to the UNIX gethostname() or uname() function; the system name and OS name are obtained from the configuration file that has been used to configure and install Elk.

(unix-file-limit limit file)

unix-file-limit can be used to query various system limits and options associated with files. limit is a symbol identifying the type of limit; file is a filename or file descriptor.

At least the following limits and options can be queried:

+-------------+------------------------------------------------+
|Limit/Option |                    Meaning                     |
+-------------+------------------------------------------------+
+-------------+------------------------------------------------+
|max-links    | maximum number of links to a file or directory |
+-------------+------------------------------------------------+
|max-name     | maximum length of a filename                   |
+-------------+------------------------------------------------+
|max-path     | maximum length of a pathname                   |
+-------------+------------------------------------------------+
|pipe-buf     | pipe buffer size                               |
+-------------+------------------------------------------------+
|no-trunc     | filename exceeding maximum length causes error |
|             | instead of being silently truncated            |
+-------------+------------------------------------------------+

Additional limits may be present on some platforms. The list of limits actually supported by this procedure can be obtained by a call to unix-list-file-limits (see below).

If present, the POSIX pathconf()/fpathconf() function is used to query a limit; in this case the specified filename or file descriptor is supplied as an argument to pathconf() or fpathconf(). If pathconf() is not available, or if calling it is not appropriate for the type of limit, a static (compile-time) value is returned.

The result type of unix-file-limit depends on the type of the specified limit (boolean in case of no-trunc, integer otherwise).

(unix-list-file-limits)

This procedure returns the list of limit symbols that can be supplied as arguments to unix-file-limit (see above).

(unix-job-control?)

This predicate returns #t if UNIX job control is available on the local system, #f otherwise. In a POSIX environment, this procedure may call sysconf().


Markup created by unroff 1.0,    September 24, 1996,    net@informatik.uni-bremen.de