Hope that helps!
Oh, yeah, I'm pretty sure the Miner Config page is hard coded to expect certain types of values -- and if it doesn't see them, it resets them or erases them or whatever. I don't use the GUI all that much (just the status page sometimes to check on the "oooooo" status of the chips) but I remember people with custom configs on the S1 (eg, with more than 3 pools set up -- when there was only room for 3 to display on the GUI web form) would run into lockups or various problems as the GUI tried to deal with all the extra data that it didn't think ought to be there...
So your problem might be that the GUI is screwing with your config when you try to look at it to "confirm" your config is working. It probably doesn't expect to see any weird ass "number-then-a-semicolon-then-a-url" shenanigans in the "url" field... Oh, and actually now that I think about it, we are REMOVING the url field and replacing it with a quota field so I can imagine the web form *might* be assuming we left those values blank or that the file is corrupt ...or whatever random assumption it might make, it seems safe to assume it's probably not all that great for what we're trying to do. :)
Instead, try setting up your configuration file (per my previous post), restart cgminer (/etc/init.d/cgminer restart or it might be /etc/init.d/cgminer.sh restart sorry not in front of the machine right now so I can't check) while you're still logged in via SSH. It will reload your config file and should start hashing again -- but without a reboot, and without having to go click anything on the web form...so we can eliminate those two possible variables for the time being. That way you can at least confirm you don't have a typo in the config file, or something along those lines.
So long as you keep your changes confined within the /config directory, it should survive any reboots, because that's the only directory that actually persists between sessions. Try it one more time, and (instead of rebooting) restart cgminer, then once you see the box is hashing again (flashing green lights) enter the following:
--------------------------------------------------------------------------------
(5s):1.049T (avg):1.014Th/s | A:7141632 R:20224 HW:18260 WU:14170.5/m
ST: 252 SS: 0 NB: 65 LW: 8516915 GF: 106 RF: 0
Connected to multiple pools with block change notify
Block: 1da7dd6c... Diff:8.85G Started: [13:31:22] Best share: 0
--------------------------------------------------------------------------------
[P]ool management [S]ettings [D]isplay options [Q]uit
BTM 0: 45/ 52C 2040R | 1.120T/1.014Th/s | A:7141888 R:20480 HW:18260 WU:14174.3/m
--------------------------------------------------------------------------------
The first thing to look for is on the 5th line from the top, where it says "Connected to multiple pools with block change notify." If you don't see that, then you have a typo in your config somewhere (perhaps you're still using "url" and not "quota" lines in the pool definition section?) or you failed to add "load-balance" : true, to the file.
Alternatively,
Note this is different from just setting "balance" : true -- which is what you were doing in your previous post. If you just want 50/50 load balancing and you don't care about telling cgminer how much quota to give a particular pool, then you can actually just do things a bit easier -- take your original code (no "quota" lines or whatnot) and simply add "balance" : true, to your configuration file. There should be zero difference in doing that -- vs changing the init.d script to include --balance in the cgminer commandline.
Anyway, if you don't have load-balance or balance set in your config file, then that line I referenced above will say something akin to "Connected via Stratum to stratum.btcguild.com:3333 with diff 512..."
Assuming you *do* see the lines about "connected to multiple pools" then you can hit the 'P' key (for some reason I had to hit it five or six times before cgminer actually showed me the menu -- so don't worry if it is sluggish to appear) and you should see something like the following, but with your pool data of course:
--------------------------------------------------------------------------------
(5s):1.068T (avg):1.014Th/s | A:7244800 R:21248 HW:18531 WU:14171.2/m
ST: 309 SS: 0 NB: 66 LW: 8680461 GF: 108 RF: 1
Connected to multiple pools with block change notify
Block: 3f8d1861... Diff:8.85G Started: [13:36:41] Best share: 0
--------------------------------------------------------------------------------
[P]ool management [S]ettings [D]isplay options [Q]uit
BTM 0: 46/ 52C 2040R | 1.045T/1.014Th/s | A:7244800 R:21248 HW:18531 WU:14171.2/m
--------------------------------------------------------------------------------
0: Enabled Alive Quota 50 Prio 0: stratum+tcp://stratum.btcguild.com:3333 User:SomeUsername_SomeWorker
1: Enabled Alive Quota 50 Prio 1: stratum+tcp://us1.ghash.io:3333 User:SomeUsername.SomeWorker
2: Enabled Alive Quota 0 Prio 2: stratum+tcp://uk1.ghash.io:3333 User:SomeUsername.SomeWorker
Current pool management strategy: Load Balance
[F]ailover only disabled
Pool [A]dd [R]emove [D]isable [E]nable [Q]uota change
[C]hange management strategy [S]witch pool [I]nformation
Or press any other key to continue
Again, refer back to my first post (1 or 2 pages ago) to see the config file that corresponds to this screen. But you'll note that the numbered list shows that pool 0 and pool 1 both have a quota of 50, while pool 2 has a quota of 0 (failover only). Also, here is a good place to confirm that your config file has no typos -- note that the 5th line from the bottom says "Current pool management strategy: Load Balance." So that shows my cgminer.conf file is indeed set up for load-balance and is working fine...and this is fresh from a reboot (well, fresh as in "I rebooted late last night") to make sure I wasn't leading you astray about the file persisting across sessions/reboots.
Note that (4th line from the bottom) it says: "[F]ailover only disabled." That's the way it should look (if you're unfamiliar with cgminer -- if not, then I apologize for what probably seems like I'm talking down to you -- certainly not my intent!) and if it doesn't look that way, make sure your config file doesn't have any additional parameters that could be screwing with stuff -- eg, I have no clue what "failover-only" : true, would do if combined with "load-balance" : true, in the conf file, but it seems safe to assume one of them would "overrule" the other. Or at least confuse things!
(Obviously if you decide to use regular "balance" instead of "load-balance" as your management strategy, then the line 5th from the bottom would say "balance" and you wouldn't see all that quota crap in the numbered list of pools.)
Now -- again, apologies if you know all this already -- if you're ready to get the hell out of that screen, or anything running under a GNU screen session for that matter, you hold the control key and press A...then you release both keys...and then you hit 'D'. So "Ctrl+A, D." [spoiler]lol, I tend to catch myself thinking "And...Disconnect" so I guess that's how I tend to remember that combo. Fans of Emacs will remember that combo because they use that, plus tons of other similar combos, all the time. Fans of vi will think that's crazy, why not just type "Escape, colon, q, exclamation point, enter" -- something intuitive like that?! :) Fans of sanity will think both of these hypothetical guys are crazy...but they'll also be wise enough to never say such heresy out loud![/spoiler]
If you disconnected from the screen session successfully, you'll find yourself dumped back at a normal/familiar root@s20~# prompt, at which point it's safe to exit...assuming things are working okay.
Now, if they *are* working okay, you can experiment to see if it's really the GUI that is mucking up your config file. First, make a copy of your (currently functional) cgminer configuration file:
root@s20:~# screen -r
[detached]
root@s20:~# cp /config/cgminer.conf /config/cgminer.conf.WorkingLoadBalance.sillyLongFilename.bak
/tmp$
Alt+Tab over to your ssh window and type
4 -r-------- 1 root root 538 May 14 06:01 /config/cgminer.conf
root@s20:~# date
Fri May 16 14:03:04 UTC 2014
Note that the clock is running on UTC time by default, so it might be worthwhile to check the current time as I did, just to make sure you're not comparing apples and oranges. So if you look at the stuff above, you can see that the last edit to my config file was roughly a day and a half ago...so it definitely persisted through the reboot yesterday. But more importantly, you can see that nothing has gone behind my back and changed it AGAIN since I edited it....however, I didn't go mess with the web GUI, since I don't use it to set up configuration stuff (it's easier for me to just scp over known-good config files that I've saved from another system, or edit the image when I first prepare the sdcard for the S2...plus you never know what kind of weird stuff the GUI might overwrite) and I don't have immediate access to the system right now so I didn't want to (potentially) do whatever it is you're doing and reset my own file, because that would be annoying. :)
I'm pretty sure you can use the "Status" screen all you want in the GUI. It's the "Miner Setup" page that has the potential to screw with your configuration file, I *think*. So none of this prevents you from using that to monitor your system, if that's how you roll. Note however that you can use other methods (from the command line while logged in via ssh, or even via your local machine if you have the API set up correctly) to check your work. So, one final example before I go -- and let's hope *some* of this helped you, since apparently my last message failed to do anything but annoy and frustrate you further! Kind of like going "hey look at what I can do...hahahahaha...this is what it looks like when your settings persist!" But I assure you that wasn't my intention! :)
When you think you have load-balance working and you want to check from the command line, enter the following, and then use enter or spacebar to page through the results. I'm doing this via ssh on to the S2, but you can also do this remotely if your API is set up correctly -- which I will leave as an exercise to the reader.
The command is:
As you page through the info that is displayed, you should see all the stuff we set up in the configuration file -- there should be at least two pools (or three, depending on your configuration setup. I suppose there could be *one* but load-balancing *one* pool server would be...a questionable use of one's time.), zero indexed, so you'll see info for POOL0, POOL1 and so on. The main thing to look for here is -- assuming you just restarted cgminer a few minutes ago -- are your (different, load-balanced) pools each completing work successfully, or are you (mostly) still just submitting work to POOL0?
You can also see (if your config file is setup correctly) there will be entries like [QUOTA] => 50, showing that your quota setup in the config file is being applied correctly. But mostly if you see that POOL0 and POOL1 have approximately their "fair share" of work listed under their [Difficulty Accepted] => xxyy sections, then you can rest easy that things are working properly. (Double check by going to your pool's site -- eg, btcguild or wherever -- and make sure that it is estimating your hash speed to be somewhere in the neighborhood of what it *should* be getting. Obviously the pool's estimate is an approximation -- but if something is really screwed up (say your rejected shares are really high on one pool only, due to using the wrong username or something like that) it's possible for cgminer and the GUI to show that you're happily hashing away at 1015Gh/s ...even though as far as the pool is concerned, you're doing *nothing* or very little! I know that seems obvious, but when I was experimenting around with some of the settings a few days ago, I managed to find a terribly unfortunate combination of config options that resulted in BTCGuild rejecting the vast majority of my shares, while the GUI and API and cgminer ncurses display all implied I was hashing just fine. It wasn't until I checked and noticed that the *pool* thought i was running around 50 GH/s (and not 500GH/s) that I realized I had "load balanced" myself in such a way that half of my hashrate was going to one pool...and the other half was going down the drain!
But, oops, I digress. Again. (Because it's what I do.)
But, freebit13, I sincerely hope this helps you troubleshoot your "mysterious resetting issue" and I really am sorry that my earlier effort led you down the path of "lots of time invested, with zero return!" :) Hopefully we can get this figured out for you...since (as i mentioned in the previous post) I was hunting around for info on this exact same thing a few days ago, so I assume there are others who will want to do it, too. And since everyone knows "Dogie's Comprehensive(TM) is the most trusted brand of forum-based documentation for ASIC configuration," I'm sure some of them will come to this thread...
But I'm kidding of course. Nobody would act that way around here...this is an internet forum, for chrissakes! Never will you find a more appropriate and reasonable crowd of calm, rational individuals, than when you make them all anonymous, set the topic to 'technology+finance' and then allow them to ask each other for help. What could go wrong!? :)
edit: PS, this *might* not be strictly relevant, freebit13, but if you continue to have trouble duplicating (on your box) the setup I have working on mine, it might be useful to know some info about your setup, eg: What batch S2 do you have, is it the stock SD card or did you upgrade it to a Class 10, what firmware are you running, do you have a sister and is she single and if not does she have any hot friends? (You know, standard "background" stuff. it's important for the whole "troubleshooting" process.)
Because when you post a question on Dogie's Comprehensive(TM) you know you can expect thoroughness ... even (and perhaps especially) if we don't actually solve your question or help you at all. Which, I guess, so far would be the case here...um...I guess I will hit submit and hope things go better this time! Good luck!