Skip to content

Commit

Permalink
remove USR1 "Save internal DB to disk" (#17249)
Browse files Browse the repository at this point in the history
(cherry picked from commit 5ea9665)
  • Loading branch information
ilyam8 authored and Ferroin committed Mar 27, 2024
1 parent e4a9027 commit 892aa76
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 20 deletions.
1 change: 0 additions & 1 deletion src/daemon/README.md
Expand Up @@ -110,7 +110,6 @@ The command line options of the Netdata 1.10.0 version are the following:
Signals netdata handles:

- HUP Close and reopen log files.
- USR1 Save internal DB to disk.
- USR2 Reload health configuration.
```
Expand Down
1 change: 0 additions & 1 deletion src/daemon/main.c
Expand Up @@ -820,7 +820,6 @@ int help(int exitcode) {

fprintf(stream, "\n Signals netdata handles:\n\n"
" - HUP Close and reopen log files.\n"
" - USR1 Save internal DB to disk.\n"
" - USR2 Reload health configuration.\n"
"\n"
);
Expand Down
10 changes: 1 addition & 9 deletions system/freebsd/rc.d/netdata.in
Expand Up @@ -17,10 +17,9 @@ required_files="@configdir_POST@/netdata.conf"
start_precmd="netdata_prestart"
stop_postcmd="netdata_poststop"

extra_commands="reloadhealth savedb"
extra_commands="reloadhealth"

reloadhealth_cmd="netdata_reloadhealth"
savedb_cmd="netdata_savedb"

netdata_prestart()
{
Expand All @@ -42,12 +41,5 @@ netdata_reloadhealth()
return 0
}

netdata_savedb()
{
p=`cat ${pidfile}`
kill -USR2 ${p} && echo "Sent USR1 (save db) to pid ${p}"
return 0
}

load_rc_config $name
run_rc_command "$1"
10 changes: 1 addition & 9 deletions system/openrc/init.d/netdata.in
Expand Up @@ -6,10 +6,9 @@ NETDATA_PIDFILE="@localstatedir_POST@/run/netdata/netdata.pid"

description="Run the Netdata system monitoring agent."

extra_started_commands="reload rotate save"
extra_started_commands="reload rotate"
description_reload="Reload health configuration."
description_rotate="Reopen log files."
description_save="Force sync of database to disk."

command_prefix="@sbindir_POST@"
command="${command_prefix}/netdata"
Expand Down Expand Up @@ -70,10 +69,3 @@ rotate() {
"Failed to reopen Netdata log files" \
SIGHUP
}

save() {
run_cmd save-database \
"Saving Netdata database" \
"Failed to save Netdata database" \
SIGUSR1
}

0 comments on commit 892aa76

Please sign in to comment.