Author

Topic: Scheduling Mining (Read 3410 times)

full member
Activity: 128
Merit: 100
January 22, 2012, 08:26:49 AM
#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
full member
Activity: 186
Merit: 100
January 21, 2012, 10:40:02 PM
#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...
full member
Activity: 128
Merit: 100
January 19, 2012, 01: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.
full member
Activity: 186
Merit: 100
January 18, 2012, 08:52:44 AM
#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.
rjk
sr. member
Activity: 448
Merit: 250
1ngldh
January 17, 2012, 10:30:45 AM
#8
easiest version:
setup cgminer to mine only hours you want.
^This
full member
Activity: 128
Merit: 100
January 17, 2012, 09:31:37 AM
#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.
full member
Activity: 186
Merit: 100
January 17, 2012, 07: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,
full member
Activity: 128
Merit: 100
January 16, 2012, 10:26:40 PM
#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.
donator
Activity: 1218
Merit: 1079
Gerald Davis
January 16, 2012, 09:39:01 PM
#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.
legendary
Activity: 916
Merit: 1003
January 16, 2012, 09:34:23 PM
#3
cgminer has a time scheduler built in, no fussing with cron and the like.
legendary
Activity: 2058
Merit: 1431
January 16, 2012, 09:31:49 PM
#2
set up a crontab that kills the miner process?
full member
Activity: 128
Merit: 100
January 16, 2012, 08:41:47 PM
#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?
Jump to: