{"id":3278,"date":"2014-06-30T21:08:46","date_gmt":"2014-06-30T13:08:46","guid":{"rendered":"http:\/\/rmohan.com\/?p=3278"},"modified":"2014-06-30T21:08:46","modified_gmt":"2014-06-30T13:08:46","slug":"top-12-ps-performance-commands","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=3278","title":{"rendered":"Top 12 &#8216;PS&#8217; Performance Commands"},"content":{"rendered":"<p><span style=\"font: 12px\/18px Verdana, Geneva, sans-serif; text-align: left; color: #333333; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; float: none; display: inline !important; white-space: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;\">I use\u00a0following ps commands in order to check for performance probelms:<\/span><\/p>\n<h5 style=\"font: 14px\/normal Oswald, 'Bebas Neue', Bebas, 'Arial Narrow', sans-serif; margin: 10px 0px; padding: 0px; border: 0px currentColor; text-align: left; color: #333333; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; position: relative; -ms-word-wrap: break-word; background-color: #ffffff; -webkit-text-stroke-width: 0px;\">1) Displaying top CPU_consuming processes:<\/h5>\n<p><span id=\"com_box\" style=\"background-position: 0px 0px; font: 0.95em\/1.5em Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; margin: 10px 0px; padding: 0.66em 0.91em; border: 1px solid #dddddd; text-align: left; color: #222222; text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: auto; word-spacing: 0px; vertical-align: baseline; display: block; white-space: normal; position: relative; -ms-word-wrap: break-word; background-image: none; background-attachment: scroll; background-repeat: repeat; background-color: #efefef; -webkit-text-stroke-width: 0px;\">\u00a0# ps aux|head -1; ps aux|sort -rn +2|head -10<\/span><\/p>\n<h5 style=\"font: 14px\/normal Oswald, 'Bebas Neue', Bebas, 'Arial Narrow', sans-serif; margin: 10px 0px; padding: 0px; border: 0px currentColor; text-align: left; color: #333333; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; position: relative; -ms-word-wrap: break-word; background-color: #ffffff; -webkit-text-stroke-width: 0px;\">2) Displaying top 10 memory-consuming processes:<\/h5>\n<p><span id=\"com_box\" style=\"background-position: 0px 0px; font: 0.95em\/1.5em Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; margin: 10px 0px; padding: 0.66em 0.91em; border: 1px solid #dddddd; text-align: left; color: #222222; text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: auto; word-spacing: 0px; vertical-align: baseline; display: block; white-space: normal; position: relative; -ms-word-wrap: break-word; background-image: none; background-attachment: scroll; background-repeat: repeat; background-color: #efefef; -webkit-text-stroke-width: 0px;\"># ps aux|head -1; ps aux|sort -rn +3|head<\/span><\/p>\n<h5 style=\"font: 14px\/normal Oswald, 'Bebas Neue', Bebas, 'Arial Narrow', sans-serif; margin: 10px 0px; padding: 0px; border: 0px currentColor; text-align: left; color: #333333; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; position: relative; -ms-word-wrap: break-word; background-color: #ffffff; -webkit-text-stroke-width: 0px;\">3) Displaying process in order of being penalized:<\/h5>\n<p><span id=\"com_box\" style=\"background-position: 0px 0px; font: 0.95em\/1.5em Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; margin: 10px 0px; padding: 0.66em 0.91em; border: 1px solid #dddddd; text-align: left; color: #222222; text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: auto; word-spacing: 0px; vertical-align: baseline; display: block; white-space: normal; position: relative; -ms-word-wrap: break-word; background-image: none; background-attachment: scroll; background-repeat: repeat; background-color: #efefef; -webkit-text-stroke-width: 0px;\"># ps -eakl|head -1; ps -eakl|sort -rn +5<\/span><\/p>\n<h5 style=\"font: 14px\/normal Oswald, 'Bebas Neue', Bebas, 'Arial Narrow', sans-serif; margin: 10px 0px; padding: 0px; border: 0px currentColor; text-align: left; color: #333333; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; position: relative; -ms-word-wrap: break-word; background-color: #ffffff; -webkit-text-stroke-width: 0px;\">4) Displaying process in order of priority:<\/h5>\n<p><span id=\"com_box\" style=\"background-position: 0px 0px; font: 0.95em\/1.5em Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; margin: 10px 0px; padding: 0.66em 0.91em; border: 1px solid #dddddd; text-align: left; color: #222222; text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: auto; word-spacing: 0px; vertical-align: baseline; display: block; white-space: normal; position: relative; -ms-word-wrap: break-word; background-image: none; background-attachment: scroll; background-repeat: repeat; background-color: #efefef; -webkit-text-stroke-width: 0px;\"># ps -eakl|sort -n +6|head<\/span><\/p>\n<h5 style=\"font: 14px\/normal Oswald, 'Bebas Neue', Bebas, 'Arial Narrow', sans-serif; margin: 10px 0px; padding: 0px; border: 0px currentColor; text-align: left; color: #333333; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; position: relative; -ms-word-wrap: break-word; background-color: #ffffff; -webkit-text-stroke-width: 0px;\">5) Displaying process in order of nice value<\/h5>\n<p><span id=\"com_box\" style=\"background-position: 0px 0px; font: 0.95em\/1.5em Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; margin: 10px 0px; padding: 0.66em 0.91em; border: 1px solid #dddddd; text-align: left; color: #222222; text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: auto; word-spacing: 0px; vertical-align: baseline; display: block; white-space: normal; position: relative; -ms-word-wrap: break-word; background-image: none; background-attachment: scroll; background-repeat: repeat; background-color: #efefef; -webkit-text-stroke-width: 0px;\"># ps -eakl|sort -n +7<\/span><\/p>\n<h5 style=\"font: 14px\/normal Oswald, 'Bebas Neue', Bebas, 'Arial Narrow', sans-serif; margin: 10px 0px; padding: 0px; border: 0px currentColor; text-align: left; color: #333333; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; position: relative; -ms-word-wrap: break-word; background-color: #ffffff; -webkit-text-stroke-width: 0px;\">6) Displaying the process in order of time<\/h5>\n<p><span id=\"com_box\" style=\"background-position: 0px 0px; font: 0.95em\/1.5em Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; margin: 10px 0px; padding: 0.66em 0.91em; border: 1px solid #dddddd; text-align: left; color: #222222; text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: auto; word-spacing: 0px; vertical-align: baseline; display: block; white-space: normal; position: relative; -ms-word-wrap: break-word; background-image: none; background-attachment: scroll; background-repeat: repeat; background-color: #efefef; -webkit-text-stroke-width: 0px;\"># ps vx|head -1;ps vx|grep -v PID|sort -rn +3|head -10<\/span><\/p>\n<h5 style=\"font: 14px\/normal Oswald, 'Bebas Neue', Bebas, 'Arial Narrow', sans-serif; margin: 10px 0px; padding: 0px; border: 0px currentColor; text-align: left; color: #333333; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; position: relative; -ms-word-wrap: break-word; background-color: #ffffff; -webkit-text-stroke-width: 0px;\">7) Displaying the process in order of real memory use<\/h5>\n<p><span id=\"com_box\" style=\"background-position: 0px 0px; font: 0.95em\/1.5em Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; margin: 10px 0px; padding: 0.66em 0.91em; border: 1px solid #dddddd; text-align: left; color: #222222; text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: auto; word-spacing: 0px; vertical-align: baseline; display: block; white-space: normal; position: relative; -ms-word-wrap: break-word; background-image: none; background-attachment: scroll; background-repeat: repeat; background-color: #efefef; -webkit-text-stroke-width: 0px;\"># ps vx|head -1; ps vx|grep -v PID|sort -rn +6|head -10<\/span><\/p>\n<h5 style=\"font: 14px\/normal Oswald, 'Bebas Neue', Bebas, 'Arial Narrow', sans-serif; margin: 10px 0px; padding: 0px; border: 0px currentColor; text-align: left; color: #333333; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; position: relative; -ms-word-wrap: break-word; background-color: #ffffff; -webkit-text-stroke-width: 0px;\">8) Displaying the process in order of I\/O<\/h5>\n<p><span id=\"com_box\" style=\"background-position: 0px 0px; font: 0.95em\/1.5em Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; margin: 10px 0px; padding: 0.66em 0.91em; border: 1px solid #dddddd; text-align: left; color: #222222; text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: auto; word-spacing: 0px; vertical-align: baseline; display: block; white-space: normal; position: relative; -ms-word-wrap: break-word; background-image: none; background-attachment: scroll; background-repeat: repeat; background-color: #efefef; -webkit-text-stroke-width: 0px;\"># ps vx|head -1; ps vx|grep -v PID|sort -rn +4|head -10<\/span><\/p>\n<h5 style=\"font: 14px\/normal Oswald, 'Bebas Neue', Bebas, 'Arial Narrow', sans-serif; margin: 10px 0px; padding: 0px; border: 0px currentColor; text-align: left; color: #333333; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; position: relative; -ms-word-wrap: break-word; background-color: #ffffff; -webkit-text-stroke-width: 0px;\">9) Displaying WLM classes<\/h5>\n<p><span id=\"com_box\" style=\"background-position: 0px 0px; font: 0.95em\/1.5em Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; margin: 10px 0px; padding: 0.66em 0.91em; border: 1px solid #dddddd; text-align: left; color: #222222; text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: auto; word-spacing: 0px; vertical-align: baseline; display: block; white-space: normal; position: relative; -ms-word-wrap: break-word; background-image: none; background-attachment: scroll; background-repeat: repeat; background-color: #efefef; -webkit-text-stroke-width: 0px;\"># ps -a -o pid, user, class, pcpu, pmem, args<\/span><\/p>\n<h5 style=\"font: 14px\/normal Oswald, 'Bebas Neue', Bebas, 'Arial Narrow', sans-serif; margin: 10px 0px; padding: 0px; border: 0px currentColor; text-align: left; color: #333333; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; position: relative; -ms-word-wrap: break-word; background-color: #ffffff; -webkit-text-stroke-width: 0px;\">10) Determining process ID of wait processes:<\/h5>\n<p><span id=\"com_box\" style=\"background-position: 0px 0px; font: 0.95em\/1.5em Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; margin: 10px 0px; padding: 0.66em 0.91em; border: 1px solid #dddddd; text-align: left; color: #222222; text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: auto; word-spacing: 0px; vertical-align: baseline; display: block; white-space: normal; position: relative; -ms-word-wrap: break-word; background-image: none; background-attachment: scroll; background-repeat: repeat; background-color: #efefef; -webkit-text-stroke-width: 0px;\"># ps vg|head -1; ps vg|grep -w wait<\/span><\/p>\n<h5 style=\"font: 14px\/normal Oswald, 'Bebas Neue', Bebas, 'Arial Narrow', sans-serif; margin: 10px 0px; padding: 0px; border: 0px currentColor; text-align: left; color: #333333; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; position: relative; -ms-word-wrap: break-word; background-color: #ffffff; -webkit-text-stroke-width: 0px;\">11) Wait process bound to CPU<\/h5>\n<p><span id=\"com_box\" style=\"background-position: 0px 0px; font: 0.95em\/1.5em Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; margin: 10px 0px; padding: 0.66em 0.91em; border: 1px solid #dddddd; text-align: left; color: #222222; text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: auto; word-spacing: 0px; vertical-align: baseline; display: block; white-space: normal; position: relative; -ms-word-wrap: break-word; background-image: none; background-attachment: scroll; background-repeat: repeat; background-color: #efefef; -webkit-text-stroke-width: 0px;\">\u00a0# ps -mo THREAD -p<\/span><\/p>\n<h5 style=\"font: 14px\/normal Oswald, 'Bebas Neue', Bebas, 'Arial Narrow', sans-serif; margin: 10px 0px; padding: 0px; border: 0px currentColor; text-align: left; color: #333333; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; position: relative; -ms-word-wrap: break-word; background-color: #ffffff; -webkit-text-stroke-width: 0px;\">12) CPU usage with priority levels<\/h5>\n<p><span id=\"com_box\" style=\"background-position: 0px 0px; font: 0.95em\/1.5em Consolas, 'Andale Mono', Monaco, Courier, 'Courier New', Verdana, sans-serif; margin: 10px 0px; padding: 0.66em 0.91em; border: 1px solid #dddddd; text-align: left; color: #222222; text-transform: none; text-indent: 0px; letter-spacing: normal; overflow: auto; word-spacing: 0px; vertical-align: baseline; display: block; white-space: normal; position: relative; -ms-word-wrap: break-word; background-image: none; background-attachment: scroll; background-repeat: repeat; background-color: #efefef; -webkit-text-stroke-width: 0px;\">\u00a0# topas -P<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I use following ps commands in order to check for performance probelms:<\/p>\n<p> 1) Displaying top CPU_consuming processes: <\/p>\n<p> # ps aux|head -1; ps aux|sort -rn +2|head -10<\/p>\n<p> 2) Displaying top 10 memory-consuming processes: <\/p>\n<p># ps aux|head -1; ps aux|sort -rn +3|head<\/p>\n<p> 3) Displaying process in order of being penalized: <\/p>\n<p># ps -eakl|head -1; ps -eakl|sort [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/3278"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3278"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/3278\/revisions"}],"predecessor-version":[{"id":3279,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/3278\/revisions\/3279"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3278"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3278"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3278"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}