Sponsored Content
Operating Systems AIX When AIX audit start, How to set the /audit/stream.out file size ? Post 302585992 by admin_xor on Friday 30th of December 2011 12:18:36 AM
Old 12-30-2011
Why don't you write a script which will monitor the file size of stream.out and if it becomes close to 150MB, the script will make a backup copy of it before the audit subsystem over writes the file?

You may place this in your crontab for executing it in every 30 minutes or so:

Code:
#!/bin/ksh

size=$( /usr/bin/du -k /audit/stream.out | /bin/awk {print $1} )

# I'm considering the threshold size to be 148MB; you may increase the
# frequency of the cron job while increasing the threshold size.

if [ $size -ge 151552 ]; then
   cp /audit/stream.out /audit/stream.out.`date +"%F-%H-%M-%S"`
fi

exit 0

 

9 More Discussions You Might Find Interesting

1. Red Hat

server audit

Hi all.. I need to perform an audit on my servers (ranging form mdk to redhat, knoppix...). I know there exists somewhere a script that could get me back the info i want.. I've googled around, and haven't found anything interesting.. Anyone have some thing i could investigate? Thanx ... (5 Replies)
Discussion started by: penguin-friend
5 Replies

2. Cybersecurity

Enabling C2 audit

hey guys, im going to enable C2 auditing on a sun box, i know how to do it, but im just wondering if there are any issues or problems that i may run into. this will be my first major change (since i have to reset the box) since i joined this company and i dont really wanna kill their servers, so... (2 Replies)
Discussion started by: roguekitton
2 Replies

3. AIX

AIX audit users activity

Is there a tool or application the will audit users activity? I've tryed to use audit the comes with AIX but to gathers so much information it is near impossible to see what they are doing. I just want to monitor logins and and files they create or change. (9 Replies)
Discussion started by: daveisme
9 Replies

4. AIX

Need to audit LV's - need some command help

I need to run a DC wide audit of some oracle filesystems to ensure their all on SAN. In linux its pretty easy since its LVM device structure includes the VG for which that lv is part of (/dev/VGFOO/lv-bar). As such I can just run mount and do some greping to get the needed info. SO my question... (2 Replies)
Discussion started by: Mattchewie
2 Replies

5. AIX

audit.log file rotation

Hi guys, I've googled this quite a bit, and tried searching on these forums, but haven't found a solution to my problem. I wanted to inquire about AIX's audit subsystem - more specifically, how to rotate its log file. So far I've been able to find how to rotate AIX syslog log files, and I... (2 Replies)
Discussion started by: w1r3d
2 Replies

6. AIX

Aix 5.3 Audit issue - not orking properly

Hello Friends, I had enabled the audit and configured for sysadmin user alone in audit config file. but the audit starts logging for root user alone. Attached the conf file. I want the aduit to record only for sysadmin activities.. need your expertise and help in solving the issue. (1 Reply)
Discussion started by: kmvinay
1 Replies

7. Solaris

Is it possible to audit a specific folder or file in Solaris ?

Hi, I wish to audit access to a specific folder or file in Solaris. I have read the man pages for auditd, audit_control , audit_event but don't seem to find any clue. Has anyone tried this before ? Is it feasible ? Any advise is appreciated. Thanks Yik (5 Replies)
Discussion started by: ycheng08
5 Replies

8. UNIX for Dummies Questions & Answers

Audit Flat File - # of Columns / Rows

We receive a file which usually has 40 to 50 million rows. I want to set up an audit process by which everytime we receive a file we audit it for # of rows and total number of columns. So if the # of rows is around 1 million on a particular day, I want to raise a flag or send an email....and if... (3 Replies)
Discussion started by: priya33184
3 Replies

9. Solaris

how to configure a audit in global zone that will audit all the zone

Hi everyone, how i can configure a single audit service in the global zone for all zones, on solaris BSM. I will be glad to hear back from you. Thanks and Regards (3 Replies)
Discussion started by: ladondo
3 Replies
audomon(1M)															       audomon(1M)

NAME
audomon - audit overflow monitor daemon SYNOPSIS
fss] sp_freq] warning] output] string] DESCRIPTION
monitors the capacity of the current audit trail and the file system on which the audit trail is located. prints out warning messages when either capacity is approaching full. also checks the audit trail and the file system against two switch points: FileSpaceSwitch (FSS) and AuditFileSwitch (AFS). If either switch point is reached, audit recording automatically switches to an alternative audit trail. also takes action at the switch point if there is a task specified with the option. The FileSpaceSwitch (FSS) is specified as a percentage of the total disk space available. When the file system reaches this percentage, looks for a backup audit trail. If the backup audit trail is available, recording is switched from the audit trail to the backup trail. If the backup audit trail is not available, then the auditing system creates a new audit trail with the same base name but a different timestamp extension. The auditing system begins recording to the new audit trail. The AuditFileSwitch (AFS) is specified (using by the size of the audit trail. When the audit trail reaches the specified size, looks for a backup audit trail. If a backup audit trail is available, recording is switched from the audit trail to the backup trail (see audsys(1M) for more information). If a backup audit trail is not available, then the auditing system creates a new audit trail with the same base name but a different timestamp extension. The auditing system begins recording to the new audit trail. issues a warning message, when either switch point is approached. is typically spawned by (as part of the start-up process) when the system is booted up if the parameter AUDITING is set to 1 in file can also be started any time by a privileged user. Once invoked, monitors, periodically sleeping and "waking up" at intervals. Note that does not produce any messages when the audit system is disabled. is restricted to privileged users. Options recognizes the following options: Specify the file or tty to which warning messages are directed. By default, warning messages are sent to the console. Note that the warning messages apply to the diagnostic messages that generates messages concerning the status of the audit system, as well as the messages that the scheduled task (see below) may print out to the standard output and error file. Error messages caused by wrong usage of are sent to the standard output (where is invoked). Note: The file given to the option must exist and must be writable by the user who started (normally root during system startup) according to the system call. See access(2). Specify the FileSpaceSwitch by a number ranging from 0 to 100. When the file system that contains the current audit trail has less than fss percent free space remaining, looks for a backup audit trail. If available, the backup trail is designated as the new audit trail. If no backup trail is available, the auditing system creates a new audit trail with the same base name but a different timestamp extension and begins recording to it. The fss parameter must be a larger number than the min_free parameter of the file system to ensure that the switch takes place before min_free is reached. By default, fss is 20 percent. Specify the wake-up switch-point frequency in minutes. The wake-up frequency is calculated based on sp_freq and the current capacity of the audit trail and the file system. The calculated wake-up frequency at any time before the switch points is larger than sp_freq. As the size of the audit trail or the file system's free space approaches the switch points, the wake-up frequency approaches sp_freq. sp_freq can be any positive real number. The default sp_freq is 1 (minute). Specify that warning messages be sent before the switch points. warning is an integer ranging from 0 through 100. The higher the warning, the closer to the switch points warning messages are issued. For example, warning set to 50 causes warning messages to be sent half-way before the switch points are reached. warning set to 100 causes warning messages to be sent only after the designated switch points are reached and a switch is not possible due to a missing backup trail. By default, warning is 90. Note: The warning message is not sent if the audit trail size grows beyond the switch points in between two consecutive audomon wakeup intervals. In this case, only performs the switch to next audit trail. Make more verbose. This option causes to also print out the next wake-up time. Specify a command line to run after a successful audit trail switch. When the trail is switched from, for example, OldTrail to NewTrail, runs the command: The command string must be specified as an absolute path. Any shell meta-characters and wildcards are expanded by but are expanded by the shell. The command is executed with a real uid and effective uid of 0 in a non-chrooted environment. The command must make minimal assumptions about the environment. For example, the command needs to set environment variables such as its working directory, and its groups. Note: To use this feature, do not explicitly specify the next audit trail using audsys(1M)). EXAMPLES
Example 1: The above command starts the daemon with the following expected behaviors, assuming auditing system was started using o sleeps at least 1 minute at intervals. o When the size of current audit trail reaches 1000 * 90% = 900 kbytes, or the file system that contains the current audit trail has reached (100%-20%) * 90% = 72% full, starts printing out warning messages to the console. o When the size of current audit trail reaches 1000 kbytes, or the file system that contains the current audit trail has reached 100% - 20% = 80% full, switches recording data to: where yyyymmdd_HHMM is replaced by the time when the switch has happened. o After the switch succeeded, invokes the following command: to copy to a remote system assuming that is what the given script intends to do. Example 2: To stop daemon that is already running, use: WARNINGS
All modifications made to the audit system are lost upon reboot. To make the changes permanent, set in AUTHOR
was developed by HP. SEE ALSO
audsys(1M), audit(5). audomon(1M)
All times are GMT -4. The time now is 06:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy