<?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: Need a script to get load in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-to-get-load/m-p/3306613#M715928</link>
    <description>After years of scripting, I try to stay away from cut -c because the column numbers do not remain stable on many commands and cut's -d does not understand white space as a field (cut -d " " counts every space as a separate field). Geoff's solution is the most stable since changes to the number of spaces between fields can change but awk will always extract fields 10,11,12.</description>
    <pubDate>Wed, 16 Jun 2004 08:37:53 GMT</pubDate>
    <dc:creator>Bill Hassell</dc:creator>
    <dc:date>2004-06-16T08:37:53Z</dc:date>
    <item>
      <title>Need a script to get load</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-to-get-load/m-p/3306605#M715920</link>
      <description>right now I am using w to get the load running it every 5mins.&lt;BR /&gt;&lt;BR /&gt;What I want is to just filter out the load numbers and paste that into a certain spot in an html file.&lt;BR /&gt;&lt;BR /&gt;Is there a way I can do this?&lt;BR /&gt;&lt;BR /&gt;Derek&lt;BR /&gt;</description>
      <pubDate>Wed, 16 Jun 2004 05:52:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-to-get-load/m-p/3306605#M715920</guid>
      <dc:creator>Derek_59</dc:creator>
      <dc:date>2004-06-16T05:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: Need a script to get load</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-to-get-load/m-p/3306606#M715921</link>
      <description>Derek,&lt;BR /&gt;Is this what you are looking for:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;while true&lt;BR /&gt;do&lt;BR /&gt;echo `w -u' &amp;gt;&amp;gt; filename&lt;BR /&gt;sleep 300&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 16 Jun 2004 06:01:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-to-get-load/m-p/3306606#M715921</guid>
      <dc:creator>Bharat Katkar</dc:creator>
      <dc:date>2004-06-16T06:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: Need a script to get load</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-to-get-load/m-p/3306607#M715922</link>
      <description>Derek,&lt;BR /&gt;&lt;BR /&gt;echo `w -u' &amp;gt;&amp;gt; filename&lt;BR /&gt;&lt;BR /&gt;This line has back quotes `w -u` &lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 16 Jun 2004 06:02:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-to-get-load/m-p/3306607#M715922</guid>
      <dc:creator>Bharat Katkar</dc:creator>
      <dc:date>2004-06-16T06:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: Need a script to get load</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-to-get-load/m-p/3306608#M715923</link>
      <description>Well here's a sily way of doing it&lt;BR /&gt; &lt;BR /&gt;$LOAD=`uptime | cut -c45- | sed "s/,//g"`</description>
      <pubDate>Wed, 16 Jun 2004 06:03:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-to-get-load/m-p/3306608#M715923</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-06-16T06:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: Need a script to get load</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-to-get-load/m-p/3306609#M715924</link>
      <description>Mark,&lt;BR /&gt;&lt;BR /&gt;That is almost there, it is cuttin the word Load off before average. what can we do to keep that there?&lt;BR /&gt;&lt;BR /&gt;Derek&lt;BR /&gt;</description>
      <pubDate>Wed, 16 Jun 2004 06:08:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-to-get-load/m-p/3306609#M715924</guid>
      <dc:creator>Derek_59</dc:creator>
      <dc:date>2004-06-16T06:08:20Z</dc:date>
    </item>
    <item>
      <title>Re: Need a script to get load</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-to-get-load/m-p/3306610#M715925</link>
      <description>reduce the number 45 until it chops off the correct number of characters.  On my system that is 25.</description>
      <pubDate>Wed, 16 Jun 2004 06:11:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-to-get-load/m-p/3306610#M715925</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-06-16T06:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: Need a script to get load</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-to-get-load/m-p/3306611#M715926</link>
      <description>sweet, now I will just do an SSI to insert it into an html page.&lt;BR /&gt;&lt;BR /&gt;Thanks to both of you!</description>
      <pubDate>Wed, 16 Jun 2004 06:20:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-to-get-load/m-p/3306611#M715926</guid>
      <dc:creator>Derek_59</dc:creator>
      <dc:date>2004-06-16T06:20:58Z</dc:date>
    </item>
    <item>
      <title>Re: Need a script to get load</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-to-get-load/m-p/3306612#M715927</link>
      <description>And now for something completely different - a man with awk:&lt;BR /&gt;&lt;BR /&gt;uptime | awk '{print $10, $11, $12}' |sed s/,//g&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Wed, 16 Jun 2004 07:34:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-to-get-load/m-p/3306612#M715927</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2004-06-16T07:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: Need a script to get load</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-to-get-load/m-p/3306613#M715928</link>
      <description>After years of scripting, I try to stay away from cut -c because the column numbers do not remain stable on many commands and cut's -d does not understand white space as a field (cut -d " " counts every space as a separate field). Geoff's solution is the most stable since changes to the number of spaces between fields can change but awk will always extract fields 10,11,12.</description>
      <pubDate>Wed, 16 Jun 2004 08:37:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-to-get-load/m-p/3306613#M715928</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2004-06-16T08:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: Need a script to get load</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-to-get-load/m-p/3306614#M715929</link>
      <description>I'm with Bill, &lt;BR /&gt;Just use awk to strip the fields you need, you can use head or tail to remove the header information.</description>
      <pubDate>Thu, 17 Jun 2004 07:25:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-to-get-load/m-p/3306614#M715929</guid>
      <dc:creator>rmueller58</dc:creator>
      <dc:date>2004-06-17T07:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: Need a script to get load</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-to-get-load/m-p/3306615#M715930</link>
      <description>I'm with Bill too.  This is the reason I called it a "silly" way but I obviously can't spell "silly" properly :)</description>
      <pubDate>Thu, 17 Jun 2004 07:27:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-to-get-load/m-p/3306615#M715930</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-06-17T07:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: Need a script to get load</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-to-get-load/m-p/3306616#M715931</link>
      <description>Thanks to all. works perfect with awk!</description>
      <pubDate>Thu, 17 Jun 2004 07:29:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/need-a-script-to-get-load/m-p/3306616#M715931</guid>
      <dc:creator>Derek_59</dc:creator>
      <dc:date>2004-06-17T07:29:09Z</dc:date>
    </item>
  </channel>
</rss>

