09-10-2009
pattern search for multiple log files and counting
I have 10 appservers and each appserver has 4 jvms . Each of these logs is archived and stored on a nfs directory . For example the files are
/logs/200907/ap1-jvm1.server.log.20090715.gz
/logs/200907/ap2-jvm2.server.log.20090714.gz
/logs/200908/ap1-jvm1.server.log.20090812.gz
I want to search for say some pattern from these files from say august 15th to sept 15th and give me a count of that pattern .For example I want a daily count from aug15-sept 15 for app server and jvm for pattern "Exception" from the log . It should look like
-----
Aug 15
3434
Aug 16
2323
....
....
Sept10
5656
thanks
Gubbs
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have 20 files in a direcotry like BARE01_DLY_MKT_YYYYMMDD. The MKT differes for all these files but the remaining syntax remains the same for a particular day. If I am checking for today I need to make sure that there are 20 files that start with BARE01_DLY_MKT_20060720. How can I write a... (31 Replies)
Discussion started by: dsravan
31 Replies
2. UNIX for Dummies Questions & Answers
I need to count the number of files which have a search string, but counting the file only once
if search string is found.
eg: File1: Please note that there are 2 occurances of "aaa"
aaa
bbb
ccc
aaa
File2: Please note that there are 3 occurances of "aaa"
aaa
bbb
ccc... (1 Reply)
Discussion started by: sudheshnaiyer
1 Replies
3. Shell Programming and Scripting
Hi,
I have couple of .txt files (say 50 files) in a folder.
For each file:
I need to get the number of lines in each file and then that count -1 (I wanted to exclude the header.
Then sum the counts of all files and output the total sum.
Is there an efficient way to do this using shell... (7 Replies)
Discussion started by: Lucky Ali
7 Replies
4. Shell Programming and Scripting
In a directory, I have 5000 multiple files that contains around 4000 rows with 10 columns in each file containing a unique string 'AT' located at 4th column.
OM 3328 O BT 268 5.800 7.500 4.700 0.000 1.400
OM 3329 O BT 723 8.500 8.900... (7 Replies)
Discussion started by: asanjuan
7 Replies
5. Shell Programming and Scripting
Hey Unix gurus,
I would like to count the number occurrences of all the words (regardless of case) across multiple files, preferably outputting them in descending order of occurrence. This is well beyond my paltry shell scripting ability.
Researching, I can find many scripts/commands that... (4 Replies)
Discussion started by: twjolson
4 Replies
6. Shell Programming and Scripting
Hello :)
I have this file
cat employee_list
Name : jack
Gender: m
ID : 4512
DOB : 03/27/1980
hire date : 04/23/2012
Nationality: US
marital status : single
=====================
Name : mick
Gender: m
ID : 1256
DOB : 03/27/1970
Hire date : 012/10/2011
Nationality: US
Marital... (4 Replies)
Discussion started by: Sara_84
4 Replies
7. Shell Programming and Scripting
Want to fetch a column with multiple pattern using awk.
How to achieve the same.
Tried
cat test
address : 10.63.20.92/24
address : 10.64.22.93/24
address : 10.53.40.91/24
cat test | awk '{print $3}' |awk -F "/" '{print $1}'
10.63.20.92
10.64.22.93
10.53.40.91
Is there any... (2 Replies)
Discussion started by: Manasa Pradeep
2 Replies
8. Linux
I am working on AIX operating system.
I want to search list of Article Id for given Set Date (which are present in a seperate file input.txt)
art_list.csv
------------
"Article ID" |"Ad Description" |"Pyramid"|"Pyramid Desc "|"ProductTypeId"|"Set Date "|... (3 Replies)
Discussion started by: rajivrsk
3 Replies
9. Shell Programming and Scripting
I have a sample file with following output:
HTTP/1.1 200 OK
User: admin
Set-Cookie: AMBARISESSIONID=y3v3648yqcno32nq478kw7ar;Path=/;HttpOnly
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Content-Type: text/plain
Vary: Accept-Encoding, User-Agent
Content-Length: 6057
Server:... (4 Replies)
Discussion started by: saurau
4 Replies
10. Shell Programming and Scripting
#!/usr/bin/ksh
a="Run successfully"
cd $APPS
ls -l *.txt | while read $txt
do
if then
cp $APPS/$txt cp $hist/$txt
else
rm $APPS/$txt
echo "Files has been removed"
fi
done
New in shell script please help me out
Around 100 txt files in $APPS dir i want to search pattern from... (8 Replies)
Discussion started by: Kalia
8 Replies
LEARN ABOUT DEBIAN
scanlogs
SCANLOGS(8) System Manager's Manual SCANLOGS(8)
NAME
scanlogs - summarize INN log files.
SYNOPSIS
scanlogs [ norotate ] [ nonn ]
DESCRIPTION
Scanlogs summarizes the information recorded in the INN log files (see newslog(5)). By default, it also rotates and cleans out the logs.
It is normally invoked by the news.daily(8) script.
KEYWORDS
The following keywords are accepted:
norotate
Using this keyword disables the rotating and cleaning aspect of the log processing: the logs files are only scanned for information
and no contents are altered.
nonn Normally the nn log file is scanned and rotated. Using this keyword disables this function.
If scanlogs is invoked more than once a day, the ``norotate'' keyword should be used to prevent premature log cleaning.
HISTORY
Written by Landon Curt Noll <chongo@toad.com> and Rich $alz <rsalz@uunet.uu.net> for InterNetNews. This is revision 1.1, dated 1996/10/29.
SEE ALSO
innd(8) newslog(5), news.daily(8), nnrpd(8).
SCANLOGS(8)