Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Looking for first instance of an error in explorer log Post 302928251 by Ditto on Wednesday 10th of December 2014 08:33:43 AM
Old 12-10-2014
Quote:
Originally Posted by amani
Hi

How to see the first instance of an error in explorer log ?

In this case I want to know the first time error "SCSI transport failed" was populated in messages

Thanks

Amani
Probably a rookie answer here, but if you're talking just scanning for the first error in a given log file, I've used this logic successfully in the past:

Code:
 
LN=`grep -n "<error>" <log_file> | head -1 | nawk -F: '{print $1}'`
let LNe=$LN+5
head -$LNe  <log_file> | tail -10

so drop in "SCSI transport failed" for "<error>" and put your log file in there and it'll rip out 10 lines (5 before and 5 after) around the error.
This User Gave Thanks to Ditto For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

internet explorer for hp-ux

Hello, i'm running a hp-ux workstation model 715 / 100 with hp-ux version 11.11 i need a microsoft internet explorer for this workstation to make some tests. does anyone know where i can cat a internet explorer 4.01 for my workstation? Thank all for help! ;-) (3 Replies)
Discussion started by: ortsvorsteher
3 Replies

2. UNIX for Advanced & Expert Users

Printer Error(the Object Instance Test Does Not Exist)

Hello, i need some help about how to set up a high velocity impact printer in UNIX SCO 5.05, this printer is attached with a parallel port in a PC(host), the host use tunemul to access unix.(this reference is just to ask you if this is a local or remote connection, just to be sure), so, i... (2 Replies)
Discussion started by: jav_v
2 Replies

3. UNIX Desktop Questions & Answers

regd explorer

hiii i want to know how to install explorer in sparc e-250 OS solaris 8 iam able to install the software iam able to install the explorer,i use to run #./explorer -q -e other than this what all i should run to get all details.but iam just getting some thing which not related to o/s or h/w... (3 Replies)
Discussion started by: solaris8in
3 Replies

4. Shell Programming and Scripting

first instance to end of log file

All, I looking for developing a script which would find the first instance of a date in a log file: 2004/07/15 19:16:09 Here are the next couple lines after the dat time stamp: backup completed daemon started. And I want to put the rest of the lines after the first instance in this... (2 Replies)
Discussion started by: bubba112557
2 Replies

5. Solaris

Explorer causing syslog error

Hi there, I have upgraded my explorer (SUNWexplo) on a solaris 10 Sparc box from version 3.4 to the latest version (5.5) . However im a little concerned, whenever I run the new explorer either manually or scheduled, I get a syslog event as follows 1 in 0:08:31: Sep 22 17:00:15 fmy.machine.com... (8 Replies)
Discussion started by: hcclnoodles
8 Replies

6. Shell Programming and Scripting

replace first instance(not first instance in line)

Alright, I think I know what I am doing with sed(which probably means I don't). But I cant figure out how to replace just the first occurance of a string. I have tried sed, ed, and grep but can't seem to figure it out. If you have any suggestions I am open to anything! (3 Replies)
Discussion started by: IronHorse7
3 Replies

7. HP-UX

ERROR: more than one instance of overloaded function "vprintf" has "C" linkage

Hi people! I've got this own library: -------------------------------------------- Personal.h -------------------------------------------- #ifdef __cplusplus extern "C" { #endif #include <stdio.h> #include <stdarg.h> #include <string.h> ... (0 Replies)
Discussion started by: donatoll
0 Replies

8. Shell Programming and Scripting

database instance Error capture

I wrote a script to capture some rows from the DB. However I want to capture the errors if the DB instance is down which usually produces errors like below. What should be my approach to kill script if the DB instance is down: DATABASE ERRORS: Msg 937, Level 14, State 1: Server... (2 Replies)
Discussion started by: moe458
2 Replies

9. Solaris

Getting error while trying to create a Solaris boot instance

I issue the following command to create a boot instance from an active boot instance on solaris 11.1. beadm create -a -d "Oracle x86 64 BIT Solaris SunOS Rel 5.11 Ver 11.1 10/2012 Enable SSH " OraSolBcp I get the following error below;- be_mount_callback: failed to mount dataset... (5 Replies)
Discussion started by: Tenyhwa
5 Replies

10. Shell Programming and Scripting

Error while sudo to instance via bash script

Team , I am trying to sudo to instnace using a shell script .In out put i am getting this error for every line ...I am running this script as root .. sudo su - userid -i db2 "command " Error /etc/profile: shopt: not found how can we overcome this error ? Can someone help on... (1 Reply)
Discussion started by: rocking77
1 Replies
strerr(8)						      System Manager's Manual							 strerr(8)

NAME
strerr - Receives error messages from the STREAMS log driver SYNOPSIS
/usr/sbin/strerr [-a sys_admin_mail_name] [-d logdir] PARAMETERS
Specifies the mail name of the user to receive the message via mail. This is the system administrator by default. Specifies the directory to contain the error log file. This is /var/adm/streams by default. DESCRIPTION
The strerr daemon receives error messages from the STREAMS log driver (strlog) for addition to the STREAMS error log files (error.mm.dd) in the STREAMS error logger directory (/var/adm/streams by default). When first called, the strerr daemon creates the log file error.mm.dd. This is a daily log file, where mm indicates the month and dd indicates the day of the logged messages. The strerr daemon then appends each error message that it subsequently receives from the STREAMS log driver to the log file. STREAMS error log messages have the following format: seq_num std_time ticks_time flags mod_ID sub_ID msg_text where: The error sequence number. The time the message was sent, in the format hh:mm:ss. The time the message was sent, measured in machine ticks since the last boot. Can be any of the following indicators: Indicates that the message has also been saved in the process's trace log. Indi- cates that the message signaled a fatal error. Indicates that the message is to be sent to the system administrator or specified user via mail. The module identification number of the trace message source. The subidentification number of the trace message source. The trace message text. The strerr daemon will run continuously until terminated by the user. FILES
The error log file or files on which strerr operates. NOTES
Only one strerr process can open the STREAMS log driver at a time. This restriction is intended to maximize performance. The STREAMS error logging mechanism works best when it is not overused. The strerr daemon can degrade STREAMS performance by affecting the response, throughput, and other behaviors of the drivers and modules that invoke it. The daemon will also fail to capture messages if drivers and modules generate messages at a higher rate than its optimum read rate. Missing sequence numbers among the messages in a log file indicate that messages have been lost. RELATED INFORMATION
Interfaces: strlog(7). delim off strerr(8)
All times are GMT -4. The time now is 09:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy