dm_freebsd_vmstat Function

public function dm_freebsd_vmstat(vmstat) result(rc)

Returns output of vmstat(8). The procedure runs for > 0.1 seconds! Executes the following command and reads the last output values:

$ vmstat -H dummy 0.1 2
 procs    memory    page                    faults       cpu
 r  b  w  avm  fre  flt  re  pi  po   fr   sr   in   sy   cs us sy id
 1  0  0 607119396864 5717385216 2116   0   1   0 3283  279 1396 9058 9120  4  2 92
 0  0  0 607119396864 5717381120   30   0   0   0    0  300  120 1650 4000  0  3 96

The function returns the following error codes:

  • E_FORMAT if output format is unexpected.
  • E_PLATFORM if current system is not FreeBSD.
  • E_READ if reading failed or pipe returned no bytes.
  • E_SYSTEM if system call failed.

Arguments

Type IntentOptional Attributes Name
integer(kind=i8), intent(out) :: vmstat(FREEBSD_NVMSTAT)

Values.

Return Value integer


Calls

proc~~dm_freebsd_vmstat~~CallsGraph proc~dm_freebsd_vmstat dm_freebsd_vmstat proc~dm_is_error dm_is_error proc~dm_freebsd_vmstat->proc~dm_is_error proc~dm_pipe_close dm_pipe_close proc~dm_freebsd_vmstat->proc~dm_pipe_close proc~dm_pipe_open dm_pipe_open proc~dm_freebsd_vmstat->proc~dm_pipe_open proc~dm_pipe_read_line dm_pipe_read_line proc~dm_freebsd_vmstat->proc~dm_pipe_read_line c_pclose c_pclose proc~dm_pipe_close->c_pclose proc~dm_pipe_is_connected dm_pipe_is_connected proc~dm_pipe_close->proc~dm_pipe_is_connected c_popen c_popen proc~dm_pipe_open->c_popen proc~dm_f_c_string dm_f_c_string proc~dm_pipe_open->proc~dm_f_c_string proc~dm_pipe_open->proc~dm_pipe_is_connected c_fgets c_fgets proc~dm_pipe_read_line->c_fgets proc~dm_pipe_read_line->proc~dm_pipe_is_connected

Called by

proc~~dm_freebsd_vmstat~~CalledByGraph proc~dm_freebsd_vmstat dm_freebsd_vmstat proc~dm_freebsd_vmstat_cpu_idle dm_freebsd_vmstat_cpu_idle proc~dm_freebsd_vmstat_cpu_idle->proc~dm_freebsd_vmstat