correct sentinel crontab log string?

europound

Member
Oct 22, 2016
123
1
68
72
is this correct?

* * * * * cd /root/dashman/sentinel && venv/bin/python bin/sentinel.py 2>&1 >> sentinel-cron.log
 

strophy

Administrator
Dash Core Group
Dash Support Group
Feb 13, 2016
786
496
133
If /root/dashman/sentinel is where you installed sentinel, then yes, this is correct. You can try running the command manually - if there is no output, then sentinel is working and you have done everything right.
 

europound

Member
Oct 22, 2016
123
1
68
72
I tried

No modification made
[email protected]:~/log# cd /root/dashman/sentinel && venv/bin/python bin/sentinel.py >>/root/log/sentinel-cron.log 2>&1
[email protected]:~/dashman/sentinel# cd /root/dashman/sentinel && venv/bin/python bin/sentinel.py >>/root/log/sentinel-cron.log 2>&1
[email protected]:~/dashman/sentinel# cd /root/dashman/sentinel && venv/bin/python bin/sentinel.py >>/root/log/sentinel-cron.log
[email protected]:~/dashman/sentinel# venv/bin/python bin/sentinel.py
[email protected]:~/dashman/sentinel#


immediately returns back to shell
is this normal?
should not it hang up without returning to prompt?
 

europound

Member
Oct 22, 2016
123
1
68
72
how else can I make sure sentinel is working?
and what does it do at all?
why do we need it?
 

strophy

Administrator
Dash Core Group
Dash Support Group
Feb 13, 2016
786
496
133
Did you read my message? If you run sentinel and it immediately returns you to shell, then it is working and you have done everything right. This is by design, to avoid filling log files with unnecessary success messages, since sentinel must run once every minute.
 

strophy

Administrator
Dash Core Group
Dash Support Group
Feb 13, 2016
786
496
133
https://dashpay.atlassian.net/wiki/spaces/DOC/pages/103922706/Sentinel

Sentinel is responsible for monitoring and persisting features unique to Dash, such as superblocks, votes, proposals and other governance objects. It monitors dashd to ensure it is fully synchronised, and synchronises this state with the rest of the network. It is a critical part of Dash since version 12.1, and if you choose not to run it on your masternode, you will not get paid.
 

IcyBud

New Member
Nov 9, 2017
12
1
3
40
is this correct?

* * * * * cd /root/dashman/sentinel && venv/bin/python bin/sentinel.py 2>&1 >> sentinel-cron.log
NO! You have to put the 2>&1 part behind or it will not display error messages in the log!
I learned that with the last sentinel bug...

Code:
* * * * * cd /root/dashman/sentinel && venv/bin/python bin/sentinel.py >> sentinel-cron.log 2>&1
 

IcyBud

New Member
Nov 9, 2017
12
1
3
40
if you don't belive, try this:

Code:
md test
rm test
rm test >> test.log
rm test 2>&1 >> test.log
rm test >> test.log 2>&1
rm -rf test
 

Figlmüller

Member
Sep 2, 2014
85
45
58
Vienna, Austria
NO! You have to put the 2>&1 part behind or it will not display error messages in the log!
I learned that with the last sentinel bug...

Code:
* * * * * cd /root/dashman/sentinel && venv/bin/python bin/sentinel.py >> sentinel-cron.log 2>&1
Yep, that's right. 2>&1 will redirect STDERR to STDOUT when being used like you mentioned. Else, it will only write the output of the command to the file, but not error messages. The order is important.
 
  • Like
Reactions: UdjinM6