File: SIGNALS

package info (click to toggle)
pmacct 1.7.6-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 11,548 kB
  • sloc: ansic: 106,538; sh: 4,876; cpp: 4,340; python: 3,631; makefile: 502
file content (77 lines) | stat: -rw-r--r-- 3,937 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
SIGNALS:
Here follows a list of supported signals and their meaning. If a signal is
not being properly delivered to the daemon, and this is on a system running
SELinux, check for SELinux interferences.


Core process:
SIGCHLD:	used by the Core Process to handle gracefully his loved child
		processes (plugins). This is internal, ie. should not be sent
		by users. To end gracefully the daemon use SIGINT;
SIGHUP:         reopens the logging infrastructure. Works with both syslog and
		logfiles; it also works with streamed logging of BGP messages/
		events (bgp_daemon_msglog_file), streamed logging of BMP data/
		stats/events (bmp_daemon_msglog_file) and streamed logging of
		sFlow counters (sfacctd_counter_file); this signal must be sent
		to all running processes;
SIGUSR1:        returns various stats via the configured log output (logfile,
		syslog) or, if none is configured, to console; the syslog level
		used is NOTICE and the facility is selected through config. The
		feature is implemented for pmacctd, uacctd, nfacctd and sfacctd
		daemons. Following is an example of the output emitted by flow
		daemons, nfacctd and sfacctd:

		NOTICE ( default/core ): +++
		NOTICE ( default/core ): stats [0.0.0.0:2100] agent=X.X.X.X:0 time=1515772618 packets=1 bytes=496 seq_good=1 seq_jmp_fwd=0 seq_jmp_bck=0
		NOTICE ( default/core ): stats [0.0.0.0:2100] agent=Y.Y.Y.Y:0 time=1515772618 packets=2 bytes=992 seq_good=2 seq_jmp_fwd=0 seq_jmp_bck=0
		NOTICE ( default/core ): stats [0.0.0.0:2100] time=1515772618 discarded_packets=0
		NOTICE ( default/core ): ---

		Following is an example of the output emitted by pmacctd:

		NOTICE ( default/core ): +++
		NOTICE ( default/core ): stats [XXX, 0] time=1515772618 received_packets=1000 dropped_packets=0
		NOTICE ( default/core ): stats [YYY, 1] time=1515772618 received_packets=1000 dropped_packets=0
		NOTICE ( default/core ): ---

		Note: stats for nfacctd and sfacctd daemons are logged at the
		next useful flow packet being collected (only worth nothing in
		test and lab scenarios). This signal applies to Core Process
		only;
SIGUSR2:	if 'maps_refresh' config directive is enabled, it causes maps
		to be reloaded (ie. pre_tag_map, bgp_agent_map, etc.). If also
		indexing is enabled, ie. maps_index, indexes are re-computed;
		depending which process loads a map (ie. Core Process, [some
		of the active] Plugins, etc.), the signal must target the right
		process in order to be effective; where a map is computed can
		be derived by the logs, ie.:

		INFO ( default/core ): [/path/to/primitives.lst] (re)loading map.
		INFO ( default/core ): [/path/to/primitives.lst] map successfully (re)loaded.

		primitives.lst is loaded by the core process and a signal to
		reload such map should be sent to the Core Process. There is
		usually no harm in sending this signal to all processes unless
		in presence of a use-case to relad different maps at different
		time intervals. 
SIGINT:		the signal is used by the Core Process itself and propagated
		to each running plugin for graceful termination (ie. send BGP
		NOTIFICATION message to established BGP sessions, close open
		files, remove PID files, purge data, etc.). See Q16 of the
		FAQS document for recommendations on how to best send SIGINT
		signals to the daemon;
SIGTERM:	not handled (which means it follows the default behaviour for
		the OS) if the daemon is started in background; otherwise it 
		works like SIGINT;
SIGPIPE:	ignored;

Plugin (SQL, noSQL, memory, print, tee, probes, etc.) processes:
SIGPIPE:	ignored;
SIGCHLD:	ignored;
SIGHUP:		reopens the logging infrastructure. Works with both syslog and
                logfiles;
SIGUSR1:	ignored;
SIGUSR2:        if 'maps_refresh' configuration directive is enabled it causes
		maps loaded by the Plugin to be reloaded;
SIGINT:		causes the process to exit gracefully; if directed to a specific
		Plugin, it will cause shut down iof only that one plugin.