Solved

Seeting Logs in AIX

Posted on 2009-05-11
7
1,779 Views
Last Modified: 2013-11-17
Hello i would like to retain logs of 90 days in aix , please tell me how to do this and how to check the current no. of days are set on server

Thanks
0
Comment
Question by:prashantchauhan
  • 3
  • 2
  • 2
7 Comments
 
LVL 30

Assisted Solution

by:Kerem ERSOY
Kerem ERSOY earned 250 total points
ID: 24354451
Hi,

There's not a default tool in AIX to do that. There's a tool called logrotate. IT is available through Toolbox CD. It supports only V5.3 of AIX though.

Cheers,
K.


0
 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 250 total points
ID: 24354616
Hi,
which logs are you talking about?
There is, except for syslog and cron, no automatic log rotation facility in AIX.
- syslog: configuration is done in /etc/syslog.conf. Look for the keywords "rotate, size, time, files ...", where rotation based on time is configured by the "time" keyword. Specify a number and h(our), d(ay) or w(eek) following "time".
- cron: this is configured in /etc/cronlog.conf (only with AIX 5300-04 or higher, or AIX 6). Rotation based on time is not possible, it can be done based on size only.
For all the other logs governed by the OS you will need something like "logrotate"
Find logrotate here -
http://www.perzl.org/aix/index.php?n=Main.Logrotate
 
wmp
 
 
0
 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 250 total points
ID: 24354710
logrotate (as can be obtained e.g. from perzl.org) supports AIX levels starting with 4.2, afaik ...
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

Author Comment

by:prashantchauhan
ID: 24363385
Hello Please can u look at this and let me know how should i get this details from the server and would like to implemnet on all my aix server
retention-log.JPG
0
 
LVL 30

Accepted Solution

by:
Kerem ERSOY earned 250 total points
ID: 24363708
Hi,

IBM Syslog can not archive your wtmp nor your failedlogins. So you'll need logwatch to accomplish this. You can etiher use tour ToolBox CD (for AIX 5.3 and higher) or you can download it from here:
http://www.perzl.org/aix/index.php?n=Main.Logrotate
As some other experts told. (Use the command oslevel to see what version of os you are using)

Once you've downloaded it you need
coreutils
popt
libopt.a

Pagkages must be installed on your system. So you'll need your toolbox CD and OS CD's anyway.

You'll see WTMP is there. Notice the keywords monthls suggesting that it wil be rotated every 30 days and rotate 3 meaning that it will keep 3 older versions meaning that you'll have 3 monthly copies. a total of 90 days of retention will be there.

For the other files you need to go to /etc/logrotate.d and create a file called sulog. It should contain these lines:

/var/adm/sulog {
      create 0600 root system
      sharedscripts
}
   
and create another file called failedlogins under the same folder conatining::
/etc/security/failedlogins {
    create 0644 root system
   sharedscripts
}


I hope this helps.

Cheers,
K.



# see "man logrotate" for details

# rotate log files monthly

monthly
 

# keep 4 months worth of backlogs

rotate 4
 

# create new (empty) log files after rotating old ones

create
 

# uncomment this if you want your log files compressed

compress
 

# RPM packages drop log rotation information into this directory

include /etc/logrotate.d
 

# no packages own wtmp -- we'll rotate them here

/var/log/wtmp {

    monthly

    create 0664 root utmp

    rotate 3

}
 

# system-specific logs may be also be configured here.

Open in new window

0
 
LVL 68

Assisted Solution

by:woolmilkporc
woolmilkporc earned 250 total points
ID: 24364107
The required packages coreutils, popt, gettext, info are available here, too. No need for OS CDs or the toolbox CD.
http://www.perzl.org/aix/index.php?n=Main.HomePage
0
 

Author Closing Comment

by:prashantchauhan
ID: 31580140
many thanks
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now