MIDAS
|
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdint.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <math.h>
#include <ctype.h>
#include <assert.h>
#include <string.h>
#include <iostream>
#include "midas.h"
#include "mfe.h"
#include "mstrlcpy.h"
#include "msystem.h"
#include <fstream>
Go to the source code of this file.
Classes | |
struct | CPUData_ |
struct | NetStat |
Macros | |
#define | PROCSTATFILE "/proc/stat" |
#define | PROCMEMINFOFILE "/proc/meminfo" |
#define | PROCNETSTATFILE "/proc/net/dev" |
#define | String_startsWith(s, match) (strstr((s), (match)) == (s)) |
#define | EVID_MONITOR 63 |
Typedefs | |
typedef struct CPUData_ | CPUData |
Functions | |
INT | frontend_init () |
Frontend initialization. | |
INT | frontend_exit () |
Frontend exit. | |
INT | begin_of_run (INT run_number, char *error) |
Begin of Run. | |
INT | end_of_run (INT run_number, char *error) |
End of Run. | |
INT | pause_run (INT run_number, char *error) |
Pause Run. | |
INT | resume_run (INT run_number, char *error) |
Resume Run. | |
INT | frontend_loop () |
Frontend loop. | |
INT | poll_event (INT source, INT count, BOOL test) |
INT | interrupt_configure (INT cmd, INT source, PTYPE adr) |
int | read_system_load (char *pevent, int off) |
void | ReadCPUData () |
void | ReadNetData () |
INT | rpc_callback (INT index, void *prpc_param[]) |
void | BuildHostHistoryPlot () |
void | BuildHostCPUPlot () |
void | BuildHostNetPlot () |
void | InitGPU () |
Variables | |
const char * | frontend_name = "msysmon" |
const char * | frontend_file_name = __FILE__ |
BOOL | frontend_call_loop = TRUE |
INT | display_period = 0 |
INT | max_event_size = 4*1024*1024 |
INT | max_event_size_frag = 4*1024*1024 |
INT | event_buffer_size = 10*1024*1024 |
BOOL | equipment_common_overwrite = FALSE |
EQUIPMENT | equipment [] |
int | cpuCount |
std::vector< CPUData * > | cpus |
unsigned long long int | usertime |
unsigned long long int | nicetime |
unsigned long long int | systemtime |
unsigned long long int | idletime |
int | networkInterfaceCount =0 |
std::vector< NetStat * > | NetReceive |
std::vector< NetStat * > | NetTransmit |
std::string | colours [16] |
int | event_size = 10*1024 |
HNDLE | hSet |
int | test_rb_wait_sleep = 1 |
timeval | tv |
timeval | old_tv |
timeval | new_tv |
#define EVID_MONITOR 63 |
Definition at line 97 of file msysmon.cxx.
Definition at line 23 of file msysmon.cxx.
Definition at line 27 of file msysmon.cxx.
Definition at line 19 of file msysmon.cxx.
Definition at line 30 of file msysmon.cxx.
Begin of Run.
Called every run start transition. Set equipment status in ODB, start acquisition on the modules.
[in] | run_number | Number of the run being started |
[out] | error | Can be used to write a message string to midas.log |
Definition at line 956 of file msysmon.cxx.
void BuildHostCPUPlot | ( | ) |
Definition at line 634 of file msysmon.cxx.
void BuildHostHistoryPlot | ( | ) |
Definition at line 562 of file msysmon.cxx.
void BuildHostNetPlot | ( | ) |
Definition at line 719 of file msysmon.cxx.
End of Run.
Called every stop run transition. Set equipment status in ODB, stop acquisition on the modules.
[in] | run_number | Number of the run being ended |
[out] | error | Can be used to write a message string to midas.log |
Definition at line 963 of file msysmon.cxx.
Frontend exit.
Runs at frontend shutdown. Disconnect hardware and set equipment status in ODB
Definition at line 949 of file msysmon.cxx.
Frontend initialization.
Runs once at application startup. We initialize the hardware and optical interfaces and set the equipment status in ODB. We also lock the frontend to once physical cpu core.
Definition at line 868 of file msysmon.cxx.
Frontend loop.
If frontend_call_loop is true, this routine gets called when the frontend is idle or once between every event.
Definition at line 984 of file msysmon.cxx.
void InitGPU | ( | ) |
Definition at line 1013 of file msysmon.cxx.
Pause Run.
Called every pause run transition.
[in] | run_number | Number of the run being ended |
[out] | error | Can be used to write a message string to midas.log |
Definition at line 970 of file msysmon.cxx.
Definition at line 1000 of file msysmon.cxx.
Definition at line 1275 of file msysmon.cxx.
void ReadCPUData | ( | ) |
Definition at line 1031 of file msysmon.cxx.
void ReadNetData | ( | ) |
Definition at line 1096 of file msysmon.cxx.
Resume Run.
Called every resume run transition.
[in] | run_number | Number of the run being ended |
[out] | error | Can be used to write a message string to midas.log |
Definition at line 977 of file msysmon.cxx.
Definition at line 536 of file msysmon.cxx.
std::string colours[16] |
Definition at line 311 of file msysmon.cxx.
int cpuCount |
Definition at line 150 of file msysmon.cxx.
std::vector<CPUData*> cpus |
Definition at line 151 of file msysmon.cxx.
INT display_period = 0 |
Definition at line 72 of file msysmon.cxx.
EQUIPMENT equipment[] |
Definition at line 101 of file msysmon.cxx.
Definition at line 99 of file msysmon.cxx.
INT event_buffer_size = 10*1024*1024 |
Definition at line 79 of file msysmon.cxx.
int event_size = 10*1024 |
Definition at line 527 of file msysmon.cxx.
Definition at line 68 of file msysmon.cxx.
Definition at line 65 of file msysmon.cxx.
Definition at line 62 of file msysmon.cxx.
HNDLE hSet |
Definition at line 531 of file msysmon.cxx.
INT max_event_size = 4*1024*1024 |
Definition at line 75 of file msysmon.cxx.
INT max_event_size_frag = 4*1024*1024 |
Definition at line 76 of file msysmon.cxx.
std::vector<NetStat*> NetReceive |
Definition at line 178 of file msysmon.cxx.
std::vector<NetStat*> NetTransmit |
Definition at line 179 of file msysmon.cxx.
int networkInterfaceCount =0 |
Definition at line 177 of file msysmon.cxx.
timeval new_tv |
Definition at line 1095 of file msysmon.cxx.
timeval old_tv |
Definition at line 1095 of file msysmon.cxx.
int test_rb_wait_sleep = 1 |
Definition at line 532 of file msysmon.cxx.
timeval tv |
Definition at line 1095 of file msysmon.cxx.