07-10-2007
Dynamic time to append for every log info
Hi All,
What i am looking for:
i want to generate a dynamic system time for each and every data(line) which goes on generating data continously....
now i am using this script to append a time for dynamic data generation log file,
tail -f filename_error.log|awk -v var="$( date +%H":"%M":"%S" "%Y )" ' /parallel nursery GC/ || /GC/ { $0=$0 " " var } ; 1'
[INFO ][memory ] 7654.644: parallel nursery GC 1613483K->1441609K (2969600K), 58.004 ms 01:40:38 2007
[INFO ][memory ] 7672.245: parallel nursery GC 1636286K->1464021K (2969600K), 59.238 ms 01:40:38 2007
[INFO ][memory ] 7680.216: parallel nursery GC 1667206K->1494772K (2969600K), 58.330 ms 01:40:38 2007
[INFO ][memory ] 7691.249: parallel nursery GC 1691520K->1519101K (2969600K), 52.770 ms 01:40:38 2007
[INFO ][memory ] 7698.657: parallel nursery GC 1709864K->1537607K (2969600K), 52.452 ms 01:40:38 2007
[INFO ][memory ] 7705.461: parallel nursery GC 1760051K->1587293K (2969600K), 53.754 ms 01:40:38 2007
[INFO ][memory ] 7713.707:GC 1803076K->1630709K (2969600K), 52.372 ms 01:40:38 2007
[INFO ][memory ] 7705.461: parallel nursery GC 1760051K->1587293K (2969600K), 53.754 ms 01:40:38 2007
but i am looking for : a command that can generate the output as shown below .....
[INFO ][memory ] 7654.644: parallel nursery GC 1613483K->1441609K (2969600K), 58.004 ms 01:40:38 2007
[INFO ][memory ] 7672.245: parallel nursery GC 1636286K->1464021K (2969600K), 59.238 ms 01:40:45 2007
[INFO ][memory ] 7680.216: parallel nursery GC 1667206K->1494772K (2969600K), 58.330 ms 01:40:48 2007
[INFO ][memory ] 7691.249: parallel nursery GC 1691520K->1519101K (2969600K), 52.770 ms 01:40:52 2007
[INFO ][memory ] 7698.657: parallel nursery GC 1709864K->1537607K (2969600K), 52.452 ms 01:40:55 2007
[INFO ][memory ] 7705.461: parallel nursery GC 1760051K->1587293K (2969600K), 53.754 ms 01:40:59 2007
[INFO ][memory ] 7713.707:GC 1803076K->1630709K (2969600K), 52.372 ms 01:41:38 2007
[INFO ][memory ] 7705.461: parallel nursery GC 1760051K->1587293K (2969600K), 53.754 ms 01:41:42 2007
means the time should go on changing , i.e the output info as shown above should always append with a current system time ......
waiting for ur valuable suggestions.....eagerly
or
is there any another way to get the dynamic time generation to append for an dynamic data generation..................waiting for ur valuable suggestions........
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Where can i find info about the Time Service of UNIX ???
I need to "speak" with a machine which has UNIX os ( i know its IP address ) and to get from this machine its date or time.
I work with Cygwin on my machine.
any help will be welcomed .... (1 Reply)
Discussion started by: Inbal
1 Replies
2. UNIX for Advanced & Expert Users
Hi Guys,
the requirement is like this,
i am having a error log file in this format,
4594.493: parallel nursery GC 2594592K->2544691K (2969600K), 30.848 ms
4605.958: parallel nursery GC 2634887K->2584986K (2969600K), 38.900 ms
4619.079: parallel nursery GC 2822555K->2774812K... (12 Replies)
Discussion started by: gsprasanna
12 Replies
3. UNIX for Dummies Questions & Answers
Hi all,
here is a problem,
i am having a data in a file of this format,
cat filename|grep -ivn edc|tr -s ' ' +|cut -d+ f1,12
1 01:18:38 2007
25 01:43:38 2007
48 01:58:45 2007
71 02:11:02 2007
102 02:19:51 2007
and so on ........ ....... .
here... (4 Replies)
Discussion started by: gsp
4 Replies
4. Shell Programming and Scripting
Looking for a shell script or a simple perl script . I am new to scripting and not very good at it .
I have 2 directories . One of them holds a text file with list of files in it and the second one is a daily log which shows the file completion time. I need to co-relate both and make a report.
... (0 Replies)
Discussion started by: breez_drew
0 Replies
5. UNIX for Dummies Questions & Answers
Hi i just want to create a folder with current time.
For example.
foldername_09042010 How do i modify mkdir or write script to do this? (1 Reply)
Discussion started by: pinga123
1 Replies
6. Shell Programming and Scripting
Hi,
There are similar kind of posts, but none seems like working for me. Please correct me if I'm wrong.
I need append/rename file abc.txt with file processed date and time like abc_systemdatetimestamp.txt
and move it to different folder.
for example I have
/source/data/abc.txt
... (1 Reply)
Discussion started by: amsn08
1 Replies
7. Shell Programming and Scripting
I need to be able to take the results from ls -l command and modify the output as follows:
I will run
ls -l *.mak
My results will be
aa.mak
bb.mak
cc.mak
I then need to take those results and create a file that has the following info:
dsjj/ubin/aa
dsjj/ubin/bb
dsjj/ubin/cc
... (3 Replies)
Discussion started by: jclanc8
3 Replies
8. Emergency UNIX and Linux Support
hi,
i have some file names. my file names are as follows:
c_abc_new.txt.xls
c_def.txt.xls
i want to append date time stamp in the below manner.
c_abc_new_YYYYMMDD_HH24MISS.txt.xls
c_def_YYYYMMDD_HH24MISS.txt.xls
check the two input file names, they differ in naming. the 1st file name... (9 Replies)
Discussion started by: Little
9 Replies
9. Programming
I would like to compile a binary that doesnot depend on LD_LIBRARY_PATH as this binary will be setuid to owner and used by other users and since setuid doesnot support LD_LIBRARY_PATH making it independent of LD_LIBRARY_PATH would be great.
But I am not able to specify the path of the shared... (1 Reply)
Discussion started by: waavman
1 Replies
10. Shell Programming and Scripting
Hi
I have a system running uname -a
Linux cmovel-db01 2.6.32-38-server #83-Ubuntu SMP Wed Jan 4 11:26:59 UTC 2012 x86_64 GNU/Linux
I would like to capture the contents of /var/log/syslog from 11:00AM to 11:30AM and sent to this info via email.
I was thinking in set a cron entry at that... (2 Replies)
Discussion started by: fretagi
2 Replies
LEARN ABOUT REDHAT
sgeequ
SGEEQU(l) ) SGEEQU(l)
NAME
SGEEQU - compute row and column scalings intended to equilibrate an M-by-N matrix A and reduce its condition number
SYNOPSIS
SUBROUTINE SGEEQU( M, N, A, LDA, R, C, ROWCND, COLCND, AMAX, INFO )
INTEGER INFO, LDA, M, N
REAL AMAX, COLCND, ROWCND
REAL A( LDA, * ), C( * ), R( * )
PURPOSE
SGEEQU computes row and column scalings intended to equilibrate an M-by-N matrix A and reduce its condition number. R returns the row scale
factors and C the column scale factors, chosen to try to make the largest element in each row and column of the matrix B with elements
B(i,j)=R(i)*A(i,j)*C(j) have absolute value 1.
R(i) and C(j) are restricted to be between SMLNUM = smallest safe number and BIGNUM = largest safe number. Use of these scaling factors is
not guaranteed to reduce the condition number of A but works well in practice.
ARGUMENTS
M (input) INTEGER
The number of rows of the matrix A. M >= 0.
N (input) INTEGER
The number of columns of the matrix A. N >= 0.
A (input) REAL array, dimension (LDA,N)
The M-by-N matrix whose equilibration factors are to be computed.
LDA (input) INTEGER
The leading dimension of the array A. LDA >= max(1,M).
R (output) REAL array, dimension (M)
If INFO = 0 or INFO > M, R contains the row scale factors for A.
C (output) REAL array, dimension (N)
If INFO = 0, C contains the column scale factors for A.
ROWCND (output) REAL
If INFO = 0 or INFO > M, ROWCND contains the ratio of the smallest R(i) to the largest R(i). If ROWCND >= 0.1 and AMAX is neither
too large nor too small, it is not worth scaling by R.
COLCND (output) REAL
If INFO = 0, COLCND contains the ratio of the smallest C(i) to the largest C(i). If COLCND >= 0.1, it is not worth scaling by C.
AMAX (output) REAL
Absolute value of largest matrix element. If AMAX is very close to overflow or very close to underflow, the matrix should be
scaled.
INFO (output) INTEGER
= 0: successful exit
< 0: if INFO = -i, the i-th argument had an illegal value
> 0: if INFO = i, and i is
<= M: the i-th row of A is exactly zero
> M: the (i-M)-th column of A is exactly zero
LAPACK version 3.0 15 June 2000 SGEEQU(l)