Programmatically monitoring Windows memory

Hi
I'd like to monitor the total amount of memory a Windows-process is using. Something like the Windows Task Manager does.
This is primarially used to get the amount of memory an application built with Labview is using.
I know there are several ways to calculate the memory of certain VIs and iterate through all Vis in memory, but that doesn't the trick.
You'll miss out the memory that is consumed in a DLL. This is run in the same address space as the VI, but is not logged in any of the common LV monitoring tools.
In my case I wan't to restart an application when the LV 8.6 Webserver eats too much memory, which it does if you plublish heavily decorated frontpanels.
So I am sure there is way to get these numbers in a Windows Kernel or User method or property. Is someone better in MS internals than I? Then I'd really appreciate a hint.
Gabi
7.1 -- 2013
CLA
Solved!
Go to Solution.

Thanks guys
I usually stick with Active-X but this time I could not follow the MS-sequence of methods and properties . Maybe it's also because I tried it on a German XP-Professional (SP3).
 Ultimatly the scan will have to run as well on a Windows-Server 2008/64 So I decided to go with .net.
I didn't even know there existed an example for that. But since my problem was "monitoring memory" I would not search for System Monitor or Counters.
So thank again.
Gabi
BTW: As compared to what google brings up for a search, NI is pretty poor.
7.1 -- 2013
CLA

Similar Messages

  • Dual Monitors Windows 7 Problems

    Ok, this problem is getting really annoying and I think its a problem with windows 7 itself and not my computer.
    Basically I have a dual monitor setup with the left hand monitor as my secondary and right hand monitor as my primary.  Whenever I have an application with any graphics on it at all such as a progress bar on my left hand monitor moving windows around becomes laggy and juddery, yet this doesn't happen when the graphical app is on my primary monitor!
    My system Specs: 
    ASUS Striker Extreme MOBO
    OCZ 850W gameXtreme
    Core 2 Duo 2.4GHz CPU
    4GB (4x1GB) OCZ DDR2 1066MHz RAM
    Nvidia 8800GTX
    Sound blaster x-fi Xtreme Gamer (older PCI version)
    3 x 80GB HD for system drive in RAID 0
    1 x 500GB and 1 x 250GB drives for storage
    Monitors are 1680 x 1050 res
    Windows 7 Exp Index:
    CPU: 5.9
    Memory: 5.9
    Graphics: 6.8
    Gaming Graphics: 6.8
    Primary HD: 5.9
    What iv tried:
    Updating to latest drivers
    Upgraded system memory from 2GB to 4GB
    Installing 64-bit version
    removing sound card and re-installing windows from scratch
    upgraded my PSU
    Thanks for your help!

    (Latest update) This is the best I can do to alleviate the problem, and does reduce its severity immensely, but I found myself still noticing some slight playback glitches in videos on my second monitor which probably also translate to anything else with movement. I have tested with a panning scene in one of my videos and there is a subtle micro-stutter on my second monitor which I can find no way to fix. This doesn't occur if outputting to a single display, one or the other, nor does it occur when playing the video on my primary monitor in a dual-monitor configuration. Note that when I say "primary monitor", I am not referring to the monitor Windows has marked as primary, but my actual monitor rather than TV. In a dual-monitor configuration, this micro-stutter will only occur when playing video on my right monitor (TV), regardless of settings or which ports the monitors are connected to on the GPU. The micro-stutter occurs with no relation to the activity on the other screen, as it can be completely still. I can confirm the micro-stutter does not occur at all with Desktop Window Manager (Aero) disabled. In short, this is a nightmare.
    (Note that this micro-stutter is equally replicable in the 182.50 (WDDM1.1-less) driver, meaning there is no way to solve it other than disabling Aero or outputting to a single monitor.)
    I think I've solved the problem.. for me, anyway. I've divided this into short answer and "long answer", which is closer to a stream of consciousness in some ways, as I found out about Force10Level9 as I was writing.
    The short version:
    I've found some registry keys which seem to have fixed the problem for me. I haven't experienced any side effects, but use the tweaks at your own risk!
    I don't know exactly what they do. This comes from a lot of.. experimentation. I believe FrameRateMin tells the Desktop Window Manager that it's crucial to try to keep the framerate at or above the value specified (more details below), and Force10Level9 sounds like it forces DWM to use DirectX 9. I'm fairly certain about the former, not as certain about the latter, but together they do wonders.
    You can view the fix below. You can then save it as a .reg file and import it into your registry. Restart the Desktop Window Manager service or reboot to see the changes.
    Fix: http://pastebin.com/FFDbubw9
    Undo: http://pastebin.com/zA8CJY06
    (P.S. Just ran a FurMark test between fix applied and no fix. No difference in performance, with an inactive secondary monitor. I also noticed no difference in Physical Memory usage as reported by Task Manager. YMMV, let me know if you have any side effects.)
    (P.P.S. The screen fade that happens when you log in/out is just as choppy as before (or if it wasn't choppy for you, that shouldn't have changed). Oh well, how often do we see that thing, anyway? :))
    By the way, it appears 10Level9 is Windows 7's emulation platform for running DX10 on DX9 hardware. It's reported to be at least a 0.5x performance hit, so it's surprising that it actually makes Aero run better. If this article is anything to go by, Force10Level9 makes Aero run exactly the same as it does with older WDDM 1.0-only drivers like 182.50: http://www.techarp.com/showarticle.aspx?artno=637&pgno=1
    The long version:
    Well... I was able to do one more thing.
    There is an undocumented registry key which allows you to fine-tune the Desktop Window Manager's scheduling. Unfortunately, all of its values seem to be defunct in the final version of Windows 7 we all use today... except one: FrameRateMin.
    From what I gather, the Desktop Window Manager (Aero) carefully monitors the framerate it is able to achieve, and when it can't measure up to its own expectations, it will perform a "step down", or framerate reduction, and maintain this lower framerate for a given period of time (at one time specifiable with a registry value) before trying again at maximum speed.
    I presume it does all this to keep things looking "smooth".
    The problem is, in most cases, it doesn't help, and actually prolongs the stuttering duration. By "in most cases", I mean in every case it's happened in my personal usage of my Windows 7 computers.
    So what helped me was setting this FrameRateMin value to 60. That way, the Desktop Window Manager considers anything under 60fps to be unacceptable and will not remain at a lower framerate for purposes of perceived smoothness. Thus, the stuttering will take up as little time as possible, making it nearly unnoticeable most of the time.
    Keep in mind DWM shouldn't be having performance problems to begin with, but apparently in some cases, like with my particular hardware (desktop and laptop) and the latest NVIDIA drivers, it does.
    Down to brass tacks. The registry key is HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\DWM\Schedule. The value is FrameRateMin, a DWORD representing the minimum framerate DWM will consider as acceptable. I set it to 60, but you can set it to whatever you want.
    To repeat, this WILL NOT prevent Aero from ever getting below the framerate you specify; it simply prevents Aero from retaining a lower framerate after a stutter in order to give the illusion of smoothness (an illusion which fails).
    I imagine the main reason it fails so spectacularly in my usage is because I watch a lot of videos which play back at 24fps. Such a framerate plays back terribly with a 30Hz refresh rate, which is what Aero would reduce itself to for extended lengths of time. Now, performance hiccups are minimal, but sadly still existent.
    So this isn't a solution, but it does help. I am still uncertain of where the problem lies, considering GPU-Z shows graphics card loads to be as low as always when it's happening.
    Oh, and I found one more registry value. This one is far more important. :) It solves the problem for me entirely, from what I can tell.
    HKEY_CURRENT_USER\SOFTWARE\Microsoft\Avalon.Graphics
    add the DWORD value Force10Level9 with a value of 1.
    I haven't noticed any side effects, just smooth performance.
    Apply these tweaks at your own risk!

  • Subtitle track turns monitor window into color noise?!

    As soon as I added a subtitle track to my encore 1.5 project, the monitor window turns into colored noise.
    http://www.smugmug.com/gallery/4373720_VBrbJ/
    The video noise seems to be an upside down image (of a performer on stage).
    If I play the video, it turns normal, but the audio track sometimes play normal, sometimes it becomes a constant sine wave.
    What's going on?

    A work around is to remove the transcode. However, as I add more subtitle into the track, I run into a "out of memory" pop up. Subsequently, the cursor (red line) redraw leaves behind some un-erased lines, and the bottom border of the subtitle track sometimes is not drawn. Drag-resizing the subtitle also does not redraw until the mouse is released.
    Did I really run out of memory? I have 2G on this machine. Or is this an encore config issue? I looked but did not find any memory configuration options.

  • Programatically Monitoring RT Memory Remotely

    Hello,
    Does anyone know if there's a way to monitor the memory of an RT target remotely without using RT System Manager?  I've been given an RT application that appears to have a memory leak.  I'd really like to set up a logging VI to watch the memory usage over time, but without that ability it's hard to get a clear picture of what's going on.  I'm aware of "RT Get Memory Usage.vi" and I've used it before, but I can't use it except locally on the target, and I'd rather not log to my cRIO's flash memory if I can help it.  I suppose I could write some TCP code to regularly transfer the memory usage over to a Windows application, but what if the TCP code itself is causing the memory leak?
    If such a VI or function exists, I'd love to know about it, and if it doesn't exist, it would be really nice if someone at NI released one.
    Any ideas?
    Thanks in advance,
    Jim

    Hi Stephen,
    Thanks for your reply.  Well, it's not that I can't use RT System Manager - it's just that it's a crude tool for what I'm trying to do.  What I mean by this is that I'm using System Manager to keep an eye on the memory over a prolonged period of time.  System Manager is a bit awkward because, to see memory usage all the time as an "alert," I've got to set up an alert that occurs when memory usage exceeds zero.  Then, all the alerts occur at regular intervals.  No problem; this works well enough.  To log the alerts, there's no way to set up a file and have a sort of disk-streaming setup.  The only way to log alerts is after the fact.  This isn't so bad, but I'm working on a lot of really large applications all the time and I regularly crash LabVIEW, and when that happens, I lose all of the memory data.  (I'm not at all saying that LabVIEW is unstable; Most of the time I have great luck with it.  I'm just dealing with some very complex and unusal code on a regular basis)  So then, as I said, it's not that I can't use it - I'm just hoping that there's a better way.
    Apparently there is a better way!  After I wrote some slightly frustrated feedback to NI's product support, Mike from NI got back to me, and he said:
    "There is a new feature in LabVIEW RT 8.6 that should solve your problem (logging Memory usage on an RT Target). Every RT Target now publishes its CPU and Memory usage levels as variables under the NI_SystemState process. Specifically, you can read the value of
    \\target\NI_SystemState\Memory\Allocated
    to see the current memory usage of your target. If you have DSC, you can bind this to a variable with logging, or you can just read and log the value yourself."
    Mike, if you're reading this, I hope you don't mind my quoting you on this one, but I'm very grateful for your response and I thought I'd share the wealth.  I'm not using DSC, but I did successfully retrieve the variable using LOGOS via the datasockets protocol.  For those unfamiliar with the process, I've attached a screenshot.
    Thanks again to Mike!  (And to Stephen for replying to my post)
    Jim
    Attachments:
    MemoryViaLogos.png ‏5 KB

  • CS4-How do I remove a split screen in the Program monitor window?

    I have Pro CS4 on a vista 64 OS. I am using the Mainstream encoders and my Program monitor window switches to a split screen every time I play the timeline. When I stop the playback, the screen returns to normal full screen with the last frame showing. When I start the playback again, the screen splits into two screens squishing the actual playback window to the left part of the monitor window. Any Ideas? Thanks.

    I found the solution by changing my quality settings (in the top right hand corner of the program display window) from "Automatic Quality" to "Highest Quality".
    I am not sure why it affects the display in this manner, but it just works this way and it is repeatable.
    I am working with 50 Mb MXF files from a Sony PDW900 HD camera.I use the Mainstream codecs to inport the files. I am using a Nvidia Quadro CX as a video card with the latest drivers. I first thought that the Mainstream codecs were affecting the display somehow, but then again, I do not remember changing these display settings. Thanks for the suggestions, I appreciate the response just the same...

  • How do I get an image in the Encore CS6 monitor window? Audio's fine.

    First time Encore user. Running its CS6 version alongside PP CC 2014. Exported media as mpg2-dvd from PP, imported as timeline with the .wav into Encore as suggested here: Adobe TV
    I get sound but no image in the monitor window. The m2v file plays back in VLC, but no image in QT, and attempted playback gets me spinning beach balls.
    Thoughts? Just need to burn a DVD for client delivery tomorrow. Yes, a DVD.
    I'm running osx 10.9.5, 2.7GHz i7/16GB RAM MBP with a couple of SSDs in it, and a Thunderbolt RAID 1 for media.
    Thanks for any leads.

    Thanks for your reply. I believe the purpose of Photo Stream on Apple TV is quite different, obviously you can use Photo Stream as a screen saver, but since Apple TV doesn't have a hard drive you can't download your Photo Stream pictures onto the device. This creates a problem when you have an Apple TV at two different locations (Home sharing wouldn't work), so I want to know if I can move a picture back into PhotoStream after 30 days and the system will allow it. Please help! Thanks!

  • Monitor window aspect ratio

    How do you set the aspect ratio of the monitor window?  Sometimes a 16:9 still image will full the monitor window, and sometimes it will be letterboxed inside a 4:3 monitor window.  How do you control this?

    For just the Program Monitor, setting that to Fit, will be correct - however, your Project Preset MUST match you Source Footage. Are you mixing Source Footage, or mis-matching the Project's Settings to your Source Footage?
    Good luck,
    Hunt

  • Can't resize video in Sequence monitor window anymore ???

    OK Help... I have been working on a project in CS4 and the project settings are HD 1080. I have been able to bring in other SD clips and simply "click" on the video in the monitor window and a box comes up around the video and I can resize it and then render and it looks acceptable. This works if I want to shrink it and have a black border also. Now the ability to do this is GONE ! Same computer - same everything. I click and there is no box or ability to re-size. Only thing I ever did was load up another project at one time in standard DV - NTSC and encoded with Encore.  Whats Wrong

    Glad that you found it. You can also do the same thing with the Bounding Box, if you open the Effects Control Panel, and then click on the name Motion in the Effects list there, and you'll get a Bounding Box in the Program Panel. Personally, I like the numerical method, but some like the Bounding Box.
    Good luck,
    Hunt

  • Resolution of image in monitor window

    How can I get the image in the monitor window to be as sharp as the image in the preview window in Premier Elements 10?

    Marcel,
    If a Project ONLY has Still Images (no Video), then the Project needs to be set to the desired output, say NTSC (or PAL, depending on where one lives) DV Widescreen 16:9 if going to DVD. This is a departure from a Project's Preset, where there IS Video. Then, the Video will dictate what the Project's Preset should be - a 100% match between it, and the Video. When one has both Video and Still Images, the direction for matching the Project to the Video holds.
    With Still Images, it is always best to Scale those, in Photoshop/Photoshop Elements, prior to Import into Premiere. This will do two things: keep the processing overhead lower, and actually yield higher quality. See this article: http://forums.adobe.com/thread/450798?start=0&tstart=0. For an SD Project, we recommend Scaling to no more than 1000 x 750 pixels, unless one needs to do a Pan on a Zoomed Out Still. I Scale to exactly the Frame Size of the Project. For an HD Project, say at 1920 x 1080, we recommend Scaling to no larger than 2000 x 1500.
    With Still Images, when one Imports those, and drags them to the Timeline, there WILL be a red line. Same as when one adds an overlay, say a Title, or Picture in Picture, or adds an Effect, or even a Transition - the red line will appear, and for smoothest playback, Rendering of the Timeline, or that portion of the Timeline, will be required.
    Good luck, and hope that helps.
    Hunt

  • Issue monitoring window

    We have an issue tracking system that I am trying to design an issue monitoring window for. I created the popup which has 2 frames: the top is the list of issues, the bottom is the assignments for that issue. The popup is set to refresh every 2 minutes, and the assignments section can is changed by clicking the linked id in the issues frame. The user can highlight a row in the top by clicking on the row. Double-clicking will launch a popup.
    What I need is this: I need for the user to be able to single click on a row to see the assignments for that call, or double click to see the details for that call. I believe the value of the call_id is obtained with the getValue(), but have not been able to get it to work. This is one of the last pieces of this project - any help would be greatly appreciated!

    I think I found a workaround. Instead of having the user click on the row to get the popup, I have changed all columns to links. One click will update the bottom frame, two clicks on a link initiates the popup. The rows highlight on mouseover. Note for anyone else wanting to call a popup from a popup: for some reason, the popup blocker will affect calls to the htmldb app when a session variable is used (other websites worked). I also had to use #APP_SESSION# instead of &SESSION. .

  • Clips do not play in monitor window

    Hi
    Since adding some extra clips to the timeline in P/8 I am not able to play the scenes in the monitor window,they will appear there if I drag the timeline marker tool.
    75BIGJ75

    Hi Steve & Bill
    Thanks for your help, I have now sorted my problem.  This morning after the PC had been switched off over night I started a compleatly new project after clearing out all the other projects, and everything worked fine. The only difference being when the clips from the VHS tapes were put on the timeline I got a message saying improve poor quality clips? yes/no, I clicked no,   last time I clicked yes, then it went into Auto Analylise. This may have been the problem.
    I will try to answer your questions now steve.   The Tape Deck is a Sony Mini Video Cassette recorder/Player  NO. GV-C300E PAL.(a useful piece of kit) it has a firewire connection to the PC and records in AVI format.   My o/s is windows 7,  Hard Drive 1Tb  with plenty of space, Processor is Dual Core 3.10Ghz  And 4 GB of Ram.  In general I am very pleasd with PRE8 it has problems yes but Iam sure they will be sorted later. I have worked with several of the earlier editions.
    Thanks again to all.

  • Remote monitoe supervisor not appearing in remote monitor window

    Hi All, So I want to use the remote monitor application to monitor either a CSQ or an agent. Setup the CSQ's, agents and supervisors for normal applications and all works fine. I have setup the remote monitor app and I receive the necessary prompts whe I dial it BUT in the remote monitor window, I dont see any supervisors at all - and ideas would be great as its driving me crazy.
    Thanks

    Hi Paul,
    Unique identifier of the user for which the spoken name is to be uploaded.
    Note        The User Id must be numerical.
    Yes it is required to have the Supervisor ID in numbers to be visible under the Remote Monitoring page. For the Test purpose I created multple user with the Supervisor Capability, and only the Supervisors with the numbers in the User ID are visible in this page as seen below.
    Please open the Help for this page on the Remote Monitoring and click on the section "Creating a Remote Monitoring Supervisor" , you will see the above requirement.
    Hope this helps, also please rate the helpful posts.
    Thanks,
    Anand

  • Monitor window problems in CS4?

    I just upgraded to CS4 from an older version.  I have Premiere Pro 4.2.1.  I'm using it on a Windows XP machine.
    The monitor window is not behaving at all as expected.
    I imported a Photoshop file to use as a still for a few seconds.  The thumbnail in the upper left corner of the project window looks fine, but the colors in the monitor window are really bizarre.  For example, the white background of the Photoshop file is displayed in the monitor window as a horrid salmon color.  The places that should be red in the Photoshop file display in the monitor window as royal blue.  I tried exporitng the sequence to an AVI file, and the colors came out fine in the AVI file.  So the problem appears to be confined to the behavior of the monitor window.
    When I move the slider back and forth in the timeline window, I would expect the monitor window to display whichever frame I'm passing over.  But it doesn't.  It'll update the view (with incorrect colors) when I pass the slider in the Timeline window over a still, but if I pass the slider over a clip, it just preserves the display of the most-recently-displayed still.
    I have also noticed that there is no longer a help file local on my hard disk - when I click o nthe "help" choice from the menu bar, and then pick "Adobe Premier Pro Help", instead of accessing a local help file, it goes out to Adobe's web site.  This was EXTREMELY annoying when I was trying to use this stuff on an airplane without web access!  How am I supposed to get help when I don't have Internet access?????
    Can anybody point me in the right direction to solve these problems?

    The links in this ARTICLE might prove useful. Most often, this is caused by either an outdated video driver, or perhaps a setting for Hardware Acceleration, OpenGL, or similar.
    Also, as Harm mentions, make sure that your PSD is RGB 8-bit, and is also appropriately Scaled in PS to near the Frame Size of the Project. Usually, CMYK, or 16-bit PSD's will yield error messages.
    Good luck,
    Hunt

  • Audio,  Premiere Elements 13 (Trial), Samsung Ultrabook NP730U3E with Windows 8.1 ! The problem: If I transfer a clip  from the monitor window to the timeline the audio disapears

    On the moment that I transfer a scene from the monitor window to the timeline, my audio disapears. In the monitor window the sound is playing well. How can I solve this problem ?

    gertdd
    Please explain.
    You cannot move a clip from the Edit area monitor to the Timeline. When you write "monitor window", are you referring to the Preview Window that opens when you double click a file's thumbnail in Project Assets?
    If that is the case, are you waiting for the audio imported to Project Assets to conform fully before you start to work with the import? See bottom right of Expert workspace and the appearance of a progress bar. See any conforming going on there?
    Do you get sound for your clip if you drag it from Project Assets to the Timeline Video Track 1/Audio Track 1 rather than if you drag a trim from the Preview Window to the Timeline (as it appears you are doing).
    Please review and consider, and then let me know if I have misinterpreted any of your problem description.
    The answers will be in the details.
    We will be watching for those details to help us help you.
    Thank you.
    ATR

  • Oversaturated colors in Source and Program Monitor windows

    After I updated to Premiere CC 7.1.0 the colors is much more saturated in the Source and Program Monitor windows and also in the Bin thumbnails.
    Colors is fine when viewing the video under Export Setting, in the Title window, in the thumbnails on the timeline and also when I open a ProRes export in Quicktime:
    I'm on a Macbook Pro bought in January 2013.
    I've tried switching the renderer between CUDA, OpenGL and Software Only - no change. I've also tried unchecking "Composite in Linear Color" under Sequence Settings with no luck.
    How can I change this?
    Best regards,
    Kasper

    I've been editing in Premiere since 5.1 and this has never been an issue before. So what you're telling me is I can no longer rely on colors when editing on my Macbook without having to plug in an external monitor?
    I'm not buying that - it must be possible to view the same colors in both the Source/Program monitor and in the timeline/Title window like always.
    What could the problem be associated to?

Maybe you are looking for

  • I changed my apple ID but the old one is still showing up on my phone! How do I update it so I can make changes to the iCloud settings on my phone?

    I changed my Apple ID recently and everything works fine when I sign into iTunes or iCloud from my PC. However, when I go to iCloud settings on my iPhone 5, the account is still showing up under the old Apple ID. That means that I cannot turn off the

  • IPhoto won't open, even after 3 re-installations.

    My problem is fairly simple; iPhoto refuses to open. I have installed iLife '09 three times because of this, and each time it makes no difference. It hangs for awhile and then offers to relaunch, close, or send a report to Apple. Not really sure what

  • Problem creating Web Service with Wizard

    Hi, I have problems in generating a WebService based on my EJB using the Wizard integrated in SAP Dev. Studio (right click on "ejb-jar.xml" -> New -> Web Service in the J2EE DC Explorer) In the method selecting screen the methods of my Bean are shown

  • Custom 403 http-error page

    Hi, one of our http-server-listener is running with ssl-client-certificate-required. If the client doesn't send its certificate to the server, we get a message: "Forbidden Your client is not allowed to access the requested object." How can we customi

  • Integration procedure-requesting few details

    Hi, The procedure for integration certification is given in this portal . i am soliciting few answers to these question, could somebody be kind enough to lead me. 1. do we have to be ready with an interface program before we approach the icc? 2.will