Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Network #44

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,9 @@ DIRS += iocBoot
# For LCLS
#DIRS += testIocAdminApp
endif
ifeq '$(MAKE_TEST_NET_IOC_APP)' 'YES'
DIRS += testIocNetStatsApp
testIocStatsApp_DEPEND_DIRS = devIocStats
DIRS += iocBoot
endif
include $(TOP)/configure/RULES_TOP
12 changes: 7 additions & 5 deletions configure/RELEASE
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@
#NOTE: MSI moved to CONFIG_SITE.

# SNCSEQ required only if testIocStatsApp will be built.
MAKE_TEST_IOC_APP=YES

#MAKE_TEST_IOC_APP=YES
MAKE_TEST_NET_IOC_APP=YES
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The configure/RELEASE file is only supposed to contain variables with paths pointing to other modules. I know you didn't start this, but you're changing it so please move this variable to the configure/CONFIG_SITE file where it really belongs.

# =============================================================
# Define the version of modules needed by
# IOC apps or other Support apps - used by testIocStatsApp
# =============================================================
SUPPORT=/usr/local/epics/R3.14.11/modules/soft/synApps_5_5/support
#SUPPORT=/usr/local/epics/R3.14.11/modules/soft/synApps_5_5/support

SNCSEQ = $(SUPPORT)/seq-2-0-12
#SNCSEQ = $(SUPPORT)/seq-2-0-12
SUPPORT=/home/mirek/epics/R3.15.8/modules/soft/synApps_6_1/support/
#SNCSEQ =$(SUPPORT)/seq-2-2-6

EPICS_BASE=/afs/slac/g/spear/epics/base
EPICS_BASE=/home/mirek/epics/R3.15.8/base-3.15.8

# These lines allow developers to override these RELEASE settings
# without having to modify this file directly.
Expand Down
10 changes: 8 additions & 2 deletions devIocStats/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ INC += devIocStatsOSD.h

#=============================

LIBRARY_IOC = devIocStats
LIBRARY_IOC = devIocStats devIocStatsSeq

devIocStats_LIBS = $(EPICS_BASE_IOC_LIBS)
devIocStatsSeq_LIBS = $(EPICS_BASE_IOC_LIBS)
devIocStats_SYS_LIBS_solaris = kstat
devIocStats_SYS_LIBS_WIN32 += psapi

Expand All @@ -26,7 +27,11 @@ SRCS += devIocStatsString.c
SRCS += devIocStatsWaveform.c
SRCS += devIocStatsSub.c
SRCS += devIocStatsTest.c

SRCS += ioccar.c
devIocStats_SRCS += seqFunction.c
ifeq ($(NETWORK_STAT),NO)
USR_CFLAGS_Linux += -DNO_NETWORK_STAT
endif
# OSD parts
# Base 3.14 does not correctly define POSIX=NO for mingw
ifeq (mingw,$(findstring mingw, $(T_A)))
Expand All @@ -35,6 +40,7 @@ endif
SRCS += osdCpuUsage.c
SRCS += osdCpuUtilization.c
SRCS += osdFdUsage.c
SRCS += osdNetStats.c
SRCS += osdMemUsage.c
SRCS += osdWorkspaceUsage.c
SRCS += osdClustInfo.c
Expand Down
2 changes: 2 additions & 0 deletions devIocStats/devIocStats.dbd
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
device(ai,INST_IO,devAiStats,"IOC stats")
device(ai,INST_IO,devAiClusts,"IOC stats clusts")
device(ai,INST_IO,devAiNet,"IOC net stats")
device(ao,INST_IO,devAoStats,"IOC stats")
device(stringin,INST_IO,devStringinStats,"IOC stats")
device(stringin,INST_IO,devStringinEnvVar,"IOC env var")
device(stringin,INST_IO,devStringinEpics,"IOC epics var")
device(stringin,INST_IO,devStringinNet,"IOC net stats")
device(waveform,INST_IO,devWaveformStats,"IOC stats")
function(rebootProc)
function(scanMonInit)
Expand Down
11 changes: 11 additions & 0 deletions devIocStats/devIocStats.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#define ST_CMD "ST_CMD"
#define ENGINEER "ENGINEER"
#define LOCATION "LOCATION"
#define WIKI "WIKI"

#include "devIocStatsOSD.h"

Expand Down Expand Up @@ -112,6 +113,16 @@ extern int devIocStatsGetClusterUsage (int pool, int *pval);
/* Network Interface Errors */
extern int devIocStatsInitIFErrors (void);
extern int devIocStatsGetIFErrors (ifErrInfo *pval);
typedef struct tNetList
{
char *pcNetIf;
void *pData;
struct tNetList *next;
}tNetList;
#define NET_OK 0
#define NET_NOK 1
extern int getPacketStats(void *ifa);
extern int getIpAddr(char *pcIf,char **pcIfAddr);

/* Boot Info */
extern int devIocStatsInitBootInfo (void);
Expand Down
Loading