Solved

Seeting Logs in AIX

Posted on 2009-05-11
7
1,798 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

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

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
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.

773 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