COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

### Script question (payment for correct answer)

• Email
• Follow

My apology if this is unethical for this NG. I figure, I'm getting
$100 to set this up for a client, so I'll happily transfer$50 via
Paypal to anyone that can do this script. (I just don't have time now
to figure it out).

It's actually fairly simple (for you gurus):

Request details:
1. check (via netstat) for connections to port 5111 to see that there
is at least one session that is ESTABLISHED on that port.
2. if there are NO sessions with that status, send a warning message
(via plain mailx) to 3 defined receipients.
3. This daemon has to send alerts only between 2:AM EST - 5:PM EST Mon-
Fri. (i.e. we don't care if there are no sessions at other times).

Roger
(If you don't have Paypal, I can send check as well)

 0
Reply unixzip (36) 10/10/2008 3:20:21 PM

See related articles to this posting

On Oct 10, 11:20=A0am, unix <unix...@yahoo.com> wrote:
> My apology if this is unethical for this NG. I figure, I'm getting
> $100 to set this up for a client, so I'll happily transfer$50 via
> Paypal to anyone that can do this script. (I just don't have time now
> to figure it out).
>
> It's actually fairly simple (for you gurus):
>
> Request details:
> 1. check (via netstat) for connections to port 5111 to see that there
> is at least one session that is ESTABLISHED on that port.
> 2. if there are NO sessions with that status, send a warning message
> (via plain mailx) to 3 defined receipients.
> 3. This daemon has to send alerts only between 2:AM EST - 5:PM EST Mon-
> Fri. (i.e. we don't care if there are no sessions at other times).
>
> Thanks in advance,
> Roger
> (If you don't have Paypal, I can send check as well)

Here's something quick and dirty(works in solaris 10, what OS are you
using):

#!/usr/bin/ksh

rcpts=3Dsome1@important.com, some2@important.com, some3@important.com
netstat -anf inet |grep ESTABLISH |grep ".5111" > /dev/null || mailx -
s "The Very Important Connection isn't there" ${rcpts} < /dev/null   0 Reply edcrosbys 10/10/2008 4:46:50 PM On Oct 10, 12:46=A0pm, edcrosbys <edcros...@gmail.com> wrote: > On Oct 10, 11:20=A0am, unix <unix...@yahoo.com> wrote: > > > > > > > My apology if this is unethical for this NG. I figure, I'm getting > >$100 to set this up for a client, so I'll happily transfer $50 via > > Paypal to anyone that can do this script. (I just don't have time now > > to figure it out). > > > It's actually fairly simple (for you gurus): > > > Request details: > > 1. check (via netstat) for connections to port 5111 to see that there > > is at least one session that is ESTABLISHED on that port. > > 2. if there are NO sessions with that status, send a warning message > > (via plain mailx) to 3 defined receipients. > > 3. This daemon has to send alerts only between 2:AM EST - 5:PM EST Mon- > > Fri. (i.e. we don't care if there are no sessions at other times). > > > Thanks in advance, > > Roger > > (If you don't have Paypal, I can send check as well) > > Here's something quick and dirty(works in solaris 10, what OS are you > using): > > #!/usr/bin/ksh > > rcpts=3Dso...@important.com, so...@important.com, so...@important.com > netstat -anf inet |grep ESTABLISH |grep ".5111" > /dev/null || mailx - > s "The Very Important Connection isn't there"${rcpts} < /dev/null- Hide =
quoted text -
>
> - Show quoted text -

This is on a 9 server

 0
Reply mark 10/10/2008 5:58:51 PM

On Oct 10, 12:46=A0pm, edcrosbys <edcros...@gmail.com> wrote:
> On Oct 10, 11:20=A0am, unix <unix...@yahoo.com> wrote:
>
>
>
>
>
> > My apology if this is unethical for this NG. I figure, I'm getting
> > $100 to set this up for a client, so I'll happily transfer$50 via
> > Paypal to anyone that can do this script. (I just don't have time now
> > to figure it out).
>
> > It's actually fairly simple (for you gurus):
>
> > Request details:
> > 1. check (via netstat) for connections to port 5111 to see that there
> > is at least one session that is ESTABLISHED on that port.
> > 2. if there are NO sessions with that status, send a warning message
> > (via plain mailx) to 3 defined receipients.
> > 3. This daemon has to send alerts only between 2:AM EST - 5:PM EST Mon-
> > Fri. (i.e. we don't care if there are no sessions at other times).
>
> > Thanks in advance,
> > Roger
> > (If you don't have Paypal, I can send check as well)
>
> Here's something quick and dirty(works in solaris 10, what OS are you
> using):
>
> #!/usr/bin/ksh
>
> rcpts=3Dso...@important.com, so...@important.com, so...@important.com
> netstat -anf inet |grep ESTABLISH |grep ".5111" > /dev/null || mailx -
> s "The Very Important Connection isn't there" ${rcpts} < /dev/null- Hide = quoted text - > > - Show quoted text - What about time frames ? (2AM - 5PM)   0 Reply mark 10/10/2008 6:01:31 PM mark wrote: > On Oct 10, 12:46 pm, edcrosbys <edcros...@gmail.com> wrote: >> On Oct 10, 11:20 am, unix <unix...@yahoo.com> wrote: >>> 1. check (via netstat) for connections to port 5111 to see that there >>> is at least one session that is ESTABLISHED on that port. >>> 2. if there are NO sessions with that status, send a warning message >>> (via plain mailx) to 3 defined receipients. >>> 3. This daemon has to send alerts only between 2:AM EST - 5:PM EST Mon- >>> Fri. (i.e. we don't care if there are no sessions at other times). >> Here's something quick and dirty(works in solaris 10, what OS are you >> using): >> >> #!/usr/bin/ksh >> >> rcpts=so...@important.com, so...@important.com, so...@important.com >> netstat -anf inet |grep ESTABLISH |grep ".5111" > /dev/null || mailx - >> s "The Very Important Connection isn't there"${rcpts} < /dev/null- Hide quoted text -
>>
>> - Show quoted text -
>
> What about time frames ? (2AM - 5PM)

crontab -e someuser

* 2-17 * * 1-5 /path/to/script > /dev/null 2>&1

 0
Reply Oscar 10/10/2008 6:38:48 PM

Oscar del Rio wrote:
> mark wrote:
>> On Oct 10, 12:46 pm, edcrosbys <edcros...@gmail.com> wrote:
>>> On Oct 10, 11:20 am, unix <unix...@yahoo.com> wrote:
>>>> 1. check (via netstat) for connections to port 5111 to see that there
>>>> is at least one session that is ESTABLISHED on that port.
>>>> 2. if there are NO sessions with that status, send a warning message
>>>> (via plain mailx) to 3 defined receipients.
>>>> 3. This daemon has to send alerts only between 2:AM EST - 5:PM EST Mon-
>>>> Fri. (i.e. we don't care if there are no sessions at other times).
>
>>> Here's something quick and dirty(works in solaris 10, what OS are you
>>> using):
>>>
>>> #!/usr/bin/ksh
>>>
>>> rcpts=so...@important.com, so...@important.com, so...@important.com
>>> netstat -anf inet |grep ESTABLISH |grep ".5111" > /dev/null || mailx -
>>> s "The Very Important Connection isn't there" ${rcpts} < /dev/null- >>> Hide quoted text - >>> >>> - Show quoted text - >> >> What about time frames ? (2AM - 5PM) > > crontab -e someuser > > * 2-17 * * 1-5 /path/to/script > /dev/null 2>&1 of course, if the service is not running the ops will get the email every minute! if they can stand it say every 10 minutes, then use 0,10,20,30,40,50 2-17 * * 1-5 /path/to/script > /dev/null 2>&1   0 Reply Oscar 10/10/2008 6:42:20 PM Yeah, I'm a 5 minutes kinda monitoring guy (for stuff I consider important). I've seen a badly written script that runs every minute and a hung NFS mount cause all the other jobs for cron to hang. This wasn't caught because the syslog monitor was kicked off via cron. If we had the script running ever 5 minutes instead of every minute, the condition would have taken longer to happen and we would have probably noticed it by then. We've since changed the way we do stuff regarding log monitoring. The script stays running and the cron job just makes sure an instance is running, and goes away quietly.   0 Reply edcrosbys 10/10/2008 7:02:12 PM 6 Replies 123 Views Similar Articles 12/11/2013 6:28:06 AM [PageSpeed]  Reply: Similar Artilces: MS Perl question -- how to use hacked script to work correctly(was Question on loops and return values or sumpin) First off, thanks to all who replied to my original post, I will go back and reply to each of you .. thank you for your time. And to everyone else now here, thank you for your time. I have altered a couple scripts to work in IndigoPerl and Win32::Resources to accomplish a simple task - read in a list of servers from a text file, query them for their drives and space on the drives, and put all the information on space out to a second text file, space delimited. My questions are before the code: The important question is this: How to get an array of drive letters in use in a foreach loop, and a... expect script to answer a question on behalf of the user i have a simple bash script (ask.sh) which asks the user three questions when run: ##BEGIN echo -n "some question 1: " read answer echo$answer > log echo -n "some question 2: " read answer echo $answer >> log echo -n "some question 3: " read answer echo$answer >> log ## END what i am trying to do is write an expect script which spawns the script above and will answer a subset of the questions on behalf of the user who ran the script. for example, i can write the expect script: #BEGIN log_user 0 spawn sh ask.sh inter...

Dear all, I am currently working my way through accelerated c++, but have found that there are not enough questions to try and answer. Does anyone know of a good source of q & A 's that are in keeping with the style and philosophy of the book? It is importnat to me that they are in keeping with the book as it starts from high level(STL) programming, which apparently is unusual. Any help much appreciated. Apologise if this is off topic. Yours sincerely Alex [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: D...

FAQ Topic
----------------------------------------------------------------------- FAQ Topic - I have a question that is not answered in here or in any of the resources mentioned here but I'm sure it has been answered in comp.lang.javascript. Where are the archives located? ----------------------------------------------------------------------- http://groups.google.com/group/comp.lang.javascript/topics Maintain an archive of comp.lang.javascript going back to 1996 and provide diverse archive searching facilities. -- Postings such as this are automatically sent once a day. Their goal is to an...

Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question
This is the most important question of your life. The question is: Do you floss? It is not a question of how well you brush, nor if you use mouthwash, but do you floss? Are you sure you will keep all the teeth you still have? The reason some people don't know for sure if they are maintaining a preventitive oral dentifrice is because they just don't know what those words mean. The good news is that you can know for sure whether you will keep all of your teeth. Dental textbooks describe full-toothed-ness as a beautiful place with no death, sorrow, sickness or pain. Dentitists tell...

awk script question
I am have very little experiece in awk scripting but I have been asked to debug a problem. I have narrowed the problem to this part of the code. Could someone please tell me what the following part of an .awk script does? {if (substr($0,43,14) ~ /^Sales Order :$/) { print "FLID0300~" substr($0,62,8); sub (substr($0,43,25)," "); print "\\left 0.0"; print "\\space lines 19"; print "\\font courier, 9.75"; print $0; next; } Thanks in advance, Rob Blind Squirrel wrote: > I am have very little experiece in... Question on perl script. Hello Group, I am very new to the perl language and don't know much about it. I had a question & maybe someone can help me decipher/modify a script. We have AIX 5.2 & the script (test.sh) contains the following perl command: /usr/bin/perl -014pe's|^|"'$PAGE1FORM'".(/Page:\s+1\s/?"\n":"'$CONTFORMSFX'\n")|e' Basically, two values are being passed to this script. Variable PAGE1FORM will contain$1 (example: "m_inv01") and CONTFORMSFX will contain $2 (example: "_09"). Basically, the script is invoked as foll... bash scripting question Hi all! Say I've got this: foo;bar;12;foobar The 12 are a variable number of figures. I want another list to be filtered with all the numbers individually, as in grep -e"$(echo "^1" ; echo "^2")" (or something). Can anybody quickie help? Thanks in advance! cross-posted to comp.unix.shell The Loeki wrote: > cross-posted to comp.unix.shell If it were cross-posted to comp.unix.shell, we'd see comp.unix.shell in the headers, and I don't see that. So it must have been separately posted to comp.unix.shell, which is precisely the opposite of cros...

Do the itanium versions of HP-UX use LD_LIBRARY_PATH instead of SHLIB_PATH? And, if I am using C-Shell, what do I do to allow for the env vars to be > 256 bytes? Aaron Hirshberg aaronhirshb...@yahoo.com [ You really need a better subject... ] aaronhirshberg@yahoo.com wrote: > Do the itanium versions of HP-UX use LD_LIBRARY_PATH instead of > SHLIB_PATH? It looks like the HP-UX 11iV2u2 (11.23pi) manpages for ld discuss that. They imply that both LD_LIBRARY_PATH and SHLIB_PATH may be searched, in that order. rick jones BTW, what was all the other junk at the end of your post?...

Marquee script question
I love the Dynamic Drive cross browser marquee script. I'd like to make the text loop immediately after completion, so the beginning runs right after the end (does that make sense?). Could anyone tell me how to do this? Here's the link: http://www.calicosystems.com/pilla/index1.htm Here's the code: <script language="JavaScript1.2"> /* Cross browser Marquee script- � Dynamic Drive (www.dynamicdrive.com) For full source code, 100's more DHTML scripts, and Terms Of Use, visit http://www.dynamicdrive.com Credit MUST stay intact */ //Specify the marquee's...

Question on search script
Hello, I'm trying to create a search script where a user can enter information into the search box. When the user clicks search, it will open up google.com and enter the same information that the user typed in the search box and search for it. Is this possible? Gazing into my crystal ball I observed John <stepri@sbcglobal.net> writing in news:kq2025d93tnv3u9c68oq0s3m0undtb5slm@4ax.com: > Hello, > > I'm trying to create a search script where a user can enter > information into the search box. When the user clicks search, it will > open up google.com and enter...

script question 496717
I am trying to write a script with little success. It should prompt the user for input until they press ^D, then put the input in a file, and then make the file executable. For some reason this seems to work when I do it from the command line, but doesn't work in my script. Here's what I would normally do from the command line: echo "#!/bin/bash" > foo cat > foo [user input followed by ^D] chmod u+x foo Thanks in advance for the help ;-) Lowell Lowell <lkirsh@cs.ubc.ca> writes: > I am trying to write a script with little success. It should prompt >...

Perl script permission question
The question stems from an IRSSI irc client scripting tutorial site found at the following URL... http://juerd.nl/site.plp/irssiscripttut "Because Irssi scripts are embedded in Irssi and not executed from the console, they do not need to be executable. A permission mode setting of 600 is enough for scripts in your home directory, 644 is enough for system wide script installations. The shebang line is not required, as this is only the case for executable scripts. " How can a script actually run if it isn't executable? In article <0e0440e7-821a-4949-91b0-6930159e...

Filemaker (This is possibly a Script Question)
Hello All, I'd like to know how I can create a dialog box which activates on startup in my standalone database asking people to register. It is a shareware product so it would go something like this: i) Starup the standalone application/database ii) A dialog box appears asking the user to register iii) If they do register there is an "enter Code" button where upon they input the number and the annoying dialog box dissapears for good. iv) If they dont register the box stays up temporarily for say 10 seconds and then disappears. Is this a programming/scriptng nightmare or...

Basic Shell script question
I have Solaris 9 installed and using a simple shell script. #!/bin/sh echo "Begin" cd /nonexistent/directory echo "end" The second echo does not print, the cd command fails and quits the script. Is this normal behaviour for shell scripts. I ran the script in Red Hat 9.0 and it worked fine, the cd command printed an error and the echo command also got executed. Is this a bug in Solaris shell or a documented behaviour. thx, Ab In article <1111648537.128870.155870@f14g2000cwb.googlegroups.com>, absolsp@yahoo.com wrote: > I have Solaris 9 installed and usin...

Netbackup Script and Option Questions
comp.unix.solaris: Following a recent DR test, I have two questions about Netbackup: 1. Is it possible to have Netbackup run a script immediately following restoral? The intent behind this question is that I want users' crontabs to be completely commented out following restoral so that nothing is inadventantly run. 2. Does Netbackup have the equivalent of TSM's -dirsonly option for restorals that restores the directory structure of a particular directory or file system without restoring any of the files within? If so, does it restore the ownership and permissions along with establ...

C Shell script question
Hi, I am simply trying to append a single alphabetical character to a string in a data file. When I added the character manually to the data file, it uploaded fine to a Oracle database. However, when I automated it (so that the character is placed in the data file by a CShell script), the data file will no longer upload to the database, which leads me to believe that I am not appending the character correctly in the shell. This is how the command originally looked: set tp = echo $id | awk -F- '{print$1 $2}' and this is how I tried to append it: set tp = Becho$id | awk -F...

Panther: Periodic Scripts Question
What do I need to do to have the periodic scripts e-mail their results to root? I have postfix and root enabled. As I recall, that was all that was needed for versions past (using sendmail instead of postfix). TIA, Ken P. -- Remove _me_ for e-mail address In article <oKWqb.171$b77.59@dfw-service2.ext.raytheon.com>, Ken Prager <prager_me_@ieee.org> wrote: > What do I need to do to have the periodic scripts e-mail their results > to root? > > I have postfix and root enabled. As I recall, that was all that was > needed for versions past (using sendmail in... Shell Script Question 496296 Currently i'm doing this in a shell script to strip the word LOCATION off but now the users want the word location stripped off too if found . my question is how do i strip off LOCATION or location that is lowercase or uppercase in a shell script. Help ARCH1=sed '1s/^LOCATION=//' << EOF$ARCHDEST EOF fuadar@sbcglobal.net had nothing better to do than to say: > question is how do i strip off LOCATION or location that is lowercase or > uppercase in a shell script. > ARCH1=sed '1s/^LOCATION=//' << EOF If you are using GNU sed: ARCH1=s...

Answers To NonStop Newbie Questions
Attention Tandem (HP NonStop Server) Newcomers! Judging from some of the recent messages posted in the Tandem newsgroups, y'all should peruse old messages posted to the groups. Besides RTFM (Reading The Fine Manuals), you may very likely find answers to your questions already posted there. As some of the recent questions indicate that the asker may be lacking fundamental TNS insights, I invite y'all to visit my Google group MicroTech.Software, via: http://groups.google.com/group/MicroTech_Software For Guardian/NonStop Kernel basic (and advanced!) know-how, peruse the GAME course...