A simple version of windows task manager

monitor_system(
  out_file = "system_monitor.csv",
  plot = !is.null(out_file),
  plot_time = 1/24
)

Arguments

monitor_df

NULL or results from previous call to envFunc::monitor_system()

Value

Dataframe

Examples

  df <- monitor_system()
#> Warning: There was 1 warning in `dplyr::mutate()`.
#>  In argument: `cpu = as.numeric(cpu)`.
#> Caused by warning:
#> ! NAs introduced by coercion
#> Error in ggplot(dplyr::filter(dplyr::filter(tidyr::pivot_longer(monitor_df,     dplyr::where(is.numeric)), !grepl("prop", name)), as.numeric(difftime(Sys.time(),     now, units = "days")) <= plot_time), aes(now, value)): could not find function "ggplot"

  counter <- 1

  while(counter < 3) {

    counter <- counter + 1

    Sys.sleep(1)

    df <- monitor_system(df)

  }
#> Warning: There was 1 warning in `dplyr::mutate()`.
#>  In argument: `cpu = as.numeric(cpu)`.
#> Caused by warning:
#> ! NAs introduced by coercion
#> Error: Invalid `file` argument: must be character