Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Seeting Logs in AIX

Posted on 2009-05-11
7
Medium Priority
?
1,883 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 1000 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 1000 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 1000 total points
ID: 24354710
logrotate (as can be obtained e.g. from perzl.org) supports AIX levels starting with 4.2, afaik ...
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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 1000 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 1000 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
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…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses
Course of the Month13 days, 12 hours left to enroll

963 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