press Esc before to be sure you are no more in mod/insert mode...
press n for next occurance
Hi ,
Thanks a lot . Is there any other way for example let say as You have guided that I have opened the abc.log file through Vi editor and if Lets say I am searching on the logs where pattern 'abcd' is there in logs and it could be in sat several places in logs so all those places it is there in logs it could get highlighted ,in Vi itself .
I would like a simple shell script that will allow me to display to screen all unsuccessful su attempts in my sulog file, for the present date.
I have been trying several different combinations of commands, but I can't quite get the syntax correct.
The mess I have right now (don't laugh) is... (4 Replies)
Im tyring to create a script that will show me any lines in a file with todays date and yesterdays, the date format in the file is as follows
----- amqxfdcx.c : 728 --------------------------------------------------------
07/12/05 09:53:20
AMQ6109: An internal WebSphere MQ error has... (3 Replies)
I've got a 2.2 Gig syslog file from our Cisco firewall appliance. The problem is that we've been seeing gaps in the syslog for anywhere from 10 minutes to 2 hours. Currently I've just been using 'less' and paging through the file to see if I can find any noticeable gaps. Obviously this isn't the... (3 Replies)
I have a script which tails a log file and if it finds certain strings in the data tailed it sends an email, basically like this:
tail -f logfile > tmp.file &
sleep 10
kill $!
STRING=$(grep -c "string" tmp.file)
&& echo $STRING | mailx -s "Warning.." admin@123.com
When the string is... (10 Replies)
When I use "/" to look for a particular command that I typed in the current session it says
D02:-/home/user1/temp> /job
ksh: /job: not found.
D02:-/home/user1/temp>
previously it used to fetch all the commands which had job in it..
for example subjob, endjob, joblist etc...
may I... (7 Replies)
without using conventional file searching commands like find etc, is it possible to locate a file if i just know that the file that i'm searching for contains a particular text like "Hello world" or something? (5 Replies)
Hi Folks,
I am searching for a pattern in logs through putty by opening the file in vi editor
and reaching to the last of the file by $ and then searching the pattern , lets say I have to search the pattern abc then it would be ?abc Now I want line numbers along with the matching pattern to be... (3 Replies)
Command 1:
$script | grep 'Write to ECC( SSID=MARGIN)'
Command 2:
$script | grep 'is not greater than existing logical processing'
The above commands run my script and search the mentioned strings but I do not want to run my script twice. It is increasing run time.
Can someone tell me... (3 Replies)
Below is my script to log all the command input by any user to /var/log/messages. But I cant achieve the desired output that i want. PLease see below.
function log2syslog
{
declare COMMAND
COMMAND=$(fc -ln -0)
logger -p local1.notice -t bash -i -- "$USER:$COMMAND"
}
trap... (12 Replies)
Discussion started by: invinzin21
12 Replies
LEARN ABOUT DEBIAN
lire::logger
Logger(3pm) LogReport's Lire Documentation Logger(3pm)NAME
Lire::Logger - Lire's logging interface.
SYNOPSIS
Any program:
use Lire::Logger qw/ lr_info lr_debug lr_warn /;
lr_info( "doing stuff " );
lr_debug( "debugging information" );
lr_warn( "encountered unexpected value: ", $value );
open( CFGFILE, "my.conf" ) or lr_err( "open error: ", $! );
DESCRIPTION
This module contains functions that should be used by everything in the Lire framework which should need logging.
All logging functions take any number of parameters that will be joined together to form the message (like print(), die(), warn() and
friends).
lr_emerg()
This logs a message at the "emerg" level and aborts your program. This probably shouldn't be used.
lr_crit()
This logs a message at the "crit" level and aborts your program. This should only be used when something is really broken in the Lire
program or the environment. It is used a few places in Lire when assertion that should really never fail (like a DLF file with the wrong
number of fields).
lr_err()
This logs a message at the "err" level and usually aborts your program. (It is the equivalent of a die().) The program won't abort if it's
used in an eval block. Uses this for error condition.
lr_warn()
This logs a message at the "warning" level. Perl's builtin warn is mapped to this function. Use this for non-fatal errors.
lr_notice()
This logs a message at the "notice" level. This should be used for significant informational messages that the user should see. (By
default, the user will only see messages at level "notice" or higher.)
lr_info()
This logs a message at the "info" level. Use this for general informational messages.
lr_debug()
This logs a message at the "debug" level. Use this for debugging messages.
SEE ALSO Lire::Program(3pm)AUTHOR
Francis J. Lacoste <flacoste@logreport.org>
VERSION
$Id: Logger.pm,v 1.10 2006/07/23 13:16:29 vanbaal Exp $
COPYRIGHT
Copyright (C) 2001-2003 Stichting LogReport Foundation LogReport@LogReport.org
This file is part of Lire.
Lire is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program (see COPYING); if not, check with
http://www.gnu.org/copyleft/gpl.html.
Lire 2.1.1 2006-07-23 Logger(3pm)