More
referral
Increase your income with Hive. Invite your friends and earn real cryptocurrency!

HiveOS Polluting syslog when mining with equihash 125/4

hive os is constantly polluting the syslog when you’re mining anything with equihash 125/4 hiveos-linux/avg_khs at master · minershive/hiveos-linux · GitHub

Mar 26 18:39:31 hive2080ti avg_khs[2039]: jq: 2 compile errors
Mar 26 18:39:31 hive2080ti avg_khs[2039]: JSON parsing error
Mar 26 18:39:41 hive2080ti avg_khs[2039]: jq: error: syntax error, unexpected $end, expecting QQSTRING_TEXT or QQSTRING_INTERP_START or QQSTRING_END (Unix shell quoting issues?) at <top-level>, line 1:
Mar 26 18:39:41 hive2080ti avg_khs[2039]: ."equihash
Mar 26 18:39:41 hive2080ti avg_khs[2039]: jq: error: try .["field"] instead of .field for unusually named fields at <top-level>, line 1:
Mar 26 18:39:41 hive2080ti avg_khs[2039]: ."equihash
Mar 26 18:39:41 hive2080ti avg_khs[2039]: jq: 2 compile errors
Mar 26 18:39:41 hive2080ti avg_khs[2039]: JSON parsing error
Mar 26 18:39:51 hive2080ti avg_khs[2039]: jq: error: syntax error, unexpected $end, expecting QQSTRING_TEXT or QQSTRING_INTERP_START or QQSTRING_END (Unix shell quoting issues?) at <top-level>, line 1:
Mar 26 18:39:51 hive2080ti avg_khs[2039]: ."equihash
Mar 26 18:39:51 hive2080ti avg_khs[2039]: jq: error: try .["field"] instead of .field for unusually named fields at <top-level>, line 1:
Mar 26 18:39:51 hive2080ti avg_khs[2039]: ."equihash
Mar 26 18:39:51 hive2080ti avg_khs[2039]: jq: 2 compile errors
Mar 26 18:39:51 hive2080ti avg_khs[2039]: JSON parsing error
Mar 26 18:39:51 hive2080ti avg_khs[2039]: {"params":{"avg_khs": null}}

I get the same error. Did you manage to get it resolved?

would imagine there is a problem with the parsing for the watchdog.

However, the watchdog might be the one polluting the syslog. Maybe create a separate file to output is status?

This excessive logging has bothered me for the past few months too. The reason is the " " and “/” in the algorithm name “equihash 144/5”. On the live-chat, Hive tried to convince me that it was not their issue. I disagreed.

I fixed the /hive/sbin/avg_khs file the following:

if [[ ! -z $algo && $algo != 'null' && ! -z $khs && $khs != 'null' ]]; then
          ## Added quotes to the $algo qr parsing
          khs=`jq -r '."'"${algo}"'"+'$khs <<< "$khs_json"`

and a few lines below:

      algo=`echo $khs_json | jq -r 'to_entries['$i'].key'`
      algo=${algo//\//⧸} #replace all chars "/" with "_"
      # remove \ and " " chars from filename
      algo=${algo//\\/_} #replace all chars "\" with "_"
      algo=${algo// /_}} #replace all chars " " with "_"

I hope this can help someone, and hive can pick up this fix to not get overwritten in the next update :).