![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| quick script C shell | ajp7701 | Shell Programming and Scripting | 1 | 03-18-2008 04:31 PM |
| A little guidance needed :) | shadow0001 | Shell Programming and Scripting | 9 | 03-07-2008 02:16 PM |
| Quick help needed in the Shell Script | namishtiwari | Shell Programming and Scripting | 1 | 02-01-2008 09:44 AM |
| need a quick basic shell script help | eb222 | Shell Programming and Scripting | 6 | 11-22-2007 09:00 AM |
| IP Address changes - Quick Help Needed. | gingerd2003 | IP Networking | 4 | 02-22-2007 11:39 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Hi all,
I am trying to get the exception count daily from a log file which is more than 1 GB in size. I am using loops which get the count of the exception and transaction. But i need to take this exception count for a time frame from 5.00 am to 5:00 pm. I Think I can use to exact the error message in the loop. But i can use the sed to exact all the exception to a temp log then i can grep to that temp log which will speed up my script. like this sed -n s/: 5:/,/:17:/p exception.log >> temp/log -> i am not sure about the syntax i need to check this. ![]() Awaiting for your expertise on this issue. Also i want to search some of the exception like in a log file. For that i used to call the checker loop each and every time..Is that any method available where i can search and take the exact count for the the string. This is the method checker() { count=`grep -c "$2" $1` if [ $count -eq 0 ] then echo "There is no exception in the log file" >> mail.log echo $count else echo "There is $count exception happened" >> mail.log echo $count fi } I am calling like E1=`check "temp.log" "Suspend Exception"` E2=`check "temp.log" "DataException" ` . . total_exp= `echo "E1 + E2"|bc -l` echo " total no of expection $total_exp" this is a snipet from the script Regards, Senthil Kumar AK Last edited by senthilkumar_ak; 08-07-2008 at 01:12 PM.. |
|
||||
|
Worker#1364lchalegreenVST: 10:02:11 336 ViewStatementBusinessLogic.validateRequestStatementService is unable to fulfil a request
Worker#0522keynotescriptCP: 21:59:47 899 CardProfileServiceAggregatorForCycleCut.getCardProfileData Exit Worker#0522keynotescriptCP: 21:59:47 899 CardProfileServiceAggregatorForCycleCut.getCardProfileData Exit Worker#0522keynotescriptCP: 21:59:47 899 CardProfileBusinessLogic.getCardProfile Time taken to get cardprofile is :::: 4.96 secs Worker#0522keynotescriptCP: 21:59:47 900 CardProfileServiceBean.getCardProfile Exit |
|
||||
|
This looks identical to Please suggest some changes in my code
|
|
||||
|
Yes we are trying to reduce the time of script by some logic, but the result is not know yet
|
| Sponsored Links | ||
|
|