Sponsored Content
Top Forums Shell Programming and Scripting Script to Monitor List of Ports Post 302465131 by eclipseagent on Thursday 21st of October 2010 05:06:21 PM
Old 10-21-2010
Yup.. I know what you mean.. however, this application doesn't allow for any type of connections through the port, since it's an internal license adapter. It just refuses connection when trying to telnet. The application cannot be modified, but I was told that 100% reliability that LISTEN means it's working (it's what I'm told from the application, so it's all I can agree to).

Here's what I've come up with:

NETSTAT=`netstat -ant | grep LISTEN | awk '{ print $4 }'`
CCTEST="my_email@email.com another_email@email.com"

for PORT in `seq 26401 26412`; do
echo "$NETSTAT" | grep $PORT &> /dev/null
if [ $? -ne 0 ]; then
echo "Port $PORT is down on `hostname`i X.X" | mail -s "Port $PORT is down on `hostname`" $CCTEST
else
echo "Port $PORT is =)"
fi
done
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

list all ports and their relative IP@ if any

Hi all i'm working on a LINUX-based platform. i'm little confused with PORTs. i have my platform connected to many other platforms, i need to know the relative port for each IP@. i know the IP of each connected platform to mine, but i'm not sure about the relative PORT for each platform...... (4 Replies)
Discussion started by: samsal_991
4 Replies

2. UNIX for Dummies Questions & Answers

get the list of open ports in unix?

Hi, what is the unix command to get the list of all open ports in unix? Thank you in advance (1 Reply)
Discussion started by: zainab
1 Replies

3. AIX

How to find list of userdefined ports in aix

I want to know list of userdefined ports available in aix .Suppose I want to run a process at port 20 .using netstat i could able to find out that no process is listening at that 20 .Still I am not able to bring my process up at port 20. Thanks kittu (1 Reply)
Discussion started by: kittu1979
1 Replies

4. Solaris

how to monitor ports

I run into this issue occasionally and just looking for suggestions on how others solved it. I would like to monitor ports on a large number of systems and would like to determine which systems are listening on specific ports. I know there are heavy-weight apps that provide this such as HP ovo... (6 Replies)
Discussion started by: mhm4
6 Replies

5. Solaris

List TCP ports with process

Hello, One of our developers is asking for a command/script in Solaris similar to "netstat -anp" in Linux. He gave this output as an example: root@xxx:~# netstat -anp | grep LISTEN tcp 0 0 0.0.0.0:7937 0.0.0.0:* LISTEN 16082/nsrexecd tcp 0 ... (7 Replies)
Discussion started by: vimes
7 Replies

6. UNIX for Advanced & Expert Users

script for unassigned ports

Hi Guys, could you help me with this. I need a script where if we enter the hostname and range of port numbers, the script must be able to give me the ports that were unassigned to any of the services installed. Thanks, Charan (5 Replies)
Discussion started by: charan314
5 Replies

7. Solaris

List of Ports being used.

Hi, I have 2 queries: a) Is it possible that a port no., not defined in /etc/services, be used by an application. b) how do i find the list of ports is being currently used on my Solaris box(if entry not made into /etc/services) I donot have "lsof" installed on my box. (3 Replies)
Discussion started by: EmbedUX
3 Replies

8. UNIX for Dummies Questions & Answers

How do i list running process with the ports they are using?

How do i list the running process and also view the ports they are listening to at the same time? (3 Replies)
Discussion started by: mena
3 Replies

9. Linux

Packages that monitor OS configs and service/ports?

I have several Redhat servers and workstations that I need to be able to monitor for any changes and be notified of any changes to the OS. The features I need to specifically monitor are: ports - opening of new ports that are not already in a whitelist services - any starting or attempts to start... (1 Reply)
Discussion started by: JCDinPGH
1 Replies

10. UNIX for Advanced & Expert Users

Script monitor website wth default tomcat script

Hi all, on our application server we have the following script that monitor the status of the website, my problem here is that i have edite the retries from 3 to 5, and the timewait to 120 second, so the script should check 5 times every 2 minutes, and if the fifth check fails it must restart... (0 Replies)
Discussion started by: charli1
0 Replies
UHSO(4) 						   BSD Kernel Interfaces Manual 						   UHSO(4)

NAME
uhso -- support for several HSxPA devices from Option N.V. SYNOPSIS
The module can be loaded at boot time by placing the following line in loader.conf(5): uhso_load="YES" DESCRIPTION
The uhso driver provides support for several HSxPA devices from Option N.V. that are based on their packet interface. Each device has a set of serial ports and a raw IP packet interface. The serial ports of the device are accessed through the ucom(4) driver which makes them behave like tty(4) devices. The packet interface is exposed as a network interface. Establishing a connection on the packet interface is achieved by using the proprietary AT commands ``AT_OWANCALL'' and ``AT_OWANDATA'' on any of the available serial ports. The network interface must be configured manually using the data obtain from these calls. Each device usually have at least two or more serial ports, their individual purpose can be identified through sysctl(8). Ports identified as ``Modem'' features a normal modem interface that can be used with PPP. Ports identified as ``Diagnostic'' uses a proprietary binary interface used for firmware upgrades, this port does not have a AT command interface and can not be used to control the device. Other ports features an AT command interface that can be used for normal device control. HARDWARE
The uhso driver should work with most devices from Option. The following devices have been verified to work o Option GlobeSurfer iCON 7.2 (new firmware) o Option iCON 225 o Option iCON 452 o Option iCON 505 The device features a mass storage device referred to as ``Zero-CD'' which contains drivers for Microsoft Windows; this is the default mode for the device. The uhso driver automatically switches the device from ``Zero-CD'' mode to modem mode. This behavior can be disabled by setting hw.usb.uhso.auto_switch to 0 using sysctl(8) EXAMPLES
Establishing a packet interface connection using the AT command interface available at one of the serial ports AT+CGDCONT=1,,"apn.provider" AT_OWANCALL=1,1,1 OK _OWANCALL=1,1 AT_OWANDATA=1 _OWANDATA: 1, 10.11.12.13, 0.0.0.0, 10.2.3.4, 10.2.3.5, 0.0.0.0, 0.0.0.0, 72000 Configuring the interface ifconfig uhso0 10.11.12.13 up route add default -interface uhso0 echo "nameserver 10.2.3.4" > /etc/resolv.conf echo "nameserver 10.2.3.5" >> /etc/resolv.conf The connection can be terminated with AT_OWANCALL=1,0,1 FILES
/dev/cuaU?.? SEE ALSO
ucom(4), usb(4) AUTHORS
The uhso driver was written by Fredrik Lindberg <fli@shapeshifter.se>. BSD
January 14, 2010 BSD
All times are GMT -4. The time now is 06:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy