Quote:
Originally Posted by smurfyboy88 When on idle running no programmes i still have a PF usage of around 450MB....this raises to 550MB even when only using Firefox. |
Are you looking at the Page File usage as reported by Task Manager on thePprocesses tab?
That's actually the Commit Charge, not the Page File usage.
To get an accurate idea of your Page File usage, run the following script before shutting down. It will show the current and peak Page File usage for the session.
It will create a log file in My Documents showing the peak Page File usage during each session so you can easily track it for a few days.
Copy and paste into Notepad, then save it as PageFileUsage.vbs (or whatevery you want, just needs the .vbs extension).
Code:
' WinXP-2K_PageFile.vbs - Checks the current and peak usage, and allocated
' size of the Windows Windows XP or Windows 2000 pagefile and optionally
' log and/or show the results in a popup.
' © Bill James - wgjames@mvps.org - Created 4 Nov 2002 - Revised 10 Nov 2002
' Please see the ReadMe.txt file for additional information.
' You can run this script manually during a Windows session, or if you have
' Windows XP/2000 Pro I recommend adding it as a logoff script to log results
' at the end of each Windows session. To implement running the script at
' logoff (also shutdown and restart) for Windows XP Pro or Windows 2000 Pro:
' Click Start, Run, gpedit.msc. Select User Configuration, Windows Settings,
' Scripts. In the right pane, select Logoff, Properties. Click Add, Browse.
' Browse to the location of this script and select it. IMPORTANT: In the
' "Script Parameters" box add "log" (no quotes) so the script will not show a
' popup which would stall your shutdown sequence. OK, Apply, OK. (You may
' want to first copy this script to the logoff folder and select it there)
' If logging is enabled (default), the results are saved in My Documents folder
' as PageFileLog.txt.
'**********************************************************
' Three optional settings are configurable below:
' WriteToFile - If set to True the information will be added to a log file in
' your 'My Documents' folder. Of course, you want this if you are running
' at logoff, but you might not want it for manually checks. Changing this
' to False disables logging.
' ShowPopup - If set to True then after the script runs a message box is
' presented with the results. This might not be desirable when
' automatically running the script at logoff. False disables popup.
' DisplaySeconds - The number of seconds that the results popup will
' display. Setting this to 0 (zero) will cause the popup to remain until
' acknowledged.
WriteToFile = True 'Options: True, False
ShowPopup = True 'Options: True, False
DisplaySeconds = 0 '0 (zero) to force OK
'**********************************************************
'**********************************************************
' You can also set the options using arguments:
' Syntax: [path]scriptname [log] [rpt] [t:sec]
' log - add results to the logfile
' rpt - show results in popup
' t:seconds - controls how long the popup message will display
' Example: "WinXP-2K_PageFile.vbs rpt t:5" - show popup for 5 seconds, no log.
' Example: "WinXP-2K_PageFile.vbs log" - log the results, no popup.
' Example: "WinXP-2K_PageFile.vbs log rpt t:10" - log and 10 second popup.
' NOTE: If ANY arguments are used, all hardcoded variables are set to
' false or 0, so you must specifically set which options you want.
' To use these options, create a shortcut to the script and add the arguments
' there, or the arguments can be used running the script from command line.
'**********************************************************
' Do not edit below this line
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 by Bill James", 4096
End If
' Revison History
' 9 Nov 2002 - Various prerelease changes
' 10 Nov 2002 - Tweaked to show stats where multiple drives have a pagefile
HTH
Jerry