dm_linux Module

Abstraction layer over Linux-specific APIs.


Uses

  • module~~dm_linux~~UsesGraph module~dm_linux dm_linux module~dm_error dm_error module~dm_linux->module~dm_error module~dm_kind dm_kind module~dm_linux->module~dm_kind module~dm_pipe dm_pipe module~dm_linux->module~dm_pipe module~dm_platform dm_platform module~dm_linux->module~dm_platform module~dm_error->module~dm_kind module~dm_ascii dm_ascii module~dm_error->module~dm_ascii iso_fortran_env iso_fortran_env module~dm_kind->iso_fortran_env module~dm_pipe->module~dm_error module~dm_pipe->module~dm_kind unix unix module~dm_pipe->unix

Used by

  • module~~dm_linux~~UsedByGraph module~dm_linux dm_linux module~dmpack dmpack module~dmpack->module~dm_linux proc~dm_system_cpu_cores dm_system_cpu_cores proc~dm_system_cpu_cores->module~dm_linux proc~dm_system_cpu_model dm_system_cpu_model proc~dm_system_cpu_model->module~dm_linux proc~dm_system_cpu_temperature dm_system_cpu_temperature proc~dm_system_cpu_temperature->module~dm_linux proc~dm_system_disk_free dm_system_disk_free proc~dm_system_disk_free->module~dm_linux proc~dm_system_load_average dm_system_load_average proc~dm_system_load_average->module~dm_linux

Functions

public function dm_linux_disk_free(path, file_system, size, used, available, capacity, mounted_on) result(rc)

Returns free disk space of file or directory. Argument path must be a file or directory, for example, / or .. The function calls df(1) internally and expects sizes in 1024K blocks.

Read more…

Arguments

Type IntentOptional 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.

Return Value integer

public function dm_linux_procfs_cpu_cores(ncore) result(rc)

Returns number of CPU cores from /proc/cpuinfo (cpu cores of processor 0).

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(out) :: ncore

Number of CPU cores.

Return Value integer

public function dm_linux_procfs_cpu_idle(idle) result(rc)

Returns CPU idle time of from /proc/stat (cpu):

Read more…

Arguments

Type IntentOptional Attributes Name
integer, intent(out) :: idle

CPU idle time [%].

Return Value integer

public function dm_linux_procfs_cpu_model(model) result(rc)

Returns model name of first CPU from /proc/cpuinfo (model name of processor 0), for instance:

Read more…

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(inout) :: model

Hardware model.

Return Value integer

public function dm_linux_procfs_load_average(avg1, avg5, avg15) result(rc)

Returns load averages from /proc/loadavg.

Read more…

Arguments

Type IntentOptional 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.

Return Value integer

public function dm_linux_sys_cpu_temperature(temperature) result(rc)

Reads temperature of first CPU in °C from /sys/class/thermal/thermal_zone0/temp.

Read more…

Arguments

Type IntentOptional Attributes Name
real, intent(out) :: temperature

Temperature [°C]

Return Value integer