3 title: Controlling the Daemon
6 The main daemon that runs on nodes keeps internal stats and supports reloading of agents and changing
7 logging level without restarting.
9 If you want to reload all the agents without restarting the daemon you can just send it signal *USR1*
10 and it will reload its agents.
12 You can send *USR2* to cycle the log level through DEBUG to FATAL and back again, just keep sending
13 the signal and look at the logs.
15 Reloading agents work in most cases though we recommend a full daemon restart in production use
16 due to the nature of the ruby class loading system. If you are changing agent contents and relying
17 on the reload behavior you might end up with agents not being in a consistent state.
19 ## Obtaining daemon statistics
21 The daemon keeps a number of statistics about its operation, you can view these using the _inventory_
24 {% highlight console %}
25 % mco inventory example.com
28 Start Time: Mon Sep 24 17:37:28 +0100 2012
29 Config File: /etc/mcollective/server.cfg
30 Collectives: mcollective, fr_collective
31 Main Collective: mcollective
34 Messages Passed Filters: 44118
35 Messages Filtered: 8221
38 Total Processor Time: 527.06 seconds
39 System Time: 349.32 seconds
49 |------------|-------------------------------------------|
50 |Start Time |Local time on the node when the daemon started|
51 |Collectives |All known collectives this agent responds on|
52 |Main Collective |The primary collective|
53 |Process ID |The process ID of the mcollectived|
54 |Total Messages |Total messages received from the middleware|
55 |Messages Passed Filters|Amount of messages that was determined to be applicable to this node based on filters|
56 |Messages Filtered |Messages that did not apply to this node|
57 |Expired Messages |Received messages that had expired their TTL values|
58 |Replies Sent |Not all received messages result in replies, this counts the actual replies sent|
59 |Total Processor Time |Processor time including user and system time consumed since start|
60 |System Time |System Processor time only|
62 You can get the raw values using the *rpcutil* agent using the *daemon_stats* action.
64 {% highlight console %}
65 % mco rpc rpcutil daemon_stats
66 Discovering hosts using the mongo method .... 26
68 * [ ============================================================> ] 26 / 26
88 Config File: /etc/mcollective/server.cfg
93 Start Time: 1347545937
94 Threads: ["#<Thread:0x7f44350964f8 sleep>",
95 "#<Thread:0x7f4434f7f538 sleep>",
96 "#<Thread:0x7f44390ce368 sleep>",
97 "#<Thread:0x7f44350981b8 run>"]
98 Times: {:cutime=>1111.13, :utime=>3539.21, :cstime=>1243.64, :stime=>5045.21}
99 Total Messages: 259842
102 Security Validated: 259842
129 Finished processing 26 / 26 hosts in 289.20 ms
132 ## Obtaining running configuration settings
134 All configuration settings of any mcollective daemon can be retrieved using the *get_config_item*
135 action of the *rpcutil* agent:
137 {% highlight console %}
138 % mco rpc rpcutil get_config_item item=collectives -I example.com
139 Discovering hosts using the mongo method .... 1
141 * [ ============================================================> ] 1 / 1
145 Property: collectives
146 Value: ["mcollective", "fr_collective"]
155 Finished processing 1 / 1 hosts in 59.05 ms