<?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: help inserting headings/title on a script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/help-inserting-headings-title-on-a-script/m-p/5257983#M659142</link>
    <description>If you show us yours, we'll show you our s olutions.&lt;BR /&gt;&lt;BR /&gt;- What tools are you using? Shell (which?) Awk?&lt;BR /&gt;- What tools can you use? Perl?&lt;BR /&gt;- Where does the data come from?&lt;BR /&gt;- What should the result ideally look like?&lt;BR /&gt;- If you can, provide a .TXT attachement with code and data examples, in addition to the posted text to get a clear view on spaces/spacing.&lt;BR /&gt;&lt;BR /&gt;Doug unconditionally uses 2 disting methods of printing. The crude 'echo' and the refined printf with full formatting control.&lt;BR /&gt;&lt;BR /&gt;When dealing with header lines, I often use conditional prints like (perl)&lt;BR /&gt;&lt;BR /&gt;print "heading\n" unless $lines++ &lt;BR /&gt;&lt;BR /&gt;in AWK I might use BEGIN { } or (NR=-1)&lt;BR /&gt;&lt;BR /&gt;Please help us help you!&lt;BR /&gt;Regards,&lt;BR /&gt;Hein&lt;BR /&gt;</description>
    <pubDate>Wed, 06 Oct 2010 12:08:07 GMT</pubDate>
    <dc:creator>Hein van den Heuvel</dc:creator>
    <dc:date>2010-10-06T12:08:07Z</dc:date>
    <item>
      <title>help inserting headings/title on a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-inserting-headings-title-on-a-script/m-p/5257980#M659139</link>
      <description>Hi all!&lt;BR /&gt;&lt;BR /&gt;Please can somebody help, I wrote a small script that provides info on performance, but, I´ve not managed to put headings for the values to be displayed. For example:&lt;BR /&gt;N. of CPUs, CPU Utiliz, Mem Utili, Runqueue&lt;BR /&gt;4             50          44        3&lt;BR /&gt;4             57          34        2&lt;BR /&gt;4             45          45        1&lt;BR /&gt;&lt;BR /&gt;Please can you help?&lt;BR /&gt;&lt;BR /&gt;F.R.</description>
      <pubDate>Wed, 06 Oct 2010 11:36:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-inserting-headings-title-on-a-script/m-p/5257980#M659139</guid>
      <dc:creator>NDO</dc:creator>
      <dc:date>2010-10-06T11:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: help inserting headings/title on a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-inserting-headings-title-on-a-script/m-p/5257981#M659140</link>
      <description>Hey;&lt;BR /&gt;&lt;BR /&gt;This seems pretty easy:&lt;BR /&gt;&lt;BR /&gt;printf "%s %2s %2s %s\n" "C" "CU" "MU" "R"&lt;BR /&gt;echo "=============="&lt;BR /&gt;&lt;BR /&gt;at the top of your script before you collect the sar or vmstat output.&lt;BR /&gt;&lt;BR /&gt;That seems pretty self evident, so I'm assuming I'm missing something?&lt;BR /&gt;&lt;BR /&gt;Doug</description>
      <pubDate>Wed, 06 Oct 2010 11:45:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-inserting-headings-title-on-a-script/m-p/5257981#M659140</guid>
      <dc:creator>Doug O'Leary</dc:creator>
      <dc:date>2010-10-06T11:45:25Z</dc:date>
    </item>
    <item>
      <title>Re: help inserting headings/title on a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-inserting-headings-title-on-a-script/m-p/5257982#M659141</link>
      <description>Hi Doug!&lt;BR /&gt;&lt;BR /&gt;Thanx for your prompt response, but IÂ´m new into scripting, the idea below the headings is to use gbl_cpu_util, gbl_mem_util, etc, and use that file as an advise syntax file to be used with glance. Pls can you explain your code, if is not asking too much.&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;&lt;BR /&gt;FR</description>
      <pubDate>Wed, 06 Oct 2010 11:50:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-inserting-headings-title-on-a-script/m-p/5257982#M659141</guid>
      <dc:creator>NDO</dc:creator>
      <dc:date>2010-10-06T11:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: help inserting headings/title on a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-inserting-headings-title-on-a-script/m-p/5257983#M659142</link>
      <description>If you show us yours, we'll show you our s olutions.&lt;BR /&gt;&lt;BR /&gt;- What tools are you using? Shell (which?) Awk?&lt;BR /&gt;- What tools can you use? Perl?&lt;BR /&gt;- Where does the data come from?&lt;BR /&gt;- What should the result ideally look like?&lt;BR /&gt;- If you can, provide a .TXT attachement with code and data examples, in addition to the posted text to get a clear view on spaces/spacing.&lt;BR /&gt;&lt;BR /&gt;Doug unconditionally uses 2 disting methods of printing. The crude 'echo' and the refined printf with full formatting control.&lt;BR /&gt;&lt;BR /&gt;When dealing with header lines, I often use conditional prints like (perl)&lt;BR /&gt;&lt;BR /&gt;print "heading\n" unless $lines++ &lt;BR /&gt;&lt;BR /&gt;in AWK I might use BEGIN { } or (NR=-1)&lt;BR /&gt;&lt;BR /&gt;Please help us help you!&lt;BR /&gt;Regards,&lt;BR /&gt;Hein&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Oct 2010 12:08:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-inserting-headings-title-on-a-script/m-p/5257983#M659142</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2010-10-06T12:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: help inserting headings/title on a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-inserting-headings-title-on-a-script/m-p/5257984#M659143</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;I am using this comand:(opt/perf/bin/glance -adviser_only -iterations 5 -j10 -syntax /tmp/fr/advtest &amp;gt; /tmp/fr/streess.out )&lt;BR /&gt;with that adviser file: (print " ", gbl_statdate, " ", gbl_stattime&lt;BR /&gt;&lt;BR /&gt;print "number of CPUs online,",gbl_active_cpu&lt;BR /&gt;print "Total CPU utilization, ",gbl_cpu_total_util&lt;BR /&gt;print "Average n of processes using CPU,",gbl_cpu_queue&lt;BR /&gt;print "% of physical mem in use, ",gbl_mem_util&lt;BR /&gt;print "% of swap space available,",gbl_swap_space_util&lt;BR /&gt;print "Average of time of all disks being used,",gbl_disk_util&lt;BR /&gt;print "% of time of busiest disk had I/O in progress, ",gbl_disk_util&lt;BR /&gt;)&lt;BR /&gt;but for easy formating in excel I want to change the layout, so puting the headings in one line, and the values at the bottom.&lt;BR /&gt;&lt;BR /&gt;regards&lt;BR /&gt;&lt;BR /&gt;FR</description>
      <pubDate>Wed, 06 Oct 2010 12:13:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-inserting-headings-title-on-a-script/m-p/5257984#M659143</guid>
      <dc:creator>NDO</dc:creator>
      <dc:date>2010-10-06T12:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: help inserting headings/title on a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-inserting-headings-title-on-a-script/m-p/5257985#M659144</link>
      <description>( Earlier I meant to write $. == 1 )&lt;BR /&gt;&lt;BR /&gt;Hmmm, some of us do not have those tools handy, but they know what to do with the input/output if shown in detail.&lt;BR /&gt;&lt;BR /&gt;Given the width of the heading the current format with heading on left would seem 'nicer' than the classic heading on top.&lt;BR /&gt;&lt;BR /&gt;Anyway, &lt;BR /&gt;Can you not just re-arrange those 'nice' print lines with ugly (for you) result into really ugly print lines with nice results?&lt;BR /&gt;&lt;BR /&gt;Something like (and you complete...) :&lt;BR /&gt;&lt;BR /&gt;print "number of CPUs online,Total CPU utilization,Average n of processes using CPU,% of physical mem in use"...&lt;BR /&gt;&lt;BR /&gt;print gbl_active_cpu, gbl_cpu_total_util,gbl_cpu_queue,gbl_mem_util ....&lt;BR /&gt;&lt;BR /&gt;In a pinch you can teach Excell to rotate the data, or post process the text file to do so. For example with perl something like:&lt;BR /&gt;&lt;BR /&gt;$ perl -lne '($nam[$i],$val[$i++]) = split /,/ }{ print join q(,),@nam; print join q(,),@val'   &amp;lt; bad  &amp;gt; good&lt;BR /&gt;&lt;BR /&gt;Btw... you had gbl_disk_util used twice.&lt;BR /&gt;&lt;BR /&gt;Good luck,&lt;BR /&gt;Hein&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Oct 2010 12:36:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-inserting-headings-title-on-a-script/m-p/5257985#M659144</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2010-10-06T12:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: help inserting headings/title on a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-inserting-headings-title-on-a-script/m-p/5257986#M659145</link>
      <description>Hein!&lt;BR /&gt;&lt;BR /&gt;I tought you were going to show yours:)?&lt;BR /&gt;&lt;BR /&gt;FR&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 06 Oct 2010 12:50:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-inserting-headings-title-on-a-script/m-p/5257986#M659145</guid>
      <dc:creator>NDO</dc:creator>
      <dc:date>2010-10-06T12:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: help inserting headings/title on a script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/help-inserting-headings-title-on-a-script/m-p/5257987#M659146</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;The answers provided did shed some light into it.&lt;BR /&gt;&lt;BR /&gt;thanx&lt;BR /&gt;&lt;BR /&gt;FR</description>
      <pubDate>Tue, 12 Oct 2010 11:49:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/help-inserting-headings-title-on-a-script/m-p/5257987#M659146</guid>
      <dc:creator>NDO</dc:creator>
      <dc:date>2010-10-12T11:49:26Z</dc:date>
    </item>
  </channel>
</rss>

