imcheck

The imcheck command validates the message store and the user files, reports errors, and generates message store reports. In addition to validating the message store and generating reports, it also allows you to recover the message store from a crash.

Messages may be lost if a crash occurs after the messages have been removed from mail queue by IMTA, but have not yet been "sync-ed" in the user file. When the -c option is specified, imcheck looks at all the messages delivered to the message store within the last few minutes before the crash, verifies if they are in the user files, and redelivers those that are not. Users may get the same message twice after a crash recovery.


Note - You must be logged in as the message store owner to use this utility.

Syntax

 
imcheck -d [date] [-f filename] [-l config_file_location]
 
imcheck -r [date] [-f filename] [-l config_file_location]
 
imcheck -u [user] [-f filename] [-l config_file_location]
 
imcheck -c [-f filename] [-l config_file_location]
 
imcheck -t [-l config_file_location]
 

Except for the -f and -l options, each option must be specified in a separate command. In other words, you cannot combine the -d, -r, -u, -c, and -t options together in one command.

The following options are used with imcheck:

-d [date]  

Generates a detailed store report. If a specific date is given (in the form yyyymmdd), imcheck generates a report for the specified date.  

-r [date]  

Generates a regular report. If a specific date is given (in the form yyyymmdd), imcheck generates a report for the specified date.  

-c  

Perform a crash recovery. This selection can only be used after a crash. It must be run before the IMTA has started and should not be running with IMTA at the same time.  

-f filename  

Redirect all output to the file filename. The file is placed in the current working directory. It is not placed under ADM_ROOT. filename can be an absolute path.  

-u [user]  

Generate a user report for all message store users. If a specific user name is given, imcheck generates a user report for the specified user; otherwise, a report for all users is generated.  

-t  

Check if the message store has potentially been corrupted.  

-l config_file_location  

Location of the Message Access Services configuration file (ims.cnf). If the -l option is not specified, the default location (/etc/opt/SUNWmail/ims/) will be used.  


Note - When using the -u and -c options, imcheck can only be run when the message access is stopped.

Example

The following example generates report for the user "Jane" and directs the output to a file named "outputfile."

 
# imcheck -u Jane -f outputfile
 

The following output is an example of a regular report (imcheck -r):

 
verbose store report with verification on Fri Oct 10 
15:54:58 1997
 

 
Message data report
 
 Data for 1 year(s) follows:
 
1997  30 day(s), 3 bucket(s) per day
 

 
        1001 n-recs  end-of-file  verify_data
 
        001     394     17958940           ok
 
        002     397     13822883           ok
 
        003     399      7578785           ok
 

 
        1002 n-recs  end-of-file  verify_data
 
        001     833     23289349           ok
 
        002     864     12327173           ok
 
        003     812     21576875           ok
 

 
        1003 n-recs  end-of-file  verify_data
 
        001     873     16900476           ok
 
        002     878     21127935           ok
 
        003     781     23281795           ok
 

 
.
 
.
 
.
 
Index files report
 
 
 
Data for 1 years(s) follows:
 
    1997  30 day(s),
 
n-bkts complexity n-entries next-entry verify_links 
ParseLevel  Version
 
 
 
    1001     3 COMPLETEPARSE      1190       1191           ok           
3    0.0
 
    1002     3 COMPLETEPARSE      2509       2510           ok           
3    0.0
 
    1003     3 COMPLETEPARSE      2532       2533           ok           
3    0.0
 
    1004     3 COMPLETEPARSE      1472       1473           ok           
3    0.0
 
    1005     3 COMPLETEPARSE         0          1           ok           
3    0.0
 
.
 
.
 
.
 

The following output is an example of a detailed report (imcheck -d):

 
verbose store report with verification on Fri Oct 10 15:55:18 1997
 

 
Message data report
 
  Data for 1 year(s) follows:
 
     1997  30 day(s), 3 bucket(s) per day
 
1001 n-recs  end-of-file  verify_data
 
        001     394     17958940           ok
 
        002     397     13822883           ok
 
        003     399      7578785           ok
 

 
        1002 n-recs  end-of-file  verify_data
 
        001     833     23289349           ok
 
        002     864     12327173           ok
 
        003     812     21576875           ok
 

 
        1003 n-recs  end-of-file  verify_data
 
        001     873     16900476           ok
 
        002     878     21127935           ok
 
        003     781     23281795           ok
 
Index files report
 
 
 
Data for 1 years(s) follows:
 
    1997  30 day(s),
 
 
 
********1001*************************************
 

 
MAX_ENV_SIZE = 32768
 
MAX_BODY_SIZE = 262144
 
IDIR RECORD NO. 1 :
 
INDEXDIR: Index_Rec_Offset = 12
 
              INDEX_Rec_Size = 344
 
                     Ref_Cnt = 1
 
                      In_use = 1
 
                        CUID = 1.0
 
     INDEX:   Index_Rec_Size = 344
 
              Index_Rec_cksm = 0
 
                  Mdata_file = 1997/1001/003
 
                Mdata_offset = 12
 
                 Env_present = 1
 
                    Env_size = 198
 
                Body_present = 1
 
               Body_Rec_size = 60
 
MSGDATA:      Record_size = 4997
 
 
RFC821_rcpts = u4
 
Index_file = 1997/1001
 
                  Idir_entry = 1
 
                Message_size = 4930
 
                RFC821_rcpts = u3
 
IDIR RECORD NO. 2 :
 
  INDEXDIR: Index_Rec_Offset = 356
 
              INDEX_Rec_Size = 344
 
                     Ref_Cnt = 1
 
                      In_use = 1
 
                        CUID = 2.0
 
     INDEX:   Index_Rec_Size = 344
 
Index_Rec_cksm = 0
 
                  Mdata_file = 1997/1001/001
 
                Mdata_offset = 12
 
                 Env_present = 1
 
                    Env_size = 198
 
                Body_present = 1
 
               Body_Rec_size = 60
 
   MSGDATA:      Record_size = 2362
 
                  Index_file = 1997/1001
 
                  Idir_entry = 2
 
                Message_size = 2295
 

 
.
 
.
 
.
 




Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.