<?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: Swatch in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/swatch/m-p/3671341#M243798</link>
    <description>I don't know what swatch is, but one big difference in startups you talk about is the controlling terminal.&lt;BR /&gt;&lt;BR /&gt;The /etc/rc scripts start processes without a controlling terminal, where nohup provides this device.&lt;BR /&gt;&lt;BR /&gt;The controlling terminal defines stdin, stdout, and stderr.&lt;BR /&gt;&lt;BR /&gt;The swatch is probably doing something like trying to write to or read from stdin/stdout.&lt;BR /&gt;&lt;BR /&gt;Have you read the docs for swatch?  Are you sute there isn't a "-d" or something for daemon mode?  That usually prevents it from assuming that there is a controlling terminal... in most programs, or at least ones that are intended to be run as services.&lt;BR /&gt;&lt;BR /&gt;Good luck,&lt;BR /&gt;&lt;BR /&gt;Vince</description>
    <pubDate>Mon, 14 Nov 2005 15:36:45 GMT</pubDate>
    <dc:creator>Vincent Fleming</dc:creator>
    <dc:date>2005-11-14T15:36:45Z</dc:date>
    <item>
      <title>Swatch</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/swatch/m-p/3671340#M243797</link>
      <description>Greetings all;&lt;BR /&gt;&lt;BR /&gt;Wondering if anyone out there is running swatch.  Having a problem with swatch in the shutdown and startup scripts.  If we allow swatch to be started up during a server boot (/sbin/init.d with a link to /sbin/rc3.d) it works fine but the console connection is disabled as well as our ems notifications seem to be somehow held up.  When swatch is stopped then our ems startup notification messages appear. By the way if we nohup swatch it works as advertised.&lt;BR /&gt;Interested in finding out if anyone is starting up swatch during server boot time and if so would you mind sharing your start up and shutdown script.  &lt;BR /&gt;&lt;BR /&gt;If anyone would be interested in sharing there swatch configuration file(s) would appreciate that as well.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance!&lt;BR /&gt;&lt;BR /&gt;wvsa  &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 14 Nov 2005 14:17:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/swatch/m-p/3671340#M243797</guid>
      <dc:creator>wvsa</dc:creator>
      <dc:date>2005-11-14T14:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: Swatch</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/swatch/m-p/3671341#M243798</link>
      <description>I don't know what swatch is, but one big difference in startups you talk about is the controlling terminal.&lt;BR /&gt;&lt;BR /&gt;The /etc/rc scripts start processes without a controlling terminal, where nohup provides this device.&lt;BR /&gt;&lt;BR /&gt;The controlling terminal defines stdin, stdout, and stderr.&lt;BR /&gt;&lt;BR /&gt;The swatch is probably doing something like trying to write to or read from stdin/stdout.&lt;BR /&gt;&lt;BR /&gt;Have you read the docs for swatch?  Are you sute there isn't a "-d" or something for daemon mode?  That usually prevents it from assuming that there is a controlling terminal... in most programs, or at least ones that are intended to be run as services.&lt;BR /&gt;&lt;BR /&gt;Good luck,&lt;BR /&gt;&lt;BR /&gt;Vince</description>
      <pubDate>Mon, 14 Nov 2005 15:36:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/swatch/m-p/3671341#M243798</guid>
      <dc:creator>Vincent Fleming</dc:creator>
      <dc:date>2005-11-14T15:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: Swatch</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/swatch/m-p/3671342#M243799</link>
      <description>Ah... swatch.sorceforge.net... &lt;BR /&gt;&lt;BR /&gt;Log watcher.&lt;BR /&gt;&lt;BR /&gt;OK. It's a perl script (at least the one I found).&lt;BR /&gt;&lt;BR /&gt;It might work for you if you did this:&lt;BR /&gt;&lt;BR /&gt;swatch &amp;lt; /dev/console &amp;gt; /dev/console 2&amp;gt;&amp;amp;1 &amp;amp;&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;swatch &amp;lt; /dev/zero &amp;gt; /dev/null 2&amp;gt;&amp;amp;1 &amp;amp;&lt;BR /&gt;&lt;BR /&gt;or just:&lt;BR /&gt;&lt;BR /&gt;swatch &amp;gt; /dev/null 2&amp;gt;&amp;amp;1 &amp;amp;&lt;BR /&gt;or&lt;BR /&gt;swatch &amp;gt; /dev/console 2&amp;gt;&amp;amp;1 &amp;amp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;(These are ksh format... if you use another shell, you'll have to translate)&lt;BR /&gt;&lt;BR /&gt;Good luck,&lt;BR /&gt;&lt;BR /&gt;Vince</description>
      <pubDate>Mon, 14 Nov 2005 15:59:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/swatch/m-p/3671342#M243799</guid>
      <dc:creator>Vincent Fleming</dc:creator>
      <dc:date>2005-11-14T15:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Swatch</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/swatch/m-p/3671343#M243800</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;My swatch configuration file looks like;&lt;BR /&gt;&lt;BR /&gt;cat /etc/swatchrc.txt&lt;BR /&gt;==========================================================&lt;BR /&gt;# Swatch configuration file&lt;BR /&gt;#&lt;BR /&gt;#&lt;BR /&gt;# swatch -c /etc/swatchrc -t /var/log/snort/alert&lt;BR /&gt;#&lt;BR /&gt;### Snort Alerts&lt;BR /&gt;## Watch for entries containing the word 'Priority' in the snort alert file.&lt;BR /&gt;## Display it in green on the screen&lt;BR /&gt;## Mail alert to alerts@yourdomain.com with subject of the email&lt;BR /&gt;## being "----Snort IDS Alert----"&lt;BR /&gt;## Log in file /var/log/IDS-scans&lt;BR /&gt;watchfor /Priority/&lt;BR /&gt;echo green_h&lt;BR /&gt;mail addresses=ses\@krishna.kovaiteam.com,subject=--- Snort IDS Alert ---&lt;BR /&gt;exec echo $0 &amp;gt;&amp;gt; /var/log/IDS-scans&lt;BR /&gt;============================================================&lt;BR /&gt;&lt;BR /&gt;Also, ur problem is not related to swatch configuration, I hope.&lt;BR /&gt;&lt;BR /&gt;--&lt;BR /&gt;Prabu.S</description>
      <pubDate>Mon, 14 Nov 2005 23:49:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/swatch/m-p/3671343#M243800</guid>
      <dc:creator>Senthil Prabu.S_1</dc:creator>
      <dc:date>2005-11-14T23:49:18Z</dc:date>
    </item>
    <item>
      <title>Re: Swatch</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/swatch/m-p/3671344#M243801</link>
      <description>Thanks to all who have replied.  Still having a problem starting swatch as part of /sbin/init.d start up scripts.  Can see it in the rc.log but swatch does not start, have tried changing the script shell to ksh and redirecting the output to /dev/null still have not been able to get swatch to start during boot up.  Script works great if I run logged in as root.  Here is the startup script:&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;#&lt;BR /&gt;#######################################################################&lt;BR /&gt;#&lt;BR /&gt;# Start/Stop script for swatch monitoring on `hostname` &lt;BR /&gt;#&lt;BR /&gt;# Modifications&lt;BR /&gt;#   Date   Id   Comments&lt;BR /&gt;# 11/15/05 NL   Orignal script&lt;BR /&gt;#&lt;BR /&gt;#########################################################################&lt;BR /&gt;#&lt;BR /&gt;PATH=/sbin:/usr/sbin:/usr/bin:/opt/perl/bin:/sbin/init.d&lt;BR /&gt;export PATH&lt;BR /&gt;#&lt;BR /&gt;#&lt;BR /&gt;# setup for HP startup/shutdown standards&lt;BR /&gt;#&lt;BR /&gt;case $1 in&lt;BR /&gt;    'start_msg')&lt;BR /&gt;            echo "Starting swatch on Hosea"&lt;BR /&gt;           ;;&lt;BR /&gt;    'start')&lt;BR /&gt;    echo "Start swatch on `hostname`"&lt;BR /&gt;    swatch -c /etc/swatch/swatch.syslog.conf -t /var/adm/syslog/syslog.log &amp;gt; /de&lt;BR /&gt;v/null 2&amp;gt;&amp;amp;1 &amp;amp;&lt;BR /&gt;    echo "Swatch started on `hostname`"&lt;BR /&gt;    echo $PATH&lt;BR /&gt;            ;;&lt;BR /&gt;    'stop_msg')&lt;BR /&gt;            echo "Stop swatch on Hosea" &lt;BR /&gt;            ;;&lt;BR /&gt;        'stop')&lt;BR /&gt;            echo "Stop swatch on `hostname`"&lt;BR /&gt;            ps -ef | grep swatch | grep -v grep | cut -c9-14 | xargs kill &amp;gt;/dev/&lt;BR /&gt;null 2&amp;gt;&amp;amp;1&lt;BR /&gt;            ;;&lt;BR /&gt;    *)&lt;BR /&gt;            echo "usage: $0 {start|stop|start_msg|stop_msg}"&lt;BR /&gt;            ;;&lt;BR /&gt;esac&lt;BR /&gt;exit 0&lt;BR /&gt;ps -ef | grep swatch | grep -v grep | cut -c9-14 | xargs kill &amp;gt;/dev/null&lt;BR /&gt;&lt;BR /&gt;I can't see anything wrong with the script, especially since it works great starting it as root.  Here is the link to sbin/rc3.d:&lt;BR /&gt;&lt;BR /&gt;lrwxr-xr-x   1 root       sys             19 Nov 14 15:01 S900swatch -&amp;gt; /sbin/init.d/swatch&lt;BR /&gt;&lt;BR /&gt;Any suggestion would be greatly appreciated&lt;BR /&gt;&lt;BR /&gt;wvsa&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 15 Nov 2005 16:03:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/swatch/m-p/3671344#M243801</guid>
      <dc:creator>wvsa</dc:creator>
      <dc:date>2005-11-15T16:03:05Z</dc:date>
    </item>
  </channel>
</rss>

