I have a log file on our system which fills up with lines that have been timestamped, as follows....
03/03/2008 10:56:06:815] (ERROR) balance: continuing session to genapp02 : 18500
03/03/2008 10:56:06:820] (ERROR) balance: continuing session to genapp02 : 18500
03/03/2008 10:56:07:003]... (2 Replies)
I'm trying to find a way to show large page sizes (page size in K) from multiple web server log files. Essentially I want to show only rows from a file where a specific column is larger than some value. Has anyone ever done this type of log analysis? If so, a snippet of code would be very... (2 Replies)
Hi folks,
I have a situation where i have a raw file like
cat file_raw
776 713 111
0776713113
317-713-114
235776713115
776713116
336713117
77 6 713 118
0776713119
235776713120
and would like to replace all leading zeros with 235, remove all spaces and dashes, and make all... (3 Replies)
Hi,
I want to copy some files from a Folder say, /usr/X at random intervals to another location.
Basically, new files will be dumped at random intervals to location /usr/X and I have to copy those new files to some other location (after copying, I cannot delete those files from source... (2 Replies)
Hi everyone, thanks in advance for your kind help!
Here is what i need to achieve (simplificated example of course):
1-i have a "300-hour-music.mp3" file in my server HD side
2-a page HTML/PHP gets user input : the length of the track he want to listen, let's say 2 hours
3-a BASH script... (0 Replies)
I'd like to copy strings from a log file and put them into a CSV.
The strings could be on different line numbers, depending on size of log.
Example Log File:
File = foo.bat
Date = 11/11/11
User = Foo Bar
Size = 1024
...
CSV should look like:
"foo.bat","11/11/11","Foo Bar","1024" (7 Replies)
Guys,
Please help me with this code. I have 2GB file to process and shell seems to be the best option. I am a biologist and though I can think of the logic, the commands are beyond me. Any help is greatly appreciated. Please look at the attched file and the requirement will be very clear.
I... (6 Replies)
Hi dear users,
I need to compare numeric columns in two files. These files have the following structure.
K.txt (4 columns)
A001 chr21 9805831 9846011
A002 chr21 9806202 9846263
A003 chr21 9887188 9988593
A003 chr21 9887188 ... (2 Replies)
Hello Gurus,
First, i would like to know is there any way to solve my problem.
i have a log file like this:
INFO - ABCDRequest :: processing started for the record <0> TransactionNo <Txn#1> recordID <recID#1>
INFO - ABCDRequest :: processing started for the record <0> TransactionNo... (9 Replies)
I have huge log file that taken every minute
and I need the total at 5min intervals.
Sample log:
#timestamp(yyyymmddhhmm);result;transaction
201703280000;120;6
201703280001;120;3
201703280002;105;3
201703280003;105;5
201703280004;105;5
201703280005;105;4
201703280006;120;2... (2 Replies)
Discussion started by: wwolfking
2 Replies
LEARN ABOUT DEBIAN
log::report::dispatcher::file
Log::Report::Dispatcher::File(3pm) User Contributed Perl Documentation Log::Report::Dispatcher::File(3pm)NAME
Log::Report::Dispatcher::File - send messages to a file or file-handle
INHERITANCE
Log::Report::Dispatcher::File
is a Log::Report::Dispatcher
SYNOPSIS
dispatcher Log::Report::Dispatcher::File => 'stderr'
, to => *STDERR, accept => 'NOTICE-';
# close a dispatcher
dispatcher close => 'stderr';
# let dispatcher open and close the file
dispatcher FILE => 'mylog', to => '/var/log/mylog'
, charset => 'utf-8';
...
dispatcher close => 'mylog'; # will close file
# open yourself, then also close yourself
open OUT, ">:encoding('iso-8859-1')", '/var/log/mylog'
or fault "...";
dispatcher FILE => 'mylog', to => *OUT;
...
dispatcher close => 'mylog';
close OUT;
# dispatch into a scalar
my $output = '';
open $outfile, '>', $output;
dispatcher FILE => 'into-scalar', to => $outfile;
...
dispatcher close => 'into-scalar';
print $output;
DESCRIPTION
This basic file logger accepts an file-handle or filename as destination.
METHODS
Constructors
$obj->close
Only when initiated with a FILENAME, the file will be closed. In any other case, nothing will be done.
Log::Report::Dispatcher::File->new(TYPE, NAME, OPTIONS)
-Option--Defined in --Default
accept Log::Report::Dispatcher depend on mode
charset Log::Report::Dispatcher LOCALE
format_reason Log::Report::Dispatcher 'LOWERCASE'
locale Log::Report::Dispatcher <system locale>
mode Log::Report::Dispatcher 'NORMAL'
replace false
to <required>
accept => REASONS
charset => CHARSET
format_reason => 'UPPERCASE'|'LOWERCASE'|'UCFIRST'|'IGNORE'|CODE
locale => LOCALE
mode => 'NORMAL'|'VERBOSE'|'ASSERT'|'DEBUG'|0..3
replace => BOOLEAN
Only used in combination with a FILENAME: throw away the old file if it exists. Probably you wish to append to existing information.
Use the LOCALE setting by default, which is LC_CTYPE or LC_ALL or LANG (in that order). If these contain a character-set which Perl
understands, then that is used, otherwise silently ignored.
to => FILENAME|FILEHANDLE|OBJECT
You can either specify a FILENAME, which is opened in append mode with autoflush on. Or pass any kind of FILE-HANDLE or some OBJECT
which implements a "print()" method. You probably want to have autoflush enabled on your FILE-HANDLES.
When cleaning-up the dispatcher, the file will only be closed in case of a FILENAME.
Accessors
$obj->filename
Returns the name of the opened file, or "undef" in case this dispatcher was started from a file-handle or file-object.
$obj->isDisabled
See "Accessors" in Log::Report::Dispatcher
$obj->mode
See "Accessors" in Log::Report::Dispatcher
$obj->name
See "Accessors" in Log::Report::Dispatcher
$obj->needs
See "Accessors" in Log::Report::Dispatcher
$obj->type
See "Accessors" in Log::Report::Dispatcher
Logging
$obj->collectLocation
Log::Report::Dispatcher::File->collectLocation
See "Logging" in Log::Report::Dispatcher
$obj->collectStack([MAXDEPTH])
Log::Report::Dispatcher::File->collectStack([MAXDEPTH])
See "Logging" in Log::Report::Dispatcher
$obj->log(HASH-of-OPTIONS, REASON, MESSAGE)
See "Logging" in Log::Report::Dispatcher
$obj->stackTraceLine(OPTIONS)
Log::Report::Dispatcher::File->stackTraceLine(OPTIONS)
See "Logging" in Log::Report::Dispatcher
$obj->translate(HASH-of-OPTIONS, REASON, MESSAGE)
See "Logging" in Log::Report::Dispatcher
SEE ALSO
This module is part of Log-Report distribution version 0.94, built on August 23, 2011. Website: http://perl.overmeer.net/log-report/
LICENSE
Copyrights 2007-2011 by Mark Overmeer. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See
http://www.perl.com/perl/misc/Artistic.html
perl v5.14.2 2011-08-23 Log::Report::Dispatcher::File(3pm)