<?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 Re: Sar output on Linux in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/sar-output-on-linux/m-p/4450515#M37236</link>
    <description>&amp;gt;Is it possible to have everything on the same line for a given timestamp? With awk or perl.&lt;BR /&gt;&lt;BR /&gt;Sure but you are going to have to explain exactly what you want.  It appears something is terribly wrong with your sar output.&lt;BR /&gt;It seems you have a title line then data, then a different title and data.&lt;BR /&gt;&lt;BR /&gt;I don't understand why the title line has a different timestamp than the data?&lt;BR /&gt;&lt;BR /&gt;If you have more data in your file, do you have sets of those 4 lines?  (Do you have blank lines?)&lt;BR /&gt;&lt;BR /&gt;If you just have repeats of those 4 lines you can do:&lt;BR /&gt;awk '&lt;BR /&gt;{&lt;BR /&gt;getline L2&lt;BR /&gt;getline L3&lt;BR /&gt;getline L4&lt;BR /&gt;print $0, L3 # title&lt;BR /&gt;print L2, L4 # data&lt;BR /&gt;}' sar-file</description>
    <pubDate>Wed, 01 Jul 2009 01:36:13 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2009-07-01T01:36:13Z</dc:date>
    <item>
      <title>Sar output on Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sar-output-on-linux/m-p/4450514#M37235</link>
      <description>hi all,&lt;BR /&gt;i used glance on hpux to gather system metrics, unfortunately on linux, glance has less values. So, i'm trying to use SAR to collect the metrics, unfortunately my tool that processes my datafile expects 1 line per timestamp. With sar, if i specify sar -u and -r then he'll generate 2 lines for the same timestampt:&lt;BR /&gt;&lt;BR /&gt;03:20:27 PM       CPU     %user     %nice   %system   %iowait    %steal     %idle&lt;BR /&gt;03:20:28 PM       all      0.00      0.00      0.00      0.00      0.00    100.00&lt;BR /&gt;&lt;BR /&gt;03:20:27 PM kbmemfree kbmemused  %memused kbbuffers  kbcached kbswpfree kbswpused  %swpused  kbswpcad&lt;BR /&gt;03:20:28 PM    946668   2706144     74.08     88708   2466876    337196       128      0.04        60&lt;BR /&gt;&lt;BR /&gt;IOs it possible to have everything on the same line for a given timestamp ? With a Awk or perl.&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;JB</description>
      <pubDate>Tue, 30 Jun 2009 21:21:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sar-output-on-linux/m-p/4450514#M37235</guid>
      <dc:creator>Jean-Baptiste Broccard</dc:creator>
      <dc:date>2009-06-30T21:21:21Z</dc:date>
    </item>
    <item>
      <title>Re: Sar output on Linux</title>
      <link>https://community.hpe.com/t5/operating-system-linux/sar-output-on-linux/m-p/4450515#M37236</link>
      <description>&amp;gt;Is it possible to have everything on the same line for a given timestamp? With awk or perl.&lt;BR /&gt;&lt;BR /&gt;Sure but you are going to have to explain exactly what you want.  It appears something is terribly wrong with your sar output.&lt;BR /&gt;It seems you have a title line then data, then a different title and data.&lt;BR /&gt;&lt;BR /&gt;I don't understand why the title line has a different timestamp than the data?&lt;BR /&gt;&lt;BR /&gt;If you have more data in your file, do you have sets of those 4 lines?  (Do you have blank lines?)&lt;BR /&gt;&lt;BR /&gt;If you just have repeats of those 4 lines you can do:&lt;BR /&gt;awk '&lt;BR /&gt;{&lt;BR /&gt;getline L2&lt;BR /&gt;getline L3&lt;BR /&gt;getline L4&lt;BR /&gt;print $0, L3 # title&lt;BR /&gt;print L2, L4 # data&lt;BR /&gt;}' sar-file</description>
      <pubDate>Wed, 01 Jul 2009 01:36:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/sar-output-on-linux/m-p/4450515#M37236</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-07-01T01:36:13Z</dc:date>
    </item>
  </channel>
</rss>

