Thursday 4 October 2012

/USR FULL IN AIX:


/USR Full In Aix:

# df –g’ ‘df –k’, find out the highly utilized filesystem.

1. move failedlogins into utmp file
Ex: mv /etc/security/failedlogin /etc/utmp

2. find which file and which directory using more space
. To list the files which are over 6 months old:

/usr/bin/find /var -type f \( -name "*.gz" -o -name "*.Z" \) -mtime +186 -exec ls -l {} ';' -exec rm -f {} ';'
Ex:
-rw-r--r--    1 root     system        63079 Jun 27 2007  /var/adm/ras/install_all_updates.log.Z
-rw-r-----    1 root     system     14764428 Dec  1 2009  /var/log/ARCH/failedlogin.0.gz
-rw-r-----    1 root     system        45452 Sep 30 2010  /var/log/ARCH/failedlogin.10.Z
-rw-r-----    1 root     system        32859 Aug 31 2010  /var/log/ARCH/failedlogin.11.Z

3.check the recent application filesets.

#lslpp -h

Ex:

 bos.txt.tfs.data
                  5.3.0.0   APPLY      COMPLETE     12/27/07     14:15:38

  devices.common.IBM.modemcfg.data
                  5.3.0.0   COMMIT       COMPLETE     12/27/07     14:13:44
 bos.txt.spell.data
                  5.3.0.0   COMMIT       COMPLETE     12/27/07     14:15:38

Note:  change apply to commit by using installp -c file setname

           installp -c bos.txt.tfs.data
                     (or)
         installp -Cgx all (it will commit all the file sets)

4. If require increse the file system size.

Ex : #chfs -a size=+1G /usr


/TMP FULL IN AIX



/TMP Full In Aix:


1.  #‘df –g’ ‘df –k’, find out the highly utilized filesystem.

2. Check for the sizes and accordingly cleanup following files:

/tmp – application files; software dumps; logs

3.  #du -max /tmp | sort -nr | head -10

Ex:
196.18  /tmp
64.75   /tmp/Mystic_db2look_dw02.ddl
39.26   /tmp/db2diag.log
26.38   /tmp/e-admin.cache

4. find which file and which directory using more space
    To list the files which are over 6 months old:

/usr/bin/find /tmp -type f \( -name "*.gz" -o -name "*.Z" \) -mtime +186 -exec ls -l {} ';' -exec rm -f {} ';'

Ex:

-rwxr-x---    1 patrol   system       964172 Apr  9 2009  /tmp/2/emcgrab/tools/bin/inq.aix32_51.Z
-rwxr-x---    1 patrol   system       611359 Jan 17 2006  /tmp/2/emcgrab/tools/bin/inq.aix43.Z
-rwxr-x---    1 patrol   system       642331 Jan 17 2006  /tmp/2/emcgrab/tools/bin/inq.aix64_43.Z

5.remove snap file
Ex: # snap -r

it will remove the file from /tmp/ibmsupt

6.If reqires increse the file systemsize

Ex: chfs -a size=+1G /tmp

/VAR FULL IN AIX


/VAR Full In Aix:


#‘df –g’ ‘df –k’, find out the highly utilized filesystem.

1. Check for the sizes and accordingly cleanup following files:

 #   find /var -xdev -size +2048 -ls| sort -r +6

    /var :

     /var/spool/mail/*
     /var/adm/cron/log
     /var/tmp/*
     /var/adm/messages
    /var/adm/syslog
     /var/adm/wtmp
     /var/preserve/*
     /var/spool/mqueue/* .

2.  any old files we will gip.
    Ex: #gzip file_name

3.    If reqires increse the file system size .

Ex:   #chfs -a size=+1G /var

4.   Check whether the trcfile file in this directory is large. If it is large and a trace is not currently being
run, you can remove the file using the following command:
#rm /var/adm/ras/trcfile
 #rm  /var/adam/ras/vmcore10
5.Check the /var/spool directory, which contains the queueing subsystem files. Clear the queueing
subsystem using the following commands:
#stopsrc -s qdaemon
#rm /var/spool/lpd/qdir/*
#rm /var/spool/lpd/stat/*
#rm /var/spool/qdaemon/*
#startsrc -s qdaemon

ROOT(/) FULL IN AIX :


ROOT(/) Full In Aix:

# df –g’ ‘df –k’, find out the highly utilized filesystem.

If root (/) is full
1)    Check the /etc/security/failedlogin file.
    Use the following command to read the contents of the file.
        who /etc/security/failedlogin

The condition of tty's respawning too rapidly will create failed login entries.
To clear the file after reading or saving the output, execute the following command:

      # cp /dev/null /etc/security/failedlogin

  
2)  Check the /dev directory.

    If a device name is typed incorrectly, as in rmto instead of rmt0, a file will be
created in /dev called  rmto. The command will normally proceed until the entire
 root file system is filled before failing. /dev is part of the / file system. Look for
entries that are not devices (that do not have a major or minor number).

    Execute the following:

   #cd /dev
     #  ls -l |pg

    Whereas a file size on an ordinary file would normally be seen, a device
file will have two numbers separated by a comma.

    Example:
       crw-rw-rw-   1 root     system    12,0 Oct 4 10:19 rmt0

    If the output looks like the following, the file should be removed.
       crw-rw-rw-   1 root     system   9375473 Oct 4 10:19 rmto

NOTE: The /dev directory has some valid file names. Look for a file that has a
large size (larger than 500    bytes).

NOTE: If system auditing is running, the /audit directory (default) may
rapidly fill up and require attention.

    Check for very large files.

Large files can be located with the find command. For example, to find all
files in the root (/) directory  larger than 1 MB, enter the following command:

       find / -xdev -size  +2048 -ls |sort -r  +6

This will find all files greater than 1 MB and sort them in reverse order with
the largest files first.

NOTE: When checking the root directory, entries from the /dev directory that have
major and minor numbers instead of file sizes will be interspersed with real files
and can be ignored.

Other useful find command flags may be helpful, such as the -newer flag.
Review the product  documentation to learn more about such flags.

NOTE: Before removing any files, the user should check to see if the file is currently in use by an active user process. Execute the following command:

    fuser <filename>

<filename> is the file name that is being checked by the active user process. If a
 file is open at the time of removal,it is only removed from the directory listing.
 The blocks allocated to that file are not freed until the process holding
 the file open is killed.

You can also remove smit.log and smit.script in the / directory.


4)  If require increse the file system size.

Ex : #chfs -a size=+1G /