未验证 提交 69c733cc 编写于 作者: C Changjian Gao 提交者: GitHub

Add "Fault Diagnosis and Analysis" doc (#197)

* Add "Fault Diagnosis and Analysis" doc

* Update

* Update

* Update
上级 191378f8
......@@ -100,10 +100,11 @@ If you wanna use JuiceFS in Hadoop, check [Hadoop Java SDK](docs/en/hadoop_java_
## Administration
- [Redis best practices](docs/en/redis_best_practices.md)
- [Mount JuiceFS at boot](docs/en/mount_at_boot.md)
- [How to setup object storage](docs/en/how_to_setup_object_storage.md)
- [Redis Best Practices](docs/en/redis_best_practices.md)
- [Mount JuiceFS at Boot](docs/en/mount_at_boot.md)
- [How to Setup Object Storage](docs/en/how_to_setup_object_storage.md)
- [Cache Management](docs/en/cache_management.md)
- [Fault Diagnosis and Analysis](docs/en/fault_diagnosis_and_analysis.md)
- [Using JuiceFS on Kubernetes](docs/en/how_to_use_on_kubernetes.md)
## POSIX Compatibility
......@@ -161,7 +162,7 @@ $ cat /jfs/.accesslog
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. We can use this to debug and analyze performance issues. We will provide more tools to analyze it.
The last number on each line is the time (in seconds) current operation takes. You can use this to debug and analyze performance issues. We will provide more tools to analyze it.
## Supported Object Storage
......
......@@ -105,6 +105,7 @@ JuiceFS 使用 [Hadoop Java SDK](docs/zh_cn/hadoop_java_sdk.md) 与 Hadoop 生
- [开机自动挂载 JuiceFS](docs/en/mount_at_boot.md)
- [如何设置对象存储](docs/en/how_to_setup_object_storage.md)
- [缓存管理](docs/en/cache_management.md)
- [故障诊断和分析](docs/en/fault_diagnosis_and_analysis.md)
- [在 Kubernetes 中使用 JuiceFS](docs/en/how_to_use_on_kubernetes.md)
## POSIX 兼容性测试
......@@ -162,7 +163,7 @@ $ cat /jfs/.accesslog
2021.01.15 08:26:11.003616 [uid:0,gid:0,pid:4403] write (17666,390,951582): OK <0.000006>
```
每一行的最后一个数字是该操作所消耗的时间,单位是秒。我们可以利用它来分析各种性能问题,未来我们也会提供更多工具来分析它。
每一行的最后一个数字是该操作所消耗的时间,单位是秒。可以利用它来分析各种性能问题,未来我们也会提供更多工具来分析它。
## 支持的对象存储
......
# Fault Diagnosis and Analysis
## Error Log
When JuiceFS run in background (through [`-d` option](command_reference.md#juicefs-mount) when mount volume), logs will output to syslog. Depending on your operating system, you can get the logs through different commands:
```bash
# macOS
$ syslog | grep 'juicefs'
# Linux
$ cat /var/log/syslog | 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:
```bash
$ 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 debug and analyze performance issues.
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册