<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic only show some processes in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/only-show-some-processes/m-p/4614668#M60581</link>
    <description>hi&lt;BR /&gt;&lt;BR /&gt;I have to display some interesting data for a menu&lt;BR /&gt;&lt;BR /&gt;so I was checking the "top command"&lt;BR /&gt;&lt;BR /&gt;so I decided that top commands display everything I need but I want o display only the top information not the rest I mean only the 4 first lines like I pasted on this thread..&lt;BR /&gt;&lt;BR /&gt;top - 15:46:23 up 186 days,  5:14,  2 users,  load average: 0.00, 0.00, 0.00&lt;BR /&gt;Tasks: 114 total,   1 running, 113 sleeping,   0 stopped,   0 zombie&lt;BR /&gt;Cpu(s):  0.5%us,  0.2%sy,  0.0%ni, 98.2%id,  1.0%wa,  0.0%hi,  0.2%si,  0.0%st&lt;BR /&gt;Mem:   2075500k total,  1741508k used,   333992k free,   339992k buffers&lt;BR /&gt;Swap:  3047416k total,       64k used,  3047352k free,  1140164k cached&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;how can I do that? I want to only display those values and I need it to be updated&lt;BR /&gt;&lt;BR /&gt;thanks a lot</description>
    <pubDate>Thu, 08 Apr 2010 20:56:04 GMT</pubDate>
    <dc:creator>KarloChacon</dc:creator>
    <dc:date>2010-04-08T20:56:04Z</dc:date>
    <item>
      <title>only show some processes</title>
      <link>https://community.hpe.com/t5/operating-system-linux/only-show-some-processes/m-p/4614668#M60581</link>
      <description>hi&lt;BR /&gt;&lt;BR /&gt;I have to display some interesting data for a menu&lt;BR /&gt;&lt;BR /&gt;so I was checking the "top command"&lt;BR /&gt;&lt;BR /&gt;so I decided that top commands display everything I need but I want o display only the top information not the rest I mean only the 4 first lines like I pasted on this thread..&lt;BR /&gt;&lt;BR /&gt;top - 15:46:23 up 186 days,  5:14,  2 users,  load average: 0.00, 0.00, 0.00&lt;BR /&gt;Tasks: 114 total,   1 running, 113 sleeping,   0 stopped,   0 zombie&lt;BR /&gt;Cpu(s):  0.5%us,  0.2%sy,  0.0%ni, 98.2%id,  1.0%wa,  0.0%hi,  0.2%si,  0.0%st&lt;BR /&gt;Mem:   2075500k total,  1741508k used,   333992k free,   339992k buffers&lt;BR /&gt;Swap:  3047416k total,       64k used,  3047352k free,  1140164k cached&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;how can I do that? I want to only display those values and I need it to be updated&lt;BR /&gt;&lt;BR /&gt;thanks a lot</description>
      <pubDate>Thu, 08 Apr 2010 20:56:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/only-show-some-processes/m-p/4614668#M60581</guid>
      <dc:creator>KarloChacon</dc:creator>
      <dc:date>2010-04-08T20:56:04Z</dc:date>
    </item>
    <item>
      <title>Re: only show some processes</title>
      <link>https://community.hpe.com/t5/operating-system-linux/only-show-some-processes/m-p/4614669#M60582</link>
      <description>Actually, your example shows 5 lines, not 4.&lt;BR /&gt;&lt;BR /&gt;How about:&lt;BR /&gt;top -b | head -5</description>
      <pubDate>Thu, 08 Apr 2010 22:21:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/only-show-some-processes/m-p/4614669#M60582</guid>
      <dc:creator>Jared Middleton</dc:creator>
      <dc:date>2010-04-08T22:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: only show some processes</title>
      <link>https://community.hpe.com/t5/operating-system-linux/only-show-some-processes/m-p/4614670#M60583</link>
      <description>thanks  someone else provided me these 2&lt;BR /&gt;&lt;BR /&gt;1. it has the option to press q to exit&lt;BR /&gt;VAR=x ; while [ "${VAR}" != 'q' ] ; do top | head -4 ; read -sn 1 -t 2 VAR ; done&lt;BR /&gt;&lt;BR /&gt;2. no q option to exit&lt;BR /&gt;watch -n 2 'top -b -n1| head -n 4'&lt;BR /&gt;&lt;BR /&gt;the point for both is they don't really update the CPU options&lt;BR /&gt;&lt;BR /&gt;anyway to fix that?&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Apr 2010 23:52:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/only-show-some-processes/m-p/4614670#M60583</guid>
      <dc:creator>KarloChacon</dc:creator>
      <dc:date>2010-04-08T23:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: only show some processes</title>
      <link>https://community.hpe.com/t5/operating-system-linux/only-show-some-processes/m-p/4614671#M60584</link>
      <description>You want only the upper lines?&lt;BR /&gt;&lt;BR /&gt;LINES=5 top&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Goran</description>
      <pubDate>Fri, 09 Apr 2010 06:26:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/only-show-some-processes/m-p/4614671#M60584</guid>
      <dc:creator>Goran Koruga</dc:creator>
      <dc:date>2010-04-09T06:26:39Z</dc:date>
    </item>
  </channel>
</rss>

