troubleshootinfg farming
This commit is contained in:
@@ -155,8 +155,6 @@ It is highly recommended to set a Ubuntu systemd service to keep the Farmerbot r
|
||||
[Service]
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
StandardOutput=append:/root/farmerbotfiles/farmerbot.log
|
||||
StandardError=append:/root/farmerbotfiles/farmerbot.log
|
||||
ExecStart=/usr/local/bin/farmerbot run -e /root/farmerbotfiles/.env -c /root/farmerbotfiles/config.yml -d
|
||||
|
||||
[Install]
|
||||
@@ -175,26 +173,28 @@ It is highly recommended to set a Ubuntu systemd service to keep the Farmerbot r
|
||||
|
||||
### Check the Farmerbot Logs
|
||||
|
||||
Once you've set a Farmerbot systemd service [as show above](#set-a-systemd-service), the Farmerbot will start writing logs to the file `farmerbot.log` in the directory `farmerbotfiles`.
|
||||
You can get more details on the operation of the Farmerbot by inspecting the log file.
|
||||
|
||||
Thus, you can get more details on the operation of the Farmerbot by inspecting the log file. This can also be used to see the **Farmerbot Report Table** as this table is printed in the Farmerbot log.
|
||||
|
||||
* See all logs so far
|
||||
```
|
||||
cat ~/farmerbotfiles/farmerbot.log
|
||||
```
|
||||
* See the last ten lines and new logs as they are generated
|
||||
```
|
||||
tail -f ~/farmerbotfiles/farmerbot.log
|
||||
```
|
||||
* See all logs and new lines as they are generated
|
||||
```
|
||||
tail -f -n +1 ~/farmerbotfiles/farmerbot.log
|
||||
```
|
||||
* See the last report table
|
||||
```
|
||||
tac ~/farmerbotfiles/farmerbot.log | grep -B5000 -m1 "Nodes report" | tac
|
||||
```
|
||||
* View the log file
|
||||
```
|
||||
journalctl -u <unit file name>
|
||||
```
|
||||
* View the log file with reverse output
|
||||
```
|
||||
journalctl -ru <unit file name>
|
||||
```
|
||||
* View X lines from the log file
|
||||
```
|
||||
journalctl -u <unit file name> -n X
|
||||
```
|
||||
* View the log file since a given date
|
||||
```
|
||||
journalctl -u <unit file name> --since <date>
|
||||
```
|
||||
* Create a log file with journalctl with the last 1000 lines
|
||||
```
|
||||
journalctl -u farmerbot -n 1000 > farmerbot.log
|
||||
```
|
||||
|
||||
### Stop the Farmerbot
|
||||
|
||||
|
Reference in New Issue
Block a user