Use monit as a utility for managing and monitoring hived.
exclude:true
layout:full
canonical_url:monit.html
---
### Intro
Monit can restart hived if it crashes, if it does not respond, or stop the process if it uses too many resources. You can use monit to monitor files, directories and filesystems for changes, such as timestamps changes, checksum changes or size changes.
One of the major benefits of monit is the ability to have hived start when the system restarts. And if monit is properly configured, you can have your system stop hived when the system shuts down.
### Sections
*[Install Monit](#install-monit)
*[Configure Monit](#configure-monit)
### Install Monit
On linux:
```bash
$ sudo apt-get install monit
```
For other OS types, refer to: [mmonit.com/monit](https://mmonit.com/monit/)
We check uptime because if hived starts too soon, p2p may not be available within the first few seconds of OS start. If hived starts in this state, it will freeze.
Note, we're using nohup to get the pid. But you can also configure monit to work without it by looking for hived using a matching pattern. But it's always better to execute a script rather than hived directly.
This will keep your hived running for you (across restarts, even, no need for any cronjobs or multiplexors) and keep you from fighting with your chosen OS. Keep in mind, the default is for monit to only once a minute, so be patient if you're waiting for it to do something.