|
||||
File indexing completed on 2024-11-15 09:38:37
0001 /***********************************************************************************\ 0002 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations * 0003 * * 0004 * This software is distributed under the terms of the Apache version 2 licence, * 0005 * copied verbatim in the file "LICENSE". * 0006 * * 0007 * In applying this licence, CERN does not waive the privileges and immunities * 0008 * granted to it by virtue of its status as an Intergovernmental Organization * 0009 * or submit itself to any jurisdiction. * 0010 \***********************************************************************************/ 0011 //==================================================================== 0012 // Memory.h 0013 //-------------------------------------------------------------------- 0014 // 0015 // Package : System (The LHCb System service) 0016 // 0017 // Description: Information of memory usage from a given process 0018 // 0019 // Author : M.Frank 0020 // Created : 13/11/00 0021 // Changes : 0022 // 0023 //==================================================================== 0024 #ifndef GAUDIKERNEL_MEMORY_H 0025 #define GAUDIKERNEL_MEMORY_H 0026 0027 // Framework include files 0028 #include "GaudiKernel/Kernel.h" 0029 #include "GaudiKernel/SystemBase.h" 0030 0031 /** Note: OS specific details for memory usage 0032 0033 Entrypoints: 0034 - basePriority Base priority 0035 - procID Process ID 0036 - parentID Parent's process ID 0037 - affinityMask Affinity mask 0038 - exitStatus Exit status 0039 - priorityBoost Priority boost 0040 - numPageFault Number of page faults 0041 - pagefileUsage Current page file usage 0042 - pagefileUsagePeak Peak usage of page file 0043 - nonPagedMemory Current usage of non paged memory 0044 - nonPagedMemoryPeak Peak usage of non paged memory 0045 - nonPagedMemoryLimit Maximum amount of non-paged memory this process is allowed to use 0046 - pagedMemory Amount of paged memory currently occupied 0047 - pagedMemoryPeak Maximum of paged memory occupied by the process 0048 - pagedMemoryLimit paged memory that can be occupied by the process 0049 - memorySize Size of currently occupied memory 0050 - memorySizePeak Maximum memory occupied by the process 0051 - memoryLimit Amount of memory that can be occupied by the process 0052 - virtualMemorySize Virtual memory size currenly occupied 0053 - peakVirtualMemorySize Maximum amount of virtual memory occupied 0054 - virtualMemoryLimit Amount of virtual memory that can be occupied by the process 0055 - minMemoryLimit Minimum amount of virtual memory this process may use 0056 - maxMemoryLimit Maximum amount of virtual memory this process is allowed to use 0057 - mappedMemorySize Currenly mapped virtual memory size 0058 - mappedMemorySizePeak Peak mapped virtual memory size 0059 0060 @author: M.Frank 0061 @version: 1.0 0062 */ 0063 namespace System { 0064 /// Unit of memory 0065 enum MemoryUnit { Byte, kByte, MByte, GByte, TByte, PByte, EByte }; 0066 /// Convert time from kByte to requested representation (Experts only) 0067 GAUDI_API long adjustMemory( MemoryUnit typ, long value ); 0068 /// Basic Process Information: Process ID 0069 GAUDI_API long procID(); 0070 /// Basic Process Information: Parent's process ID 0071 GAUDI_API long parentID( InfoType fetch = ProcessBasics, long pid = -1 ); 0072 /// Basic Process Information: Affinity mask 0073 GAUDI_API long affinityMask( InfoType fetch = ProcessBasics, long pid = -1 ); 0074 /// Basic Process Information: Exit status (does not really make sense for the running process, but for others!) 0075 GAUDI_API long exitStatus( InfoType fetch = ProcessBasics, long pid = -1 ); 0076 /// Basic Process Information: Base priority 0077 GAUDI_API long basePriority( InfoType fetch = ProcessBasics, long pid = -1 ); 0078 /// Basic Process Information: priority boost 0079 GAUDI_API long priorityBoost( InfoType fetch = PriorityBoost, long pid = -1 ); 0080 0081 /// Basic Process Information: Number of page faults 0082 GAUDI_API long numPageFault( InfoType fetch = Memory, long pid = -1 ); 0083 /// Basic Process Information: Current page file usage 0084 GAUDI_API long pagefileUsage( MemoryUnit unit = kByte, InfoType fetch = Memory, long pid = -1 ); 0085 /// Basic Process Information: Peak usage of page file 0086 GAUDI_API long pagefileUsagePeak( MemoryUnit unit = kByte, InfoType fetch = Memory, long pid = -1 ); 0087 /// Basic Process Information: Peak usage of page file 0088 GAUDI_API long pagefileUsageLimit( MemoryUnit unit = kByte, InfoType fetch = Quota, long pid = -1 ); 0089 0090 /// Basic Process Information: Current usage of non paged memory 0091 GAUDI_API long nonPagedMemory( MemoryUnit unit = kByte, InfoType fetch = Memory, long pid = -1 ); 0092 /// Basic Process Information: Peak usage of non paged memory 0093 GAUDI_API long nonPagedMemoryPeak( MemoryUnit unit = kByte, InfoType fetch = Memory, long pid = -1 ); 0094 /// System Process Limits: Maximum amount of non-paged memory this process is allowed to use 0095 GAUDI_API long nonPagedMemoryLimit( MemoryUnit unit = kByte, InfoType fetch = Quota, long pid = -1 ); 0096 0097 /// Basic Process Information: Amount of paged memory currently occupied by the process 'pid' 0098 GAUDI_API long pagedMemory( MemoryUnit unit = kByte, InfoType fetch = Memory, long pid = -1 ); 0099 /// Basic Process Information: Maximum of paged memory occupied by the process 'pid' 0100 GAUDI_API long pagedMemoryPeak( MemoryUnit unit = kByte, InfoType fetch = Memory, long pid = -1 ); 0101 /// Basic Process Information: Amount of paged memory that can be occupied by the process 'pid' 0102 GAUDI_API long pagedMemoryLimit( MemoryUnit unit = kByte, InfoType fetch = Quota, long pid = -1 ); 0103 0104 /// System Process Limits: Minimum amount of virtual memory this process may use 0105 GAUDI_API long minMemoryLimit( MemoryUnit unit = kByte, InfoType fetch = Quota, long pid = -1 ); 0106 /// System Process Limits: Maximum amount of virtual memory this process is allowed to use 0107 GAUDI_API long maxMemoryLimit( MemoryUnit unit = kByte, InfoType fetch = Quota, long pid = -1 ); 0108 /// Basic Process Information: priority boost 0109 GAUDI_API long mappedMemory( MemoryUnit unit = kByte, InfoType fetch = Memory, long pid = -1 ); 0110 /// Basic Process Information: priority boost 0111 GAUDI_API long mappedMemoryPeak( MemoryUnit unit = kByte, InfoType fetch = Memory, long pid = -1 ); 0112 /// Basic Process Information: priority boost 0113 GAUDI_API long virtualMemory( MemoryUnit unit = kByte, InfoType fetch = Memory, long pid = -1 ); 0114 /// Basic Process Information: priority boost 0115 GAUDI_API long virtualMemoryPeak( MemoryUnit unit = kByte, InfoType fetch = Memory, long pid = -1 ); 0116 /// System Process Limits: Maximum amount of the page file this process is allowed to use 0117 GAUDI_API long virtualMemoryLimit( MemoryUnit unit = kByte, InfoType fetch = Quota, long pid = -1 ); 0118 } // namespace System 0119 #endif // GAUDIKERNEL_MEMORY_H
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |