{"id":97665,"date":"2017-12-28T07:00:00","date_gmt":"2017-12-28T22:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/?p=97665"},"modified":"2019-03-13T01:21:32","modified_gmt":"2019-03-13T08:21:32","slug":"20171228-00","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20171228-00\/?p=97665","title":{"rendered":"How does Resource Monitor get information for processes that already terminated?"},"content":{"rendered":"<p>How does the Resource Monitor program get information for processes that have already terminated? <\/p>\n<p>Try it: Run Task Manager, then go to the Performance tab. From there, click <i>Open Resource Monitor<\/i>. Now run another program, say, Notepad. Let Notepad run for a while, and then close it. Observe that there is still an entry for <code>notepad.exe<\/code> in Resource Monitor, labeled <i>Terminated<\/i>. <\/p>\n<p>What is the function to call to get performance statistics on a program that has terminated? <\/p>\n<p>There is no function to get performance statistics for a program that has terminated. What you&#8217;re seeing is an optical illusion: Resource Monitor continues to show statistics for processes that have terminated, so that you can see the final results before they go away. <\/p>\n<p>Here&#8217;s proof that it&#8217;s an illusion: After exiting Notepad and putting it into the grayed-out <i>Terminated<\/i> state in Resource Monitor, go back to Task Manager and click <i>Open Resource Monitor<\/i> again. This will open another instance of Resource Monitor, and in that new instance, you&#8217;ll see no trace of the terminated Notepad process. <\/p>\n<p>Now you see it. Now you don&#8217;t. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>It&#8217;s an optical illusion.<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[25],"class_list":["post-97665","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>It&#8217;s an optical illusion.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/97665","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=97665"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/97665\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=97665"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=97665"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=97665"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}