Small tool that extracts witness data from Helium miner logs.

Overview

Helium Miner Logs Analyzer

Small tool that extracts witness data from Helium miner logs.

It currently works for the Pisces 100 and miner version miner-arm64_2022.01.29.0_GA. It may work for other miners that have the docker log folder mapped to the host, for which you will need to provide the folder path as a command-line argument.

It will soon support any other SSH enabled miners.

Description

The tool provides information on the beacons witnessesed by the miner.

Understanding lost witnesses

Only a fraction of the beacons witnessed by the miner make it to the blockchain.

Reasons:

  • Witnesses lost at the local miner bacause of failure of delivery to the challenger due to:

    • P2P or network errors. These include:

      • Timeout, usually due to a relayed challenger.
      • Challenger P2P address not found in the peer book.
      • Other challenger related problems, like "no listen address", "host unreachable" or "connection refused".

    • Miner crashes/reboots.

  • Witnesses lost at the challenger: After successfuly delivering the witness to the challenger, the transaction fails to complete due to P2P or network problems at the challenger. In such cases, at Helium Explorer All Activity tab, the challenger shows a Constructed Challenge event, but not a Challenged Beaconer event.

  • Witnesses lost at the "max hotspots lottery": When the number of hotspots that witness a beacon exceed 14 (current poc_max_witness_per_hop), only 14 are selected to receive rewards.

This tool lets you analyze the causes for the witnesses lost at the local miner.

Downloading

You can clone the repository with:

git clone https://github.com/inigoflores/helium-miner-log-analyzer

Or download the tool with:

wget -O processlogs.php https://raw.githubusercontent.com/inigoflores/helium-miner-log-analyzer/main/processlogs.php; chmod a+x processlogs.php

Tool usage

$ ./processlogs.php [-a] [-l] [-s MMMM-dd-yy] [-e MMMM-dd-yy] [-p /FULL/PATH/TO/LOGS]


Options

        -a      Show witness statistics

        -l      Show witness list 

        -s      Specify a start date in MMMM-dd-yy format      

        -e      Specify an end date in MMMM-dd-yy format

        -p      Specify a full path to the miner logs folder

Examples

Show the stats for all the log files

$ ./processlogs.php

Using logs in folder /home/pi/hnt/miner/log/


General Witnesses Overview
----------------------------------
Total witnesses                   =   176
Succesfully delivered             =   129  (73.3%)
Failed                            =    47  (26.7%)
├── Max retry    =   37 (21.02%)
└── Crash/reboot =   10  (5.68%)

Max Retry Failure Reasons
----------------------------------
Timeout                           =    31 (83.78%)
Not Found                         =     5 (13.51%)
Other challenger issues           =     1   (2.7%)

Challengers
----------------------------------
Not Relayed                       =   139 (78.98%)
Relayed                           =    27 (15.34%)
Unknown Relay Status              =    10  (5.68%)

Show list of all witnesses between two dates

$ ./processlogs.php -l -s 2022-02-07 -e 2022-02-08

Using logs in folder /home/pi/hnt/miner/log/

Date                    | Session    | RSSI | Freq  | SNR   | Challenger                                           | Relay | Status            | Fails | Reason
-------------------------------------------------------------------------------------------------------------------------------------------------------------- 
2022-02-07 00:05:34.025 |  0.29017.0 |  -86 | 867.3 |   6.0 | 11niYWTvewEMcdPK59Tazqhv4kCZ3Gpoe3yVZnfRgY9pmzML8ky  | yes   | incomplete        |     7 | timeout
2022-02-07 00:36:28.908 |    0.615.1 | -133 | 867.1 | -22.0 | 11gRRMR29BW78XitZf6cs7y3gBmwupx4eoSSNQs3EziUSMsbmUX  | no    | incomplete        |     4 | no listen address
2022-02-07 00:45:16.905 |   0.1576.1 | -108 | 868.1 |   0.2 | 11UvTXVboFiqtHMMxsf5oEyAhj8B3qsBjKkATR5ePN6XofHocai  | no    | successfully sent |     1 |  
2022-02-07 01:35:01.192 |   0.8380.1 | -132 | 867.9 | -21.8 | 112F2QZoZegus7vLVPUkMDUtxYBm6nTjqdJyo3LPwxNoZRMi6sCM | no    | successfully sent |     1 |  
2022-02-07 01:38:39.908 |   0.8782.1 | -121 | 867.3 | -15.5 | 11FeRqqXFKRBoN6XJVP4ANYBFfNKCWGgd9grPHo9pUp5q1fK8QJ  | no    | successfully sent |     1 |  
2022-02-07 01:39:20.252 |   0.8825.1 | -113 | 867.9 |  -2.0 | 112KZA9reNWQnq9qhG5PMn7x9f2p9dc35LNCkiBcD5gjb7UghYog | no    | successfully sent |     1 |  
2022-02-07 01:47:17.255 |   0.9732.1 | -114 | 868.3 |  -7.8 | 11zR51xa3snWKK3MvMTuqxdMd2pEBr5fi1aoTh5opWQoGpdkZ2n  | no    | successfully sent |     1 |  
2022-02-07 02:46:57.971 |  0.17587.1 | -124 | 867.7 | -12.5 | 1122TC5BqLdnm1EQwtkigTYF6iwpdQTkvsa2MkkBzvkfaQPimUhN | no    | successfully sent |     0 |  
2022-02-07 02:55:54.617 |  0.18484.1 | -130 | 867.5 | -18.8 | 11pU9oyLcCRm52vaoXYaeux42iBBuZpZQLHE9VpmKmfsTZsQE6i  | no    | successfully sent |     1 |  
2022-02-07 03:03:50.745 |  0.18766.1 | -119 | 867.5 | -12.8 | 11SSEQrNh4HFyDZQVbHgN37gY93JhcmZ41QSL9VRmFGk6CKe6vd  | no    | failed max retry  |    10 | timeout
2022-02-07 03:23:37.592 |  0.21872.1 | -133 | 867.7 | -22.2 | 115Pygt41v6Q62v4v9SwN7kZqznnWK9KUzDkhghwKobqVdrqSSS  | no    | successfully sent |     0 |  
2022-02-07 03:39:11.445 |  0.23706.1 | -134 | 867.7 | -22.8 | 11hbSHhDpxF8q24sQHXsv6hhduoEvSV78sZwuASz3L2aLcan3BS  | no    | successfully sent |     2 |  
2022-02-07 03:40:09.606 |  0.22970.1 | -129 | 867.9 | -17.0 | 112B5gsKJQNakrcbXjE7Q4eJ3hvnSqzVUjNaSACqbxoyM6KtNDba | yes   | failed max retry  |    10 | timeout
2022-02-07 04:16:57.890 |  0.27833.1 | -124 | 867.7 | -12.0 | 112nPUEawDi68p2P17uCMCGqTwqZEVibZYAZj8QU7s45anemEQJw |       | incomplete        |     1 | not found
2022-02-07 04:23:03.160 |  0.27676.1 | -130 | 867.7 | -19.2 | 112nfNdbiVqFq7UspMcWFTe732T4bQ8zLGcxPa47c2ecBX8x2mdZ | yes   | failed max retry  |    10 | timeout
2022-02-07 04:28:04.779 |  0.29002.1 | -127 | 867.1 | -15.8 | 119urtr1g1mf8Hwp2zZY9ac67Bx7U9FxWR8yA3abDJm1VHRZJ5j  | no    | successfully sent |     0 |  
2022-02-07 04:34:54.667 |  0.29737.1 | -111 | 867.1 |  -1.2 | 1128adyYt7fGn6RuGctLyLmk8jQeSmjvGoRFvHkbm4Cv1P6BhAGD | no    | successfully sent |     0 |  
2022-02-07 04:41:31.663 |  0.29558.1 | -126 | 867.7 | -14.8 | 112WoqNjPxUe5H8kv3aR6WVUKccAToBVEAmtETyzHdtyc6LsoEm7 | yes   | failed max retry  |    10 | timeout
2022-02-07 04:55:18.510 |  0.32320.1 | -113 | 867.9 |  -2.0 | 112eejjn6T4F9QwonttAR7ytEeTFta7LBuNRDaUAeKdUE4t9Q5pJ | no    | successfully sent |     2 |  
2022-02-07 15:13:12.859 |  0.16228.6 | -130 | 867.5 | -19.2 | 11DMBKhcZyRqxKNJTRM87jYiuXn9ZvUs9g4oyPFtRgyffZ3EoZz  | yes   | failed max retry  |    10 | timeout
2022-02-07 15:13:29.813 |  0.17080.6 | -118 | 868.1 | -10.5 | 11DYhps5kpkoQWrKqsQk2qp8pGQSznr7nG1tZZiXpZX23Q13BaY  | no    | successfully sent |     0 |  
2022-02-07 15:15:49.157 |  0.17463.6 | -108 | 868.1 |  -1.2 | 11v7GAnsegKafk2xRLPBe5c23dJdgyNtqVRdL7jNKNTVpUd47RP  | no    | successfully sent |     0 |  
2022-02-07 15:41:10.539 |  0.19480.6 | -120 | 868.1 | -12.5 | 11cg19DSHHq4CH47j13KZgBNKLAk1XyJvXymmBzdL1uhnuhhmkB  | yes   | failed max retry  |    10 | timeout
2022-02-07 15:52:15.475 |  0.20238.6 | -127 | 867.7 | -16.2 | 112Tqn6sXrtq6y7rquCgWDXqUyUhURZEieKrUi54Rbyd54hjN3ho | yes   | failed max retry  |    10 | timeout
2022-02-07 16:03:33.531 |  0.22011.6 | -108 | 867.7 |   0.0 | 11ksFDK45UKQpQBDD8GXxCen6tGiYN2TAkBPHzgS5bP2MrZbeua  | no    | successfully sent |     1 |  
2022-02-07 16:11:21.482 |  0.22942.6 | -115 | 867.1 |  -6.5 | 11zxT6uTmuUWpF6syQ4TivUQBXidCcoBAb73nTyJQprkv34b1Fd  | no    | successfully sent |     1 |  
2022-02-07 16:23:15.755 |  0.24723.6 | -113 | 868.3 | -10.5 | 112rCjPi82RrfX9nrp4v6kboTnybxtzEqJuoCWh7pGCWS77dtx7W | no    | successfully sent |     0 |  
2022-02-07 16:53:39.602 |  0.28278.6 | -128 | 867.7 | -16.5 | 1126rKBPY9JVW7yUuT5JmnScsRES9Gx74Yp4DdXKcB6FR8V6UP3C | no    | successfully sent |     0 |  
2022-02-07 17:28:21.098 |  0.32485.6 | -134 | 867.7 | -22.0 | 11E7hUwqQ19eWWK8swEH1x1qYmZ2zDovfhde4xGZEb5LArJwRRH  | no    | successfully sent |     1 |  
2022-02-07 17:29:36.457 |  0.31650.6 | -104 | 868.5 | -19.2 | 112RD81VjLFxf5MCcQ6TC8mxrnK7G7tq3mQDXAFWNTmTmx4p7RAu | yes   | failed max retry  |    10 | timeout
2022-02-07 17:57:16.654 |   0.3148.7 | -130 | 867.5 | -19.5 | 11DQJRHXQb2HsTsUm3ypWdaK3v8pg1bCZ5fao1f3jnFWtZeKWeV  | no    | successfully sent |     0 |  
2022-02-07 18:03:36.011 |   0.3170.7 | -119 | 868.3 | -14.2 | 112bzG9JD48TNiZWu44EiC7ptw8QeGRzRFoo6az7jus3VFD38PwQ | yes   | failed max retry  |    10 | timeout
2022-02-07 18:13:02.536 |   0.5087.7 | -125 | 867.9 | -14.2 | 112nQV6DjmfwkieWWjgVsx3HQft6HoripXPWEhdoeZGSPsntdbGo | no    | successfully sent |     0 |  
2022-02-07 18:36:11.809 |   0.7057.7 | -120 | 868.3 | -12.8 | 112mcdkg1pXXf9z82gt1UjCdFaBuUrfZ3DXy1NM3xHzMeGmoLT3d | yes   | failed max retry  |    10 | timeout
2022-02-07 18:40:04.299 |   0.7562.7 |  -98 | 867.7 |   4.5 | 112XXXPsNtmAPDjsGK6ep5zFrn9gquUpSA642XxTMFscHzCrAgWF | no    | failed max retry  |    10 | timeout
2022-02-07 19:29:06.344 |  0.14484.7 | -125 | 867.7 | -13.2 | 11xcryDafroaWNY37tmbMwSTmjuY9vCaZewfZRbUohqzSKHeGKy  | no    | successfully sent |     2 |  
2022-02-07 19:46:40.182 |  0.16224.7 | -126 | 868.3 | -20.2 | 11266VEDsHYoKYqZgrKH8XUM63rM7a4Qw3tR7hvYhnqZM2H78KSC | no    | successfully sent |     1 |  
2022-02-07 19:58:57.512 |  0.17917.7 | -127 | 867.9 | -15.5 | 11M9sQ4PSoHr9KkjBdB3EKwfQeD3nadEPJso2593Ay7786SxQD8  | no    | successfully sent |     0 |  
2022-02-07 20:09:17.051 |  0.19104.7 | -128 | 867.7 | -16.8 | 112VV6TV2UU6FRsrEBdLQRZUnVQsQFMtnSFPTJ4QXw4U517WU4AT | no    | successfully sent |     1 |  
2022-02-07 21:39:50.709 |  0.31786.7 |  -98 | 867.7 |   7.0 | 11YWNBxXXFK3s63Wz5L6Z6uoZ6DHGb1DRnF5nVigfhj9sqiiYWw  | no    | successfully sent |     0 |  
2022-02-07 21:48:47.593 |  0.32329.7 | -127 | 868.3 | -18.8 | 1121tjTVJsfBUtxH5NNzjG1hA52Q7Wr62GmpnQkJa4Pf8GCdFT2N | no    | successfully sent |     3 |  
2022-02-07 21:49:49.562 |     0.46.8 | -127 | 868.3 | -18.8 | 112BGNwn3SVCyNWfZTkyDUuLXRysnpycgLrjtdJKjDVCpuf2d6eq | no    | successfully sent |     0 |  
2022-02-07 22:06:06.238 |   0.2695.8 | -125 | 867.9 | -12.5 | 112aetNrJVQXKNyXL7jdKG7qRKzBoEadhKMfK9BTRY4sFJtknXaZ | no    | successfully sent |     0 |  
2022-02-07 22:30:25.674 |   0.5418.8 |  -55 | 867.1 |   8.0 | 11QhFjuehz8QWLRn5qR9RjmDFxou6XpDQmwZzDgDJzMiC5sKLnV  | no    | successfully sent |     0 |  
2022-02-07 23:14:10.411 |  0.10702.8 | -133 | 867.1 | -22.2 | 11pqVvosA8dDAVUSbNNLLNozjQshEscVzrnz2LTCzbaNkziMACw  | no    | successfully sent |     1 |  
2022-02-07 23:41:39.322 |  0.13323.8 | -123 | 867.5 | -11.5 | 112Af5GCqsXsqaE4AWwiB5D5ARi9s8GwGrGB4h8dDdMiqTHteUUi | no    | successfully sent |     2 |  

To Do

  • Add support form miners that don't have the log folders from the docker image mapped to the host.
  • Add option to export to CSV.
  • Run as a service and store data in a local database.
Comments
  • On Windows: Division by zero error

    On Windows: Division by zero error

    Dear Inigoflores, on windows i started gettin a division by zeror erro. Do you have any idea why? It was working some weeks ago.

    Using logs in folder processlogs\logs
    Warning: Division by zero in processlogs\processlogs.php on line 168
    
    General Witnesses Overview  
    ----------------------------------
    Total witnesses                   =     1   (INF/hour)
    Succesfully delivered             =     0     (0%)
    Failed                            =     1   (100%) 
      ├── Max retry    =    0     (0%) 
      └── Crash/reboot =    1   (100%) 
    
    Max Retry Failure Reasons 
    ----------------------------------
    Timeout                           =     0     (0%) 
    Not Found                         =     0     (0%) 
    Other challenger issues           =     0     (0%) 
    
    Challengers 
    ----------------------------------
    Not Relayed                       =     0     (0%) 
    Relayed                           =     0     (0%) 
    Unknown (Probably Not Relayed)    =     1   (100%) 
    

    console.log

    opened by Secarius 10
  • similar script

    similar script

    maybe you can take some additional info from it to enhance yours :)

    #!/bin/bash
    #!/bin/sh
    #
    # spot for varaiables that will be needed
    miner_vm_name=$(balena ps | egrep "miner_" | awk '{print $NF}')
    miner_animal_name=$(balena exec $miner_vm_name miner info name)
    get_console_log=$(find /mnt/data -name "console.log")
    total_witnesses=$(cat $get_console_log | egrep -w '@miner_onion_server:decrypt:' | grep -c ':')
    successful_witnesses=$(cat $get_console_log | grep -c 'successfully sent witness to challenger')
    failedtodial_witnesses=$(cat $get_console_log | grep -c 'failed to dial challenger')
    resending_witnesses=$(cat $get_console_log | egrep -w '@miner_onion_server:send_witness:' | grep -c 're-sending')
    sending_witnesses=$(cat $get_console_log | egrep -w '@miner_onion_server:send_witness:' | grep -c 'sending')
    failedtosendresend_witnesses=$(cat $get_console_log | grep -c 'failed to send witness, max retry')
    relaytransported_total=$(cat $get_console_log | egrep -w '@libp2p_transport_relay:connect_to:' | grep -c ':')
    challenger_notfound=$(cat $get_console_log | egrep 'not_found' | grep -c 'failed to dial challenger')
    challenger_timeout=$(cat $get_console_log | egrep 'timeout' | grep -c 'failed to dial challenger')
    challenger_refused=$(cat $get_console_log | egrep 'econnrefused' | grep -c 'failed to dial challenger')
    challenger_unreachable=$(cat $get_console_log | egrep 'ehostunreach' | grep -c 'failed to dial challenger')
    challenger_nolistenaddr=$(cat $get_console_log | egrep 'no_listen_addr' | grep -c 'failed to dial challenger') 
    #
    #
    echo "****************************************************************************"
    echo "Performing actions on Node:"
    echo "          VM: $miner_vm_name"
    echo " Animal Name: $miner_animal_name"
    echo "Log Location: $get_console_log"
    echo "****************************************************************************"
    echo " "
    #
    if [ $1 == "p2p-status" ]; then
    	balena exec $miner_vm_name miner info p2p_status
    elif [ $1 == "gossip-peers" ]; then
    	balena exec $miner_vm_name miner peer gossip_peers
    elif [ $1 == "peer-refresh" ]; then
    	balena exec $miner_vm_name miner peer refresh
    elif [ $1 == "relay-reset"  ]; then
    	balena exec $miner_vm_name miner peer relay_reset
    elif [ $1 == "deamon-restart" ]; then
    	balena exec $miner_vm_name miner restart
    	echo 'wait 30 seconds before running any further HMC commands to allow the miner deamon services to finish loading'
    elif [ $1 == "vm-restart" ]; then
    	balena exec $miner_vm_name miner reboot
    	echo 'wait 1 minute before running any further HMC commands to allow the miner VM to boot up again and deamon services to finish loading'
    elif [ $1 == "log-analyzer" ]; then
    	echo '******************************************************************'
    	echo 'Total Witnessed:                                    = '$total_witnesses
    	echo '               |-- Sending:                         = '$(($sending_witnesses-$resending_witnesses))
    	echo '               |-- Resending:                       = '$resending_witnesses
    	echo 'Successful:                                         = '$successful_witnesses ' (' $(($successful_witnesses*100/$total_witnesses))'%)'
    	echo 'Unreachable:                                        = '$failedtodial_witnesses ' (' $(($failedtodial_witnesses*100/$total_witnesses))'%)'
    	echo 'Send or Re-send Failed:                             = '$failedtosendresend_witnesses ' (' $((failedtosendresend_witnesses*100/$total_witnesses))'%)'
    	echo 'Other (Witness Failures):                           = '$(($total_witnesses-($successful_witnesses+$failedtodial_witnesses+$failedtosendresend_witnesses))) ' (' $(( ($total_witnesses-($successful_witnesses+$failedtodial_witnesses+$failedtosendresend_witnesses))*100/$total_witnesses))'%)'
    	echo 'Challenger Issues:'
    	echo '               |-- Challenger Not Found:            = '$challenger_notfound
    	echo '               |-- Challenger Timed Out:            = '$challenger_timeout
    	echo '               |-- Challenger Refused Connection:   = '$challenger_refused
    	echo '               |-- Challenger Unreachable:          = '$challenger_unreachable
    	echo '               |-- Challenger No Listening Address: = '$challenger_nolistenaddr
    	echo '******************************************************************'
    else
    	echo "Bye"
    fi
    

    source: https://raw.githubusercontent.com/saad-akhtar/helium_miner_checker/main/hmc.sh

    opened by DimitrisSar 2
  • Add noise metric to output

    Add noise metric to output

    @inigoflores

    When running the tool with ./processlogs.php -l both RSSI and SNR are outputted, but not noise. This is a simple calculation (RSSI - SNR) source but a bit cumbersome to effectively do yourself in the console.

    I want to see this to better understand if I would benefit from a SAW filter or not.

    PS. If you don't have time to do it, but want it added, let me know and I'll do it. Was quite some time since I dabbled in php though!

    Thanks!

    opened by GGAlanSmithee 2
  • only displaying last (few) witnesses ir normal?

    only displaying last (few) witnesses ir normal?

    Hello, I installed on sensecap and it worked. But i can only display a few record, I mean, yesterday i could see about 120 but today only about 70. Also i can't list yesterday's records. Is this normal or am I using the wrong syntax?

    Captura de ecrã 2022-05-31, às 09 52 22

    opened by s-areal 1
  • Display dates using the local system timezone

    Display dates using the local system timezone

    Please implement the same for this processlogs.php as for the LoRa logs one (keep the raw log entries in UTC, display datetimes in local tz)

    Excellent stuff by the way! thanx a lot for these scripts :)

    opened by DimitrisSar 1
  • Handle gzipped log files, with dates in filenames.

    Handle gzipped log files, with dates in filenames.

    I have a system that automatically collects logs from all my Sensecap's onto a management server. For this to be a bit more tidy I store my logs as .../HOSTNAME/PREFIX_YYYY-MM-DD.log.gz (example: .../helium-01/console_2022-03-27.log.gz).

    Here are two commits that allows this. First commit just adds an asterix to the filename glob so that logs with the date in them can be found. Second commit allows to open, and decompress, gzipped files. Also added a third commit which unsets a temporary variable to save some increased memory usage I caused.

    I have intentionally used substr to detect if the filename is .gz instead of using str_ends_with from PHP 8.x, to keep backwards compatibility. None of the patches provide should give and negative impact to any existing use cases.

    Please consider accepting this pull request to keep the patches in the original branch. Thank you.

    opened by magma1447 1
  • Update README.md [miner-amd64_2022.03.07.0_GA]

    Update README.md [miner-amd64_2022.03.07.0_GA]

    Tested the processlogs.php against /var/log/miner/ on a Controllino v1 running miner-amd64_2022.03.07.0_GA and it works fine.

    References:

    https://engineering.helium.com/2022/03/07/blockchain-improvements-sync-bugfix.html https://quay.io/repository/team-helium/miner?tab=tags

    opened by DimitrisSar 1
  • Witness per hour

    Witness per hour

    Awesome little script, would it be possible to add a feature to it? How many witnesses have been sent per hour. I usually get an idea of the state of the network by analyzing this and how many hotspots are sending beacons. Usually it's a constant number but sometimes it just goes way down.

    opened by microtransactions 1
  • how to open

    how to open

    hello... i can not open it i have this error maybe i went to wrong way can you tell me how to open it? lind@Mehdis-iMac helium-miner-log-analyzer % ./processlogs.php zsh: ./processlogs.php: bad interpreter: /usr/bin/php: no such file or directory

    opened by lind-ucdcd 1
  • I am using

    I am using "HeliumDIY/helium_ansible" firmware on my rak v2 and it's not finding the log folder

    Great product thanks! I am using the rak v2 with a modified firmware https://github.com/HeliumDIY/helium_ansible and the logs are located in /home/pi/miner_data/log I ended up overriding $logsFolder manually, I think that it would help if you added to the list.

    Thanks!

    opened by BeeFriedman 0
  • Update README.md for miner-amd64_2022.02.22.0_GA

    Update README.md for miner-amd64_2022.02.22.0_GA

    Tested the processlogs.php against /var/log/miner/ on a Controllino v1 running miner-amd64_2022.02.22.0_GA and it works fine.

    References:

    1. https://engineering.helium.com/2022/02/23/blockchain-release-sync-improvements.html
    2. https://quay.io/repository/team-helium/miner?tab=tags
    opened by DimitrisSar 0
  • Off-chain PoC witnesses and beacon analysis

    Off-chain PoC witnesses and beacon analysis

    A new miner image (2022.12.13.0 GA) was released, activating off-chain PoC witnesses and beacons for testing. Before switching to SOL, it could be interesting to include these as an additional feature in the script already.

    Some example log entries:

    Beaconing [ gateway-rs ] transmitting beacon, beacon: xxxxx ==, module: beacon

    Witnessing [ gateway-rs ] poc witness report submitted, beacon: xxxxx ==, module: beacon

    I am unsure though if those are off-chain PoC witnesses or whether they may possibly be other LoRa packets.

    opened by steakneedy 0
  • Grep command produces different results

    Grep command produces different results

    Running a grep command with the same search phrases produces different results from your php code. The php total for "failed" is the same, but grep shows 220 sent witnesses, while the php shows only 213. No witnesses were sent between runs.

    /var/log/miner # date Thu Jun 9 03:08:18 UTC 2022 /var/log/miner # /opt/miner/processlogs.php

    Using logs in folder /var/log/miner/

    General Witnesses Overview

    Total witnesses = 213 (9.65/hour) Succesfully delivered = 209 (98.12%) Failed = 4 (1.88%) /var/log/miner # date Thu Jun 9 03:09:09 UTC 2022 /var/log/miner # grep "miner_onion_server_light:decrypt:" console.log* | grep "sending witness at RSSI"|wc -l 220 /var/log/miner # grep "@miner_poc_grpc_client_statem:send_report" console.log* | grep "failed to submit report"|wc -l 4 /var/log/miner # grep "miner_onion_server_light:decrypt:" console.log|grep "sending witness at RSSI"|sort|tail 2022-06-09 01:03:58.969 153 [info] <0.2102.0>@miner_onion_server_light:decrypt:{230,13} sending witness at RSSI: -110, Frequency: 904.7, SNR: -1.8 2022-06-09 01:09:52.240 153 [info] <0.2102.0>@miner_onion_server_light:decrypt:{230,13} sending witness at RSSI: -88, Frequency: 904.1, SNR: 10.8 2022-06-09 01:16:29.374 201 [info] <0.2096.0>@miner_onion_server_light:decrypt:{230,13} sending witness at RSSI: -103, Frequency: 904.5, SNR: 6.5 2022-06-09 01:22:46.038 201 [info] <0.2096.0>@miner_onion_server_light:decrypt:{230,13} sending witness at RSSI: -97, Frequency: 904.3, SNR: 5.0 2022-06-09 01:23:22.905 201 [info] <0.2096.0>@miner_onion_server_light:decrypt:{230,13} sending witness at RSSI: -118, Frequency: 903.9, SNR: -7.5 2022-06-09 02:17:19.792 203 [info] <0.2075.0>@miner_onion_server_light:decrypt:{230,13} sending witness at RSSI: -116, Frequency: 904.9, SNR: -7.5 2022-06-09 02:22:54.526 203 [info] <0.2075.0>@miner_onion_server_light:decrypt:{230,13} sending witness at RSSI: -115, Frequency: 903.9, SNR: -6.0 2022-06-09 02:24:42.024 203 [info] <0.2075.0>@miner_onion_server_light:decrypt:{230,13} sending witness at RSSI: -110, Frequency: 904.9, SNR: -4.0 2022-06-09 02:50:24.910 203 [info] <0.2075.0>@miner_onion_server_light:decrypt:{230,13} sending witness at RSSI: -115, Frequency: 903.9, SNR: -3.8 2022-06-09 03:00:33.104 203 [info] <0.2075.0>@miner_onion_server_light:decrypt:{230,13} sending witness at RSSI: -119, Frequency: 904.7, SNR: -11.8 /var/log/miner # date Thu Jun 9 03:11:25 UTC 2022

    opened by franklyIdontgiveadamn 3
  • Validator connection display

    Validator connection display

    New feature request (not very important since you can't do much with this info): Add your current connection info to the validator (gRPC over http/2 on outbound tcp/8080). Include: IP Address + Port and P2P address (67.211.223.5:8080, 112vvCWKx3s3JrHqxan4fAqNAoezsNXAGyFvZchZmV6mCfwmMcvA) from example below:

    Also: not much info you can extract from the api on https://api.helium.io/v1/validators/112vvCWKx3s3JrHqxan4fAqNAoezsNXAGyFvZchZmV6mCfwmMcvA https://explorer.helium.com/validators/112vvCWKx3s3JrHqxan4fAqNAoezsNXAGyFvZchZmV6mCfwmMcvA/activity

    Example log contents to be processed:

    2022-05-16 05:18:22.653 7 [info] <0.1822.0>@miner_poc_grpc_client_statem:init:{174,5} starting miner_poc_grpc_client_statem
    2022-05-16 05:18:29.518 7 [info] <0.1822.0>@miner_poc_grpc_client_statem:setup:{219,13} *** connecting to validator with ip: "67.211.223.5", port: 8080, addr: "/p2p/112vvCWKx3s3JrHqxan4fAqNAoezsNXAGyFvZchZmV6mCfwmMcvA"
    2022-05-16 05:18:29.766 7 [info] <0.1822.0>@miner_poc_grpc_client_statem:connect_validator:{514,17} successfully connected to validator via connection #{client => http2_client,host => <<"67.211.223.5">>,http_connection => <0.1854.0>,scheme => <<"http">>}
    

    The challenge will be to detect the current validator connection. In theory, it may change over time (after initial boot up of the miner)

    opened by DimitrisSar 0
  • glamos walkapp would be a big benefit

    glamos walkapp would be a big benefit

    Hello, maybe go in contact with https://glamos.eu/walkapp/ to import the miner data into the app. I look like a big benefit to get an overview about his miner over this combination. Thx in advance.

    opened by pokeplayer2 0
Owner
Iñigo Flores
Iñigo Flores
Small package that can helps in debugging with API logs for Laravel Project.

Rest APIs Logger This is a small package that can helps in debugging with API logs. Installation Install the package via composer composer require tfs

Sunny Mahajan 7 Aug 31, 2022
Small laravel package for viewing api logs which can be used in debugging.

This is a small package that can helps in debugging api logs. It can log request method, url, duration, request payload, which models are retrieved, controller and method.

awt 334 Jan 6, 2023
Sends your logs to files, sockets, inboxes, databases and various web services

Monolog - Logging for PHP Monolog sends your logs to files, sockets, inboxes, databases and various web services. See the complete list of handlers be

Jordi Boggiano 20.1k Jan 8, 2023
Amazon Web Services CloudWatch Logs Handler for Monolog library

AWS CloudWatch Logs Handler for Monolog Handler for PHP logging library Monolog for sending log entries to AWS CloudWatch Logs service. Before using t

Maksym Leonov 377 Dec 16, 2022
Paste, share and analyse Minecraft server logs

mclo.gs Paste, share & analyse your Minecraft server logs About The project mclo.gs was created in 2017 by the Aternos team after more than 4 years of

Aternos 99 Jan 3, 2023
Logs which process created or modified a record

It is sometimes very useful to know which process created or modified a particular record in your database. This package provides a trait to add to your Laravel models which automatically logs that for you.

ORIS Intelligence 98 Dec 4, 2022
Capture and monitor detailed error logs with nice dashboard and UI

Capture and monitor detailed error logs with nice dashboard and UI Requirements Check Laravel 6 requirements Check Laravel 7 requirements Installation

Bugphix 107 Dec 12, 2022
Clear all your logs in [linux/windows] servers 🛡️

Log-killer Log Killer is tool for [Linux/Windows] Servers This tool will delete all your logs just download the tool and run it on the server if your

Rizer 281 Nov 24, 2022
Allows you to process logs using any PSR-3 compatible logger such as Monolog

Yii 2 PSR Log Target Allows you to process logs using any PSR-3 compatible logger such as Monolog

Alexander Makarov 67 Dec 14, 2022
Sends your logs to files, sockets, inboxes, databases and various web services

Monolog - Logging for PHP ⚠ This is the documentation for Monolog 3.x, if you are using older releases see the documentation for Monolog 2.x or Monolo

Jordi Boggiano 20.1k Jan 7, 2023
This is a replacement dashboard for the Pisces Helium Miner

Pisces QoL Dashboard This is a replacement dashboard for the Pisces Helium Miner. The dashboard that ships with the Pisces P100 has a number of securi

null 42 Jun 16, 2022
A proof of concept of a PHP Miner that can mine DuinoCoin

Duino Coin - PHP Miner This is a proof of concept. This miner is provided as is, with no guarantee it will work as intended for you.

Ricardo Fiorani 10 Sep 7, 2022
Extracts information about web pages, like youtube videos, twitter statuses or blog articles.

Essence is a simple PHP library to extract media information from websites, like youtube videos, twitter statuses or blog articles. If you were alread

Essence 765 Dec 30, 2022
PropertyInfo extracts information about PHP class' properties using metadata of popular sources.

PropertyInfo Component The PropertyInfo component extracts information about PHP class' properties using metadata of popular sources. Resources Docume

Symfony 1.9k Jan 5, 2023
Extracts translatable strings from source. Identical to xgettext but for template languages.

xgettext-template Extracts translatable strings from source. Identical to xgettext(1) but for template languages. Template language support Handlebars

Guillaume C. Marty 79 Oct 7, 2022
Keep your laravel logs small and tidy.

Logs can get quite out of hand. This package helps save server space and keep your Laravel log files small.

Accent Interactive 73 Nov 14, 2022
Small package that can helps in debugging with API logs for Laravel Project.

Rest APIs Logger This is a small package that can helps in debugging with API logs. Installation Install the package via composer composer require tfs

Sunny Mahajan 7 Aug 31, 2022
Small laravel package for viewing api logs which can be used in debugging.

This is a small package that can helps in debugging api logs. It can log request method, url, duration, request payload, which models are retrieved, controller and method.

awt 334 Jan 6, 2023
Tango is a command-line tool for analyzing access logs 💃

Tango Tool to get insights from the server access logs Tango is a dependency-free command-line tool for analyzing access logs ?? Currently, work on th

Roman Glushko 94 Nov 22, 2022