<style type="text/css">a[data-mtli~="mtli_filesize213kB"]:after {content:" (2.13 kB)"}</style><style type="text/css">a[data-mtli~="mtli_filesize213kB"]:after {content:" (2.13 kB)"}</style>{"id":2306,"date":"2017-12-19T16:49:50","date_gmt":"2017-12-19T16:49:50","guid":{"rendered":"https:\/\/pandorafms.com\/library\/?p=2306"},"modified":"2017-12-21T11:14:48","modified_gmt":"2017-12-21T11:14:48","slug":"monitor-and-kill-process-on-cpu-usage-high","status":"publish","type":"post","link":"https:\/\/pandorafms.com\/library\/monitor-and-kill-process-on-cpu-usage-high\/","title":{"rendered":"Monitor and kill process on CPU usage high"},"content":{"rendered":"<h2>Process CPU agent module for Windows<\/h2>\n<p>This Pandora FMS module, used as script, allow to get individual CPU usage for each specified process. This is done by a small script written in VBscript which ask several WMI sources to get a value, used as percentage for individual CPU Usage for a given process.<\/p>\n<p>This agent plugin needs two parameters:<\/p>\n<pre>PROCESS_FULL PROCESS_SHORT<\/pre>\n<p>Process full name (as seen in taskmanager), for example FIREFOX.EXE. Please be careful because UPPERCASE names are not the same than lowercase.<\/p>\n<p>Process short name (as seen in Win32_PerfRawData_PerfProc_Process), for example FIREFOX. This is usually the same name, but without extension.<\/p>\n<p>Example of usage:<\/p>\n<pre>plugin_exec cscript.exe \/\/B \"%ProgramFiles%\\Pandora_Agent\\util\\process_cpu_pid.vbs\" FIREFOX.EXE FIREFOX<\/pre>\n<p>Note: If exists several process with the same name and short name, it will return the SUM of all CPU % of all processes with the same name.<\/p>\n<p>OPTIONALLY you can provide a third parameter, the CPU ammount of a single process to be considered pernicious for the system and to be killed.<\/p>\n<pre>plugin_exec cscript.exe \/\/B \"%ProgramFiles%\\Pandora_Agent\\util\\process_cpu_pid.vbs\" FIREFOX.EXE FIREFOX 15<\/pre>\n<p>Using this mode, will also return the sum of all process (including the process killed)<\/p>\n<h2>Files:<\/h2>\n<p><a href=\"\/library\/files_repository\/1302020840.slerena.process_cpu_kill.zip\" class=\"mtli_attachment mtli_zip\" data-mtli=\"mtli_filesize213kB\" target=\"_blank\" rel=\"noopener nofollow\">process_cpu_kill.zip<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Process CPU agent module for Windows This Pandora FMS module, used as script, allow to get individual CPU usage for each specified process. This is done by a small script written in VBscript which ask several WMI sources to get a value, used as percentage for individual CPU Usage for a given process. This agent [&hellip;]<\/p>\n","protected":false},"author":14,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[6,26],"tags":[754],"_links":{"self":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/posts\/2306"}],"collection":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/users\/14"}],"replies":[{"embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/comments?post=2306"}],"version-history":[{"count":0,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/posts\/2306\/revisions"}],"wp:attachment":[{"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/media?parent=2306"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/categories?post=2306"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pandorafms.com\/library\/wp-json\/wp\/v2\/tags?post=2306"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}