owen1978 Posted October 19, 2020 Posted October 19, 2020 I came across a script on the web which displays the free ram of a computer which i want to use with bginfo but it doesn't work and I tried but im not great with WMI/VBS, can someone please help Set winmgt = "winmgmts:{impersonationLevel=impersonate}!//" Set WMI_Query = GetObject(winmgt).InstancesOf('Win32_OperatingSystem') For Each Item in WMI_Query FreeRam = Item.FreePhysicalMemory Next FreeRam = Round(FreeRam/(1024)) Echo “” & FreeRam & ” MB”
LeMarchand Posted October 20, 2020 Posted October 20, 2020 (edited) Can't help with the script (though this bump might catch someone's eye). Is this just for you, to show people how much free RAM they have, or for extra info on a pre-existing BGinfo setup for multiple users? Edited October 20, 2020 by LeMarchand
psydii Posted October 20, 2020 Posted October 20, 2020 I'm not sure what benefit you will get from looking at 'Free RAM'. If you have roughtly the 'right' amount of physical ram in your computer and its been in use for a while, 'free ram' will always be quite low (hundreds of megs at most, and often almost none) since Windows uses any RAM not hosting executing code or working data, as a cache for file access. The more useful metric is 'available' memory. This is roughly 'free ram + the cache'. If more working data/applications need to be loaded Windows will flush items out of the cache, mark them as free, and then allocate them to the required apps/data. If Available RAM is almost none then you have some problems. This script might help, though I suspect it may be where you started: https://stackoverflow.com/questions/11343190/how-to-check-available-memory-ram-via-batch-script. 1
DaveTheTech Posted October 20, 2020 Posted October 20, 2020 BGInfo does have a place where you can create the variables that you wan to include on the desktop overlay. The problem would be the free ram would be out of date as soon as its on the screen.
mbedford Posted October 22, 2020 Posted October 22, 2020 +1 this, its essentially a tattoo at the point in time BGInfo is run, its great for static (ish) data, AssetTag, IP Address, etc... but anything like performance stats, its a waste of time. What is it you are trying to achieve, on a desktop PC, free RAM is not really a metric of much use. Yes its nice to say "I have 3.6GB available" but what I would focus on is a problem (assuming you have one). Id the machine running slow and you think RAM is the issue? Advice I try to stick to - Fix the problem, not the numbers.
owen1978 Posted October 23, 2020 Author Posted October 23, 2020 Thanks for all your replies... Managed to sort it... I'm just using as quick info, not going to use it for anything else.
LeMarchand Posted October 23, 2020 Posted October 23, 2020 If you want something more visual, this may be worth a look: https://archive.codeplex.com/?p=taskbarmeters. Not used it in years, so not sure how it does on more modern systems. If it's just for you, Rainmeter is well worth a look. The below is my PC at this site and the visual I prefer, but it is very configurable.
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