diff options
author | Alexey Efimov <xeno@prnwatch.com> | 2022-02-10 16:49:41 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:41 +0300 |
commit | 26e0e4fb5e5cd6b4d7f4c21f9fcd7978891bf946 (patch) | |
tree | d34555f21d4d9f94f84d460e55b77d7eb41a953c /library/cpp/actors/core/process_stats.h | |
parent | ca3252a147a429eac4ba8221857493c58dcd09b5 (diff) | |
download | ydb-26e0e4fb5e5cd6b4d7f4c21f9fcd7978891bf946.tar.gz |
Restoring authorship annotation for Alexey Efimov <xeno@prnwatch.com>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/actors/core/process_stats.h')
-rw-r--r-- | library/cpp/actors/core/process_stats.h | 102 |
1 files changed, 51 insertions, 51 deletions
diff --git a/library/cpp/actors/core/process_stats.h b/library/cpp/actors/core/process_stats.h index 66346d0b5a..7b329d6bb4 100644 --- a/library/cpp/actors/core/process_stats.h +++ b/library/cpp/actors/core/process_stats.h @@ -10,57 +10,57 @@ namespace NMonitoring { } namespace NActors { - struct TProcStat { - ui64 Rss; - ui64 VolCtxSwtch; - ui64 NonvolCtxSwtch; - - int Pid; - char State; - int Ppid; - int Pgrp; - int Session; - int TtyNr; - int TPgid; - unsigned Flags; - unsigned long MinFlt; - unsigned long CMinFlt; - unsigned long MajFlt; - unsigned long CMajFlt; - unsigned long Utime; - unsigned long Stime; - long CUtime; - long CStime; - long Priority; - long Nice; - long NumThreads; - long ItRealValue; - // StartTime is measured from system boot - unsigned long long StartTime; - unsigned long Vsize; - long RssPages; - unsigned long RssLim; - ui64 FileRss; - ui64 AnonRss; - ui64 CGroupMemLim = 0; - - TDuration Uptime; - TDuration SystemUptime; - // ... - - TProcStat() { - Zero(*this); - Y_UNUSED(PageSize); - } - - bool Fill(pid_t pid); - - private: - long PageSize = 0; - - long ObtainPageSize(); - }; - + struct TProcStat { + ui64 Rss; + ui64 VolCtxSwtch; + ui64 NonvolCtxSwtch; + + int Pid; + char State; + int Ppid; + int Pgrp; + int Session; + int TtyNr; + int TPgid; + unsigned Flags; + unsigned long MinFlt; + unsigned long CMinFlt; + unsigned long MajFlt; + unsigned long CMajFlt; + unsigned long Utime; + unsigned long Stime; + long CUtime; + long CStime; + long Priority; + long Nice; + long NumThreads; + long ItRealValue; + // StartTime is measured from system boot + unsigned long long StartTime; + unsigned long Vsize; + long RssPages; + unsigned long RssLim; + ui64 FileRss; + ui64 AnonRss; + ui64 CGroupMemLim = 0; + + TDuration Uptime; + TDuration SystemUptime; + // ... + + TProcStat() { + Zero(*this); + Y_UNUSED(PageSize); + } + + bool Fill(pid_t pid); + + private: + long PageSize = 0; + + long ObtainPageSize(); + }; + IActor* CreateProcStatCollector(ui32 intervalSec, NMonitoring::TDynamicCounterPtr counters); IActor* CreateProcStatCollector(TDuration interval, NMonitoring::TMetricRegistry& registry); } |