Re: Script question (payment for correct answer)



On Oct 10, 11:20 am, unix <unix...@xxxxxxxxx> 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=some1@xxxxxxxxxxxxx, some2@xxxxxxxxxxxxx, some3@xxxxxxxxxxxxx
netstat -anf inet |grep ESTABLISH |grep ".5111" > /dev/null || mailx -
s "The Very Important Connection isn't there" ${rcpts} < /dev/null


.



Relevant Pages

  • Script question (payment for correct answer)
    ... $100 to set this up for a client, so I'll happily transfer $50 via ... is at least one session that is ESTABLISHED on that port. ... Fri. (i.e. we don't care if there are no sessions at other times). ...
    (comp.unix.solaris)
  • Re: Script question (payment for correct answer)
    ... $100 to set this up for a client, so I'll happily transfer $50 via ... Paypal to anyone that can do this script. ... is at least one session that is ESTABLISHED on that port. ... Fri. (i.e. we don't care if there are no sessions at other times). ...
    (comp.unix.solaris)
  • Re: Script question (payment for correct answer)
    ... $100 to set this up for a client, so I'll happily transfer $50 via ... Paypal to anyone that can do this script. ... is at least one session that is ESTABLISHED on that port. ... Fri. (i.e. we don't care if there are no sessions at other times). ...
    (comp.unix.solaris)
  • NetScreen Response to ScreenOS Port Scan DoS Vulnerability
    ... In reference to your recent posting regarding NetScreen's "ScreenOS Port ... immediately close each of the sessions established during the port scan, ... the session table on a NetScreen-5XP will be consumed faster than ...
    (Bugtraq)
  • Re: Expect REal Time Logging
    ... I need to have a "real time" log of my spawned sessions, ... This means that if the script terminates ... i.e. when I spawn a telnet session, the data is sent across my network ...
    (comp.lang.tcl)