« August 2005 | Main | May 2007 »

01/31/2006

Spoolsv.exe causing high CPU usage

If spoolsv.exe is causing 99% cpu usage then it may have a corrupted print file stuck in the system32 folder. To fix it do the following
Go to Control Panel, Administrative Tools, Services and stop the Print Spooler services
Turn off the printer.
Now go to C:\WINDOWS\system32\spool\PRINTERS and delete the files there. You may find some '00002.SHD' and '00020.SPL'. or something similar.
Now turn your printer back on and restart the print spool service.
Spoolsv.exe should be at 2% or less.

01/03/2006

Virtual Server 2003 Backup Script

There are not that very many options when it comes to backing up Virtual Servers. Here is a script I came across from the guys at Win32 Scripting that will backup the VMC and VSV. It does require vshadow.exe from the VSS SDK.
Basically it will save state running virtual machines, create a shadow copy , then restore the Virtual Servers.

You can download the script here.


Script:


Script:

On Error Resume Next

Set objShell = CreateObject ("WScript.Shell")
set objFSO=CreateObject("Scripting.FileSystemObject")
Set virtualServer = CreateObject("VirtualServer.Application")
DestBackupDir = "your backup path"
sExCmd = "CreateVSS.cmd"
Set oFileSys = CreateObject("Scripting.FileSystemObject")
if oFileSys.FileExists(sExCmd) then oFileSys.DeleteFile(sExCmd)
set oExCmd = oFileSys.CreateTextFile(sExCmd, CopyOverwrite)

For each objVM in virtualServer.VirtualMachines
'See if vm machine is running. If so then do backup
If objVM.State = 5 then
'Save state the virtual machine
set saveTask = objVM.Save
'Loop waiting for task completion - and display status
while not saveTask.isComplete
WScript.Sleep 1000
wend
'Copy .VMC and .VSV files
MyArray = Split(objVM.File,"\")
Filename = MyArray(Ubound(MyArray))
objFSO.CopyFile objVM.File,DestBackupDir & Filename
MyArray = Split(objVM.SavedStateFilePath,"\")
Filename = MyArray(Ubound(MyArray))
objFSO.CopyFile objVM.SavedStateFilePath,DestBackupDir & Filename
End If
Next
Set objVM = Nothing

' Create Shadow copy of VM drive
oExCmd.WriteLine "vshadow.exe -script=setvar1.cmd -p d:"
oExCmd.WriteLine "call setvar1.cmd"
oExCmd.WriteLine "vshadow.exe -el=%SHADOW_ID_1%,x:"
oExCmd.Close
Result = objShell.run(sExCmd,vbMinimized, TRUE)

' Start VM machine up from saved state
For each objVM in virtualServer.VirtualMachines
'See if vm machine is Saved. If so then resume
If objVM.State = 2 then
'Start virtual machine
objVM.Startup
End If
Next
Set objVM = Nothing
WScript.Sleep 10000


If Result = 0 then
'Loop through all vm machines
For each objVM in virtualServer.VirtualMachines
'See if vm machine is running. If so copy shadow backup of vm disk drives
If objVM.State = 5 then

'Copy virtual hard disks and undo disks
For each vhd in objVM.HardDiskConnections
MyArray = Split(vhd.undoHardDisk.file,"\")
Filename = MyArray(Ubound(MyArray))
SourceName = "x" & Right(vhd.undoHardDisk.file,Len(vhd.undoHardDisk.file)-1)
wscript.echo vhd.undoHardDisk.file
wscript.echo SourceName
objFSO.CopyFile SourceName,DestBackupDir & Filename
MyArray = Split(vhd.HardDisk.file,"\")
Filename = MyArray(Ubound(MyArray))
SourceName = "x" & Right(vhd.HardDisk.file,Len(vhd.HardDisk.file)-1)
objFSO.CopyFile SourceName,DestBackupDir & Filename
Next

End If
Next
End If

' Shutdown all shadow copy instances
if oFileSys.FileExists(sExCmd) then oFileSys.DeleteFile(sExCmd)
set oExCmd = oFileSys.CreateTextFile(sExCmd, CopyOverwrite)
oExCmd.WriteLine "Echo y | vshadow.exe -da"
oExCmd.Close
Result = objShell.run(sExCmd,vbMinimized, TRUE)

'Script ends
wscript.echo "done"

Keep in mind that you still need to copy the VMD file. Also don't forget to add a \ at the end of your backup path ( It will support UNC ).

Having your Cisco CallManager Publisher Failover to a Subscriber

Cisco doesn't have very good documentation when it comes to publisher to subscriber failover. If you're looking to have your VoiceGateway failover to a subscriber with the ability not only to dial out but continue to recieve incoming calls your Gateway config should have a preference value, example.

dial-peer voice 20 voip
incoming called-number .
destination-pattern 3...
preference 1 <---Add
progress_ind setup enable 3
session target ipv4:10.1.24.24 <-----assumimg this is the Publisher's ip address
dtmf-relay h245-alphanumeric
codec g711ulaw
no vad


!
dial-peer voice 21 voip
incoming called-number .
destination-pattern 3...
preference 2 <---Add, higher value than that of the PUB
progress_ind setup enable 3
session target ipv4:10.1.24.25 <----assuming this is the Subscriber's s ip addess
dtmf-relay h245-alphanumeric
codec g711ulaw
no vad

HOTFIX AND PATCHES

IM me

Sponsors

Search

  • Google

My Online Status

Sponsor

.