11-04-2008
Hi zaxxon,
thanks for your reply.
Right now i am using following funtion for yesterday date:
today=`date +%Y%m%d`
yesterday=`expr $today - 1`
echo $yesterday
20081103
The output is comming in YYYYMMDD format.So my problem is that i m not able to convert this format in "Tue Nov 04 11:27:30 MET 2008" which is mentioned in log file.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
We use an application that is dumping logs to a file on disk. However, this is dumping very verbosely and there is no method of turning down the logging level. We need to remove certain contents from these before they are commited to disk.
Has anybody got any ideas how I can do this... (3 Replies)
Discussion started by: harperonline
3 Replies
2. Shell Programming and Scripting
I want to find the unique url in a apache logs which got 404 error .
I can do something like
"cat apache.log|grep 404|awk '{print $2,$3}'|grep 404
this will give me say
/foo.html 404
/foo.html 404
/foo.html 404
/bar.html 404
/cat.html 404
However my output should only find... (3 Replies)
Discussion started by: gubbu
3 Replies
3. Shell Programming and Scripting
Hi,
could anyone help me out how to write a script, to grep the two timestamp from a particular file, so that it will list out all the logs between the particular timestamp
I have a pattern of log:
servicename operationname starttime endtime
eg.,
servicename1 operationname1 01:11:11... (1 Reply)
Discussion started by: jacktolearn
1 Replies
4. Shell Programming and Scripting
Hi All,
The developers want me to search and capture the weblogic log, you know this big logs of htmls.
They want to me to have ranges on the date and time. Like
from "2010-01-20 14:04:46,186" to "2010-01-20 15:00:12,490"
I can only do this,
cat /usr/local/bea/logs_prod1/debug.log |... (1 Reply)
Discussion started by: itik
1 Replies
5. Linux
Hi All,
The developers want me to search and capture the weblogic log, you know this big logs of htmls.
They want to me to have ranges on the date and time. Like
from "2010-01-20 14:04:46,186" to "2010-01-20 15:00:12,490"
I can only do this,
cat /usr/local/bea/logs_prod1/debug.log... (1 Reply)
Discussion started by: itik
1 Replies
6. Shell Programming and Scripting
I have prepare script to grep for outofmemory messages in the logs. I need help in modifying script. I have implemented small logic. The outofmemory messages form six logs will store in variables.
var1=`grep -i outofmemory $tomcat1logs | sed -n '$p'| sed -n -e "s/.*\(outofmemory\).*/\1/p"`... (6 Replies)
Discussion started by: coolguyamy
6 Replies
7. UNIX for Dummies Questions & Answers
Hello all. I am new to this forum and also very new to using grep - so please excuse me if this question is not in the correct forum and/or is not pertinent to this website.
I use greps like this:
gunzip -c L:\System1\SailLogger_20071019* L:\System2\SailLogger_20071019*... (14 Replies)
Discussion started by: Carl2013
14 Replies
8. Shell Programming and Scripting
Hi Guys,
I want to write a script which can grep the logs (server.log) from a file for Error String and output to a other file.
Problems:
How to know about the errors only between the current restart and not in previous as server.log has earlier restarts also?
thanks for the help! Much... (5 Replies)
Discussion started by: ankur328
5 Replies
9. Shell Programming and Scripting
Appreciate help for the below issue.
Im using below code.....I dont want to attach the logs when I ran the perl twice...I just want to take backup with today date and generate new logs...What I need to do for the below scirpt..............
1)if logs exist it should move the logs with extention... (1 Reply)
Discussion started by: Sanjeev G
1 Replies
10. UNIX for Beginners Questions & Answers
Hi,
system date format
Thu Jun 13 12:55:18 EDT 2019
My log date format
09.148.192.60 - - "GET /akamai/sureroute-test-object.html HTTP/1.1" 404 231
can someone please help me, how to get last 5mins of logs please ? I need the command
Please wrap your samples/codes in CODE TAGS,... (3 Replies)
Discussion started by: scazed
3 Replies
LEARN ABOUT SUSE
accounting
ACCOUNTING(1) SMPPPD ACCOUNTING(1)
NAME
accounting - calculates statistics about your internet connections
DESCRIPTION
accounting is a simple program to calculate statistics about your internet dial-up connections that are started and stopped by either ifup
and ifdown or by a frontend to smpppd like cinternet , qinternet or kinternet.
OPTIONS
These options are recognized by accounting. If a long option shows an argument as mandatory, then it is mandatory for the equivalent short
option also.
-l, --last=NUM
Only consider the last NUM connections.
-a, --after=DATE
Only consider connections started after DATE. DATE is a date with optional time in ISO 8601 format, e.g. `2002-12-24 20:15:00'.
Note that a date without time is treated as if the time is 00:00:00. Hence connections started on the specified date are consid-
ered.
-b, --before=DATE
Only consider connections started before DATE.
-u, --user=USER
Only consider connections started by user USER.
--this-year
Only consider connections started this year.
--last-year
Only consider connections started last year.
--this-month
Only consider connections started this month.
--last-month
Only consider connections started last month.
--this-week
Only consider connections started this week.
--last-week
Only consider connections started last week.
--today
Only consider connections started today.
--yesterday
Only consider connections started yesterday.
--per-year
Show summaries on a per year basis.
--per-month
Show summaries on a per month basis.
--per-week
Show summaries on a per week basis.
--per-day
Show summaries on a per day basis.
-c, --connections
Only list the connections but do not show provider statistics.
-p, --providers
Do not list the connections only show the provider statistics.
--connection-format=FORMAT
The names of the columns to print in the connection list. The names must be separated by a comma. Known column names are time,
type, provider, user, status, duration, rx, tx, rxtx, averx, avetx and averxtx. Each name may be appended by a colon and a number
indicating the width for the column, e.g. provider:25. The value will not be truncated if the width is too small.
--provider-format=FORMAT
The names of the columns to print in the provider list equivalent to the --connection-format option. Known column names are
provider, number, duration, rx, tx, rxtx, aveduration, averx, avetx and averxtx.
--local
Display all dates in local time. Also interpret dates on the command line in local time. This is the default.
--utc Display all dates in UTC. Also interpret dates on the command line in UTC.
--script[=STYLE]
Format output for script. Known styles are c and sh.
-f, --file=NAME
Use a different file with accounting information.
--report-errors
Report erros in the accounting file.
--version
Show program version and exit.
--help Show help information and exit.
NOTES
All informations are only obtained through the accounting log. Hence the informations, esp. the data volume, of currently active connec-
tions is not accurate. If you want the know the status of a connection, use ifstatus or a frontend to smpppd like cinternet , qinternet or
kinternet instead.
The user field is empty for connections started by a remote frontend of smpppd.
BUGS
Not yet implemented for ISDN (ippp).
FILES
/var/log/smpppd/accounting.log
File containing accounting information.
SEE ALSO
kinternet, qinternet, cinternet(1), smpppd(8), smpppd-ifcfg(8).
AUTHOR
Arvin Schnell <arvin@suse.de>
SuSE December 2002 ACCOUNTING(1)