Just use console to change it in the fly
G I D
G I 9
thx
no I mean it automatically every day in Linux...
This doesn't meet all your criteria wrt not restarting cgminer, but here is something I whipped up before API support was added:
#!/bin/sh
export DISPLAY=:0
export GPU_USE_SYNC_OBJECTS=1
while true ; do
killall -HUP cgminer > /dev/null 2>&1
now="`date +%Y%m%d%H%M%S`"
if [ -e "/usr/tmp/mine-high" ];
then
echo "Starting cgminer in high mode"
cgminer --url xxxx --user xxxx --pass xxxx --url xxxx --user xxxx --pass xxxx --auto-fan --auto-gpu --gpu-engine 300-750 --gpu-memclock 150 --gpu-vddc 1.0 --intensity "d,8,8,8" --gpu-fan 30-85 --temp-target 73 -w 256 --text-only 2> /home/jintu/cgminer-logs/run.$now.$$.log
else
if [ -e "/usr/tmp/mine-low" ];
then
echo "Starting cgminer in low mode"
cgminer --url xxxx --user xxxx --pass xxxx --url xxxx --user xxxx --pass xxxx --auto-fan --auto-gpu --gpu-engine 300-550 --gpu-memclock 150 --gpu-vddc 1.0 --intensity "d,8,8,8" --gpu-fan 30-50 --temp-target 73 -w 256 --text-only 2> /home/jintu/cgminer-logs/run.$now.$$.log
fi
fi
echo "Sleeping for 10 seconds."
sleep 10
done
This script fires up automatically when X starts (my miners are setup to autologin).
I also have the following cron config to control when it should be in each mode:
#Weekdays
0 0 * * mon,tue,wed,thu,fri /usr/local/bin/mine-high.sh
0 12 * * mon,tue,wed,thu,fri /usr/local/bin/mine-low.sh
#Weekend
0 0 * * sat,sun /usr/local/bin/mine-high.sh
0 13 * * sat,sun /usr/local/bin/mine-low.sh
and finally here are the scripts called by cron:
mine-high.sh
#!/bin/sh
#
rm /usr/tmp/mine-low > /dev/null 2>&1
touch /usr/tmp/mine-high > /dev/null 2>&1
killall -HUP cgminer > /dev/null 2>&1
mine-low.sh
#!/bin/sh
#
rm /usr/tmp/mine-high > /dev/null 2>&1
touch /usr/tmp/mine-low > /dev/null 2>&1
killall -HUP cgminer > /dev/null 2>&1