You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: context/getting-started.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,24 +67,24 @@ The {ruby Process::Metrics::General} struct contains the following fields:
67
67
-`parent_process_id` - Parent Process ID, the process ID of the process that started this process.
68
68
-`process_group_id` - Process Group ID, the process group ID of the process, which can be shared by multiple processes.
69
69
-`processor_utilization` - Processor Utilization (%), the percentage of CPU time used by the process (over a system-specific duration).
70
-
-`total_size` - Memory Size (KB), the total size of the process's memory space (usually over-estimated as it doesn't take into account shared memory).
71
-
-`resident_size` - Resident (Set) Size (KB), the amount of physical memory used by the process.
70
+
-`total_size` - Memory Size (bytes), the total size of the process's memory space (usually over-estimated as it doesn't take into account shared memory).
71
+
-`resident_size` - Resident (Set) Size (bytes), the amount of physical memory used by the process.
72
72
-`processor_time` - CPU Time (s), the amount of CPU time used by the process.
73
73
-`elapsed_time` - Elapsed Time (s), the amount of time the process has been running.
74
74
-`command` - Command Name, the name of the command that started the process.
75
75
76
76
The {ruby Process::Metrics::Memory} struct contains the following fields:
77
77
78
78
-`map_count` - Number of Memory Mappings, e.g. number of thread stacks, fiber stacks, shared libraries, memory mapped files, etc.
79
-
-`resident_size` - Resident Memory Size (KB), the amount of physical memory used by the process.
80
-
-`proportional_size` - Proportional Memory Size (KB), the amount of memory that the process is using, taking into account shared memory.
81
-
-`shared_clean_size` - Shared Clean Memory Size (KB), the amount of shared memory that is clean (not modified).
82
-
-`shared_dirty_size` - Shared Dirty Memory Size (KB), the amount of shared memory that is dirty (modified).
83
-
-`private_clean_size` - Private Clean Memory Size (KB), the amount of private memory that is clean (not modified).
84
-
-`private_dirty_size` - Private Dirty Memory Size (KB), the amount of private memory that is dirty (modified).
85
-
-`referenced_size` - Referenced Memory Size (KB), active page-cache that isn't going to be reclaimed any time soon.
86
-
-`anonymous_size` - Anonymous Memory Size (KB), mapped memory that isn't backed by a file.
87
-
-`swap_size` - Swap Memory Size (KB), the amount of memory that has been swapped to disk.
88
-
-`proportional_swap_size` - Proportional Swap Memory Size (KB), the amount of memory that has been swapped to disk, excluding shared memory.
79
+
-`resident_size` - Resident Memory Size (bytes), the amount of physical memory used by the process.
80
+
-`proportional_size` - Proportional Memory Size (bytes), the amount of memory that the process is using, taking into account shared memory.
81
+
-`shared_clean_size` - Shared Clean Memory Size (bytes), the amount of shared memory that is clean (not modified).
82
+
-`shared_dirty_size` - Shared Dirty Memory Size (bytes), the amount of shared memory that is dirty (modified).
83
+
-`private_clean_size` - Private Clean Memory Size (bytes), the amount of private memory that is clean (not modified).
84
+
-`private_dirty_size` - Private Dirty Memory Size (bytes), the amount of private memory that is dirty (modified).
85
+
-`referenced_size` - Referenced Memory Size (bytes), active page-cache that isn't going to be reclaimed any time soon.
86
+
-`anonymous_size` - Anonymous Memory Size (bytes), mapped memory that isn't backed by a file.
87
+
-`swap_size` - Swap Memory Size (bytes), the amount of memory that has been swapped to disk.
88
+
-`proportional_swap_size` - Proportional Swap Memory Size (bytes), the amount of memory that has been swapped to disk, excluding shared memory.
89
89
90
90
In general, the interpretation of these fields is operating system specific. At best, they provide a rough estimate of the process's memory usage, but you should consult the documentation for your operating system for more details on exactly what each field represents.
Copy file name to clipboardExpand all lines: guides/getting-started/readme.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,24 +67,24 @@ The {ruby Process::Metrics::General} struct contains the following fields:
67
67
-`parent_process_id` - Parent Process ID, the process ID of the process that started this process.
68
68
-`process_group_id` - Process Group ID, the process group ID of the process, which can be shared by multiple processes.
69
69
-`processor_utilization` - Processor Utilization (%), the percentage of CPU time used by the process (over a system-specific duration).
70
-
-`total_size` - Memory Size (KB), the total size of the process's memory space (usually over-estimated as it doesn't take into account shared memory).
71
-
-`resident_size` - Resident (Set) Size (KB), the amount of physical memory used by the process.
70
+
-`total_size` - Memory Size (bytes), the total size of the process's memory space (usually over-estimated as it doesn't take into account shared memory).
71
+
-`resident_size` - Resident (Set) Size (bytes), the amount of physical memory used by the process.
72
72
-`processor_time` - CPU Time (s), the amount of CPU time used by the process.
73
73
-`elapsed_time` - Elapsed Time (s), the amount of time the process has been running.
74
74
-`command` - Command Name, the name of the command that started the process.
75
75
76
76
The {ruby Process::Metrics::Memory} struct contains the following fields:
77
77
78
78
-`map_count` - Number of Memory Mappings, e.g. number of thread stacks, fiber stacks, shared libraries, memory mapped files, etc.
79
-
-`resident_size` - Resident Memory Size (KB), the amount of physical memory used by the process.
80
-
-`proportional_size` - Proportional Memory Size (KB), the amount of memory that the process is using, taking into account shared memory.
81
-
-`shared_clean_size` - Shared Clean Memory Size (KB), the amount of shared memory that is clean (not modified).
82
-
-`shared_dirty_size` - Shared Dirty Memory Size (KB), the amount of shared memory that is dirty (modified).
83
-
-`private_clean_size` - Private Clean Memory Size (KB), the amount of private memory that is clean (not modified).
84
-
-`private_dirty_size` - Private Dirty Memory Size (KB), the amount of private memory that is dirty (modified).
85
-
-`referenced_size` - Referenced Memory Size (KB), active page-cache that isn't going to be reclaimed any time soon.
86
-
-`anonymous_size` - Anonymous Memory Size (KB), mapped memory that isn't backed by a file.
87
-
-`swap_size` - Swap Memory Size (KB), the amount of memory that has been swapped to disk.
88
-
-`proportional_swap_size` - Proportional Swap Memory Size (KB), the amount of memory that has been swapped to disk, excluding shared memory.
79
+
-`resident_size` - Resident Memory Size (bytes), the amount of physical memory used by the process.
80
+
-`proportional_size` - Proportional Memory Size (bytes), the amount of memory that the process is using, taking into account shared memory.
81
+
-`shared_clean_size` - Shared Clean Memory Size (bytes), the amount of shared memory that is clean (not modified).
82
+
-`shared_dirty_size` - Shared Dirty Memory Size (bytes), the amount of shared memory that is dirty (modified).
83
+
-`private_clean_size` - Private Clean Memory Size (bytes), the amount of private memory that is clean (not modified).
84
+
-`private_dirty_size` - Private Dirty Memory Size (bytes), the amount of private memory that is dirty (modified).
85
+
-`referenced_size` - Referenced Memory Size (bytes), active page-cache that isn't going to be reclaimed any time soon.
86
+
-`anonymous_size` - Anonymous Memory Size (bytes), mapped memory that isn't backed by a file.
87
+
-`swap_size` - Swap Memory Size (bytes), the amount of memory that has been swapped to disk.
88
+
-`proportional_swap_size` - Proportional Swap Memory Size (bytes), the amount of memory that has been swapped to disk, excluding shared memory.
89
89
90
90
In general, the interpretation of these fields is operating system specific. At best, they provide a rough estimate of the process's memory usage, but you should consult the documentation for your operating system for more details on exactly what each field represents.
# Determine the total memory size in kilobytes. This is the maximum amount of memory that can be used by the current process. If running in a container, this may be limited by the container runtime (e.g. cgroups).
40
+
# Determine the total memory size in bytes. This is the maximum amount of memory that can be used by the current process. If running in a container, this may be limited by the container runtime (e.g. cgroups).
41
41
#
42
-
# @returns [Integer] The total memory size in kilobytes.
42
+
# @returns [Integer] The total memory size in bytes.
43
43
defself.total_size
44
44
# Check for Kubernetes/cgroup memory limit first (cgroups v2):
0 commit comments