Abstraction layers over system calls.
Operating system information type.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| character(len=UNAME_LEN), | public | :: | system_name | = | ' ' |
OS name. |
|
| character(len=UNAME_LEN), | public | :: | node_name | = | ' ' |
Host name. |
|
| character(len=UNAME_LEN), | public | :: | release | = | ' ' |
OS release. |
|
| character(len=UNAME_LEN), | public | :: | version | = | ' ' |
OS version. |
|
| character(len=UNAME_LEN), | public | :: | machine | = | ' ' |
Platform. |
Turns current running program into a daemon. On FreeBSD, it is probably easier to run the process through daemon(8) instead.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | command |
Returns system error string from strerror(3). If error is not
passed, this function uses errno(2) as error code.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in), | optional | :: | error |
System error code. |
Error message.
Returns number of CPU cores of first processor on Linux and FreeBSD
in ncore. On error, argument ncore will be 0.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(out) | :: | ncore |
Number of CPU cores. |
Returns CPU temperature in °C of first processor on Linux and FreeBSD
in temperature. On error, argument temperature is set to 0.0.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real, | intent(out) | :: | temperature |
Temperature [°C] |
Returns model name of first CPU in model from /proc/cpuinfo on
Linux and from sysctl(8) on FreeBSD, for instance:
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(inout) | :: | model |
Hardware model. |
Returns free disk space of file or directory. Argument path must
be a file or directory, for example, / or .. For security
reasons, path must not be a file system or ZFS pool. The function
calls df(1) internally and expects sizes in 512K (FreeBSD) or
1024K (Linux) blocks.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | path |
File or directory. |
||
| character(len=*), | intent(inout), | optional | :: | file_system |
File system path (device, ZFS pool). |
|
| integer(kind=i8), | intent(out), | optional | :: | size |
Size [byte]. |
|
| integer(kind=i8), | intent(out), | optional | :: | used |
Used space [byte]. |
|
| integer(kind=i8), | intent(out), | optional | :: | available |
Available space [byte] |
|
| integer, | intent(out), | optional | :: | capacity |
Capacity [%] |
|
| character(len=*), | intent(inout), | optional | :: | mounted_on |
Mount point. |
Returns host name from uname in name. The argument must be large
enough to hold the name. On error, argument name will be empty.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(inout) | :: | name |
Host name. |
Returns load averages from uptime(1) (FreeBSD) or /proc/loadavg
(Linux). On error, the arguments will be set to 0.0.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real, | intent(out), | optional | :: | avg1 |
Average, 1 min. |
|
| real, | intent(out), | optional | :: | avg5 |
Average, 5 min. |
|
| real, | intent(out), | optional | :: | avg15 |
Average, 15 min. |
Waits for child process sets PID. Returns E_SYSTEM on error.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(out) | :: | pid |
Process id. |
Forks process and returns PID.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(out) | :: | pid |
Process id. |
Returns the relative path of the executable. The argument must be large enough to hold the path.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(inout) | :: | path |
Returned path. |
Returns the process id (PID).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(out) | :: | pid |
Process id. |
Returns uname information (operating system, hostname, …). On error,
argument error is set to E_SYSTEM.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(uname_type), | intent(out) | :: | uname |
Uname type. |
||
| integer, | intent(out), | optional | :: | error |
Error code. |
Returns system uptime in uptime [sec]. On error, argument error
is set to E_SYSTEM and uptime to 0.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=i8), | intent(out) | :: | uptime |
Uptime [sec]. |
||
| integer, | intent(out), | optional | :: | error |
Error code. |