1758776 Members
2875 Online
108875 Solutions
New Discussion юеВ

Re: error generated

 
SOLVED
Go to solution
lawrenzo_1
Super Advisor

error generated

Hello,

I have an issue accross our environment which is being addressed by changing the application connection protocol however this needs testing before implementing.

The issue:

Occassionally an error code is being generated when an application connects to the informix database regarding share memory and entered to a logfile.

There are approx 250 scripts that run from cron that connect to the database and have the potential to fail with this error. All scripts run a inf.ksh script which setup the environments and protocols.

I want to monitor the log file for each job that runs for the error 25594 however each logfile is located in a different directory for each script.

Is there a way I can run a wrapper that does not use lots of resource for when the script is started can monitor the logfile for each error? Maybe setting something in inf.ksh?

Thanks for any help.

regards, Chris.
hello
4 REPLIES 4
Sandman!
Honored Contributor
Solution

Re: error generated

Since the inf.ksh script sets up your env it cannot be used for parsing the logfile assuming that the app starts after the environment is setup.

You can use find command to goes thru a list of folders looking inside files that end in ".log" (another assumption) and parses and greps for the string 25594 and notifies you via email. Even if the output dirs are different maybe they reside on a single device in which case you can limit the search to that particular device i.e.

# find -xdev -type f -name "*.log" | xargs grep 25594

~hope it helps
lawrenzo_1
Super Advisor

Re: error generated

thankyou

I can use this within a check however to run this on our systems would be too intensive as the filesystems are rather large.

We have created a script to check a single file for the error however due to the quantity of logfiles.

I has hoping there was a way to trap the error by setting a monitor on the relevant log file when the script is initiated
hello
James R. Ferguson
Acclaimed Contributor

Re: error generated

Hi:

You can add '-xdev' to the 'find' *and* more importantly, specify multiple directories as arguments to its search. The '-xdev' keeps 'find' from crossing mountpoints. Potentially, this will reduce your searching time. Ideally, *all* of you scripts should reference a common log directory.

Regards!

...JRF...
lawrenzo_1
Super Advisor

Re: error generated

ok thanks,

not quite what I was looking for but is a solution to my problem.

Chris
hello