• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 441
  • Last Modified:

Event logs in UNIX

Hi,

There are some scripts hwere the location fro the UNIX event log and the error log will be specified ... there is no problem with them

But there are some scripts that are just passing parameters to java programs or sth els .... for these type of scripts ... if the execuion got failed where to see the event logs  and the error logs.....

Will there be any location ... standard location where we can see the error logs of the entire process that run in that particular server ....if so ... what is the permission required for that...?

Please give me information on this and the links that can provide me more information in this area...

Thanks a lot in advance

Waiting for reply

Rajesh
0
m_razesh
Asked:
m_razesh
1 Solution
 
yuzhCommented:
>>There are some scripts hwere the location fro the UNIX event log and the error log will be specified ... there is no problem with them


It denpends how the script was written, you need to have a look at the script
yourself to find out if it logs any error to any file. there it no rules for script to
log their error, it is totally up to how the script was written !
0
 
JJSmithCommented:

In a UNIX environment all processes run in their own space and option could log anywhere they have been 'programmed' to; some processes, by design will direct their outputs to /dev/null.

For significant O/S processes it is usual to have a background logging daemon ( eg syslogd ), that write messages that it receives to logfiles ther are specified in it's configuration ( man syslogd ). Once the daemon is in place it becomes possible for all processes to pass messages to it, that can then be recorded in a central place.

The method of system logging varies between flavours of unix but in principley the same. Applications however tend to log somewhere in their installation area.

As a very very rough rule of thumb; if I suspect a process is logging but I don't know here the log is I sometime have success with:

$ touch /tmp/time_now      # this creates a file with a data time of now!

[ run the process I think is logging ]

$ find / -newer /tmp/time_now -print  

that will list all files that have changed since you 'touched' the /tmp/time_now file - this is very general and may list 100's of files in a very short time frame.

A more technical approach would probabley use something like the utility lsof (list open files), which lists the names of files and the names of processes that access those files, so imaginging a program called portlisten is running - you may find what file it is accessing with something like:

$ lsof  |  grep  portlisten

Note: lsof is not standard UNIX but an open source utility which is implimented on most variants of UNIX, see:

http://freshmeat.net/projects/lsof/

Cheers
JJ

0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now