home *** CD-ROM | disk | FTP | other *** search
/ ftp.parl.clemson.edu / 2015-02-07.ftp.parl.clemson.edu.tar / ftp.parl.clemson.edu / pub / pvfs2 / orangefs-2.8.3-20110323.tar.gz / orangefs-2.8.3-20110323.tar / orangefs / doc / pvfs2-logging.txt < prev    next >
Text File  |  2010-04-30  |  8KB  |  192 lines

  1. PVFS Logging
  2. ============
  3.  
  4. This document describes log files produced by PVFS and how to control
  5. what messages are included in them.
  6.  
  7. PVFS Log Format
  8. ---------------
  9.  
  10. The log messages from all PVFS components except for the kernel module
  11. are in the following format: 
  12.  
  13.     [<type> <timestamp>] LOG MESSAGE
  14.  
  15. The type will be one of 4 different letters depending on what type of
  16. log message it is:
  17.  
  18.     D - DEBUG 
  19.     E - ERROR 
  20.     A - ACCESS LOGGING
  21.     P - PERFORMANCE COUNTER 
  22.  
  23. The timestamp defaults to showing the date, hour, and minute that the
  24. log message was generated.  The timestamp format can be modified to one
  25. of the following styles by using the --logstamp argument to pvfs2-client
  26. or the LogStamp field in the pvfs2-server config file:
  27.  
  28.     datetime: (default, as described above)
  29.     usec: shows time with microsecond granularity (but no date)
  30.     none: no time stamp
  31.     thread: includes thread ID with each message
  32.  
  33. PVFS Log Locations
  34. ------------------
  35.  
  36. The pvfs2-server daemon writes log messages to /tmp/pvfs2-server.log by
  37. default.  A different output file can be specified using the LogFile
  38. parameter in the configuration file.  The logs can also be sent to syslog
  39. instead by adding "LogType syslog" to the configuration file.
  40.  
  41. The pvfs2-client daemon writes log messages to /tmp/pvfs2-client.log by
  42. default.  This can be overridden using the --logfile or --logtype command
  43. line arguments to pvfs2-client.
  44.  
  45. The PVFS kernel module (pvfs2.ko) generates log messages to dmesg and/or
  46. /var/log/messages and/or /var/log/kern depending on your Linux distribution.
  47.  
  48. The PVFS client library (libpvfs2) and command line utilities generate log
  49. messages to stderr if enabled.
  50.  
  51. Logging Levels
  52. --------------
  53.  
  54. All PVFS components log critical error messages automatically.  However, 
  55. you can also turn on additional logging for debugging purposes.  This is
  56. controlled by specifying which logging "masks" should be enabled.
  57.  
  58. You can see a list of available pvfs2-server, client library, and
  59. pvfs2-client logging levels by running the pvfs2-set-debugmask utility
  60. with no arguments.
  61.  
  62. You can see a list of available kernel module logging masks and client
  63. logging masks by running "cat /proc/sys/pvfs2/debug-help".
  64.  
  65. The "verbose" mask is commonly used to turn on most of the logging
  66. levels that are useful for debugging problems.
  67.  
  68. Changing the log mask for pvfs2-server
  69. --------------------------------------
  70.  
  71. Use the EventLogging field in the configuration file to specify
  72. a comma separated list of masks to enable.  You can also use the
  73. pvfs2-set-debugmask command line utility to change the mask dynamically
  74. without restarting the server.
  75.  
  76. Changing the log mask for libpvfs and command line utilities
  77. ------------------------------------------------------------
  78.  
  79. Set the PVFS2_DEBUGMASK environment variable to a comma separated list of
  80. client-appropriate masks prior to launching the application.
  81.  
  82.  
  83. Changing the log mask for the kernel module
  84. -------------------------------------------
  85.  
  86. There are three ways to set the debugging level for the kernel module:
  87.  
  88. 1.  Set module_parm_debug_mask parameter when the kernel module is
  89. loaded.  
  90.  
  91. 2.  Set the environment variable PVFS2_KMODMASK before starting the 
  92. pvfs2-client.  NOTE:  the kernel module must be loaded before starting
  93. the client-core.
  94.  
  95. 3.  Write a debug string to /proc/sys/pvfs2/kernel-debug after the kernel
  96. module is loaded.
  97.  
  98.  
  99. Options 1 and 2 allow the kernel debug mask to be set ONLY when PVFS is started,
  100. while option 3 allows the kernel debug mask to be modified while PVFS is 
  101. running.  Thus, option 3 dynamically updates the kernel debug mask, 
  102. immediately turning on the debugging options specified, and REPLACES the
  103. existing debug mask.  Whenever you modify the kernel debug mask using
  104. option 3, an informational message is printed to the system log file, 
  105. giving both its numerical value and a comma-separated list of keywords representing
  106. the areas of debugging just turned on.
  107.  
  108. Options 1 and 2 require the user to specify a numerical value that is
  109. an OR'd list of gossip debug values.  These values can be found in
  110. include/pvfs2-debug.h.  For example, to load the kernel module with
  111. "file" debugging turned on, issue the following command:
  112.  
  113. insmod pvfs2.ko module_parm_debug_mask=4
  114.  
  115. The 4 is the value of GOSSIP_FILE_DEBUG, and module_parm_debug_mask is the kernel
  116. module's input parameter for the kernel debug mask.  To turn on multiple areas,for
  117. example, file and dcache, set module_parm_debug_mask = (GOSSIP_FILE_DEBUG | GOSSIP_DCACHE_DEBUG) =
  118. (4 | 128) = 132.  Its string equivalent would be "file,dcache".
  119.  
  120. An informational message is displayed in the system log whenever you load the kernel 
  121. module, giving you the kernel debug mask's numerical value and its string 
  122. equivalent.  Be aware that you can modify this value later using option 3.
  123.  
  124. To set the kernel debug mask using PVFS2_KMODMASK, create a global environment 
  125. variable and set it equal to the desired numerical value.  When the pvfs2-client
  126. is started, the kernel debug mask and its string equivalent will be modified.  Note that 
  127. PVFS2_KMODMASK will override any value set by the kernel module load process.  Again,
  128. option 3 allows you to change the debug mask at any time.
  129.  
  130. To set the kernel debug mask using the /proc variable, write a debug string to 
  131. /proc/sys/pvfs2/kernel-debug.  Example:  echo "file,dcache" > /proc/sys/pvfs2/kernel-debug.
  132. An informational message will be written to the system log file displaying the new
  133. kernel debug mask and its string equivalent.
  134.  
  135. To see the kernel debug mask without looking in the system log, issue a "cat" on
  136. /proc/sys/pvfs2/kernel-debug and you will see the string equivalent of the kernel
  137. debug mask. 
  138.  
  139. A helper /proc variable, /proc/sys/pvfs2/debug-help, will display a list of valid
  140. keywords for both the kernel and client debug masks, when you issue a "cat" on it.  These 
  141. keywords are used to build the string that represent the areas of debugging that you 
  142. want turned on.
  143.  
  144.  
  145.  
  146. Changing the log mask for the client module
  147. -------------------------------------------
  148.  
  149. There are three ways to set the debugging level for the pvfs2-client:
  150.  
  151. 1.  Set --gossip-mask=MASK_LIST on the command line when starting the client.  This
  152. list can be overridden by PVFS2_DEBUGMASK or by setting the /proc variable client-debug. 
  153.  
  154. 2.  Write a debug string to /proc/sys/pvfs2/client-debug after starting the client. This
  155. will override any value set by --gossip-mask on the command line and any value set by
  156. PVFS2_DEBUGMASK.
  157.  
  158. 3.  Set the environment variable PVFS2_DEBUGMASK before starting the client.  This will
  159. override any value set by --gossip-mask on the command line.
  160.  
  161.  
  162. Options 1 and 2 require a string of comma-separated keywords to set the client debug mask.
  163. For example:
  164.  
  165. ./pvfs2-client --gossip-mask="server,trove" -p ./pvfs2-client-core
  166. NOTE: after kernel module is loaded and during client startup.
  167.  
  168. echo "server,trove" > /proc/sys/pvfs2/client-debug
  169. NOTE: after kernel module is loaded and client is started.
  170.  
  171. A list of client debug keywords can be found in include/pvfs2-debug.h or by accessing
  172. the /proc/sys/pvfs2/debug-help variable after the kernel module is loaded. Example:
  173.  
  174. cat /proc/sys/pvfs2/debug-help
  175.  
  176.  
  177. When the client starts, the client debug mask information is sent to the kernel module
  178. where a local version of the mask and its string equivalent is maintained.  This process
  179. writes an informational message to the system log file displaying the numerical value of
  180. the client debug mask and its string equivalent.  You can also see the mask's current string
  181. equivalent by issuing the following:
  182.  
  183. cat /proc/sys/pvfs2/client-debug.
  184.  
  185.  
  186. Whenever you modify the client debug mask after the client has started, an informational message will
  187. be written to the system log file displaying the new numerical value and string equivalent.  At any
  188. time, once PVFS is running, you can view the client debug mask using the "cat" statement above without
  189. having to look in the system log file for the last modification.
  190.  
  191.  
  192.