Witness Tips - Efficient Management

View this thread on: d.buzz | hive.blog | peakd.com | ecency.com
·@drakos·
0.000 HBD
Witness Tips - Efficient Management
<div class="pull-right"><img src="https://steemitimages.com/DQmWKC8UddDKzdJMSg3Ucjbsjgikae4hXrqAyp8qCGDastf/drakos-professor-2308610-300x168.png"></div>
It surprises me to see how much red there is on https://steemian.info/witnesses and the frequent missed blocks on https://steemit.chat/channel/witness-blocks. Our main task as witnesses is to provide a stable network. To achieve that, we need to be on our toes when something bad happens, or when we need to make decisions that require consensus. For that, I'd like to share with you some tips for efficient management, at least the way I do things.

***

## Stay Informed
There are many ways to keep informed about developments and network health. 

#### Websites
Two websites are handy for a global view about the witness ranking, status (active/inactive) and parameters. I like to consult those tables a couple of times a day.
- https://steemd.com/witnesses 
That page was the *de facto* bookmark in my browser for a long time. It is developed and hosted by @roadscape. The results are cached every 1 minute, if I'm not mistaken.
- https://steemian.info/witnesses
This webpage is an improvement on steemd.com, with more data added and sortable columns. It is developed and hosted by myself. The results are cached every 10 minutes, in order not to flood @archange's SteemSQL database. In fact, the queries are complex and take about a 45 seconds to fetch all the data.

A more advanced place to look at is the GitHub repositories. If you understand code, you can follow the projects progress at https://github.com/steemit, in particular 
- https://github.com/steemit/steem
The blockchain code, it's mainly for the developers.
- https://github.com/steemit/condenser
Condenser is the web interface project. You can learn about the current issues and report them, and if you can program, contribute with pull requests.

#### Steemit
The #witness-category tag on Steemit is the most popular place to read about the latest witness updates or announcements. So check it at least once a week to follow the news and upvote what you find useful.

#### Chat Channels
<center>https://steemitimages.com/DQmWtYQ5Uwsk5mVQLU6iPS4U6CfUx7Hfs7oZ2pQmxjuTLGd/14592653118_e737a8400b_b-50%25.jpg</center>
I recommend you hang out in those 4 channels on Steemit.Chat.
- https://steemit.chat/channel/witness
For important witness talk, getting help with your setup and errors, sharing **witness-related** links (do not post about your cute cat, @gandalf might smack you for it).
- https://steemit.chat/channel/witness-blocks
This channel monitors missed blocks. If you don't have a notification system setup on your server, this is a good place to be. I like this channel, I personally take it upon myself to poke whoever is missing too many blocks, when I notice they're away or not paying attention.
- https://steemit.chat/channel/witness-social
A general hangout for witnesses to vent, share cat pictures, etc. The channel was created to avoid cluttering the main #witness channel with non-witness related stuff.
- https://steemit.chat/channel/seed-nodes
For anything related to seed nodes.

## Don't Be Caught In The Domino Effect
<center>http://www.reddirtreport.com/sites/default/files/articles/2015/12/images/dominos-1.jpg</center>
One example of a Domino Effect is the decommissioning of steemd.steemit.com public RPC on 6 January 2018. The retirement of that node was [announced last month](https://steemit.com/steemitdev/@steemitdev/steem-api-endpoint-change-the-last-date-to-update-is-here-january-6-2018), and [reiterated 6 days ago](https://steemit.com/steemitdev/@steemitdev/last-chance-to-update-steemd-steemit-com-will-be-retired-on-january-6).

**HINT: follow the @steemitdev account.**
<center>https://cdn.pixabay.com/photo/2016/07/24/16/16/arrow-1538694_640.png</center>

And guess what, many applications broke, along with lots of witness price feeds. I posted a [fix for Steemfeed-JS](https://steemit.com/witness-category/@drakos/steemfeed-js-rpc-node-update) for those using that. But no matter what script or application you run, make sure you update your RPC. You can see the extent of the dominoes falling at https://steemian.info/witnesses, in the price feed column. Fortunately, many have updated; unfortunately, many have not (yet).

Another example is when we surpassed the 16 GB RAM usage, we saw some witnesses fall with the dominoes by looking at https://steemit.chat/channel/witness-blocks. This has happened again when we hit the 20 GB barrier. I and others have written numerous times about RAM usage, and yet people still commit the same mistake and *wake up* to upgrade after missing blocks. If you need to upgrade, upgrade ahead, don't wait for the last minute.

## Disable When You Do Maintenance
When you plan on doing some server maintenance, **DISABLE** your signing key. Replays take hours, can get stuck, can crash. System updates can go wrong or require a reboot. Do not miss any blocks if you can help it: disable your witness. If you plan on a long maintenance schedule, notify the others in the [#witness](https://steemit.chat/channel/witness) chat channel, so you don't lose precious votes. Remember, whale voters are watching that [#witness-blocks](https://steemit.chat/channel/witness-blocks) channel... 
<center>https://steemitimages.com/DQmcyD4HvPA2hCPuhyRawZHqmZqzr3o9tGvGL5huVT2sVaf/eyes-149670_640-50%25.png</center>

## Optimize Your Server Management
Managing your server(s) is, in my opinion, what makes a better witness. A server is not a plug-n-play toy, it needs maintenance, looking after, and some daily TLC.

#### Use aliases
For repetitive tasks, use aliases to avoid retyping long commands or going through your bash history. You can add aliases in your `.bashrc` file, then re-login or type `source ~/.bashrc` for changes to take effect. For instance, here are some of my own aliases:
```
alias lw='docker logs --tail=30 --follow witness'
alias lf='docker logs --tail=30 --follow feed'
alias wal='cd ~/steem-docker ; ./run.sh wallet'
alias startfeed='cd ~/steemfeed-js ; docker run -itd --rm --name feed steemfeed-js'
alias checkmem='df -h /dev/shm'
```

#### Monitor Usage
There's a 100 ways to monitor your system. `htop` is what I like to use.

- Monitor your RAM usage. We all know how RAM is important. Use the `checkmem` alias I showed you and/or look at the `htop` Mem usage.

- Monitor your CPU, with `htop`. For a witness node, the CPU usage should be minimal 1-3%. If you see an abnormal CPU usage, it's time to look into the problem. High CPU usage may be a sign of future missed blocks. Act soon to prevent that.

## Final Thoughts
I hope my tips come in handy.  Check your server(s) **daily**, it only takes a few minutes. Don't fall be behind, always stay ahead, monitor your systems, anticipate and address potential problems.

The cute fluffy cat wishes you happy witnessing.
<center>https://steemitimages.com/DQmTmCdNw98jFpCSwTBHVE6G4ziFasb4A6MJtMbExPCns9R/Fluffy-Puppy-Cat-Kitten-Cute-Cat-Sweet-Pet-Kitty-2442332-50%25.jpg</center>

***
<center>[![Follow](https://steemitimages.com/DQmZkyG7SyJiSNN6qkxJ9n9darqn51RjWpDnJCKYKEhx3D4/BlueArt.gif)](https://steemit.com/@drakos)
***
#### Available & Reliable. I am your Witness. I want to represent You.
##### &#x1F5F3; If you like what I do, consider voting for me &#x1F5F3;
[![Vote](https://steemitimages.com/DQmfRx7jNSrFAnRZPrKRHLDxR22gRFYTBnKr2uLNdVty3MG/drakos-witness-thanks.gif)](https://steemit.com/~witnesses)
###### If you never voted before, I wrote a detailed guide about [Voting for Witnesses](https://steemit.com/witness-category/@drakos/tips-and-guidelines-voting-for-witnesses).
<sub>Go to https://steemit.com/~witnesses. My name is listed in the Top 50. Click https://steemitimages.com/DQmYq3yGqzvbK4JQFudeXoDp6PEtdny8vSvX5swqW5sA2fE/chevron-up.png once.</sub>
###### Alternative voting methods
<sub>https://v2.steemconnect.com/sign/account-witness-vote?witness=drakos&approve=1
cli_wallet: **`vote_for_witness "YOURACCOUNT" "drakos" true true`**
steem-python: **`steempy approvewitness drakos --account YOURACCOUNT`**</sub>
</center>
👍 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,