ATLAS Offline Software
Control
AthenaMonitoring
src
AthMonBench.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
AthMonBench.h
"
6
#include <cstring>
7
#include <stdio.h>
8
9
AthMonBench::TMem
AthMonBench::currentVMem_ExcludingLWPools
()
10
{
11
long
result
= -1;
12
FILE*
file
= fopen(
"/proc/self/status"
,
"r"
);
13
if
(!
file
)
14
return
result
;
15
char
line
[128];
16
while
(fgets(
line
, 128,
file
) != NULL){
17
if
(strncmp(
line
,
"VmSize:"
, 7) == 0) {
18
std::stringstream
s
(&(
line
[7]));
19
s
>>
result
;
20
result
*= 1024;
//NB: ~1K uncertainty
21
result
-=
LWHistStats::getTotalPoolMemAllocated
();
22
break
;
23
}
24
}
25
fclose(
file
);
26
return
result
;
27
}
28
29
std::ostream&
operator <<
( std::ostream&
os
,
const
AthMonBench
&
br
) {
30
if
(
br
.valid())
31
os
<<
"deltaMemLW: "
<<
br
.deltaMemLW_mb()<<
" mb, "
<<
"deltaMemOther: "
<<
br
.deltaMemOther_mb()<<
" mb, deltaCPU: "
<<
br
.deltaCPU_ms()<<
" ms"
;
32
else
33
os
<<
" [no data]"
;
34
return
os
;
35
}
checkFileSG.line
line
Definition:
checkFileSG.py:75
python.SystemOfUnits.s
int s
Definition:
SystemOfUnits.py:131
get_generator_info.result
result
Definition:
get_generator_info.py:21
operator<<
std::ostream & operator<<(std::ostream &os, const AthMonBench &br)
Definition:
AthMonBench.cxx:29
file
TFile * file
Definition:
tile_monitor.h:29
AthMonBench::TMem
long long TMem
Definition:
AthMonBench.h:55
ReadFromCoolCompare.os
os
Definition:
ReadFromCoolCompare.py:231
AthMonBench.h
AthMonBench::currentVMem_ExcludingLWPools
static TMem currentVMem_ExcludingLWPools()
Definition:
AthMonBench.cxx:9
LWHistStats::getTotalPoolMemAllocated
static long long getTotalPoolMemAllocated()
Definition:
LWHistStats.cxx:21
AthMonBench
Definition:
AthMonBench.h:27
PlotCalibFromCool.br
br
Definition:
PlotCalibFromCool.py:355
Generated on Tue Jul 2 2024 21:10:39 for ATLAS Offline Software by
1.8.18