<?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 Linux Scripting in Deployment Architecture</title>
    <link>https://community.splunk.com/t5/Deployment-Architecture/Linux-Scripting/m-p/45249#M1345</link>
    <description>&lt;P&gt;hi all,&lt;BR /&gt;
i need to monitor process on linux servers. normlly i use ps -ef | grep java to see if my procees arae running. i need to implement this in splunk. can some one help on what should i put on the ps.sh file to get the result of this command on my splunk?&lt;BR /&gt;
I am using RHEL. version varies from server to server.&lt;/P&gt;</description>
    <pubDate>Mon, 26 Nov 2012 19:21:02 GMT</pubDate>
    <dc:creator>karthikbalakris</dc:creator>
    <dc:date>2012-11-26T19:21:02Z</dc:date>
    <item>
      <title>Linux Scripting</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Linux-Scripting/m-p/45249#M1345</link>
      <description>&lt;P&gt;hi all,&lt;BR /&gt;
i need to monitor process on linux servers. normlly i use ps -ef | grep java to see if my procees arae running. i need to implement this in splunk. can some one help on what should i put on the ps.sh file to get the result of this command on my splunk?&lt;BR /&gt;
I am using RHEL. version varies from server to server.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Nov 2012 19:21:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Linux-Scripting/m-p/45249#M1345</guid>
      <dc:creator>karthikbalakris</dc:creator>
      <dc:date>2012-11-26T19:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: Linux Scripting</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Linux-Scripting/m-p/45250#M1346</link>
      <description>&lt;P&gt;You should be able to put exactly the same thing into your ps.sh file:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;ps -ef | grep java
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and create a scripted input in the Splunk Manager to run the script.&lt;/P&gt;

&lt;P&gt;If you want to see a more sophisticated version of a ps.sh scripted input, you could install the *NIX Splunk app and take a look at its ps.sh script, which does some editing of the header lines.&lt;/P&gt;

&lt;P&gt;More info &lt;A href="http://docs.splunk.com/Documentation/Splunk/5.0.1/AdvancedDev/ScriptedInputsIntro"&gt;here&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Here is a very simple &lt;CODE&gt;ps.sh&lt;/CODE&gt; that should work for most flavors of Linux:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#!/bin/sh  
ps -ef | grep java
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Make sure that ps.sh is executable (&lt;CODE&gt;chmod +x ps.sh&lt;/CODE&gt;). Put the script in an appropriate directory and then set up a scripted input in the Splunk Manager. In the scripted input, specify the absolute path to the script.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Nov 2012 19:32:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Linux-Scripting/m-p/45250#M1346</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-11-26T19:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: Linux Scripting</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Linux-Scripting/m-p/45251#M1347</link>
      <description>&lt;P&gt;i did this. i changed the already existing commands in the nested if structure of the ps.sh file that comes with *NIX app to ps-ef | grep and i tried to execute the file on the linux server itself by typing ./ps.sh&lt;BR /&gt;
upon doing this i got the following error:&lt;/P&gt;

&lt;P&gt;[karthik.balakrishnan@vtormftqa01 bin]$ ./ps.sh&lt;BR /&gt;
ERROR: Unsupported SysV option.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Nov 2012 19:43:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Linux-Scripting/m-p/45251#M1347</guid>
      <dc:creator>karthikbalakris</dc:creator>
      <dc:date>2012-11-26T19:43:04Z</dc:date>
    </item>
    <item>
      <title>Re: Linux Scripting</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Linux-Scripting/m-p/45252#M1348</link>
      <description>&lt;P&gt;Okay, that means that your Linux does not support all of the options that were used in the ps.sh script.&lt;/P&gt;

&lt;P&gt;I would do &lt;CODE&gt;man ps&lt;/CODE&gt; and look at the script to see which option might be causing the problem, and remove it. Or maybe there was a typo in one of the ps commands.&lt;/P&gt;

&lt;P&gt;Of course, the problem might be in one of the other commands instead.&lt;/P&gt;

&lt;P&gt;I will update my answer with a very simple script that should work.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Nov 2012 21:46:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Linux-Scripting/m-p/45252#M1348</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-11-26T21:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: Linux Scripting</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/Linux-Scripting/m-p/45253#M1349</link>
      <description>&lt;P&gt;hi&lt;BR /&gt;
is there any update for this ?&lt;BR /&gt;
I also trying to attempt this but its not working.&lt;BR /&gt;
Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Aug 2018 02:00:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/Linux-Scripting/m-p/45253#M1349</guid>
      <dc:creator>tgmvt03</dc:creator>
      <dc:date>2018-08-22T02:00:00Z</dc:date>
    </item>
  </channel>
</rss>

