Search This Blog

Thursday, August 22, 2013

Windows Servers - Slow network performance

I have had many instances over the last few years of slow netowrk performance on various machines.

Here I list the items I have changed to resolve these.

1. Disable AutoTuningLevel

netsh interface tcp set global autotuninglevel=disabled

To re-enable AutoTuningLevel if it does not work 


netsh interface tcp set global autotuninglevel=normal



2. Disabling SMB 2




http://social.technet.microsoft.com/Forums/windowsserver/en-US/7817f338-50ec-4de6-b059-4370588f4e30/browsing-shared-folders-slow-from-xp




3. Disable TCP Offloading (needs restart)




HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

Value = DisableTaskOffload
Type = DWORD
Data = 1

Value = EnableTCPChimney
Type = DWORD
Data = 0

Value = EnableTCPA
Type = DWORD
Data = 0

Value = EnableRSS
Type = DWORD
Data = 0



I have had SMB2 and the TCP Offloading sprt out various network performance issue over the years.

Share/Bookmark

Sunday, July 28, 2013

XenServer Installation–Dell R710

I recently had to install XenServer onto a Dell R710.

This is an unlicensed install, Xen Server is now open source so this valid.

However in a unlicensed install updating the xenserver has to be down via the console.

Note: I had issues installing on to the R710 initially, I kept getting an unrecoverable error message. Stating something about the utility partition being unsupported on partition 2 (I cannot remember the exact message but I could not find anything on the internet about the message). However I fixed the problem by recreating the RAID5 array (PERC H700) and then reinitialising the array. Then I could happily install XenServer.

Once installed, I was able to browse to the XenServer IP I assigned via http, and I download XenCenter.

Once downloaded, I installed XenCenter on my Windows 7 x64 machine.

I then added the XenServer to XenCenter.

I then bonded to of the NICs together in an active-passive format (for redundancy). This took the nic setup I chose during installation, and applied it across the bonded nics. It was very easy to do.

There were 2 hot fixes to apply and this is where it started to depart from easyland.

With the unlicensed version they do not support installation of updates very the XenCenter, which would have been nice, you have to use the command line. I am not familiar with XenServer so this process was a bit alien to me.

1. Download the hotfixes and unzip the files.

2. Connect to XenServer via SFTP (I used FileZilla via SFTP, using root to connect).

3. I then changed to the \tmp folder and created a \tmp\updates folder, and uploaded the hot fixes into that folder. You only need the *.xsupdate files, not the *.tar.bz2 files.

4. Now we have to add to the pool database. In XenCenter goto the console. Change directory to the \tmp\updates folder.

5. xe patch-upload filename=<Path of file and name>

6. Record the UUID that is returned. Repeat step 5 for however many updates have been uploaded.

7. Run xe patch-list, this will list out the updates and you can check. 

8. Run xe host-list, this will list out the UUID of the hosts. Not these UUIDs as these will be needed.

9. Now run xe patch-apply uuid=<UUID of the patch> host-uuid=<UUID of the host>

10. Repeat for all updates and then reboot the host server.

11. Once the reboot has completed you should be able to review the updates in XenCenter under the General tab for the host server, under the updates section.

References:

http://support.citrix.com/article/CTX132791


Share/Bookmark

Sunday, May 12, 2013

Remove\Rename a stubbornWindows Folder

Had an issue, where i had a folder I had that was extracted from an archive, I wanted to rename the folder but Windows wouldn't let me.

I was getting errors from windows, saying that the folder no longer existed.

“The file or folder does not exist”

After trying a raft of things, I even moved the parent folder to another location, which windows happily let me do, I still couldn't rename the folder/s

When looking at the folders from the command prompt, it became there were some odd characters in the name that where no showing up in windows explorer, but in the command prompt they were appearing as white space.

In the end I managed to rename the folders using the command prompt and 8.3 filenames

“C:\ParentFolder\OddFolder Which Will Not Rename”

rename C:\ParentFolder\OddFo~1 C:\ParentFolder\Odd1


Share/Bookmark

Thursday, March 07, 2013

Powershell scripts and .Net assemblies–force PS to run later .Net CLR

Recently i was writing a PS script to check a list of websites. To do this I was using a .net class

HttpWebRequest


So I wrote the script in powerGUI on the server where I wanted the script to run. I got it working within powerGUI, so I thought I would then schedule the script.



But when I run the script from the tesk scheduler I was met with an error, stating that one of the objects I wanted to use didnot contain a method.




Method invocation failed because [System.Net.HttpWebResponse] doesn't contain a method named 'Dispose'.




What?!, it worked fine in the powerGUI on the same server.



Anyway I eventually tracked this down to the fact that powershell 2.0 starts with an older .Net framework CLR. So I needed to get powershell to run a later version.



I found an article here, it explains the problem and the solutions nicely.



http://viziblr.com/news/2012/5/16/the-easy-way-to-run-powershell-20-using-net-framework-40.html



I created the xml files in the locations specified and it solved my problems.



C:\Windows\System32\WindowsPowerShell\v1.0




  • powershell.exe.config


  • powershell_ise.exe.config



XML contents




<?xml version="1.0"?>

<configuration>


    <startup useLegacyV2RuntimeActivationPolicy="true">


        <supportedRuntime version="v4.0.30319"/>


        <supportedRuntime version="v2.0.50727"/>


    </startup>


</configuration>


Share/Bookmark

Monday, March 04, 2013

Enable Group Policy logging

Note: A great tool for viewing the GPO logs created in this article is available for free here. http://www.sysprosoft.com/policyreporter.shtml

Its great tool.

Group Policy logging can be enabled by the addition (or changing) a registry entry.

Windows 2000/2003

Registry


[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]

"UserEnvDebugLevel"=dword:00030002

Valid entries

  • NONE 0x00000000
  • NORMAL 0x00000001
  • VERBOSE 0x00000002
  • LOGFILE 0x00010000
  • DEBUGGER 0x00020000

These values can be combined.

0x00030002

i.e. for logfile, debugger and verboose

%windir%\debug\usermode\UserEnv.log

Once setup a reboot may be needed as it doesnt seem to create the folder usermode until a reboot has been completed. However I have seen a posting that said that you can manually create the usermode folder and that the UserEnv.log file will be created without a reboot, when the gpupdate is called.

 

Windows 2008

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Diagnostics]

"GPSvcDebugLevel"=dword:00030002

Valid entries

  • NONE 0x00000000
  • NORMAL 0x00000001
  • VERBOSE 0x00000002
  • LOGFILE 0x00010000
  • DEBUGGER 0x00020000

These values can be combined.

0x00030002

i.e. for logfile, debugger and verbose

%WINDIR%\debug\usermode\gpsvc.log

Once setup a reboot may be needed as it doesnt seem to create the folder usermode until a reboot has been completed. However I have seen a posting that said that you can manually create the usermode folder and that the UserEnv.log file will be created without a reboot, when the gpupdate is called.

References

http://technet.microsoft.com/en-us/library/cc759167(v=ws.10).aspx

http://www.sysprosoft.com/policyreporter.shtml

http://technet.microsoft.com/en-us/magazine/dd315424.aspx


Share/Bookmark

Thursday, February 21, 2013

Creating a Central Store for Group Policy Admin Templates

So the GP Management tool, will check for admin templates on a central location

\\domain\SYSVOL\domain\Policies\PolicyDefinitions

By default this folder PolicyDefinitions does not exist on the DCs. So create this folder on one DC, FRS will replicate to other DCs. Now copy in the templates and language folders from c:\windows\PolicyDefinitions on your server. Ensure the language folders are also include… en-US, en-AU etc…

Now if you open up a policy to edit, from a machine within the domain, the templates will be loaded from this location. So to add any more just copy them to this location on the DC


Share/Bookmark

Hair-pin NAT ( NAT loopback / NAT inside to inside)

Ok this is just a reminder for me. I needed to achieve this ability on a cisco firewall but I did not know the terminology and hence find it hard to google.

So links to details

http://kb.juniper.net/InfoCenter/index?page=content&id=KB24639

https://supportforums.cisco.com/thread/1003238

http://packetpushers.net/cisco-asa-8-38-4-hairpinning-nat-configuration/


Share/Bookmark