I'd like to know how to create a schedule to reboot or restart cgminer.
You could try CGwatcher. That will monitor it, restart it at specified intervals if required, restart it if it misbehaves, etc.I find the hash rate varies throughout the day, presumably something to do with the bandwidth available in the area. Mine goes from a high of around 220K, falls to around 190K during late afternoon and evening, then climbs back up again. That's on what is supposedly a high speed fibre optic connection; if I switch everything over to an ADSL line (I have both available) it drops by at least a quarter at any time of day. BTC mining on Slush's pool using BFGminer varies in the same way.
If you aren't using your gridseeds in dual mode, use BFGminer - no HW errors and averaging about 355k/hs per device at 850. http://cryptomining-blog.com/1883-download-the-latest-bfgminer-3-99-0-for-windows-with-gridseed-asic-support/
I'll look into it. Cgminer is reporting 360kh each (total 7.2 MH) as well. So did BFGminer on Windows. Its the pool that says different. I know the pool is an estimate but not by THAT huge a difference.
If this is bfginer for Rasp Pi, I'll check it out.
Be careful there are a lot of cgminer 3.7.2 versions out there. They are not all equal. I had a early version that did not detect a USB issue and the unit appeared to be mining but is you looked closely the accepted shares for one tor two units would stop increasing. switch to a new version that displays the serial numbers and allows individual clock setting and this version would show a unit dropping off due to a USB error. I wrote a script to monitor cgminer via the API and stop and restart cgminer if a unit stops working. you need to have --api-allow and --api-listen w:127.0.0.1 command line settings.
Here is a copy of the script. Don't judge my programming skills by this script it was a quick hack. I called the script "check_cgminer". It assumes you have a startup script called "start.sh" in the directory "/home/pi". The crontab entry I use is "*/5 * * * * root /home/pi/check_cgminer". This checks the that all the gridseeds are healthy every 5 minutes.
if you run the script with the -v option it outputs diagnostic data. "./check_cgminer -v"
Good luck.
#------------------------ BEGIN ---------------------------------------
#!/usr/bin/perl
$verbose = 0;
$restart = 0;
if ($ARGV[0] eq "-v")
{
$verbose = 1;
}
my $cmd = 'echo "{\"command\":\"devs\"}" | nc 127.0.0.1 4028';
my $res = `$cmd`;
$res =~ s/["]//g;
if ($verbose)
{
print "Results:\n$res\n\n";
}
while ($res =~ m/ASC:(\d+),Name:(.+?),ID:(\d+),Enabled:(.+?),(.*?),(.*?),(.*?),(.*?),(.*?),(.*?),(.*?),(.*?),(.*?),Last\sValid\sWork:(.*?),/g)
{
if ( $4 eq "N" )
{
$restart = 1;
}
$msg = '{ ASC ' . $1 . ' , ' . $2 . ' ' . $3 . ' , Enabled ' . $4 . ' , Valid Work ' . $14 .' }';
$cmd2 = 'date --date=@' . $14 . '' ;
my $lvw = `$cmd2`;
$lvw =~ s/\n//g;
if ($verbose)
{
print "Device Data: $msg $lvw\n";
}
$results .= 'Device Data: '. $msg . ' ' . $lvw . "\n";
}
if ($restart)
{
sleep(5);
print "CGMINER needs to be restarted\n";
my $cmd = 'echo "{\"command\":\"quit\"}" | nc 127.0.0.1 4028';
my $res = `$cmd`;
print "CGMINER Reply $res\n";
sleep(10);
my $cmd = 'sudo /home/pi/start.sh';
my $res = `$cmd`;
my $cmd = 'date >> /tmp/restart.log';
my $res = `$cmd`;
}
#------------------------ END ---------------------------------------