sacrum said:
Hi all - I've been running xp pro with a dedicated swap file
partition -
everything has been fine until recently and I have noticed that the
swap
space is always full to capactity (1500mb) - I have moved it to other
partitioand get the problem....
I have 1 Gig Ram installed
Put the following into a .vbs file via notpade and then run it. You will
see what your Pagefile is actually using and has used during the current
session.
------------------------
WriteToFile = True 'Options: True, False
ShowPopup = True 'Options: True, False
DisplaySeconds = 0 '0 (zero) to force OK
If WScript.Arguments.Count > 0 Then
WriteToFile = False
ShowPopup = False
DisplaySeconds = 0
For Each arg in WScript.Arguments
If LCase(arg) = "log" Then
WriteToFile = True
End If
If LCase(arg) = "rpt" Then
ShowPopup = True
End If
If Left(LCase(arg), 2) = "t:" Then
If IsNumeric(Mid(arg, 3)) Then
DisplaySeconds = Mid(arg, 3)
End If
End If
Next
End If
For Each obj in GetObject("winmgmts:\\.\root\cimv2").ExecQuery(_
"Select Name, CurrentUsage, PeakUsage, " & _
"AllocatedBaseSize from Win32_PageFileUsage",,48)
s = s & vbcrlf & "Pagefile Physical Location: " & vbtab & obj.Name
s = s & vbcrlf & "Current Pagefile Usage: " & vbtab & obj.CurrentUsage
& " MB"
s = s & vbcrlf & "Session Peak Usage: " & vbtab & obj.PeakUsage & "
MB"
s = s & vbcrlf & "Current Pagefile Size: " & vbtab &
obj.AllocatedBaseSize & " MB"
Next
If WriteToFile Then
Set fso = CreateObject("Scripting.FileSystemObject")
logfile = CreateObject("WScript.Shell"). _
SpecialFolders("MyDocuments") & "\PagefileLog.txt"
If NOT fso.OpenTextFile(logfile, 1, True).AtEndOfStream Then
With fso.OpenTextFile(logfile, 1)
s2 = .ReadAll : .Close
End With
End If
With fso.OpenTextFile(logfile, 2)
.Write Now() & vbcrlf & s & vbcrlf & vbcrlf & s2 : .Close
End With
End If
If ShowPopup Then
WScript.CreateObject("WScript.Shell").Popup _
s, DisplaySeconds, "WinXP Pagefile Usage Monitor", 4096
End If