1 Star 0 Fork 38

zhangweijie / JuiceFS

forked from Juicedata / JuiceFS 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
fault_diagnosis_and_analysis.md 1.55 KB
一键复制 编辑 原始数据 按行查看 历史

Fault Diagnosis and Analysis

Error Log

When JuiceFS run in background (through -d option when mount volume), logs will output to syslog. Depending on your operating system, you can get the logs through different commands:

# macOS
$ syslog | grep 'juicefs'

# Debian based system
$ cat /var/log/syslog | grep 'juicefs'

# CentOS based system
$ cat /var/log/messages | grep 'juicefs'

There are 4 log levels. You can use the grep command to filter different levels of logs for performance analysis or troubleshooting:

$ cat /var/log/syslog | grep 'juicefs' | grep '<INFO>'
$ cat /var/log/syslog | grep 'juicefs' | grep '<WARNING>'
$ cat /var/log/syslog | grep 'juicefs' | grep '<ERROR>'
$ cat /var/log/syslog | grep 'juicefs' | grep '<FATAL>'

Access Log

There is a virtual file called .accesslog in the root of JuiceFS to show all the operations and the time they takes, for example:

$ cat /jfs/.accesslog
2021.01.15 08:26:11.003330 [uid:0,gid:0,pid:4403] write (17669,8666,4993160): OK <0.000010>
2021.01.15 08:26:11.003473 [uid:0,gid:0,pid:4403] write (17675,198,997439): OK <0.000014>
2021.01.15 08:26:11.003616 [uid:0,gid:0,pid:4403] write (17666,390,951582): OK <0.000006>

The last number on each line is the time (in seconds) current operation takes. You can use this to know information of every operation, or try juicefs profile /jfs to monitor aggregated statistics. Please run ./juicefs profile -h or refer to here to learn more about this subcommand.

1
https://gitee.com/zhangweijie001/JuiceFS.git
git@gitee.com:zhangweijie001/JuiceFS.git
zhangweijie001
JuiceFS
JuiceFS
main

搜索帮助