Fedora 11 has different date format from logfiles compared to FC 6-10


 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Fedora 11 has different date format from logfiles compared to FC 6-10
# 1  
Old 01-25-2010
Fedora 11 has different date format from logfiles compared to FC 6-10

Hi Gurus,

Is there a way to tweak the date format in /var/log/secure (Fedora 11) so that it will have the same date format as in Fedora ver. 6-10.

For Fedora 11:
Code:
2010-01-24T07:32:03.767801+09:00 jump sshd[31647]: Failed password for root from 189.1.164.92 port 47662 ssh2
2010-01-24T07:32:08.391785+09:00 jump sshd[31649]: Failed password for root from 189.1.164.92 port 48117 ssh2
2010-01-24T07:32:13.156278+09:00 jump sshd[31651]: Failed password for root from 189.1.164.92 port 48486 ssh2
2010-01-24T07:32:18.081482+09:00 jump sshd[31653]: Failed password for root from 189.1.164.92 port 48781 ssh2

For Fedora 6-10:
Code:
Jan 24 04:39:36 kickstart CROND[17538]: pam_unix(crond:session): session closed for user munin
Jan 24 04:40:01 kickstart crond[28413]: pam_succeed_if(crond:account): requirement "uid < 100" was met by user "root"
Jan 24 04:40:01 kickstart crond[28413]: pam_unix(crond:session): session opened for user root by (uid=0)
Jan 24 04:40:06 kickstart crond[28414]: pam_succeed_if(crond:account): requirement "uid < 100" not met by user "munin"
Jan 24 04:40:06 kickstart CROND[28413]: pam_unix(crond:session): session closed for user root

# 2  
Old 01-25-2010
I am on Fedora 12 and it still uses the same date format as Fedora 10 and earlier releases.

Check that the /etc/rsyslogd.conf is set to use RSYSLOG_TraditionalFileFormat, i.e
Code:
$ActionFileDefaulttemplate RSYSLOG_TraditionalFileFormat

# 3  
Old 01-26-2010
Hi fpmurphy,

Thanks for the insight.. It also needs to update the rsyslog package to from 3.21 to 3.22 and adding the lines you have mentioned.

Thanks..this forum helps me a lot.
# 4  
Old 02-09-2010
After upgrading the rsyslog package to 3.22 and adding the line in /etc/rsyslog.conf

$ActionFileDefaulttemplate RSYSLOG_TraditionalFileFormat

still doesnt work in our production system using this kernel:
Code:
[root@jump ~]# uname -a 
Linux jump.valuecommerce.com 2.6.29.5-191.fc11.i686.PAE #1 SMP Tue Jun 16 23:19:53 EDT 2009 i686 i686 i386 GNU/Linux

[root@adminj ~]# uname -a
Linux adminj 2.6.30.5-43.fc11.x86_64 #1 SMP Thu Aug 27 21:39:52 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux

here is the logs from /var/log/messages:

Code:
Feb  9 14:58:09 adminj rsyslogd: WARNING: rsyslogd is running in compatibility mode. Automatically generated config directives may interfer with your rsyslog.conf settings. We suggest upgrading your config and adding -c3 as the first rsyslogd option.
Feb  9 14:58:09 adminj rsyslogd: Warning: backward compatibility layer added to following directive to rsyslog.conf: ModLoad imuxsock


---------- Post updated at 02:33 PM ---------- Previous update was at 01:57 PM ----------

Sorry, i already figured it out. it is now working.

Thanks.

Last edited by Scott; 02-09-2010 at 03:20 AM.. Reason: Please use code tags
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Date: invalid date trying to set Linux date in specific format

i try to set linux date & time in specific format but it keep giving me error Example : date "+%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01" or date +"%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01" keep giving me this error : date: invalid date ‘19-01-2017 00:05:01' Please use CODE tags... (7 Replies)
Discussion started by: umen
7 Replies

2. UNIX for Dummies Questions & Answers

Rename all Files in a UNIX Directory from one date format to another date format

Hi Unix Gurus, I would like to rename several files in a Unix Directory . The filenames can have more than 1 underscore ( _ ) and the last underscore is always followed by a date in the format mmddyyyy. The Extension of the files can be .txt or .pdf or .xls etc and is case insensitive ie... (1 Reply)
Discussion started by: pchegoor
1 Replies

3. Shell Programming and Scripting

finding date numeral from file and check the validity of date format

hi there I have file names in different format as below triss_20111117_fxcb.csv triss_fxcb_20111117.csv xpnl_hypo_reu_miplvdone_11172011.csv xpnl_hypo_reu_miplvdone_11-17-2011.csv xpnl_hypo_reu_miplvdone_20111117.csv xpnl_hypo_reu_miplvdone_20111117xfb.csv... (10 Replies)
Discussion started by: manas_ranjan
10 Replies

4. UNIX for Dummies Questions & Answers

Shell Scripts - shows today’s date and time in a better format than ‘date’ (Uses positional paramete

Hello, I am trying to show today's date and time in a better format than ‘date' (Using positional parameters). I found a command mktime and am wondering if this is the best command to use or will this also show me the time elapse since 1/30/70? Any help would be greatly appreciated, Thanks... (3 Replies)
Discussion started by: citizencro
3 Replies

5. Shell Programming and Scripting

How to increment a user defined date value in the DATE format itself using shell script?

I need to increment a date value through shell script. Input value consist of start date and end date in DATE format of unix. For eg. I need increment a date value of 1/1/09 to 31/12/09 i.e for a whole yr. The output must look like 1/1/09 2/2/09 . . . 31/1/09 . . 1/2/09 . 28/2/09... (1 Reply)
Discussion started by: sunil087
1 Replies

6. UNIX for Dummies Questions & Answers

Changing from Excel date format to MySQL date format

I have a list of dates in the following format: mm/dd/yyyy and want to change these to the MySQL standard format: yyyy-mm-dd. The dates in the original file may or may not be zero padded, so April is sometimes "04" and other times simply "4". This is what I use to change the format: sed -i '' -e... (2 Replies)
Discussion started by: figaro
2 Replies

7. Shell Programming and Scripting

convert date format to mysql date format in log file

I have a comma delimited log file which has the date as MM/DD/YY in the 2nd column, and HH:MM:SS in the 3rd column. I need to change the date format to YYYY-MM-DD and merge it with the the time HH:MM:SS. How will I got about this? Sample input 02/27/09,23:52:31 02/27/09,23:52:52... (3 Replies)
Discussion started by: hazno
3 Replies

8. Shell Programming and Scripting

split monthly logfiles into daily logfiles

Hi, I have a lot of logfiles like fooYYYYMM.log (foo200301.log, foo200810.log) with lines like YYYY-MM-DD TIMESTAMP,text1,text2,text3... but I need (for postprocessing) the form fooYYYYMMDD.log (so foo200402.log becomes foo20040201.log, foo20040202.log...) with unmodified content of lines. ... (1 Reply)
Discussion started by: clzupp
1 Replies

9. UNIX for Advanced & Expert Users

date issue-find prevoius date in a patricular format

Hi , I have written a shell script that takes the current date on the server and stores it in a file. echo get /usr/home/data-`date '+%Y%d'`.xml> /usr/local/sandeep/GetFILE.ini I call this GetFILE.ini file from an sftp program to fetch a file from /usr/home/ as location. The file is in... (3 Replies)
Discussion started by: bsandeep_80
3 Replies

10. Shell Programming and Scripting

convert mmddyy date format to ccyyddd format??

hi, for reading a cobol indexed file i need to convert "mmddyy" date format to "ccyyddd" format. i checked the datecalc and other scripts but couldnt modify them to cater to my need:(... The datecalc gives an output which i believe is the total days till that date, but i want to convert it... (2 Replies)
Discussion started by: Bhups
2 Replies
Login or Register to Ask a Question