Name
- system.fs.file_handles.in_use
- The amount of used allocated file handles over the system max.
- fraction (unit)
- system.fs.file_handles.max
- The max amount of file handles over the system max.
- handles (unit)
- system.fs.file_handles.used
- The amount of used file handles over the system.
- handles
- system.fs.file_handles.allocated
- The amount of allocated file handles over the system.
- system.fs.file_handles.allocated_unused
- The amount of unused file handles over the system.
计算公式
# handle_metrics = [23104, 0, 3040400]
# https://www.kernel.org/doc/Documentation/sysctl/fs.txt
# allocated_fh = float(handle_metrics[0])
# allocated_unused_fh = float(handle_metrics[1])
# max_fh = float(handle_metrics[2])
# num_used = allocated_fh - allocated_unused_fh
system.fs.file_handles.allocated = allocated_fh
system.fs.file_handles.allocated_unused = allocated_unused_fh
system.fs.file_handles.in_use = num_used / max_fh
system.fs.file_handles.used = num_used
system.fs.file_handles.max = max_fh
数据来源
# cat /proc/sys/fs/file-nr
23104 0 3040400