Bitcoin Forum
April 26, 2024, 02:32:19 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Scheduling Mining  (Read 3409 times)
Intention (OP)
Full Member
***
Offline Offline

Activity: 128
Merit: 100


View Profile
January 17, 2012, 12:41:47 AM
 #1

First I have no idea if this is in the right section but who knows.

Currently I have 2 small rigs and 1 gaming pc that I use for mining on the off time.  The two small computers are running BAMT which if I remember correctly is Debian based.  Is there a way through Crontab and other magic to schedule the 2 computers to go to sleep/hibernate whatever the Linux equivalent is at certain times and mine during others?  The motherboards in the system support Wake On Lan so I can theoretically wake them up from my gaming pc I just never had to use that feature before or how to work this out.

This is simply to keep my parental overlords happy since we get charged a dynamic rate for electricity: $0.045 Kw/H Offpeak, $0.068 Kw/H Mid, $0.11 Kw/H for high demand times so I'm willing to take the small cutback in BTC per day which might actually save me money considering the huge spike in costs for 6hours per day I just haven't done the math.

At any rate does anybody know if using Crontab to shut down mining and put them into sleep at specified times during the day and waking them up remotely would work or is this not possible?

YinCoin YangCoin ☯☯First Ever POS/POW Alternator! Multipool! ☯ ☯ http://yinyangpool.com/ 
Free Distribution! https://bitcointalk.org/index.php?topic=623937
1714098739
Hero Member
*
Offline Offline

Posts: 1714098739

View Profile Personal Message (Offline)

Ignore
1714098739
Reply with quote  #2

1714098739
Report to moderator
Every time a block is mined, a certain amount of BTC (called the subsidy) is created out of thin air and given to the miner. The subsidy halves every four years and will reach 0 in about 130 years.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714098739
Hero Member
*
Offline Offline

Posts: 1714098739

View Profile Personal Message (Offline)

Ignore
1714098739
Reply with quote  #2

1714098739
Report to moderator
grue
Legendary
*
Offline Offline

Activity: 2058
Merit: 1431



View Profile
January 17, 2012, 01:31:49 AM
 #2

set up a crontab that kills the miner process?

It is pitch black. You are likely to be eaten by a grue.

Adblock for annoying signature ads | Enhanced Merit UI
stevegee58
Legendary
*
Offline Offline

Activity: 916
Merit: 1003



View Profile
January 17, 2012, 01:34:23 AM
 #3

cgminer has a time scheduler built in, no fussing with cron and the like.

You are in a maze of twisty little passages, all alike.
DeathAndTaxes
Donator
Legendary
*
Offline Offline

Activity: 1218
Merit: 1079


Gerald Davis


View Profile
January 17, 2012, 01:39:01 AM
 #4

hardest version:
putting rig to sleep and waking it backup.  bad news is if it fails to wakeup no mining.

easier version:
keep rig on idle 24/7 and just setup crontab to start and kill mining process at times you want.

easiest version:
setup cgminer to mine only hours you want.
Intention (OP)
Full Member
***
Offline Offline

Activity: 128
Merit: 100


View Profile
January 17, 2012, 02:26:40 AM
 #5

I figured the easiest is to just kill the process and start it up at certain times, I thought I could one up that and put it into sleep and actually put the wake on lan feature to use but running idle would still use less power.  I'll give it a go that way and see how it turns out thanks for the suggestion.

YinCoin YangCoin ☯☯First Ever POS/POW Alternator! Multipool! ☯ ☯ http://yinyangpool.com/ 
Free Distribution! https://bitcointalk.org/index.php?topic=623937
The LT
Full Member
***
Offline Offline

Activity: 186
Merit: 100



View Profile WWW
January 17, 2012, 11:27:18 AM
 #6

You can use the RTC wakeup feature in Linux  to wake the PC up and shut it down. It's done by writing epoch-data to the /proc filenodes corresponding to the onboard RTC. There is a manual on the internet somewhere. I have done it a couple of times for cold reboots. Here's a sample script i've used.

Code:
#!/bin/bash

RESTARTDATE=`date +%Y-%m-%d`
RESTARTTIME=`date +%H:%M:%S -d "+130 seconds"`
RESTARTDT=`date -d "$RESTARTDATE $RESTARTTIME" "+%s"`

echo 0 > /sys/class/rtc/rtc0/wakealarm
echo $RESTARTDT > /sys/class/rtc/rtc0/wakealarm
poweroff

This simply restarts the system after 130 seconds. Doesn't work on ALL mobos, but works on the vast majority of them.

Hope this helps,
Intention (OP)
Full Member
***
Offline Offline

Activity: 128
Merit: 100


View Profile
January 17, 2012, 01:31:37 PM
 #7

You can use the RTC wakeup feature in Linux  to wake the PC up and shut it down. It's done by writing epoch-data to the /proc filenodes corresponding to the onboard RTC. There is a manual on the internet somewhere. I have done it a couple of times for cold reboots. Here's a sample script i've used.

Code:
#!/bin/bash

RESTARTDATE=`date +%Y-%m-%d`
RESTARTTIME=`date +%H:%M:%S -d "+130 seconds"`
RESTARTDT=`date -d "$RESTARTDATE $RESTARTTIME" "+%s"`

echo 0 > /sys/class/rtc/rtc0/wakealarm
echo $RESTARTDT > /sys/class/rtc/rtc0/wakealarm
poweroff

This simply restarts the system after 130 seconds. Doesn't work on ALL mobos, but works on the vast majority of them.

Hope this helps,
Thanks LT I'll fiddle around with that later tonight, right now I'm just using Crontab to turn /init.d/mine on and off which is working so far.

YinCoin YangCoin ☯☯First Ever POS/POW Alternator! Multipool! ☯ ☯ http://yinyangpool.com/ 
Free Distribution! https://bitcointalk.org/index.php?topic=623937
rjk
Sr. Member
****
Offline Offline

Activity: 448
Merit: 250


1ngldh


View Profile
January 17, 2012, 02:30:45 PM
 #8

easiest version:
setup cgminer to mine only hours you want.
^This

Mining Rig Extraordinaire - the Trenton BPX6806 18-slot PCIe backplane [PICS] Dead project is dead, all hail the coming of the mighty ASIC!
The LT
Full Member
***
Offline Offline

Activity: 186
Merit: 100



View Profile WWW
January 18, 2012, 12:52:44 PM
 #9

You can use the RTC wakeup feature in Linux  to wake the PC up and shut it down. It's done by writing epoch-data to the /proc filenodes corresponding to the onboard RTC. There is a manual on the internet somewhere. I have done it a couple of times for cold reboots. Here's a sample script i've used.

*snip*

Hope this helps,
Thanks LT I'll fiddle around with that later tonight, right now I'm just using Crontab to turn /init.d/mine on and off which is working so far.

This won't solve the idle power consumption issue, now will it? Smiley Even with C-states, the system consumes quite a bit of electricity. When you first try the script, don't forget to enable the on-board timer in BIOS.
Intention (OP)
Full Member
***
Offline Offline

Activity: 128
Merit: 100


View Profile
January 19, 2012, 05:54:12 AM
 #10

Currently it's roughly 200 Watts with the 5850, idle not mining it's hovering around ~85watts.  I don't know what it would be like in any sort of sleep but I have a feeling it would be less than just running idle.  I could have it just auto shut off with cron but I'm not always around to turn it back on, and that just seems stupid at that point.

YinCoin YangCoin ☯☯First Ever POS/POW Alternator! Multipool! ☯ ☯ http://yinyangpool.com/ 
Free Distribution! https://bitcointalk.org/index.php?topic=623937
The LT
Full Member
***
Offline Offline

Activity: 186
Merit: 100



View Profile WWW
January 22, 2012, 02:40:02 AM
 #11

Currently it's roughly 200 Watts with the 5850, idle not mining it's hovering around ~85watts.  I don't know what it would be like in any sort of sleep but I have a feeling it would be less than just running idle.  I could have it just auto shut off with cron but I'm not always around to turn it back on, and that just seems stupid at that point.

Just to clarify...

The whole idea of my script is that you can completely power off the system and have it wake up at a predefined time. This BIOS option is available on most modern motherboards and it can be directly programmed from Linux. You can actually set the exact time of system wakeup. Using the script, you can set the timer to the desired wakeup time and then immediately shutdown the system. It will power on, boot and start mining using cgminer. You can then program cgminer to mine for a specified amount of time and then execute the poweroff script again... Simple. If you need to wake your system at regular intervals you don't even need any script at all, actually...
Intention (OP)
Full Member
***
Offline Offline

Activity: 128
Merit: 100


View Profile
January 22, 2012, 12:26:49 PM
 #12

Currently it's roughly 200 Watts with the 5850, idle not mining it's hovering around ~85watts.  I don't know what it would be like in any sort of sleep but I have a feeling it would be less than just running idle.  I could have it just auto shut off with cron but I'm not always around to turn it back on, and that just seems stupid at that point.

Just to clarify...

The whole idea of my script is that you can completely power off the system and have it wake up at a predefined time. This BIOS option is available on most modern motherboards and it can be directly programmed from Linux. You can actually set the exact time of system wakeup. Using the script, you can set the timer to the desired wakeup time and then immediately shutdown the system. It will power on, boot and start mining using cgminer. You can then program cgminer to mine for a specified amount of time and then execute the poweroff script again... Simple. If you need to wake your system at regular intervals you don't even need any script at all, actually...

Sorry I misunderstood what that bash script did.  I found my motherboards manual and did find the option to "Power On By RTC Alarm" so I'm assuming it will work.  In the mean time I'll look up more information on RTC and what not so I don't look like a complete idiot. Smiley

YinCoin YangCoin ☯☯First Ever POS/POW Alternator! Multipool! ☯ ☯ http://yinyangpool.com/ 
Free Distribution! https://bitcointalk.org/index.php?topic=623937
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!