Skip to content

func.inc.php: get_host_summary() fails on "devs" API command #14

Description

@spamkit

Sometimes Anubis displays no stats and displays device count as 0/0. This is caused by bug in cgminer forming invalid JSON when issuing "devs" command. The invalid part of JSON is "MHS 5s":-nan. This "-nan" is causing the trouble.

How to fix:

  • patch func.inc.php:
  • - find function send_request_to_host($cmd_array, $host_data).
  • - replace $line = add_quotes_to_numbers($line); with $line = preg_replace("/("MHS\s_\w+":)(-_nan)/", '${1}0', add_quotes_to_numbers($line));

Have fun!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions