Skip to content

Commit

Permalink
Merge pull request Concordium#140 from supermario/log-extraction-inst…
Browse files Browse the repository at this point in the history
…ructions

Refine log extraction instructions
  • Loading branch information
supermario authored Feb 5, 2021
2 parents a275c9d + aef14dd commit 7916d7c
Showing 1 changed file with 61 additions and 5 deletions.
66 changes: 61 additions & 5 deletions logs.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

### Log submission
## Log submission

For B1+B2/B3/B4 challenges, proof of runtime via logs is required.

Expand All @@ -15,22 +15,78 @@ Simply run the relevant binary on your system where the Concordium Node has been
**⚠️ These files must be submitted without modifications. Tampering with the summary log will be detected and result in disqualification from all challenges.**



### Log sizes & rotation
## Log sizes

After running the node for a significant time you may find that you are running out of disk space on your node.

You can find your log file location by running:
Please try the following things.

### 1. Run the log summary tool

Download the appropriate executable linked above, and run it.

Add the output file, unmodified, to your single submission PR. You can replace this file in future with a larger runtime summary, or add further files if you are forced to clear logs.

Then move onto step 2.

If you cannot run it (it fails/breaks), move onto step 2.


### 2. Try clear up excess lines in your log

If (1) did not succeed, or you just wish to clear some space, try these commands to strip out excess lines in your log:

**⚠️ You must shut down your node before you do this, otherwise you might corrupt your entire logs! ⚠️**

Linux:
```
sed -i "/priority/d" `docker inspect --format='{{.LogPath}}' concordium-client`
```

macOS:
```
sed -i '' "/priority/d" `docker inspect --format='{{.LogPath}}' concordium-client`
```

Windows:

```
docker inspect --format='{{.LogPath}}' <container_name_or_id>
```
to get the filename, and then
```
Get-Content <file> | Select-String -pattern 'priority' -notmatch | Out-File <new-file>
```

Where the `<container_name_or_id>` is found by running `docker ps -a`.
You can now try step (1) again if it did not succeed before.

If this succeeds, great! Nothing more to do.

If this fails, move onto (3).

**⚠️ When you restart your node, answer "No" to changing your nodeID (the default) to keep existing logs ⚠️**


### 3. Advanced log extraction options

For this you'll need to speak with our team. Please post your issue in the [#testnet_support channel on Discord](https://discord.com/channels/667378330923696158/687313907500449849).

We may be able to help with some different commands/strategies for extraction depending on your situation.


### 4. Clear your logs entirely

**⚠️ Make sure you generate log summaries for submission _before_ clearing any logs!**

This should only be done as a last resort, if 1/2/3 have failed, and someone from `[Team]` has told you to do so on Discord.

You can find your log file location by running:

```
docker inspect --format='{{.LogPath}}' <container_name_or_id>
```

Where the `<container_name_or_id>` is found by running `docker ps -a`.

You can then clear out your current logs via the command line:

Expand Down

0 comments on commit 7916d7c

Please sign in to comment.