log4j.properties to change the log output configuration, such as the storage path, log level, or whether to record RPC logs. You can go to the GooseFS configuration directory and modify log4j.properties as follows:$ cd /usr/local/service/goosefs/conf$ cat log4j.properties# May get overridden by System Propertylog4j.rootLogger=INFO, ${goosefs.logger.type}, ${goosefs.remote.logger.type}log4j.category.goosefs.logserver=INFO, ${goosefs.logserver.logger.type}log4j.additivity.goosefs.logserver=falselog4j.logger.AUDIT_LOG=INFO, ${goosefs.master.audit.logger.type}log4j.additivity.AUDIT_LOG=false...
${GOOSEFS_HOME}/logs, where master logs are stored in logs/master.log and worker logs in logs/worker.log. Note that errors thrown by node processes are recorded in master.out or worker.out, which are empty if there is no error. If any error occurs, you can use these files to troubleshoot.# Appender for Masterlog4j.appender.MASTER_LOGGER=org.apache.log4j.RollingFileAppenderlog4j.appender.MASTER_LOGGER.File=${goosefs.logs.dir}/master.loglog4j.appender.MASTER_LOGGER.MaxFileSize=10MBlog4j.appender.MASTER_LOGGER.MaxBackupIndex=100log4j.appender.MASTER_LOGGER.layout=org.apache.log4j.PatternLayoutlog4j.appender.MASTER_LOGGER.layout.ConversionPattern=%d{ISO8601} %-5p %c{1} - %m%n
log4j.properties. The following example changes all log levels of GooseFS to DEBUG:log4j.rootLogger=DEBUG, ${goosefs.logger.type}, ${goosefs.remote.logger.type}
GooseFSFileInStream class to DEBUG:log4j.logger.com.qcloud.cos.goosefs.client.file.GooseFSFileInStream=DEBUG
goosefs logLevel command to modify the log level. The following are configuration items supported by logLevel:usage: logLevel [--level <arg>] --logName <arg> [--target <arg>]--level <arg> The log level to be set.--logName <arg> The logger's name(e.g. com.qcloud.cos.goosefs.master.file.DefaultFileSystemMaster) you want to get or set level.--target <arg> <master|workers|host:webPort>. A list of targets separated by, can be specified. host:webPort pair must be one of workers. Default target is master and all workers
com.qcloud.cos.goosefs.underfs.hdfs.HdfsUnderFileSystem class to DEBUG for all workers, and changes it back to INFO when the debugging is complete:$ goosefs logLevel --logName=com.qcloud.cos.goosefs.underfs.hdfs.HdfsUnderFileSystem --target=workers --level=DEBUG # Set to DEBUG.$ goosefs logLevel --logName=com.qcloud.cos.goosefs.underfs.hdfs.HdfsUnderFileSystem --target=workers --level=INFO # Set to INFO.
conf/goosefs-env.sh file:GOOSEFS_JAVA_OPTS+=" -XX:+PrintGCDetails -XX:+PrintTenuringDistribution -XX:+PrintGCTimeStamps"
GOOSEFS_JAVA_OPTS is the Java VM parameter for all GooseFS nodes. You can also use GOOSEFS_MASTER_JAVA_OPTS and GOOSEFS_WORKER_JAVA_OPTS to specify the VM parameter for the master and workers, respectively.conf/log4j.properties file:goosefs.logger.com.qcloud.cos.goosefs.fuse.GoosefsFuseFileSystem=DEBUG
logs/fuse.log. conf/log4j.properties file to configure the RPC logs for the client or the master.
In log4j.properties, configure the RPC request logs for the client:log4j.logger.com.qcloud.cos.goosefs.client.file.FileSystemMasterClient=DEBUG # RPC request logs between the client and FileSystemMasterlog34j.logger.com.qcloud.cos.goosefs.client.block.BlockSystemMasterClient=DEBUG # RPC request logs between the client and BlockMaster
logLevel command to configure the RPC request logs for the master:$ goosefs logLevel \\--logName=com.qcloud.cos.goosefs.master.file.FileSystemMasterClientServiceHandler \\--target master --level=DEBUG # File-related RPC request logs$ goosefs logLevel \\--logName=com.qcloud.cos.goosefs.master.block.BlockSystemMasterClientServiceHandler \\--target master --level=DEBUG # Block-related RPC request logs
log4j.properties file. Alternatively, you can run the logLevel command as follows:$ goosefs logLevel \\--logName=com.qcloud.cos.goosefs.underfs.UnderFileSystemWithLogging \\--target master --level=DEBUG # Record UFS operation logs for the master.$ goosefs logLevel \\--logName=com.qcloud.cos.goosefs.underfs.UnderFileSystemWithLogging \\--target workers --level=DEBUG # Record UFS operations logs for workers.
master.log or worker.log may become extremely large, or lots of logs will be rolled.log4j.properties to set locations for specific types of logs. The following example stores StateLockManager logs in statelock.log:log4j.category.com.qcloud.cos.goosefs.master.StateLockManager=DEBUG, State_LOCK_LOGGERlog4j.additivity.com.qcloud.cos.goosefs.master.StateLockManager=falselog4j.appender.State_LOCK_LOGGER=org.apache.log4j.RollingFileAppenderlog4j.appender.State_LOCK_LOGGER.File=<GOOSEFS_HOME>/logs/statelock.loglog4j.appender.State_LOCK_LOGGER.MaxFileSize=10MBlog4j.appender.State_LOCK_LOGGER.MaxBackupIndex=100log4j.appender.State_LOCK_LOGGER.layout=org.apache.log4j.PatternLayoutlog4j.appender.State_LOCK_LOGGER.layout.ConversionPattern=%d{ISO8601} %-5p %c{1} - %m%
log4j.properties file to add log filtering conditions. The following example filters logs for requests that have an RPC latency of more than 200ms and FUSE latency of over 1s:goosefs.user.logging.threshold=200msgoosefs.fuse.logging.threshold=1s
masukan