github.com/turingchain2020/turingchain@v1.1.21/cmd/miner_accounts/readme.md (about)

     1  ## 挖矿监控
     2  
     3  数据获得:
     4   1. 现在默认配置了8个挖矿帐号, 不传递帐号, 会返回10个挖矿帐号的相关信息。
     5   1. 但以后挖矿帐号可能变化, 可以通过修改服务的配置, 也可以直接在监控端修改请求。直接把监控的地址列表放在请求里
     6  ```
     7  wget 127.0.0.1:8866 --no-proxy --post-data='{"id" : 1 , "method" : "ShowMinerAccount.Get", "params" :  [{ }] } '
     8  wget 127.0.0.1:8866 --no-proxy --post-data='{"id" : 1 , "method" : "ShowMinerAccount.Get", "params" :  [{ "addrs" : ["1PSYYfCbtSeT1vJTvSKmQvhz8y6VhtddWi"] }] } '
     9  ```
    10  
    11  结果:
    12   1. seconds 里是实际挖矿时间。 理论上返回是一小时, 但实际上可能是有误差的
    13   2. totalIncreate 这段时间挖矿的所有币
    14   3. minerAccounts 一共配置里的10个挖矿帐号信息
    15   4. increase 是对应挖矿帐号的这段时间挖矿所得
    16   5. total 是对应挖矿帐号里的所有的币
    17   6. addr 是对应挖矿帐号的地址
    18   7. frozen 冻结挖矿的币
    19   8. expectIncrease 预期挖到多少币
    20   9. expectMinerBlocks 预期间隔多少个块能挖到币
    21   10. minerTrcDuring 在预期能挖到币的两倍时间间隔内,挖到多少币
    22   11. expectTotalIncrease  一个小时内预期挖矿增加
    23  
    24  需要监控
    25   1. 挖矿总量异常: 根据总体币的挖矿情况报警 (不再根据原来的固定值)
    26      1. 随着挖矿的trc变动, 用于挖矿的币会有变化, 按固定的值来预警, 在用于挖矿的币变少时会有误报, 在json中增加 expectTotalIncrease 项, 在 totalIncreate < expectTotalIncrease * 90% 预警
    27   1. 挖矿帐号异常
    28      1. 是否有某个挖矿帐号, 一个小时挖矿所得为0, 可能是挖矿机器出故障了
    29      1. 增涨不到预期的50%
    30      1. 不再监控这个点: 在预期能挖到币的两倍时间间隔内, 挖到的币为0。 挖矿有波动, 在进行预警的几天里, 这个有很多误报。
    31   1. 数据获得失败报警
    32      1. result 里面 null
    33   1. 监控机器 heartbeat 表明监控机器没有宕机
    34  
    35  ```
    36  {
    37     "id" : 1,
    38     "error" : null,
    39     "result" : {
    40        "blocks" : 234,
    41        "totalIncrease" : "4140.0000",
    42        "expectTotalIncrease" : "3687.5982",
    43        "expectBlocks" : 241,
    44        "minerAccounts" : [
    45           {
    46              "addr" : "1BG9ZoKtgU5bhKLpcsrncZ6xdzFCgjrZud",
    47              "frozen" : "30263330.0000",
    48              "total" : "30264474.0000",
    49              "expectIncrease" : "478.3413",
    50              "expectMinerBlocks" : "26.5745",
    51              "increase" : "522.0000",
    52              "minerTrcDuring" : "18.0000"
    53           },
    54           {
    55              "total" : "30286686.0000",
    56              "expectIncrease" : "478.6682",
    57              "frozen" : "30284014.0000",
    58              "addr" : "1KNGHukhbBnbWWnMYxu1C7YMoCj45Z3amm",
    59              "minerTrcDuring" : "18.0000",
    60              "increase" : "486.0000",
    61              "expectMinerBlocks" : "26.5927"
    62           },
    63           {
    64              "increase" : "54.0000",
    65              "minerTrcDuring" : "36.0000",
    66              "expectMinerBlocks" : "4.5225",
    67              "frozen" : "5150252.0000",
    68              "expectIncrease" : "81.4047",
    69              "total" : "19224972.0000",
    70              "addr" : "1FB8L3DykVF7Y78bRfUrRcMZwesKue7CyR"
    71           },
    72           {
    73              "addr" : "1Lw6QLShKVbKM6QvMaCQwTh5Uhmy4644CG",
    74              "total" : "30294246.0000",
    75              "expectIncrease" : "478.8166",
    76              "frozen" : "30293402.0000",
    77              "expectMinerBlocks" : "26.6009",
    78              "minerTrcDuring" : "54.0000",
    79              "increase" : "414.0000"
    80           },
    81           {
    82              "expectMinerBlocks" : "26.5927",
    83              "minerTrcDuring" : "36.0000",
    84              "increase" : "450.0000",
    85              "addr" : "1FiDC6XWHLe7fDMhof8wJ3dty24f6aKKjK",
    86              "expectIncrease" : "478.6688",
    87              "total" : "30288900.0000",
    88              "frozen" : "30284050.0000"
    89           },
    90           {
    91              "expectMinerBlocks" : "26.5925",
    92              "increase" : "594.0000",
    93              "minerTrcDuring" : "54.0000",
    94              "addr" : "1AMvuuQ7V7FPQ4hkvHQdgNWy8wVL4d4hmp",
    95              "frozen" : "30283780.0000",
    96              "expectIncrease" : "478.6645",
    97              "total" : "30287280.0000"
    98           },
    99           {
   100              "total" : "30205938.0000",
   101              "expectIncrease" : "25.1326",
   102              "frozen" : "1590072.0000",
   103              "addr" : "1ExRRLoJXa8LzXdNxnJvBkVNZpVw3QWMi4",
   104              "minerTrcDuring" : "54.0000",
   105              "increase" : "36.0000",
   106              "expectMinerBlocks" : "1.3963"
   107           },
   108           {
   109              "expectIncrease" : "755.1446",
   110              "total" : "47779640.0000",
   111              "frozen" : "47775904.0000",
   112              "addr" : "1AH9HRd4WBJ824h9PP1jYpvRZ4BSA4oN6Y",
   113              "minerTrcDuring" : "0.0000",
   114              "increase" : "576.0000",
   115              "expectMinerBlocks" : "41.9525"
   116           },
   117           {
   118              "expectMinerBlocks" : "26.5921",
   119              "increase" : "432.0000",
   120              "minerTrcDuring" : "36.0000",
   121              "addr" : "1PSYYfCbtSeT1vJTvSKmQvhz8y6VhtddWi",
   122              "frozen" : "30283312.0000",
   123              "total" : "30290214.0000",
   124              "expectIncrease" : "478.6572"
   125           },
   126           {
   127              "expectMinerBlocks" : "26.5834",
   128              "minerTrcDuring" : "36.0000",
   129              "increase" : "576.0000",
   130              "addr" : "1G7s64AgX1ySDcUdSW5vDa8jTYQMnZktCd",
   131              "expectIncrease" : "478.5014",
   132              "total" : "30278298.0000",
   133              "frozen" : "30273456.0000"
   134           }
   135        ],
   136        "seconds" : 3615
   137     }
   138  }
   139  
   140  ```