08-06-2009
How to check if a Port is accepting connections.
Hi,
I need to create a script which checks the availability of a particular service on a particular Port on HP-Unix. Is there any command in unix wherein we can check if any port is accepting the connections now.
Thanks,
Vihang.
10 More Discussions You Might Find Interesting
1. HP-UX
Hi UNIX guru's,
Have recently upgraded Oracle from 8i to 10g on an HP-UX (RISC) 11.11 box.
At least twice a day the database stops accepting incoming connections and the following errors are observed in the various logs.
The box needs to be rebooted to get everything going again.
The... (4 Replies)
Discussion started by: mat_cottrell
4 Replies
2. IP Networking
Hello
i have application that using ports , how can i check if the port im using is not captured by any applications? (1 Reply)
Discussion started by: umen
1 Replies
3. AIX
How can i check which service is activated on my AIX Box?
how one can check particular port is open or not (like ftp/telnet port)?
I dont have admin rights (1 Reply)
Discussion started by: ashish4422
1 Replies
4. Shell Programming and Scripting
Hi,
is it possible to check smb-connections of my server? I want to see, which files are opened from which station (ip).
The command who only works local (via terminal).
Regards. (4 Replies)
Discussion started by: inoxx
4 Replies
5. UNIX for Dummies Questions & Answers
Hi,
Please help me out, how to check whether a port currently being used or not.
is there any command which give the result?
Thanks
Rajesh (6 Replies)
Discussion started by: rajesh08
6 Replies
6. Shell Programming and Scripting
is there a better way to check if a port is active on linux and sunos systems?
this is currently what I'm using in my script:
netstat -an | egrep -i "$PORT"
i know this isn't the best way as there could be numbers in that output that has my port number in it but isn't necessarily a... (0 Replies)
Discussion started by: SkySmart
0 Replies
7. UNIX for Dummies Questions & Answers
Server has more TIME_WAIT connections in Apache(port 80) Hi,
My webserver has 16GB of RAM and CentOS 5.5, Apache 2.2.3, It's shared webserver used of for webhosting. I have optmized the server as :
<IfModule prefork.c>... (4 Replies)
Discussion started by: chandranjoy
4 Replies
8. Shell Programming and Scripting
hi everybody;
my code is cheking if a port is an actif or not with the cmd netstat -ln,I want first to enter the number of the port which I want to check it but I think that the value of $con in the second "if" is always "0" so the code give me always that the port is not used!!!
... (5 Replies)
Discussion started by: bassma
5 Replies
9. Red Hat
I have RHEL 5.8 in our production environment. We are using SSL, my query is how to find the port used for SSL. In /etc/services, it shows 443 but when I give
netstat -tulpn | grep 443
Or
netstat -tulp | grep https
I do not get any output.
I hope, my question is clear of how to find... (4 Replies)
Discussion started by: RHCE
4 Replies
10. Shell Programming and Scripting
I have my firewall process running
# ps -ef | grep firewall
root 21169 1 0 08:50 ? 00:00:00 /usr/bin/python -Es /usr/sbin/firewalld --nofork --nopid
I wish to know what ip : port number it is using. Can you please tell me how can i find out ?
I tried the below command... (4 Replies)
Discussion started by: mohtashims
4 Replies
LEARN ABOUT DEBIAN
mojo::ioloop::server
Mojo::IOLoop::Server(3pm) User Contributed Perl Documentation Mojo::IOLoop::Server(3pm)
NAME
Mojo::IOLoop::Server - Non-blocking TCP server
SYNOPSIS
use Mojo::IOLoop::Server;
# Create listen socket
my $server = Mojo::IOLoop::Server->new;
$server->on(accept => sub {
my ($server, $handle) = @_;
...
});
$server->listen(port => 3000);
# Start and stop accepting connections
$server->start;
$server->stop;
DESCRIPTION
Mojo::IOLoop::Server accepts TCP connections for Mojo::IOLoop.
EVENTS
Mojo::IOLoop::Server can emit the following events.
"accept"
$server->on(accept => sub {
my ($server, $handle) = @_;
...
});
Emitted safely for each accepted connection.
ATTRIBUTES
Mojo::IOLoop::Server implements the following attributes.
"accepts"
my $accepts = $server->accepts;
$server = $server->accepts(10);
Number of connections to accept at once, defaults to 10.
"reactor"
my $reactor = $server->reactor;
$server = $server->reactor(Mojo::Reactor::Poll->new);
Low level event reactor, defaults to the "reactor" attribute value of the global Mojo::IOLoop singleton.
METHODS
Mojo::IOLoop::Server inherits all methods from Mojo::EventEmitter and implements the following new ones.
"listen"
$server->listen(port => 3000);
Create a new listen socket. Note that TLS support depends on IO::Socket::SSL and IPv6 support on IO::Socket::INET6.
These options are currently available:
"address"
Local address to listen on, defaults to all.
"backlog"
Maximum backlog size, defaults to "SOMAXCONN".
"port"
Port to listen on.
"tls"
Enable TLS.
"tls_ca"
Path to TLS certificate authority file.
"tls_cert"
Path to the TLS cert file, defaults to a built-in test certificate.
"tls_key"
Path to the TLS key file, defaults to a built-in test key.
"generate_port"
my $port = $server->generate_port;
Find a free TCP port, this is a utility function primarily used for tests.
"start"
$server->start;
Start accepting connections.
"stop"
$server->stop;
Stop accepting connections.
SEE ALSO
Mojolicious, Mojolicious::Guides, <http://mojolicio.us>.
perl v5.14.2 2012-09-05 Mojo::IOLoop::Server(3pm)