|
8 | 8 | * [Globals and the Default Profile](#globals-and-the-default-profile)
|
9 | 9 | * [Working with Profiles and Pool Specific Settings](#working-with-profiles-and-pool-specific-settings)
|
10 | 10 | * [Include and Includes](#include-and-includes)
|
| 11 | +* [Events](#events) |
11 | 12 | * [CLI Only options](#cli-only-options)
|
12 | 13 | * [Config-file and CLI options](#config-file-and-cli-options)
|
| 14 | +* [Event options](#event-options) |
| 15 | +* [Event Types](#event-types) |
13 | 16 |
|
14 | 17 | ---
|
15 | 18 |
|
@@ -233,6 +236,34 @@ There is no limit as to how includes can be used as long as they follow proper j
|
233 | 236 |
|
234 | 237 | ---
|
235 | 238 |
|
| 239 | +## Events |
| 240 | + |
| 241 | +Users can now execute commands or perform certain tasks when pre-defined events occur while mining. |
| 242 | + |
| 243 | +For example, one might want their miner to email them via a script when the miner goes idle and reboot the computer when a GPU goes dead. This gives users a little more flexibility controlling their mining uptime without necessarily resorting to external watchdog programs that, in some cases, can be troublesome. |
| 244 | + |
| 245 | +Here is a configuration example of the above scenario: |
| 246 | +``` |
| 247 | +... |
| 248 | +"events":[ |
| 249 | + { |
| 250 | + "on":"idle", |
| 251 | + "runcmd":"/bin/mailscript \"Miner Idle\" \"Hey! My miner went idle!\"" |
| 252 | + }, |
| 253 | + { |
| 254 | + "on":"gpu_dead", |
| 255 | + "reboot":"yes" |
| 256 | + } |
| 257 | +], |
| 258 | +... |
| 259 | +``` |
| 260 | + |
| 261 | +For more details on configuration options, see [Event Options](#event-options) below. |
| 262 | + |
| 263 | +[Top](#configuration-and-command-line-options) |
| 264 | + |
| 265 | +--- |
| 266 | + |
236 | 267 | ## CLI Only options
|
237 | 268 |
|
238 | 269 | * [config](#config) `--config` or `-c`
|
@@ -2446,3 +2477,120 @@ Displays extra work time debug information.
|
2446 | 2477 | *Default:* `false`
|
2447 | 2478 |
|
2448 | 2479 | [Top](#configuration-and-command-line-options) :: [Config-file and CLI options](#config-file-and-cli-options) :: [Miscellaneous Options](#miscellaneous-options)
|
| 2480 | + |
| 2481 | +--- |
| 2482 | + |
| 2483 | +## Event options |
| 2484 | + |
| 2485 | +* [on](#on) |
| 2486 | +* [runcmd](#runcmd) |
| 2487 | +* [reboot](#reboot) |
| 2488 | +* [reboot-delay](#reboot-delay) |
| 2489 | +* [quit](#quit) |
| 2490 | +* [quit-message](#quit-message) |
| 2491 | + |
| 2492 | +### on |
| 2493 | + |
| 2494 | +Specify which event type to respond on. See below for a list of supported [event types](#event-types) |
| 2495 | + |
| 2496 | +*Available*: Events |
| 2497 | + |
| 2498 | +*Config File Syntax:* `"on":"<value>"` |
| 2499 | + |
| 2500 | +*Command Line Syntax:* `--event-on <value>` |
| 2501 | + |
| 2502 | +*Argument:* `string` Name of the event type |
| 2503 | + |
| 2504 | +*Default:* None |
| 2505 | + |
| 2506 | +[Top](#configuration-and-command-line-options) :: [Event options](#event-options) |
| 2507 | + |
| 2508 | +### runcmd |
| 2509 | + |
| 2510 | +Specify a command to run when the event occurs. Please remember to properly escape quotes (") with backslashes (\\) if you need to specify multi-word parameters enclosed in quotes (") for your commands: `\"` |
| 2511 | + |
| 2512 | +*Available*: Events |
| 2513 | + |
| 2514 | +*Config File Syntax:* `"runcmd":"<value>"` |
| 2515 | + |
| 2516 | +*Command Line Syntax:* `--event-runcmd <value>` |
| 2517 | + |
| 2518 | +*Argument:* `string` Command to execute on event |
| 2519 | + |
| 2520 | +*Default:* None |
| 2521 | + |
| 2522 | +[Top](#configuration-and-command-line-options) :: [Event options](#event-options) |
| 2523 | + |
| 2524 | +### reboot |
| 2525 | + |
| 2526 | +Reboot when event occurs. |
| 2527 | + |
| 2528 | +*Available*: Events |
| 2529 | + |
| 2530 | +*Config File Syntax:* `"reboot":"<value>"` |
| 2531 | + |
| 2532 | +*Command Line Syntax:* `--event-reboot <value>` |
| 2533 | + |
| 2534 | +*Argument:* `string` Yes: `"true"` `"yes"` `"1"` or No: `"false"` `"no"` `"0"` |
| 2535 | + |
| 2536 | +*Default:* `false` |
| 2537 | + |
| 2538 | +[Top](#configuration-and-command-line-options) :: [Event options](#event-options) |
| 2539 | + |
| 2540 | +### reboot-delay |
| 2541 | + |
| 2542 | +Wait a number of seconds before rebooting when event occurs. This is useful if you also want to fire off a script via `runcmd` prior to rebooting, giving it extra seconds to finish. |
| 2543 | + |
| 2544 | +*Available*: Events |
| 2545 | + |
| 2546 | +*Config File Syntax:* `"reboot-delay":"<value>"` |
| 2547 | + |
| 2548 | +*Command Line Syntax:* `--event-reboot-delay <value>` |
| 2549 | + |
| 2550 | +*Argument:* `number` Seconds to wait before reboot |
| 2551 | + |
| 2552 | +*Default:* `0` |
| 2553 | + |
| 2554 | +[Top](#configuration-and-command-line-options) :: [Event options](#event-options) |
| 2555 | + |
| 2556 | +### quit |
| 2557 | + |
| 2558 | +Exit sgminer when event occurs. |
| 2559 | + |
| 2560 | +*Available*: Events |
| 2561 | + |
| 2562 | +*Config File Syntax:* `"quit":"<value>"` |
| 2563 | + |
| 2564 | +*Command Line Syntax:* `--event-quit <value>` |
| 2565 | + |
| 2566 | +*Argument:* `string` Yes: `"true"` `"yes"` `"1"` or No: `"false"` `"no"` `"0"` |
| 2567 | + |
| 2568 | +*Default:* `false` |
| 2569 | + |
| 2570 | +[Top](#configuration-and-command-line-options) :: [Event options](#event-options) |
| 2571 | + |
| 2572 | +### quit-message |
| 2573 | + |
| 2574 | +Message to display on sgminer exit when event occurs. |
| 2575 | + |
| 2576 | +*Available*: Events |
| 2577 | + |
| 2578 | +*Config File Syntax:* `"quit-message":"<value>"` |
| 2579 | + |
| 2580 | +*Command Line Syntax:* `--event-quit-message "<value>"` |
| 2581 | + |
| 2582 | +*Argument:* `string` Message |
| 2583 | + |
| 2584 | +*Default:* `event_type` |
| 2585 | + |
| 2586 | +[Top](#configuration-and-command-line-options) :: [Event options](#event-options) |
| 2587 | + |
| 2588 | +--- |
| 2589 | + |
| 2590 | +## Event Types |
| 2591 | + |
| 2592 | +* `idle` Occurs when a GPU goes idle for not performing any work or when no work has been received in 10 minutes. |
| 2593 | +* `gpu_sick` Occurs when a GPU fails to respond for 2 minutes |
| 2594 | +* `gpu_dead` Occurs when a GPU fails to respond for 10 minutes |
| 2595 | + |
| 2596 | +[Top](#configuration-and-command-line-options) |
0 commit comments