Sponsored Content
Full Discussion: Modifying listener file
Top Forums Shell Programming and Scripting Modifying listener file Post 302977208 by humble_learner on Thursday 14th of July 2016 09:41:34 AM
Old 07-14-2016
Hi Rudi,

That menu is displayed whe I ssh to any host from a dedicated host in our environment. Once the menu is displayed then I have to select the number corresponding to the instance that I would like to connect to.

In my case I always want to connect to the listener which in most cases is represented by number 2 but maybe different on certain hosts. I want to do this via ksh script as provided above.

The main aim here is to modify the listener file by adding a parameter to it on each host and then reload the listener. After that testing connectivity for each instance on that host.

Last edited by humble_learner; 07-14-2016 at 12:19 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to get the listener port from its configuration file?

Hi folks, I'm trying to get the listener port from its configuration file (tnsnames.ora) using sed ,and I encounter difficulties. tnsnames.ora : DB10g = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = buffy)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) ... (3 Replies)
Discussion started by: nir_s
3 Replies

2. Shell Programming and Scripting

can someone help me with modifying this file

Hi, I have a file which has data kind of like this. Apr 13 08:20:38 uslis10a sendmail: m3DDKSx3006432: usliss26.ca.com Apr 13 08:20:38 uslis10b sendmail: m3DDKSoK006433: usliss26.ca.com Apr 13 08:20:38 uslis10b sendmail: m3DDKcSo006442: usliss26.ca.com Apr 13 08:20:38 uslis10c... (2 Replies)
Discussion started by: eamani_sun
2 Replies

3. Shell Programming and Scripting

Modifying file from outside

hi , I have a javascript file like this: function fnValidateId(){ var array_id = new Array("444","7888","6633","555","146562","3333","33332") var tmp_id = document.form1.id.value; var num=0; while(1) { if(tmp_id ==... (9 Replies)
Discussion started by: Sreejith_VK
9 Replies

4. UNIX for Dummies Questions & Answers

Modifying a .ksh file

Hi, i have created a simple .ksh file in the following manner cat <<EOF >mfile #!/bin/ksh echo "hello world" EOF I have 2 questions 1. now i would like to add a second line after the first echo command e.g. echo "this is line 2" how can i do that ? 2. I would then like... (1 Reply)
Discussion started by: corbusier
1 Replies

5. Shell Programming and Scripting

modifying file using script

Hi, I am new to shell programming, and want to know is it possible to change the contents of file using script? for example, if want to search 2 words and want to replace these words with 2 new words. Regards, Manoj (4 Replies)
Discussion started by: manoj.solaris
4 Replies

6. UNIX for Dummies Questions & Answers

Modifying a file using SED

Dear Members, I have a file which contains data as shown below: LOAD DATA APPEND INTO TABLE xxap.test ( RAW_DATA char(3000) "replace(:raw_data,'*','|')", LOADING_SEQUENCE "xx_gl_bank_fee_s1.nextval", CREATION_DATE SYSDATE, LAST_UPDATE_DATE SYSDATE, ATTRIBUTE1 "DATE_STAMP", ... (1 Reply)
Discussion started by: sandeep_1105
1 Replies

7. Shell Programming and Scripting

Modifying a file?

Hi, I want to convert a file that looks like this >joe XXXXXXXXXXXXXXXXXXX >man BBBBBBBBBBBBBBBBBBBBBSSSSSSSS to something that looks like this (where the spacing is tab seperated) joe XXXXXXXXXXXXXXXXXXX man BBBBBBBBBBBBBBBBBBBBBSSSSSSSS I am able to do the reverse but the other... (3 Replies)
Discussion started by: kylle345
3 Replies

8. Infrastructure Monitoring

modifying existing file using C

Hi all, I have a snmpd.conf file as below. in "SECTION: Trap Destinations" line I want to add "trap2dest <IP>:162 <com_str>" on a new line. For this I wrote following code #include <stdio.h> #include <stdlib.h> int main(void) { FILE *fp; ssize_t read_char_count = 0; ... (2 Replies)
Discussion started by: zing_foru
2 Replies

9. Shell Programming and Scripting

Modifying file to 75 characters

I have a text file containing some notes and I want to limit the lines to 75 characters. Tried using fold, however fold will cut words. Need something in bash, sed or awk to do this. Find the blank space less than 75 ant cut from there (10 Replies)
Discussion started by: kristinu
10 Replies

10. Shell Programming and Scripting

Modifying the header in a flat file

Hi, I need to modify the header of the flat file, can you provide me the code example: Temp.txt header: list_col1|list_col2|list_col3 data: 1|2|3 in the above header should be modified in the prescribed format(is available with me) Header: List_Col1|List_Col2|List_Col3 A... (4 Replies)
Discussion started by: srikanth_sagi
4 Replies
listen(1M)						  System Administration Commands						listen(1M)

NAME
listen - network listener daemon SYNOPSIS
/usr/lib/saf/listen [-m devstem] net_spec DESCRIPTION
The listen process ``listens'' to a network for service requests, accepts requests when they arrive, and invokes servers in response to those service requests. The network listener process may be used with any connection-oriented network (more precisely, with any connection- oriented transport provider) that conforms to the Transport Layer Interface (TLI) Specification. The listener internally generates a pathname for the minor device for each connection; it is this pathname that is used in the utmpx entry for a service, if one is created. By default, this pathname is the concatenation of the prefix /dev/netspec with the decimal representation of the minor device number. In either case, the representation of the minor device number will be at least two digits (for example, 05 or 27), or longer when it is necessary to accommodate minor device numbers larger than 99. SERVER INVOCATION
When a connection indication is received, the listener creates a new transport endpoint and accepts the connection on that endpoint. Before giving the file descriptor for this new connection to the server, any designated STREAMS modules are pushed and the configuration script is executed, (if one exists). This file descriptor is appropriate for use with either TLI (see t_sync(3NSL) ) or the sockets interface library. By default, a new instance of the server is invoked for each connection. When the server is invoked, file descriptor 0 refers to the trans- port endpoint, and is open for reading and writing. File descriptors 1 and 2 are copies of file descriptor 0; no other file descriptors are open. The service is invoked with the user and group IDs of the user name under which the service was registered with the listener, and with the current directory set to the HOME directory of that user. Alternatively, a service may be registered so that the listener will pass connections to a standing server process through a FIFO or a named STREAM, instead of invoking the server anew for each connection. In this case, the connection is passed in the form of a file descriptor that refers to the new transport endpoint. Before the file descriptor is sent to the server, the listener interprets any config- uration script registered for that service using doconfig(3NSL), although doconfig is invoked with both the NORUN and NOASSIGN flags. The server receives the file descriptor for the connection in a strrecvfd structure using an I_RECVFD ioctl(2). For more details about the listener and its administration, see nlsadmin(1M). OPTIONS
-mdevstem The listener will use devstem as the prefix for the pathname. FILES
/etc/saf/pmtag/* ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
nlsadmin(1M), pmadm(1M), sac(1M), sacadm(1M), ioctl(2), doconfig(3NSL), nlsgetcall(3NSL), nlsprovider(3NSL), t_sync(3NSL), attributes(5), streamio(7I) System Administration Guide: Basic Administration NOTES
When passing a connection to a standing server, the user and group IDs contained in the strrecvfd structure will be those for the listener (that is, they will both be 0); the user name under which the service was registered with the listener is not reflected in these IDs. When operating multiple instances of the listener on a single transport provider, there is a potential race condition in the binding of addresses during initialization of the listeners, if any of their services have dynamically assigned addresses. This condition would appear as an inability of the listener to bind a static-address service to its otherwise valid address, and would result from a dynamic-address service having been bound to that address by a different instance of the listener. SunOS 5.10 3 Apr 1997 listen(1M)
All times are GMT -4. The time now is 01:17 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy