Solved

Event logs in UNIX

Posted on 2006-06-10
2
416 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
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…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

810 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