Hi, I am trying to access and read certain lines from a configuration XML file on multiple servers (within the LAN). Fortunately the file name and path is always the same for all servers. An example extract of the file is as follows:
From this I want to obtain a list of true conditions for all servers and collated so each service will show what server it is running on
eg
SMPP_SERVER: server1, server3
OLD_PAGING: server1
The ultimate goal would be for the script to run continuously to provide a realtime indicator of services running. However if not feasible then a run when needed script would be the second choice.
I would welcome assistance for this from any guru out there !
First, collect all the files from all the servers and save them. Go through them one after the other and compile a list of services to be available. Load this list in an array. Create a second array with corresponding subscripts consisting of empty string values.
Then go through the collected files a second time and write the server name to the second array when the respective service status is up.
Example: First step, get all the service names and create the two arrays, you end up with two arrays, looking like this:
Step two is going through the collected files and scan for service-host-relationships. If you find in the file of host1 that service_2 is up you would add "host1" to the content of $servhost[2], etc.
Last step is to go through the servname/servhost pair of arrays, and print the name of the service (from servname[]) follwoed by the list of hosts (from servhosts[]) to create the list you wanted.
Dear All,
Here is the current status of the badging system:
The Beta 1 phase of the new badging system is close to completion.
42 prototype badges have been "allocated"
6 prototype badge slots are held in reserve
The "alert you have new badges" prototype is running and is currently... (4 Replies)
1. Edit a script named update.sh that generates status.html in your web directory: ~/public_html/.
I need to write specific commands to show each specific item
2. The generated webpage should include information related to:
UNIX : kernel version of ed-lab server
USER : number of users on the... (13 Replies)
Hi,
I need to query Oracle database for 100 users. I have these 100 users in a file. I need a shell script which would read this User file (one user at a time) & query database.
For instance:
USER CITY
--------- ----------
A CITY_A
B CITY_B
C ... (2 Replies)
HI
I want to get an e-mail @ my yahoo address when the file system used space gets more than 89% ,
& the message contents must be the outputs of
df -g
errpt
netstat -i
??????? (3 Replies)
Hello Friends,
I need to change network filesystem status as online but it always seems in maintenance mode, I appreciate your any suggestion to change its state as online.
shell>svcadm enable svc:/system/filesystem/local
shell>svcs -l svc:/system/filesystem/local
fmri ... (4 Replies)
Hi,
When i use the system( ) function inside a awk, i am getting the ouput with a 0 appended in a new line.
Can someone guide me to eliminate the extra line containing 0.
Ex :
awk -F"|" '{print system("convert.sh" $1}'
The output is displayed with 0 in a new line.
... (8 Replies)
Hi,
I have a requirement as below which needs to be done viz UNIX shell script
(1) I have to connect to an Oracle database
(2) Exexute "SELECT field_status from table 1" query on one of the tables.
(3) Based on the result that I get from point (2), I have to update another table in the... (6 Replies)
I am trying to locate the proper MIB and OID location, to determine if the system attention light is on IBM-702x servers running 5.x.
Currently, we get this on our Blade Centers Management Modules at location: 1.3.6.1.4.1.2.3.51.2.2.8.2.1.1.7.xx were xx is the actual Blade number. A value of 1... (0 Replies)
hi
i m new to this forum as well as UNIX. I've got an assignment but i don't know how can I start it.
can anyone please help to tell me how can I start it?
I added here few lines from my assignment.
In industry, it is common for a single organisation to provide technical support for a... (0 Replies)