#include "libgen.h"
#include "sys/times.h"
#include "unistd.h"
#include <cstdio>
#include <errno.h>
#include <fcntl.h>
#include <iostream>
#include <sstream>
#include <string>
#include <sys/signal.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <sys/procfs.h>
#include <sys/resource.h>
#include <sys/time.h>
#include "GaudiKernel/ModuleInfo.h"
#include "GaudiKernel/System.h"
#include "ProcessDescriptor.h"
Go to the source code of this file.
|
| System |
| Note: OS specific details for environment resolution.
|
|
|
enum | System::ProcessInfoCommand {
System::ProcessBasicInformation,
System::ProcessQuotaLimits,
System::ProcessIoCounters,
System::ProcessVmCounters,
System::ProcessTimes,
System::ProcessBasePriority,
System::ProcessRaisePriority,
System::ProcessDebugPort,
System::ProcessExceptionPort,
System::ProcessAccessToken,
System::ProcessLdtInformation,
System::ProcessLdtSize,
System::ProcessDefaultHardErrorMode,
System::ProcessIoPortHandlers,
System::ProcessPooledUsageAndLimits,
System::ProcessWorkingSetWatch,
System::ProcessUserModeIOPL,
System::ProcessEnableAlignmentFaultFixup,
System::ProcessPriorityClass,
System::ProcessWx86Information,
System::ProcessHandleCount,
System::ProcessAffinityMask,
System::ProcessPriorityBoost,
System::MaxProcessInfoClass,
System::ProcessEllapsedTime
} |
|
#define GAUDIKERNEL_PROCSTAT_CPP |
void readProcStat |
( |
long |
pid, |
|
|
linux_proc & |
pinfo |
|
) |
| |
Definition at line 303 of file ProcessDescriptor.cpp.
311 ost <<
"/proc/" << pid <<
"/stat";
313 if ( ( fd = open( fname.
c_str(), O_RDONLY ) ) < 0 ) {
318 lseek( fd, 0, SEEK_SET );
319 if ( ( cnt =
read( fd, buf,
sizeof( buf ) - 1 ) ) < 0 ) {
331 "%d %s %c %d %d %d %d %d %lu %lu %lu %lu %lu %lu %lu %ld %ld %ld %ld %ld %ld %llu %lu %ld %lu %lu %lu %lu " 332 "%lu %lu %lu %lu %lu %lu %lu",
def read(f, regex='.*', skipevents=0)
unsigned long long starttime