10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello Forum,
I'm using a bit of code from a script I found that allows me to capture the status code of connecting via SSH to remote servers:
ssh -qno StrictHostKeyChecking=no -o ConnectTimeout=1 user@$InputIP 'ls -l /home/user >/dev/null 2>&1' > /dev/null 2>&1
status="$(echo $?)"
echo... (4 Replies)
Discussion started by: greavette
4 Replies
2. Shell Programming and Scripting
Could you help me writing a script showing which network connections are currently active?
Means output should be something like:
"eth0, wlan1, wlan3"
Problem:
The output is supposed to happen on a 16x2 LCD Display.
Currently I am doing a "Ifconfig" as output, but its too fast for the... (2 Replies)
Discussion started by: lordofazeroth
2 Replies
3. Shell Programming and Scripting
Hello,
I want to use shell script to generate network files (I tried with python but its taking too long).
I have a list of nodes:
node.txt
LOC_Os11g37970
LOC_Os01g07760
LOC_Os03g19480
LOC_Os11g45740
LOC_Os06g08290
LOC_Os07g02800
I have an edge-list as well: edge.txt
Source_node ... (2 Replies)
Discussion started by: Sanchari
2 Replies
4. Shell Programming and Scripting
hello ,
I need to check how many parallel ssh connections my server can take the load of.
I need to login to different host which i am planning to read from a file and then a write a loop which will do parallel ssh.
Please provide suggestion on how i can write script for the same.\
Thank... (1 Reply)
Discussion started by: ABHIKORIA
1 Replies
5. UNIX for Dummies Questions & Answers
Hi
Kindly provide me shell script on server to collect inbound connections, using port number on Linux. (4 Replies)
Discussion started by: adminhelp
4 Replies
6. Shell Programming and Scripting
Hi ,
I have to create a db2 connection for the while loop in shell scripting.
Below is the connection for DB2 I have to establish
connect to TABLESCHENMA user $USERID using $PASSWORD
Below is the while loop.
while read TABLE; do
db2 LOAD CLIENT FROM
$DIRECTORY/$TABLE.ixf OF ixf INSERT... (1 Reply)
Discussion started by: vikyalex4
1 Replies
7. Shell Programming and Scripting
At times I find the need to test that the tacacs port 49 is open.
The code below works but is painfully slow because I have to wait on the timeouts.
Examples of possible responds
router1#telnet 10.11.20.14 49
Trying 206.112.204.140, 49 ... Open
route1#telnet 10.11.19.14 49
Trying... (1 Reply)
Discussion started by: popeye
1 Replies
8. Shell Programming and Scripting
Hello everyone.
I'd really appreciate some help on this since someone is ddosing or doing something to cause our server to overload. It happens once a day and always from the same isp. I've reported it to abuse email of this isp but they don't seem to care.
It happens once a day. And... (0 Replies)
Discussion started by: thesting
0 Replies
9. Shell Programming and Scripting
Dear All ,
I'm looking for a unix script that will monitor the TCP/IP connections between two physical ip addresses and when it dectes an IP is down it generates an alarm and sends SMS to mobile numbers.
Can any one help, I need this urgently.
Waiting for positive replies..
... (3 Replies)
Discussion started by: samura
3 Replies
10. Solaris
Hi,
I have a Sun Ultra 5 desktop with Solaris 8. When I telnet/rlogin into any other host, the connection closes after few hours of inactivity.
I also have another Windows box which I use rarely. But when I telnet/rlogin into the same hosts using putty, the connection stays for days without any... (5 Replies)
Discussion started by: dr_gsb
5 Replies
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)