Solved

Event logs in UNIX

Posted on 2006-06-10
2
414 Views
Last Modified: 2010-04-21
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
Comment
Question by:m_razesh
2 Comments
 
LVL 38

Expert Comment

by:yuzh
ID: 16882612
>>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
 
LVL 6

Accepted Solution

by:
JJSmith earned 500 total points
ID: 16898992

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now