Sponsored Content
Top Forums Shell Programming and Scripting Network checking while running a script Post 302328664 by amitranjansahu on Thursday 25th of June 2009 02:30:46 AM
Old 06-25-2009
try this code

Code:
MACHINE=10.0.0.1 # Change to what ever you need
PORT=23 
exec 3>/dev/tcp/${MACHINE}/${PORT}
if [ $? -eq 0 ]
then
    echo "server accepting connections on $PORT port"
else
    echo "server connections not possible $PORT port"
fi

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

daemon running in AIX checking

how do u check if a daemon is running in AIX.. Is it ps -ef|grep daemon lssrc -s demon ??? Thanks! (0 Replies)
Discussion started by: karthikosu
0 Replies

2. UNIX for Dummies Questions & Answers

perl scripting for checking if a process is running

Hi All, I am new to perl and have been trying to write a short script to check a process.Though i havent reached to the stage where i can match the output. I am trying to pass a variable x with value /opt/RGw/csbp-base/CSBP_BAT.01.00.05/csbp_BAT.01.00.05.jar and then pass another variable... (2 Replies)
Discussion started by: pistachio
2 Replies

3. Shell Programming and Scripting

checking to see if a service is running in a shell script

How can I tell, in a shell script, if a certain service is running? I know how to do this on the command line, but not in a script. Is an error thrown somehow that I can check? Thanks. (6 Replies)
Discussion started by: daflore
6 Replies

4. Solaris

No network cable But Network interface is UP and Running

I've one Netra 240 After changing main board and system configuration card reader, Network is not accessible any more, Network interfaces are always UP and Running even when there is no cable connected to Network interfaces. I tried to restart and plumb/unplumb with no luck. ifconfig -a... (7 Replies)
Discussion started by: samer.odeh
7 Replies

5. Shell Programming and Scripting

Shell Script for continuously checking status of a another script running in background, and immedia

Hi, I want to write a script which continuously checking status of a script running in background by nohup command. And if same script is not running then immediately start the script...please help.. i am using below command to run script nohup system_traps.sh & but in some... (9 Replies)
Discussion started by: ketanraut
9 Replies

6. Shell Programming and Scripting

Script will keep checking running status of another script and also restart called script at night

I am using blow script :-- #!/bin/bash FIND=$(ps -elf | grep "snmp_trap.sh" | grep -v grep) #check snmp_trap.sh is running or not if then # echo "process found" exit 0; else echo "process not found" exec /home/Ketan_r /snmp_trap.sh 2>&1 & disown -h ... (1 Reply)
Discussion started by: ketanraut
1 Replies

7. UNIX for Dummies Questions & Answers

FIFO Status Checking/Running

May i please know 1) How to check if FIFO process is down? 2) How to bring FIFO up and running? we are using redhat Linux OS and bash shell Thank you. (1 Reply)
Discussion started by: Ariean
1 Replies

8. Solaris

New to Solaris (Checking/Adding network and harddisk)

Hi all, As per the topic goes, q1) how do i check remotely (over ssh) - how many physical network interfaces I really have ? -- if an interface exists before and it got plug out, it must not be show again. -- i tried dladm show-link and ifconfig -a, but it seems to show a previously... (4 Replies)
Discussion started by: javanoob
4 Replies

9. Solaris

Checking if service is running

Hi, For audit reasons, I need to stop the web server service in some Solaris servers. The port that is listening for this service is port 10000. This is the output that shows the port 10000 is open in the server : # netstat -an | grep 10000 10.70.21.144.10000 10.70.21.133.58130 49640... (6 Replies)
Discussion started by: anaigini45
6 Replies

10. Shell Programming and Scripting

Checking to see if windows service is running

Hi I have created a PowerShell script which successfully checks whether windows service pgsql-9.2 is running. I have tried to call that PowerShell script with a shell/bash script within a LINUX machine but have been unsuccessful. Is there a way of a shell/Perl script to check whether a... (5 Replies)
Discussion started by: simpsa27
5 Replies
XR(1)								     Man Page								     XR(1)

NAME
xr - Crossroads Load Balancer & Fail Over Utility SYNOPSIS
xr [--verbose] [--web-interface XRSERVER:PORT] --server tcp:XRSERVER:PORT --backend BACKEND:PORT [--backend BACKEND:PORT] ... DESCRIPTION
This manual page briefly documents XR, the Crossroads Load Balancer & Fail Over Utility. XR is an open source load balancer and fail over utility for TCP based services. It is a dae mon running in user space, and features exten- sive configurability, polling of back ends using wake up calls, status reporting, many algorithms to select the 'right' back end for a reques t (and user-defined algorithms for very special cases), and much more. XR is service-independent: it is usable for any TCP service, such as HTTP(S), SSH, SMTP, dat abase connections. In the case of HTTP balanc- ing, XR handles multiple host balancing, and can provide session stickiness for back end processes that need sessions, but aren't session- awa re of other back ends. XR furthermore features a management web interface and can be run as a stand-alone daemon, or via inetd. Execute 'xr -h' to get a complete list of available command-line parameters. EXAMPLE
xr --verbose --server tcp:0:80 --backend 10.1.1.1:80 --backend 10.1.1.2:80 --backend 10.1.1. 3:80 --web-interface 0:8001 This instructs XR to listen to port 80 and to dispatch traffic to the servers 10.1.1.1, 10.1.1.2 and 10.1.1.2, port 80. A web interface for the balancer is started on port 8001. Direct your browser to the server running XR. You will see the pages served by one of the three back ends. The console where XR is started, will show what's going on (due to the presence of --verbose). Direct your browser to the server running XR, but port 8001. You will see the web interface, which shows the status, and where you can alter some settings. SEE ALSO
xrctl(1) AUTHOR
XR was written by Karel Kubat <karel@kubat.nl>. Web page: http://crossroads.e-tunity.com This man page was written by Frederik Dannemare <frederik@dannemare.net>. Crossroads Nov 6, 2008 XR(1)
All times are GMT -4. The time now is 04:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy