Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Seeting Logs in AIX

Posted on 2009-05-11
7
Medium Priority
?
1,871 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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…
Suggested Courses

704 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