<?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 required in shell script in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/help-required-in-shell-script/m-p/4720121#M42900</link>
    <description>remove the junk in my previous post&lt;BR /&gt;&lt;BR /&gt;its&lt;BR /&gt;&lt;BR /&gt;count=`netstat -an | grep 1522 | wc -l`&lt;BR /&gt;&lt;BR /&gt;Jai.</description>
    <pubDate>Wed, 01 Dec 2010 10:55:15 GMT</pubDate>
    <dc:creator>Jai Ganesh</dc:creator>
    <dc:date>2010-12-01T10:55:15Z</dc:date>
    <item>
      <title>Help required in shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/help-required-in-shell-script/m-p/4720117#M42896</link>
      <description>Dear Experts,&lt;BR /&gt;&lt;BR /&gt;I want to write a shell script on a linux node for the following requirement:&lt;BR /&gt;&lt;BR /&gt;netstat –an|grep 1522|wc –l&lt;BR /&gt;the count should not be greater than 900&lt;BR /&gt;&lt;BR /&gt;Can any one please help me to write the script?&lt;BR /&gt;&lt;BR /&gt;Its an urgent requirement and your immediate help will be highly appreciated and helpful.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Sudipta</description>
      <pubDate>Wed, 01 Dec 2010 09:48:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/help-required-in-shell-script/m-p/4720117#M42896</guid>
      <dc:creator>Mampi_Mumbai</dc:creator>
      <dc:date>2010-12-01T09:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: Help required in shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/help-required-in-shell-script/m-p/4720118#M42897</link>
      <description>What exactly that script should do with results? You have a command, that gives somekind of number as a result, what you want to do with it? Whats your aim?&lt;BR /&gt;&lt;BR /&gt;And you are lousy pointgiver, maybe by trying to appreciate others time you could get better answers?</description>
      <pubDate>Wed, 01 Dec 2010 10:10:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/help-required-in-shell-script/m-p/4720118#M42897</guid>
      <dc:creator>lauri_r</dc:creator>
      <dc:date>2010-12-01T10:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: Help required in shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/help-required-in-shell-script/m-p/4720119#M42898</link>
      <description>Lauri,&lt;BR /&gt;&lt;BR /&gt;I always assign the appropriate points to people whose suggestions genuinely help me to resolve my issues.&lt;BR /&gt;&lt;BR /&gt;Sorry, You haven't done the same and hence haven't received points.&lt;BR /&gt;&lt;BR /&gt;My aim is to monitor and get alerts as and when the output of the mentioned command exceeds 900. For creating a policy i need to write the script on the managed node&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Sudipta</description>
      <pubDate>Wed, 01 Dec 2010 10:14:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/help-required-in-shell-script/m-p/4720119#M42898</guid>
      <dc:creator>Mampi_Mumbai</dc:creator>
      <dc:date>2010-12-01T10:14:17Z</dc:date>
    </item>
    <item>
      <title>Re: Help required in shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/help-required-in-shell-script/m-p/4720120#M42899</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Please copy the below script and save it as count.sh&lt;BR /&gt;&lt;BR /&gt;count=`netstat â  an|grep 1522|wc â  l`&lt;BR /&gt;if [ $count &amp;gt; 900 ]; then&lt;BR /&gt;/opt/OV/bin/opcmsg a=Script o=count.sh msg_grp=OS severity=Critical msg_text="Count Exceeded"&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;and execute chmod 755 count.sh in the directory where you saved the script.&lt;BR /&gt;&lt;BR /&gt;And create a message template to capture the alert and schedule the script using schedule template or cron.&lt;BR /&gt;&lt;BR /&gt;Jai.</description>
      <pubDate>Wed, 01 Dec 2010 10:51:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/help-required-in-shell-script/m-p/4720120#M42899</guid>
      <dc:creator>Jai Ganesh</dc:creator>
      <dc:date>2010-12-01T10:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: Help required in shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/help-required-in-shell-script/m-p/4720121#M42900</link>
      <description>remove the junk in my previous post&lt;BR /&gt;&lt;BR /&gt;its&lt;BR /&gt;&lt;BR /&gt;count=`netstat -an | grep 1522 | wc -l`&lt;BR /&gt;&lt;BR /&gt;Jai.</description>
      <pubDate>Wed, 01 Dec 2010 10:55:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/help-required-in-shell-script/m-p/4720121#M42900</guid>
      <dc:creator>Jai Ganesh</dc:creator>
      <dc:date>2010-12-01T10:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: Help required in shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/help-required-in-shell-script/m-p/4720122#M42901</link>
      <description>Thanks Jai...&lt;BR /&gt;&lt;BR /&gt;Assigned 10 points to you.</description>
      <pubDate>Wed, 01 Dec 2010 11:07:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/help-required-in-shell-script/m-p/4720122#M42901</guid>
      <dc:creator>Mampi_Mumbai</dc:creator>
      <dc:date>2010-12-01T11:07:27Z</dc:date>
    </item>
    <item>
      <title>Re: Help required in shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/help-required-in-shell-script/m-p/4720123#M42902</link>
      <description>Thanks Sudipta.</description>
      <pubDate>Wed, 01 Dec 2010 11:22:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/help-required-in-shell-script/m-p/4720123#M42902</guid>
      <dc:creator>Jai Ganesh</dc:creator>
      <dc:date>2010-12-01T11:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: Help required in shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/help-required-in-shell-script/m-p/4720124#M42903</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;But I am getting false alerts ..even if the count is not 900, i am getting an alert saying its greater than 900.&lt;BR /&gt;&lt;BR /&gt;I have deployed a scheduled task policy.&lt;BR /&gt;&lt;BR /&gt;Can you please help</description>
      <pubDate>Wed, 01 Dec 2010 11:25:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/help-required-in-shell-script/m-p/4720124#M42903</guid>
      <dc:creator>Mampi_Mumbai</dc:creator>
      <dc:date>2010-12-01T11:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: Help required in shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/help-required-in-shell-script/m-p/4720125#M42904</link>
      <description>first regarding your generosity with points - it's not about giving points to those who solve your homeworks, it's about showing effort ;)&lt;BR /&gt;&lt;BR /&gt;second - your request is unrelated to OM so ...&lt;BR /&gt;&lt;BR /&gt;third - try "man sh" or "man bash" and find there how integers should be compared algebraically</description>
      <pubDate>Wed, 01 Dec 2010 11:44:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/help-required-in-shell-script/m-p/4720125#M42904</guid>
      <dc:creator>Peter Marko</dc:creator>
      <dc:date>2010-12-01T11:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: Help required in shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/help-required-in-shell-script/m-p/4720126#M42905</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Please copy the below script&lt;BR /&gt;&lt;BR /&gt;count=`netstat -an|grep 1522|wc -l`&lt;BR /&gt;if test $count -gt 900 &lt;BR /&gt;then&lt;BR /&gt;echo "Count Exceeded"&lt;BR /&gt;fi</description>
      <pubDate>Wed, 01 Dec 2010 11:49:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/help-required-in-shell-script/m-p/4720126#M42905</guid>
      <dc:creator>Jai Ganesh</dc:creator>
      <dc:date>2010-12-01T11:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help required in shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/help-required-in-shell-script/m-p/4720127#M42906</link>
      <description>Hi Jai,&lt;BR /&gt;&lt;BR /&gt;Thanks. &lt;BR /&gt;&lt;BR /&gt;-gt option has served the purpose.&lt;BR /&gt;&lt;BR /&gt;Thanks for your help. &lt;BR /&gt;&lt;BR /&gt;10 more points to you :-)</description>
      <pubDate>Wed, 01 Dec 2010 11:58:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/help-required-in-shell-script/m-p/4720127#M42906</guid>
      <dc:creator>Mampi_Mumbai</dc:creator>
      <dc:date>2010-12-01T11:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: Help required in shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/help-required-in-shell-script/m-p/4720128#M42907</link>
      <description>I suggest to try "grep :1522" there. And I never get the point of wc-l if theres already grep -c available&lt;BR /&gt;so "count=`netstat -an | grep -c :1522`" is just as good.&lt;BR /&gt;&lt;BR /&gt;I really do not whine about points that are not given to me personally... I just feel that "I have assigned points to 17 of 87 responses" is a tad bit small percentage. Feel free to assign me 0 on those answers here (I'm not sure it's possible..:) I have never asked a question myself), but at least it will improve your stats. It's not just about those 10 point answers. Lousy stats keep good answers away..;) &lt;BR /&gt;&lt;BR /&gt;And it's also quality of the question itself. If people have to ask you for details, that means Q itself is not so good...&lt;BR /&gt;&lt;BR /&gt;And you still did not answer, what is your aim with this? Is it just to keep an eye on amount of connections on port 1522 (no matter of the socket state)? and alert when it's over 900?? Do you prefer opcmsg or opcmon? Such details should be alreay in first post.</description>
      <pubDate>Wed, 01 Dec 2010 11:59:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/help-required-in-shell-script/m-p/4720128#M42907</guid>
      <dc:creator>lauri_r</dc:creator>
      <dc:date>2010-12-01T11:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: Help required in shell script</title>
      <link>https://community.hpe.com/t5/operating-system-linux/help-required-in-shell-script/m-p/4720129#M42908</link>
      <description>&lt;!--!*#--&gt;&amp;gt; And it's also quality of the question&lt;BR /&gt;&amp;gt; itself.  [...]&lt;BR /&gt;&lt;BR /&gt;It's a request for "a shell script on a linux&lt;BR /&gt;node", and it's posted in an HP-UX forum, not&lt;BR /&gt;a Linux forum.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/service/forums/familyhome.do?familyId=118" target="_blank"&gt;http://forums.itrc.hp.com/service/forums/familyhome.do?familyId=118&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;And most of the information supplied relates&lt;BR /&gt;to forum points rather than the actual task.&lt;BR /&gt;How much "quality of the question" did you&lt;BR /&gt;expect?&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Feel free to assign me 0 on those answers&lt;BR /&gt;&amp;gt; here (I'm not sure it's possible..:)&lt;BR /&gt;&lt;BR /&gt;Oh, it's possible.</description>
      <pubDate>Thu, 02 Dec 2010 10:53:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/help-required-in-shell-script/m-p/4720129#M42908</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2010-12-02T10:53:44Z</dc:date>
    </item>
  </channel>
</rss>

