MoellerAero Posted March 21, 2012 Posted March 21, 2012 (edited) I've got a FOG server up and running and am extremely pleased with everything except for the sleep timer for the SnapIn Client. Is there any way to speed this up? The log in my freshly imaged machines show sleep times of upwards of 500 seconds (8 minutes, really?). I want to set this to something a little more reasonable, say, 10-20 seconds. I've tried to modify the script in "fog_0.32/FOG Service/src/FOG_SnapinClient/MOD_SnapinClient.cs" to decrease the sleep time displayed from (350, 500) to (10, 20). Saved the file, restarted the FOG server. I've also modified the solution with visual studio to recompile the snapin .dlls - still no luck. try { Random r = new Random(); int intSleep = r.Next(350, 500); log(MOD_NAME, "Sleeping for " + intSleep + " seconds."); System.Threading.Thread.Sleep(intSleep * 1000); } catch{} Has anyone had any experience modifying the installation to tweak certain system variables such as this? Edited March 21, 2012 by MoellerAero
morganw Posted March 21, 2012 Posted March 21, 2012 I'm pretty sure that you can adjust this in a config file on the client, but I don't have a client to check. Unless you only have a few computers I wouldn't think that a really number like 10 seconds is a good idea, I imagine you could start to overload the webserver and have a negative effect on network performance.
MoellerAero Posted March 22, 2012 Author Posted March 22, 2012 (edited) I'm pretty sure that you can adjust this in a config file on the client, but I don't have a client to check. Unless you only have a few computers I wouldn't think that a really number like 10 seconds is a good idea, I imagine you could start to overload the webserver and have a negative effect on network performance. Thank you, your suggestion lead me in the right direction. I was right in assuming I had to recompile the .dll for the snapin, but thought putting it on the server was where it was launched - it was actually on the client it needed to be updated. For anyone who wants to fix this, here's the solution - email me ([email protected]) for a copy of the DLL if you aren't able to make it yourself: 1. Copy the directory /fog_0.32/FOG Service/src/FOG_SnapinClient/ from your fog installation to a directory on a Windows PC that has Visual Studio - pretty sure studio express would be sufficient but I haven't tried that since I have the full version. 2. Change the code below to what values you want ( for example, I used r.next(10, 20) ) try { Random r = new Random(); int intSleep = r.Next(350, 500); log(MOD_NAME, "Sleeping for " + intSleep + " seconds."); System.Threading.Thread.Sleep(intSleep * 1000); } catch{} 3. build the solution 4. copy the SnapInClient.dll in the solution directory (/bin/release/snapinclient.dll) to the FOG Directory on the CLIENT TO IMAGE in its Program Files. (for me - C:\Program Files\FOG\) 5. Upload a new image and the next time you deploy the snap in will only sleep for 10-20 seconds before attempting to start your snap ins. Edited March 22, 2012 by MoellerAero
morganw Posted March 23, 2012 Posted March 23, 2012 I'm pretty sure there is a .ini file somewhere on the client that you can alter instead of having to recompile anything.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now