{"id":965,"date":"2010-11-12T11:21:37","date_gmt":"2010-11-12T09:21:37","guid":{"rendered":"http:\/\/www.ora-solutions.net\/web\/?p=965"},"modified":"2010-11-12T11:21:37","modified_gmt":"2010-11-12T09:21:37","slug":"grid-control-11g-agent-metric-swap-utilization-on-hp-ux-with-pseudo-swap","status":"publish","type":"post","link":"https:\/\/www.ora-solutions.net\/web\/2010\/11\/12\/grid-control-11g-agent-metric-swap-utilization-on-hp-ux-with-pseudo-swap\/","title":{"rendered":"Grid Control 11g: Agent Metric Swap Utilization on HP-UX with Pseudo-Swap"},"content":{"rendered":"<p>If you are running Grid Control on HP-UX and you are using pseudo-swap, then you have to add the property:<\/p>\n<p>NMUPM_USE_PSEUDO_MEM=TRUE <\/p>\n<p>to the emd.properties. Otherwise, Swap Utilization is calculated wrongly (higher than acutal) and it might trigger false alarms.<\/p>\n<p>How is the Grid Control Agent calculating Swap Utilization?<\/p>\n<p>In file $AGENT_HOME\/sysman\/admin\/metadata\/host.xml line 310 you find some answers:<\/p>\n<pre lang=\"XML\" line=\"310\">\r\n<ColumnDescriptor NAME=\"swapUtil\" TYPE=\"NUMBER\" IS_KEY=\"FALSE\" \r\nCOMPUTE_EXPR=\"(100.0 * usedSwap \/ (usedSwap + freeSwap))\">\r\n<\/pre>\n<p>In other parts, you find the definition of &#8220;usedSwap&#8221; and &#8220;freeSwap&#8221;.<\/p>\n<pre lang=\"XML\" line=\"310\">\r\n <ColumnDescriptor NAME=\"usedSwap\" TYPE=\"NUMBER\" IS_KEY=\"FALSE\" \r\nCOMPUTE_EXPR=\"(usedSwapRaw \/ 1024.0)\" HELP=\"NO_HELP\">\r\n <ColumnDescriptor NAME=\"freeSwap\" TYPE=\"NUMBER\" IS_KEY=\"FALSE\" \r\nCOMPUTE_EXPR=\"(freeSwapRaw \/ 1024.0)\" HELP=\"NO_HELP\">\r\n<\/pre>\n<p>Now, we have to find &#8220;usedSwapRaw&#8221; and &#8220;freeSwapRaw&#8221;. In a different part (line 387) of this file, you see this section:<\/p>\n<pre lang=\"XML\" line=\"387\">\r\n<GetView NAME=\"LoadInternalView\" FROM_TABLE=\"_LoadInternal\">\r\n                        <Column NAME=\"cpuLoad_1min\" COLUMN_NAME=\"cpuLoad_1min\"\/>\r\n                        <Column NAME=\"cpuLoad\" COLUMN_NAME=\"cpuLoad\"\/>\r\n                        <Column NAME=\"cpuLoad_15min\" COLUMN_NAME=\"cpuLoad_15min\"\/>\r\n                        <Column NAME=\"pgScan\" COLUMN_NAME=\"pgScan\"\/>\r\n                        <Column NAME=\"noOfProcs\" COLUMN_NAME=\"noOfProcs\"\/>\r\n                        <Column NAME=\"transfers\" COLUMN_NAME=\"transfers\"\/>\r\n                        <Column NAME=\"pageSize\" COLUMN_NAME=\"pageSize\"\/>\r\n                        <Column NAME=\"realMem\" COLUMN_NAME=\"realMem\"\/>\r\n                        <Column NAME=\"freeMemRaw\" COLUMN_NAME=\"freeMemRaw\"\/>\r\n                        <Column NAME=\"usedSwapRaw\" COLUMN_NAME=\"usedSwapRaw\"\/>\r\n                        <Column NAME=\"freeSwapRaw\" COLUMN_NAME=\"freeSwapRaw\"\/>\r\n        <\/GetView>\r\n<\/pre>\n<p>In the &#8220;Metric&#8221; XML Tag for  <strong>Metric NAME=&#8221;_LoadInternal&#8221;<\/strong>, you find the QueryDescriptor:<\/p>\n<pre lang=\"XML\" line=\"620\">\r\n <QueryDescriptor FETCHLET_ID=\"OSLineToken\">\r\n      <Property NAME=\"NMUPM_USE_PSEUDO_MEM\" SCOPE=\"INSTANCE\" OPTIONAL=\"TRUE\">NMUPM_USE_PSEUDO_MEM<\/Property>\r\n      <Property NAME=\"ENVNMUPM_USE_PSEUDO_MEM\" SCOPE=\"GLOBAL\">%NMUPM_USE_PSEUDO_MEM%<\/Property>\r\n      <Property NAME=\"emdRoot\" SCOPE=\"SYSTEMGLOBAL\">emdRoot<\/Property>\r\n      <Property NAME=\"command\" SCOPE=\"GLOBAL\"> %emdRoot%\/bin\/nmupm <\/Property>\r\n      <Property NAME=\"args\" SCOPE=\"GLOBAL\">osLoad<\/Property>\r\n      <Property NAME=\"startsWith\" SCOPE=\"GLOBAL\">em_result=<\/Property>\r\n      <Property NAME=\"delimiter\" SCOPE=\"GLOBAL\">|<\/Property>\r\n      <Property NAME=\"ENVNMUPM_TIMEOUT\" OPTIONAL=\"TRUE\" SCOPE=\"SYSTEMGLOBAL\">NMUPM_TIMEOUT<\/Property>\r\n    <\/QueryDescriptor>\r\n<\/pre>\n<p>So, now we know that the agent executes &#8220;nmupm osLoad&#8221;. Let\u00b4s try it.<\/p>\n<pre lang=\"bash\" line=\"1\">\r\n$ nmupm osLoad\r\nncpus=8\r\nem_result=4.10|2.43|4.46|500038168.000000|987|3|0.000000|4096.000000|40775544.000000|10464849920.000000|41094647808.000000|21731692544.000000\r\n<\/pre>\n<p>The result is pipe seperated and consists of the columns from above. The last two are used &#8220;usedSwapRaw&#8221; and &#8220;freeSwapRaw&#8221;. <\/p>\n<p>Please note that you will get different results depending on the value of the environment variable &#8220;NMUPM_USE_PSEUDO_MEM&#8221;.<\/p>\n<pre lang=\"bash\" line=\"1\">\r\nbash$ NMUPM_USE_PSEUDO_MEM=FALSE nmupm osLoad\r\nncpus=8\r\nem_result=0.86|1.84|3.89|501596312.000000|986|3|0.000000|4096.000000|40775544.000000|10436485120.000000|21024821248.000000|47362048.000000\r\nbash$ NMUPM_USE_PSEUDO_MEM=TRUE nmupm osLoad\r\nncpus=8\r\nem_result=0.90|1.83|3.88|501596312.000000|989|3|0.000000|4096.000000|40775544.000000|10432708608.000000|41164206080.000000|21662134272.000000\r\n<\/pre>\n<p><strong>Summary<\/strong><\/p>\n<p>If you are getting warning\/critical alerts about Swap Utilization, check with glance or &#8220;swapinfo -t&#8221; to verify if pseudo-swap is used. If it is, set the property and it will fix the metric error.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are running Grid Control on HP-UX and you are using pseudo-swap, then you have to add the property: NMUPM_USE_PSEUDO_MEM=TRUE to the emd.properties. Otherwise, Swap Utilization is calculated wrongly (higher than acutal) and it might trigger false alarms. How is the Grid Control Agent calculating Swap Utilization? In file $AGENT_HOME\/sysman\/admin\/metadata\/host.xml line 310 you find [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[43,6],"tags":[],"class_list":["post-965","post","type-post","status-publish","format-standard","hentry","category-hp-ux-unix-2","category-oracle-enterprise-manager"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.ora-solutions.net\/web\/wp-json\/wp\/v2\/posts\/965","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ora-solutions.net\/web\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ora-solutions.net\/web\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ora-solutions.net\/web\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ora-solutions.net\/web\/wp-json\/wp\/v2\/comments?post=965"}],"version-history":[{"count":9,"href":"https:\/\/www.ora-solutions.net\/web\/wp-json\/wp\/v2\/posts\/965\/revisions"}],"predecessor-version":[{"id":974,"href":"https:\/\/www.ora-solutions.net\/web\/wp-json\/wp\/v2\/posts\/965\/revisions\/974"}],"wp:attachment":[{"href":"https:\/\/www.ora-solutions.net\/web\/wp-json\/wp\/v2\/media?parent=965"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ora-solutions.net\/web\/wp-json\/wp\/v2\/categories?post=965"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ora-solutions.net\/web\/wp-json\/wp\/v2\/tags?post=965"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}