suricata
|
#include "suricata-common.h"
#include "util-error.h"
#include "util-debug.h"
#include "util-cpu.h"
#include "util-byte.h"
Go to the source code of this file.
Functions | |
uint16_t | UtilCpuGetNumProcessorsConfigured (void) |
Get the number of cpus configured in the system. More... | |
uint16_t | UtilCpuGetNumProcessorsOnline (void) |
Get the number of cpus online in the system. More... | |
void | UtilCpuPrintSummary (void) |
Print a summary of CPUs detected (configured and online) More... | |
uint64_t | UtilCpuGetTicks (void) |
Retrieve CPU information (configured CPUs, online CPUs)
Definition in file util-cpu.c.
uint16_t UtilCpuGetNumProcessorsConfigured | ( | void | ) |
Get the number of cpus configured in the system.
Ok, if they should use sysconf, check that they have the macro's (syscalls) defined;
Note: For windows it's different; Check the following: SYSTEM_INFO info; GetSystemInfo(&info); -> info.dwNumberOfProcessors;
0 | if the syscall is not available or we have an error; otherwise it will return the number of cpus configured |
Definition at line 59 of file util-cpu.c.
References SCLogDebug, SCLogError, SCLogWarning, and StringParseInt64().
Referenced by UtilCpuGetNumProcessorsOnline(), and UtilCpuPrintSummary().
uint16_t UtilCpuGetNumProcessorsOnline | ( | void | ) |
Get the number of cpus online in the system.
0 | if the syscall is not available or we have an error; otherwise it will return the number of cpus online |
Definition at line 108 of file util-cpu.c.
References SCLogDebug, SCLogError, and UtilCpuGetNumProcessorsConfigured().
Referenced by AffinityGetNextCPU(), BuildCpusetWithCallback(), NFQRegisterQueue(), RunModeErfFileAutoFp(), RunModeFilePcapAutoFp(), TmThreadsGetWorkerThreadMax(), UtilAffinityGetAffinedCPUNum(), and UtilCpuPrintSummary().
uint64_t UtilCpuGetTicks | ( | void | ) |
Get the current number of ticks from the CPU.
Definition at line 161 of file util-cpu.c.
void UtilCpuPrintSummary | ( | void | ) |
Print a summary of CPUs detected (configured and online)
Definition at line 140 of file util-cpu.c.
References SCLogDebug, SCLogInfo, UtilCpuGetNumProcessorsConfigured(), and UtilCpuGetNumProcessorsOnline().