How can I find the number of connections from a specific IP address historically?
I am using netstat -na command to find out the number of network connections from a specific machine, but this returns information as of now. His there anyway that I can find out this information from yesterday or earlier.
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)
I am trying to find a specific set of characters in a long file. I only want to find the characters in column 265 for 4 bytes.
Is there a search for that? I tried cut but couldn't get it to work.
Ex. I want to find '9999' in column 265 for 4 bytes. If it is in there, I want it to print... (12 Replies)
Hi
I have a solaris 9 OS with apache web server running on top of it. i want to know how many http connections are active at any point in time. (In other words how many users are accessing my website it at any moment of time)
How to get it..?
hit counters are not required...
----------... (0 Replies)
edit; I found a solution that works, see thread #3 https://www.unix.com/302417065-post3.html
Hi there,
I have a small dedicated server that has four ip addresses and by default my httpd sends request using the servers main ip for all outbound connections.
I'm quite amateur at routing and... (4 Replies)
I need to change a line from a xen cfg file using sed if it's possible. The original line is:
vif =
I want to change ONLY the IP address of the second part ==> ip=10.1.10.4 to another IP --> ip=192.222.11.6 The first one ip=123.456.789.123 keeps untouchable.
My new line shoud... (9 Replies)
using sed to replace a specific string on a specific line number using variables
this is where i am at
grep -v WARNING output | grep -v spawn | grep -v Passphrase | grep -v Authentication | grep -v '/sbin/tfadmin netguard -C'| grep -v 'NETWORK>' >> output.clean
grep -n Destination... (2 Replies)
I'm investigating an issue where rsync's to an AIX server will sometimes fail. I suspect the problem might be due to the number of simultaneous SSH connections being made to the host dropping the rsync attempts. I'd like to view the number of open ssh connections. The who command will list logged... (1 Reply)
I want to make a script to read a list of ip addresses from a file then convert those ip addresses to ip number.
ip number is made by removing the dots then transfer to a number , so the ip number transfered to binary then to decimal which will represents the ip number 0 : 4294967295
Also I... (17 Replies)
socket(n) Tcl Built-In Commands socket(n)
__________________________________________________________________________________________________________________________________________________NAME
socket - Open a TCP network connection
SYNOPSIS
socket ?options? host port
socket -server command ?options? port
_________________________________________________________________DESCRIPTION
This command opens a network socket and returns a channel identifier that may be used in future invocations of commands like read, puts and
flush. At present only the TCP network protocol is supported; future releases may include support for additional protocols. The socket
command may be used to open either the client or server side of a connection, depending on whether the -server switch is specified.
CLIENT SOCKETS
If the -server option is not specified, then the client side of a connection is opened and the command returns a channel identifier that
can be used for both reading and writing. Port and host specify a port to connect to; there must be a server accepting connections on
this port. Port is an integer port number and host is either a domain-style name such as www.sunlabs.com or a numerical IP address such as
127.0.0.1. Use localhost to refer to the host on which the command is invoked.
The following options may also be present before host to specify additional information about the connection:
-myaddr addr
Addr gives the domain-style name or numerical IP address of the client-side network interface to use for the connection. This
option may be useful if the client machine has multiple network interfaces. If the option is omitted then the client-side interface
will be chosen by the system software.
-myport port
Port specifies an integer port number to use for the client's side of the connection. If this option is omitted, the client's port
number will be chosen at random by the system software.
-async The -async option will cause the client socket to be connected asynchronously. This means that the socket will be created immedi-
ately but may not yet be connected to the server, when the call to socket returns. When a gets or flush is done on the socket before
the connection attempt succeeds or fails, if the socket is in blocking mode, the operation will wait until the connection is com-
pleted or fails. If the socket is in nonblocking mode and a gets or flush is done on the socket before the connection attempt suc-
ceeds or fails, the operation returns immediately and fblocked on the socket returns 1.
SERVER SOCKETS
If the -server option is specified then the new socket will be a server for the port given by port. Tcl will automatically accept connec-
tions to the given port. For each connection Tcl will create a new channel that may be used to communicate with the client. Tcl then
invokes command with three additional arguments: the name of the new channel, the address, in network address notation, of the client's
host, and the client's port number.
The following additional option may also be specified before host:
-myaddr addr
Addr gives the domain-style name or numerical IP address of the server-side network interface to use for the connection. This
option may be useful if the server machine has multiple network interfaces. If the option is omitted then the server socket is
bound to the special address INADDR_ANY so that it can accept connections from any interface.
Server channels cannot be used for input or output; their sole use is to accept new client connections. The channels created for each
incoming client connection are opened for input and output. Closing the server channel shuts down the server so that no new connections
will be accepted; however, existing connections will be unaffected.
Server sockets depend on the Tcl event mechanism to find out when new connections are opened. If the application doesn't enter the event
loop, for example by invoking the vwait command or calling the C procedure Tcl_DoOneEvent, then no connections will be accepted.
CONFIGURATION OPTIONS
The fconfigure command can be used to query several readonly configuration options for socket channels: |
-error |
This option gets the current error status of the given socket. This is useful when you need to determine if an asynchronous connect |
operation succeeded. If there was an error, the error message is returned. If there was no error, an empty string is returned.
-sockname
This option returns a list of three elements, the address, the host name and the port number for the socket. If the host name cannot
be computed, the second element is identical to the address, the first element of the list.
-peername
This option is not supported by server sockets. For client and accepted sockets, this option returns a list of three elements; these
are the address, the host name and the port to which the peer socket is connected or bound. If the host name cannot be computed, the
second element of the list is identical to the address, its first element.
SEE ALSO
flush(n), open(n), read(n)
KEYWORDS
bind, channel, connection, domain name, host, network address, socket, tcp
Tcl 8.0 socket(n)