@@ -11,23 +11,23 @@ pip install --user glances
11
11
12
12
## Logging
13
13
14
- ### Gets the log output of a service ###
14
+ ### Gets the log output of a service
15
15
16
16
` journalctl -u price-server.service -f `
17
17
18
18
Note that if the service is running at a "system" level, there may be a need to use ` sudo ` with the command.
19
19
20
- ### List the logs since a specific time ###
20
+ ### List the logs since a specific time
21
21
22
22
` journalctl -u feeder.service --since "2021-12-09 20:00:00" `
23
23
24
24
` journalctl -S "4 hour ago" `
25
25
26
- ### List the logs until a specific time ###
26
+ ### List the logs until a specific time
27
27
28
28
` journalctl --until "2022-02-24 01:23:00 `
29
29
30
- ### List the logs only from the current boot ###
30
+ ### List the logs only from the current boot
31
31
32
32
` journalctl -u service-name.service -b `
33
33
@@ -67,3 +67,27 @@ sudo systemctl enable cosmos.service
67
67
### Check disk performance
68
68
69
69
` sudo hdparm -tT /dev/disk/by-id/scsi-0DO_Volume_columbus5a `
70
+
71
+ ### Get the SHA256 hash of a file
72
+
73
+ ``` bash
74
+ jq -S -c -M ' ' genesis.json | shasum -a 256
75
+ ```
76
+
77
+ ### Snippet to view consensus state
78
+
79
+ ``` bash
80
+ while true ; do curl http://localhost:26657/consensus_state | jq ' .result.round_state.height_vote_set[0].prevotes_bit_array' ; curl http://localhost:26657/dump_consensus_state | jq ' .result.round_state.votes[0].prevotes' | grep $( curl -s http://localhost:26657/status | jq -r ' .result.validator_info.address[:12]' ) ; sleep 3; echo ----; done
81
+ ```
82
+
83
+ ### Generate the operator address from the wallet key.
84
+
85
+ ``` bash
86
+ terrad keys show KEY_NAME --bech val --home ~ /.terra --output json | jq -r .address
87
+ ```
88
+
89
+ ### List the validators in order of voting power
90
+
91
+ terrad --node http://localhost:26657 query staking validators --limit 1000 -o json | jq -r '.validators[ ] | [ .operator_address, .status, (.tokens|tonumber / pow(10; 6)), .description.moniker] | @csv ' | column -t -s"," | sort -k3 -n -r | nl
92
+
93
+ (Reference: https://discord.com/channels/976127574252060703/976143280800661524/979992980091969546 )
0 commit comments