
Append a 30-minute activity snapshot to the log files
log_db_snapshot.RdCalls get_db_activity and appends one row per active
connection to connections_log.csv and one row per database to
stats_log.csv. Designed to be called on a regular schedule
(e.g. every 30 minutes via Windows Task Scheduler).
Arguments
- con
A database connection from
call.mydb.- log_dir
Directory containing the log files. Will be initialised with
init_activity_logif it does not exist yet.- verbose
Logical. Print a one-line confirmation? Default
TRUE.
Examples
if (FALSE) { # \dontrun{
con <- call.mydb()
log_db_snapshot(con, log_dir = "~/db_logs")
} # }