< Previous | Next > | |
Product: Cluster Server Guides | |
Manual: Cluster Server 4.1 Agent Developer's Guide |
Creating SMC FilesSince Source Message Catalog files are used to generate the Binary Message Catalog files, they must be created in a consistent format. SMC Format#!language = language_ID #!module = module_name #!version = version #!category = category_ID # comment message_ID1 {%s:msg} message_ID2 {%s:msg} message_ID3 {%s:msg} # comment message_ID4 {%s:msg} message_ID5 {%s:msg} ... Example SMC FileExamine an example SMC file, named VRTSvcsSunAgent.smc, based on the SMC format: #!language = en #!module = HAD #!version = 4.0 #!category = 203 # common library 100 {"%s:Invalid message for agent"} 101 {"%s:Process %s restarted"} 102 {"%s:Error opening /proc directory"} 103 {"%s:online:No start program defined"} 104 {"%s:Executed %s""} 105 {"%s:Executed %s"} Formatting SMC Files
Naming SMC Files, BMC FilesBMC files, which follow a naming convention, are generated from SMC files. The name of an SMC file determines the name of the generated BMC file. The naming convention for BMC files has the following pattern: VRTSvcs{Sun|AIX|HP|Lnx|W2K}{Agent_name}.bmc where the platform and agent_name are included. VRTSvcsHPOracle.bmc The name of the SMC file used to generate the BMC file for the preceding example is VRTSvcsHPOracle.smc. Message Examples
201 {"%s:To be or not to be! That is the question"} 10010 {"%s:To be or not to be!\n That is the question"} 10012 {"%s:To be or not to be!\n That is the question.\n Whether tis nobler in the mind to suffer\n the slings and arrows of outrageous fortune\n or to take arms against a sea of troubles"} Using Format SpecifiersUsing the "%s" specifier is appropriate for all message arguments unless the arguments must be reordered. Since the word order in messages may vary by language, a format specifier, %#$s, enables the reordering of arguments in a message; the "#" character is a number from 1 to 99. In an English SMC file, the entry might resemble: 301 {"%s:Setting cookie for proc=%s, PID = %s"} In a language where the position of message arguments need to switch, the same entry in the SMC file for that language might resemble: 301 {"%s:Setting cookie for process with PID = %3$s, name = %2$s"} |
^ Return to Top | < Previous | Next > |
Product: Cluster Server Guides | |
Manual: Cluster Server 4.1 Agent Developer's Guide | |
VERITAS Software Corporation
www.veritas.com |