You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-05 16:15:50 +03:00
add mscadmin
This commit is contained in:
@@ -106,7 +106,7 @@ rm -rf $RPM_BUILD_ROOT $RPM_BUILD_DIR/%{name}-%{version}-%{release}
|
||||
/usr/local/Calpont/bin/clearShm
|
||||
/usr/local/Calpont/bin/viewtablelock
|
||||
/usr/local/Calpont/bin/cleartablelock
|
||||
/usr/local/Calpont/bin/calpontConsole
|
||||
/usr/local/Calpont/bin/mcsadmin
|
||||
/usr/local/Calpont/bin/trapHandler
|
||||
/usr/local/Calpont/bin/remote_command.sh
|
||||
/usr/local/Calpont/bin/postConfigure
|
||||
|
@@ -25,7 +25,7 @@ if [ ! -d ${builddir}/export/Calpont ]; then
|
||||
fi
|
||||
|
||||
# stop any current procs
|
||||
${prefix}/Calpont/bin/calpontConsole shutdownsystem y
|
||||
${prefix}/Calpont/bin/mcsadmin shutdownsystem y
|
||||
if [ -x ${prefix}/Calpont/bin/infinidb ]; then
|
||||
${prefix}/Calpont/bin/infinidb stop
|
||||
fi
|
||||
@@ -86,7 +86,7 @@ sed -i -e 's/port.*=.*3306/port=14406/' ${prefix}/Calpont/mysql/my.cnf
|
||||
${prefix}/Calpont/bin/postConfigure -n
|
||||
|
||||
# restart (argh)
|
||||
#${prefix}/Calpont/bin/calpontConsole RestartSystem y
|
||||
#${prefix}/Calpont/bin/mcsadmin RestartSystem y
|
||||
|
||||
sleep 30
|
||||
pkill DMLProc
|
||||
|
@@ -10,7 +10,7 @@ TARGETS = bootstrap clean test docs coverage leakcheck install
|
||||
.PHONY: all $(TARGETS)
|
||||
|
||||
all:
|
||||
$(MAKE) -C calpontConsole
|
||||
$(MAKE) -C mcsadmin
|
||||
$(MAKE) -C traphandler
|
||||
$(MAKE) -C serverMonitor
|
||||
$(MAKE) -C postConfigure
|
||||
@@ -18,7 +18,7 @@ all:
|
||||
$(MAKE) -C sendtrap
|
||||
$(MAKE) -C calpontSupport
|
||||
$(TARGETS):
|
||||
$(MAKE) -C calpontConsole $@
|
||||
$(MAKE) -C mcsadmin $@
|
||||
$(MAKE) -C traphandler $@
|
||||
$(MAKE) -C serverMonitor $@
|
||||
$(MAKE) -C postConfigure $@
|
||||
|
83
oamapps/mcsadmin/1
Normal file
83
oamapps/mcsadmin/1
Normal file
@@ -0,0 +1,83 @@
|
||||
:******************************************************************************************
|
||||
# $Id: Makefile 2339 2012-05-02 18:20:56Z pleblanc $
|
||||
#
|
||||
# Copyright (C) 2009-2012 Calpont Corporation
|
||||
# All rights reserved
|
||||
#*****************************************************************************************/
|
||||
include ../../rules.mak
|
||||
|
||||
# The name of the executable
|
||||
|
||||
PROGRAM=mcadmin
|
||||
VERSION=1.0.0
|
||||
|
||||
# List all the source files here
|
||||
SRCS=mcadmin.cpp
|
||||
|
||||
# Run-time directories for project shared libs
|
||||
CALPONT_LIBRARY_PATH=$(EXPORT_ROOT)/lib
|
||||
|
||||
# Preprocessor flags
|
||||
CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2
|
||||
|
||||
# Compiler flags
|
||||
CXXFLAGS+=$(DEBUG_FLAGS) -Wall
|
||||
|
||||
# Linker flags
|
||||
# we need to add some search paths here because on a boostrap build we won't find liboamcpp
|
||||
# anywhere except in ../oamcpp
|
||||
CLIBS=-L../oamcpp -L$(EXPORT_ROOT)/lib $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS)
|
||||
LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib
|
||||
TLIBS=-L/usr/local/lib -lcppunit -ldl
|
||||
GLIBS=$(CLIBS)
|
||||
|
||||
.PHONY: install clean test docs FORCE coverage leakcheck
|
||||
|
||||
GLIBS=-lcppunit -ldl
|
||||
|
||||
OBJS=$(SRCS:.cpp=.o)
|
||||
|
||||
$(PROGRAM): $(OBJS)
|
||||
$(LINK.cpp) -o $@ $^ -Wl,-Bstatic -lreadline -Wl,-Bdynamic -lncurses -ltinfo
|
||||
|
||||
install: bootstrap $(PROGRAM)
|
||||
mkdir -p $(INSTALL_ROOT_BIN)
|
||||
$(INSTALL) $(PROGRAM) $(INSTALL_ROOT_BIN)
|
||||
|
||||
bootstrap:
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS) tdriver.o $(PROGRAM) $(LIBRARY) tdriver core *~ *.tag *-gcov.* *.gcov tdriver-gcov *.d *.d.* tdriver.output
|
||||
rm -rf html
|
||||
|
||||
docs:
|
||||
doxygen $(EXPORT_ROOT)/etc/Doxyfile
|
||||
|
||||
tdriver: tdriver.o
|
||||
$(LINK.cpp) -o $@ $^ $(TLIBS)
|
||||
|
||||
test: $(LIBRARY) tdriver
|
||||
rm -f /var/log/Calpont/uiCommands.log
|
||||
LD_LIBRARY_PATH=.:$(EXPORT_ROOT)/lib:/usr/local/lib ./tdriver
|
||||
|
||||
%-gcov.o: %.cpp
|
||||
$(COMPILE.cpp) -o $@ $^
|
||||
|
||||
tdriver-gcov: CXXFLAGS+=-fprofile-arcs -ftest-coverage
|
||||
tdriver-gcov: mcadmin-gcov.o $(subst .o,-gcov.o,$(OBJS))
|
||||
$(LINK.cpp) -o $@ $^ $(GLIBS)
|
||||
|
||||
|
||||
leakcheck: $(LIBRARY) tdriver
|
||||
rm -f /var/log/Calpont/uiCommands.log
|
||||
LD_LIBRARY_PATH=.:$(EXPORT_ROOT)/lib:/usr/local/lib valgrind --tool=memcheck --leak-check=yes ./tdriver
|
||||
|
||||
%.d: %.cpp
|
||||
@set -e; rm -f $@; \
|
||||
$(CC) -MM $(CPPFLAGS) $< > $@.$$$$; \
|
||||
sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
|
||||
rm -f $@.$$$$
|
||||
|
||||
ifndef BOOTSTRAP
|
||||
-include $(SRCS:.cpp=.d) tdriver.d
|
||||
endif
|
275
oamapps/mcsadmin/Doxyfile
Normal file
275
oamapps/mcsadmin/Doxyfile
Normal file
@@ -0,0 +1,275 @@
|
||||
# Doxyfile 1.4.1-KDevelop
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
PROJECT_NAME = mcsadmin.kdevelop
|
||||
PROJECT_NUMBER = $VERSION$
|
||||
OUTPUT_DIRECTORY =
|
||||
CREATE_SUBDIRS = NO
|
||||
OUTPUT_LANGUAGE = English
|
||||
USE_WINDOWS_ENCODING = NO
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
REPEAT_BRIEF = YES
|
||||
ABBREVIATE_BRIEF = "The $name class" \
|
||||
"The $name widget" \
|
||||
"The $name file" \
|
||||
is \
|
||||
provides \
|
||||
specifies \
|
||||
contains \
|
||||
represents \
|
||||
a \
|
||||
an \
|
||||
the
|
||||
ALWAYS_DETAILED_SEC = NO
|
||||
INLINE_INHERITED_MEMB = NO
|
||||
FULL_PATH_NAMES = YES
|
||||
STRIP_FROM_PATH = /home/dhill/
|
||||
STRIP_FROM_INC_PATH =
|
||||
SHORT_NAMES = NO
|
||||
JAVADOC_AUTOBRIEF = NO
|
||||
MULTILINE_CPP_IS_BRIEF = NO
|
||||
DETAILS_AT_TOP = NO
|
||||
INHERIT_DOCS = YES
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
TAB_SIZE = 8
|
||||
ALIASES =
|
||||
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
SUBGROUPING = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Build related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
EXTRACT_ALL = NO
|
||||
EXTRACT_PRIVATE = NO
|
||||
EXTRACT_STATIC = NO
|
||||
EXTRACT_LOCAL_CLASSES = YES
|
||||
EXTRACT_LOCAL_METHODS = NO
|
||||
HIDE_UNDOC_MEMBERS = NO
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
HIDE_IN_BODY_DOCS = NO
|
||||
INTERNAL_DOCS = NO
|
||||
CASE_SENSE_NAMES = YES
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
SHOW_INCLUDE_FILES = YES
|
||||
INLINE_INFO = YES
|
||||
SORT_MEMBER_DOCS = YES
|
||||
SORT_BRIEF_DOCS = NO
|
||||
SORT_BY_SCOPE_NAME = NO
|
||||
GENERATE_TODOLIST = YES
|
||||
GENERATE_TESTLIST = YES
|
||||
GENERATE_BUGLIST = YES
|
||||
GENERATE_DEPRECATEDLIST= YES
|
||||
ENABLED_SECTIONS =
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
SHOW_USED_FILES = YES
|
||||
SHOW_DIRECTORIES = YES
|
||||
FILE_VERSION_FILTER =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
QUIET = NO
|
||||
WARNINGS = YES
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
WARN_NO_PARAMDOC = NO
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
WARN_LOGFILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
INPUT = /home/dhill/InfiniDB_MariaDB/oamapps/mcsadmin
|
||||
FILE_PATTERNS = *.c \
|
||||
*.cc \
|
||||
*.cxx \
|
||||
*.cpp \
|
||||
*.c++ \
|
||||
*.java \
|
||||
*.ii \
|
||||
*.ixx \
|
||||
*.ipp \
|
||||
*.i++ \
|
||||
*.inl \
|
||||
*.h \
|
||||
*.hh \
|
||||
*.hxx \
|
||||
*.hpp \
|
||||
*.h++ \
|
||||
*.idl \
|
||||
*.odl \
|
||||
*.cs \
|
||||
*.php \
|
||||
*.php3 \
|
||||
*.inc \
|
||||
*.m \
|
||||
*.mm \
|
||||
*.dox \
|
||||
*.C \
|
||||
*.CC \
|
||||
*.C++ \
|
||||
*.II \
|
||||
*.I++ \
|
||||
*.H \
|
||||
*.HH \
|
||||
*.H++ \
|
||||
*.CS \
|
||||
*.PHP \
|
||||
*.PHP3 \
|
||||
*.M \
|
||||
*.MM \
|
||||
*.C \
|
||||
*.H \
|
||||
*.tlh \
|
||||
*.diff \
|
||||
*.patch \
|
||||
*.moc \
|
||||
*.xpm \
|
||||
*.dox
|
||||
RECURSIVE = yes
|
||||
EXCLUDE =
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXCLUDE_PATTERNS =
|
||||
EXAMPLE_PATH =
|
||||
EXAMPLE_PATTERNS = *
|
||||
EXAMPLE_RECURSIVE = NO
|
||||
IMAGE_PATH =
|
||||
INPUT_FILTER =
|
||||
FILTER_PATTERNS =
|
||||
FILTER_SOURCE_FILES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to source browsing
|
||||
#---------------------------------------------------------------------------
|
||||
SOURCE_BROWSER = NO
|
||||
INLINE_SOURCES = NO
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
REFERENCED_BY_RELATION = YES
|
||||
REFERENCES_RELATION = YES
|
||||
VERBATIM_HEADERS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
ALPHABETICAL_INDEX = NO
|
||||
COLS_IN_ALPHA_INDEX = 5
|
||||
IGNORE_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_HTML = YES
|
||||
HTML_OUTPUT = html
|
||||
HTML_FILE_EXTENSION = .html
|
||||
HTML_HEADER =
|
||||
HTML_FOOTER =
|
||||
HTML_STYLESHEET =
|
||||
HTML_ALIGN_MEMBERS = YES
|
||||
GENERATE_HTMLHELP = NO
|
||||
CHM_FILE =
|
||||
HHC_LOCATION =
|
||||
GENERATE_CHI = NO
|
||||
BINARY_TOC = NO
|
||||
TOC_EXPAND = NO
|
||||
DISABLE_INDEX = NO
|
||||
ENUM_VALUES_PER_LINE = 4
|
||||
GENERATE_TREEVIEW = NO
|
||||
TREEVIEW_WIDTH = 250
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_LATEX = YES
|
||||
LATEX_OUTPUT = latex
|
||||
LATEX_CMD_NAME = latex
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
COMPACT_LATEX = NO
|
||||
PAPER_TYPE = a4wide
|
||||
EXTRA_PACKAGES =
|
||||
LATEX_HEADER =
|
||||
PDF_HYPERLINKS = NO
|
||||
USE_PDFLATEX = NO
|
||||
LATEX_BATCHMODE = NO
|
||||
LATEX_HIDE_INDICES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_RTF = NO
|
||||
RTF_OUTPUT = rtf
|
||||
COMPACT_RTF = NO
|
||||
RTF_HYPERLINKS = NO
|
||||
RTF_STYLESHEET_FILE =
|
||||
RTF_EXTENSIONS_FILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_MAN = NO
|
||||
MAN_OUTPUT = man
|
||||
MAN_EXTENSION = .3
|
||||
MAN_LINKS = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the XML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_XML = yes
|
||||
XML_OUTPUT = xml
|
||||
XML_SCHEMA =
|
||||
XML_DTD =
|
||||
XML_PROGRAMLISTING = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options for the AutoGen Definitions output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the Perl module output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_PERLMOD = NO
|
||||
PERLMOD_LATEX = NO
|
||||
PERLMOD_PRETTY = YES
|
||||
PERLMOD_MAKEVAR_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
ENABLE_PREPROCESSING = YES
|
||||
MACRO_EXPANSION = NO
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
SEARCH_INCLUDES = YES
|
||||
INCLUDE_PATH =
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
PREDEFINED =
|
||||
EXPAND_AS_DEFINED =
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
TAGFILES =
|
||||
GENERATE_TAGFILE = mcsadmin.tag
|
||||
ALLEXTERNALS = NO
|
||||
EXTERNAL_GROUPS = YES
|
||||
PERL_PATH = /usr/bin/perl
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
CLASS_DIAGRAMS = YES
|
||||
HIDE_UNDOC_RELATIONS = YES
|
||||
HAVE_DOT = NO
|
||||
CLASS_GRAPH = YES
|
||||
COLLABORATION_GRAPH = YES
|
||||
GROUP_GRAPHS = YES
|
||||
UML_LOOK = NO
|
||||
TEMPLATE_RELATIONS = NO
|
||||
INCLUDE_GRAPH = YES
|
||||
INCLUDED_BY_GRAPH = YES
|
||||
CALL_GRAPH = NO
|
||||
GRAPHICAL_HIERARCHY = YES
|
||||
DIRECTORY_GRAPH = YES
|
||||
DOT_IMAGE_FORMAT = png
|
||||
DOT_PATH =
|
||||
DOTFILE_DIRS =
|
||||
MAX_DOT_GRAPH_WIDTH = 1024
|
||||
MAX_DOT_GRAPH_HEIGHT = 1024
|
||||
MAX_DOT_GRAPH_DEPTH = 1000
|
||||
DOT_TRANSPARENT = NO
|
||||
DOT_MULTI_TARGETS = NO
|
||||
GENERATE_LEGEND = YES
|
||||
DOT_CLEANUP = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to the search engine
|
||||
#---------------------------------------------------------------------------
|
||||
SEARCHENGINE = NO
|
83
oamapps/mcsadmin/Makefile
Executable file
83
oamapps/mcsadmin/Makefile
Executable file
@@ -0,0 +1,83 @@
|
||||
:******************************************************************************************
|
||||
# $Id: Makefile 2339 2012-05-02 18:20:56Z pleblanc $
|
||||
#
|
||||
# Copyright (C) 2009-2012 Calpont Corporation
|
||||
# All rights reserved
|
||||
#*****************************************************************************************/
|
||||
include ../../rules.mak
|
||||
|
||||
# The name of the executable
|
||||
|
||||
PROGRAM=mcsadmin
|
||||
VERSION=1.0.0
|
||||
|
||||
# List all the source files here
|
||||
SRCS=mcsadmin.cpp
|
||||
|
||||
# Run-time directories for project shared libs
|
||||
CALPONT_LIBRARY_PATH=$(EXPORT_ROOT)/lib
|
||||
|
||||
# Preprocessor flags
|
||||
CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2
|
||||
|
||||
# Compiler flags
|
||||
CXXFLAGS+=$(DEBUG_FLAGS) -Wall
|
||||
|
||||
# Linker flags
|
||||
# we need to add some search paths here because on a boostrap build we won't find liboamcpp
|
||||
# anywhere except in ../oamcpp
|
||||
CLIBS=-L../oamcpp -L$(EXPORT_ROOT)/lib $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS)
|
||||
LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib
|
||||
TLIBS=-L/usr/local/lib -lcppunit -ldl
|
||||
GLIBS=$(CLIBS)
|
||||
|
||||
.PHONY: install clean test docs FORCE coverage leakcheck
|
||||
|
||||
GLIBS=-lcppunit -ldl
|
||||
|
||||
OBJS=$(SRCS:.cpp=.o)
|
||||
|
||||
$(PROGRAM): $(OBJS)
|
||||
$(LINK.cpp) -o $@ $^ -Wl,-Bstatic -lreadline -Wl,-Bdynamic -lncurses -ltinfo
|
||||
|
||||
install: bootstrap $(PROGRAM)
|
||||
mkdir -p $(INSTALL_ROOT_BIN)
|
||||
$(INSTALL) $(PROGRAM) $(INSTALL_ROOT_BIN)
|
||||
|
||||
bootstrap:
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS) tdriver.o $(PROGRAM) $(LIBRARY) tdriver core *~ *.tag *-gcov.* *.gcov tdriver-gcov *.d *.d.* tdriver.output
|
||||
rm -rf html
|
||||
|
||||
docs:
|
||||
doxygen $(EXPORT_ROOT)/etc/Doxyfile
|
||||
|
||||
tdriver: tdriver.o
|
||||
$(LINK.cpp) -o $@ $^ $(TLIBS)
|
||||
|
||||
test: $(LIBRARY) tdriver
|
||||
rm -f /var/log/Calpont/uiCommands.log
|
||||
LD_LIBRARY_PATH=.:$(EXPORT_ROOT)/lib:/usr/local/lib ./tdriver
|
||||
|
||||
%-gcov.o: %.cpp
|
||||
$(COMPILE.cpp) -o $@ $^
|
||||
|
||||
tdriver-gcov: CXXFLAGS+=-fprofile-arcs -ftest-coverage
|
||||
tdriver-gcov: mcsadmin-gcov.o $(subst .o,-gcov.o,$(OBJS))
|
||||
$(LINK.cpp) -o $@ $^ $(GLIBS)
|
||||
|
||||
|
||||
leakcheck: $(LIBRARY) tdriver
|
||||
rm -f /var/log/Calpont/uiCommands.log
|
||||
LD_LIBRARY_PATH=.:$(EXPORT_ROOT)/lib:/usr/local/lib valgrind --tool=memcheck --leak-check=yes ./tdriver
|
||||
|
||||
%.d: %.cpp
|
||||
@set -e; rm -f $@; \
|
||||
$(CC) -MM $(CPPFLAGS) $< > $@.$$$$; \
|
||||
sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
|
||||
rm -f $@.$$$$
|
||||
|
||||
ifndef BOOTSTRAP
|
||||
-include $(SRCS:.cpp=.d) tdriver.d
|
||||
endif
|
83
oamapps/mcsadmin/Makefile~
Executable file
83
oamapps/mcsadmin/Makefile~
Executable file
@@ -0,0 +1,83 @@
|
||||
:******************************************************************************************
|
||||
# $Id: Makefile 2339 2012-05-02 18:20:56Z pleblanc $
|
||||
#
|
||||
# Copyright (C) 2009-2012 Calpont Corporation
|
||||
# All rights reserved
|
||||
#*****************************************************************************************/
|
||||
include ../../rules.mak
|
||||
|
||||
# The name of the executable
|
||||
|
||||
PROGRAM=mcadmin
|
||||
VERSION=1.0.0
|
||||
|
||||
# List all the source files here
|
||||
SRCS=mcadmin.cpp
|
||||
|
||||
# Run-time directories for project shared libs
|
||||
CALPONT_LIBRARY_PATH=$(EXPORT_ROOT)/lib
|
||||
|
||||
# Preprocessor flags
|
||||
CPPFLAGS=-I$(EXPORT_ROOT)/include -I/usr/include/libxml2
|
||||
|
||||
# Compiler flags
|
||||
CXXFLAGS+=$(DEBUG_FLAGS) -Wall
|
||||
|
||||
# Linker flags
|
||||
# we need to add some search paths here because on a boostrap build we won't find liboamcpp
|
||||
# anywhere except in ../oamcpp
|
||||
CLIBS=-L../oamcpp -L$(EXPORT_ROOT)/lib $(IDB_COMMON_LIBS) $(IDB_SNMP_LIBS)
|
||||
LDFLAGS+=$(CLIBS) -Wl,--rpath -Wl,/usr/local/Calpont/lib
|
||||
TLIBS=-L/usr/local/lib -lcppunit -ldl
|
||||
GLIBS=$(CLIBS)
|
||||
|
||||
.PHONY: install clean test docs FORCE coverage leakcheck
|
||||
|
||||
GLIBS=-lcppunit -ldl
|
||||
|
||||
OBJS=$(SRCS:.cpp=.o)
|
||||
|
||||
$(PROGRAM): $(OBJS)
|
||||
$(LINK.cpp) -o $@ $^ -Wl,-Bstatic -lreadline -Wl,-Bdynamic -lncurses -ltinfo
|
||||
|
||||
install: bootstrap $(PROGRAM)
|
||||
mkdir -p $(INSTALL_ROOT_BIN)
|
||||
$(INSTALL) $(PROGRAM) $(INSTALL_ROOT_BIN)
|
||||
|
||||
bootstrap:
|
||||
|
||||
clean:
|
||||
rm -f $(OBJS) tdriver.o $(PROGRAM) $(LIBRARY) tdriver core *~ *.tag *-gcov.* *.gcov tdriver-gcov *.d *.d.* tdriver.output
|
||||
rm -rf html
|
||||
|
||||
docs:
|
||||
doxygen $(EXPORT_ROOT)/etc/Doxyfile
|
||||
|
||||
tdriver: tdriver.o
|
||||
$(LINK.cpp) -o $@ $^ $(TLIBS)
|
||||
|
||||
test: $(LIBRARY) tdriver
|
||||
rm -f /var/log/Calpont/uiCommands.log
|
||||
LD_LIBRARY_PATH=.:$(EXPORT_ROOT)/lib:/usr/local/lib ./tdriver
|
||||
|
||||
%-gcov.o: %.cpp
|
||||
$(COMPILE.cpp) -o $@ $^
|
||||
|
||||
tdriver-gcov: CXXFLAGS+=-fprofile-arcs -ftest-coverage
|
||||
tdriver-gcov: mcadmin-gcov.o $(subst .o,-gcov.o,$(OBJS))
|
||||
$(LINK.cpp) -o $@ $^ $(GLIBS)
|
||||
|
||||
|
||||
leakcheck: $(LIBRARY) tdriver
|
||||
rm -f /var/log/Calpont/uiCommands.log
|
||||
LD_LIBRARY_PATH=.:$(EXPORT_ROOT)/lib:/usr/local/lib valgrind --tool=memcheck --leak-check=yes ./tdriver
|
||||
|
||||
%.d: %.cpp
|
||||
@set -e; rm -f $@; \
|
||||
$(CC) -MM $(CPPFLAGS) $< > $@.$$$$; \
|
||||
sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
|
||||
rm -f $@.$$$$
|
||||
|
||||
ifndef BOOTSTRAP
|
||||
-include $(SRCS:.cpp=.d) tdriver.d
|
||||
endif
|
8496
oamapps/mcsadmin/mcadmin.cpp~
Normal file
8496
oamapps/mcsadmin/mcadmin.cpp~
Normal file
File diff suppressed because it is too large
Load Diff
0
oamapps/mcsadmin/mcadmin.d.20892
Normal file
0
oamapps/mcsadmin/mcadmin.d.20892
Normal file
0
oamapps/mcsadmin/mcadmin.d.21522
Normal file
0
oamapps/mcsadmin/mcadmin.d.21522
Normal file
135
oamapps/mcsadmin/mcadmin.h~
Normal file
135
oamapps/mcsadmin/mcadmin.h~
Normal file
@@ -0,0 +1,135 @@
|
||||
/* Copyright (C) 2014 InfiniDB, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; version 2 of
|
||||
the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
/******************************************************************************************
|
||||
* $Id: calpontConsole.h 3071 2013-04-04 18:45:53Z rdempsey $
|
||||
*
|
||||
******************************************************************************************/
|
||||
/**
|
||||
* @file
|
||||
*/
|
||||
#ifndef CALPONTCONSOLE_H
|
||||
#define CALPONTCONSOLE_H
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <cstdlib>
|
||||
#include <string>
|
||||
#include <limits.h>
|
||||
#include <sstream>
|
||||
#include <exception>
|
||||
#include <stdexcept>
|
||||
#include <vector>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <sys/signal.h>
|
||||
#include <sys/types.h>
|
||||
#include <readline/readline.h>
|
||||
#include <readline/history.h>
|
||||
#include <time.h>
|
||||
#include <pthread.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "liboamcpp.h"
|
||||
#include "configcpp.h"
|
||||
#include "snmpmanager.h"
|
||||
#include "snmpglobal.h"
|
||||
#include "calpontsystemcatalog.h"
|
||||
#include "brmtypes.h"
|
||||
|
||||
|
||||
const int CmdSize = 80;
|
||||
const int ArgNum = 10;
|
||||
const int DescNumMax = 10;
|
||||
const int cmdNum = 68;
|
||||
|
||||
const std::string DEFAULT_LOG_FILE = "/var/log/Calpont/uiCommands.log";
|
||||
std::ofstream logFile;
|
||||
|
||||
/**
|
||||
* write the command to the log file
|
||||
*/
|
||||
void writeLog(std::string command);
|
||||
|
||||
/** @brief location of the Process Configuration file
|
||||
*/
|
||||
const std::string ConsoleCmdsFile= "ConsoleCmds.xml";
|
||||
|
||||
void getFlags(const std::string* arguments, oam::GRACEFUL_FLAG& gracefulTemp, oam::ACK_FLAG& ackTemp, oam::CC_SUSPEND_ANSWER& suspendAnswer, bool& bNeedsConfirm, std::string* password = NULL);
|
||||
int confirmPrompt(std::string warningCommand);
|
||||
std::string dataPrompt(std::string promptCommand);
|
||||
int processCommand(std::string*);
|
||||
int ProcessSupportCommand(int CommandID, std::string arguments[]);
|
||||
void printAlarmSummary();
|
||||
void printCriticalAlarms();
|
||||
void checkRepeat(std::string*, int);
|
||||
void printSystemStatus();
|
||||
void printProcessStatus(std::string port = "ProcStatusControl");
|
||||
void printModuleCpuUsers(oam::TopProcessCpuUsers topprocesscpuusers);
|
||||
void printModuleCpu(oam::ModuleCpu modulecpu);
|
||||
void printModuleMemoryUsers(oam::TopProcessMemoryUsers topprocessmemoryusers);
|
||||
void printModuleMemory(oam::ModuleMemory modulememory);
|
||||
void printModuleDisk(oam::ModuleDisk moduledisk);
|
||||
void printModuleResources(oam::TopProcessCpuUsers topprocesscpuusers, oam::ModuleCpu modulecpu, oam::TopProcessMemoryUsers topprocessmemoryusers, oam::ModuleMemory modulememory, oam::ModuleDisk moduledisk);
|
||||
void printState(int state, std::string addInfo);
|
||||
std::string getParentOAMModule();
|
||||
bool checkForDisabledModules();
|
||||
oam::CC_SUSPEND_ANSWER AskSuspendQuestion(int CmdID);
|
||||
|
||||
|
||||
|
||||
class to_lower
|
||||
{
|
||||
public:
|
||||
char operator() (char c) const // notice the return type
|
||||
{
|
||||
return tolower(c);
|
||||
}
|
||||
};
|
||||
|
||||
/** @brief Hidden Support commands in lower-case
|
||||
*/
|
||||
const std::string supportCmds[] = { "helpsupport",
|
||||
"stopprocess",
|
||||
"startprocess",
|
||||
"restartprocess",
|
||||
"killpid",
|
||||
"rebootsystem",
|
||||
"rebootnode",
|
||||
"stopdbrmprocess",
|
||||
"startdbrmprocess",
|
||||
"restartdbrmprocess",
|
||||
"setsystemstartupstate",
|
||||
"stopprimprocs",
|
||||
"startprimprocs",
|
||||
"restartprimprocs",
|
||||
"stopexemgrs",
|
||||
"startexemgrs",
|
||||
"restartexemgrs",
|
||||
"getprocessstatusstandby",
|
||||
"distributeconfigfile",
|
||||
"getpmdbrootconfig",
|
||||
"getdbrootpmconfig",
|
||||
"getsystemdbrootconfig",
|
||||
"checkdbfunctional",
|
||||
"getsystemreadflags",
|
||||
"setsystemqueryready",
|
||||
""
|
||||
};
|
||||
|
||||
|
||||
#endif
|
8496
oamapps/mcsadmin/mcsadmin.cpp
Normal file
8496
oamapps/mcsadmin/mcsadmin.cpp
Normal file
File diff suppressed because it is too large
Load Diff
1049
oamapps/mcsadmin/mcsadmin.d
Normal file
1049
oamapps/mcsadmin/mcsadmin.d
Normal file
File diff suppressed because it is too large
Load Diff
135
oamapps/mcsadmin/mcsadmin.h
Normal file
135
oamapps/mcsadmin/mcsadmin.h
Normal file
@@ -0,0 +1,135 @@
|
||||
/* Copyright (C) 2014 InfiniDB, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; version 2 of
|
||||
the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||
MA 02110-1301, USA. */
|
||||
|
||||
/******************************************************************************************
|
||||
* $Id: MCSADMIN.h 3071 2013-04-04 18:45:53Z rdempsey $
|
||||
*
|
||||
******************************************************************************************/
|
||||
/**
|
||||
* @file
|
||||
*/
|
||||
#ifndef MCSADMIN_H
|
||||
#define MCSADMIN_H
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <cstdlib>
|
||||
#include <string>
|
||||
#include <limits.h>
|
||||
#include <sstream>
|
||||
#include <exception>
|
||||
#include <stdexcept>
|
||||
#include <vector>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <sys/signal.h>
|
||||
#include <sys/types.h>
|
||||
#include <readline/readline.h>
|
||||
#include <readline/history.h>
|
||||
#include <time.h>
|
||||
#include <pthread.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include "liboamcpp.h"
|
||||
#include "configcpp.h"
|
||||
#include "snmpmanager.h"
|
||||
#include "snmpglobal.h"
|
||||
#include "calpontsystemcatalog.h"
|
||||
#include "brmtypes.h"
|
||||
|
||||
|
||||
const int CmdSize = 80;
|
||||
const int ArgNum = 10;
|
||||
const int DescNumMax = 10;
|
||||
const int cmdNum = 68;
|
||||
|
||||
const std::string DEFAULT_LOG_FILE = "/var/log/Calpont/uiCommands.log";
|
||||
std::ofstream logFile;
|
||||
|
||||
/**
|
||||
* write the command to the log file
|
||||
*/
|
||||
void writeLog(std::string command);
|
||||
|
||||
/** @brief location of the Process Configuration file
|
||||
*/
|
||||
const std::string ConsoleCmdsFile= "ConsoleCmds.xml";
|
||||
|
||||
void getFlags(const std::string* arguments, oam::GRACEFUL_FLAG& gracefulTemp, oam::ACK_FLAG& ackTemp, oam::CC_SUSPEND_ANSWER& suspendAnswer, bool& bNeedsConfirm, std::string* password = NULL);
|
||||
int confirmPrompt(std::string warningCommand);
|
||||
std::string dataPrompt(std::string promptCommand);
|
||||
int processCommand(std::string*);
|
||||
int ProcessSupportCommand(int CommandID, std::string arguments[]);
|
||||
void printAlarmSummary();
|
||||
void printCriticalAlarms();
|
||||
void checkRepeat(std::string*, int);
|
||||
void printSystemStatus();
|
||||
void printProcessStatus(std::string port = "ProcStatusControl");
|
||||
void printModuleCpuUsers(oam::TopProcessCpuUsers topprocesscpuusers);
|
||||
void printModuleCpu(oam::ModuleCpu modulecpu);
|
||||
void printModuleMemoryUsers(oam::TopProcessMemoryUsers topprocessmemoryusers);
|
||||
void printModuleMemory(oam::ModuleMemory modulememory);
|
||||
void printModuleDisk(oam::ModuleDisk moduledisk);
|
||||
void printModuleResources(oam::TopProcessCpuUsers topprocesscpuusers, oam::ModuleCpu modulecpu, oam::TopProcessMemoryUsers topprocessmemoryusers, oam::ModuleMemory modulememory, oam::ModuleDisk moduledisk);
|
||||
void printState(int state, std::string addInfo);
|
||||
std::string getParentOAMModule();
|
||||
bool checkForDisabledModules();
|
||||
oam::CC_SUSPEND_ANSWER AskSuspendQuestion(int CmdID);
|
||||
|
||||
|
||||
|
||||
class to_lower
|
||||
{
|
||||
public:
|
||||
char operator() (char c) const // notice the return type
|
||||
{
|
||||
return tolower(c);
|
||||
}
|
||||
};
|
||||
|
||||
/** @brief Hidden Support commands in lower-case
|
||||
*/
|
||||
const std::string supportCmds[] = { "helpsupport",
|
||||
"stopprocess",
|
||||
"startprocess",
|
||||
"restartprocess",
|
||||
"killpid",
|
||||
"rebootsystem",
|
||||
"rebootnode",
|
||||
"stopdbrmprocess",
|
||||
"startdbrmprocess",
|
||||
"restartdbrmprocess",
|
||||
"setsystemstartupstate",
|
||||
"stopprimprocs",
|
||||
"startprimprocs",
|
||||
"restartprimprocs",
|
||||
"stopexemgrs",
|
||||
"startexemgrs",
|
||||
"restartexemgrs",
|
||||
"getprocessstatusstandby",
|
||||
"distributeconfigfile",
|
||||
"getpmdbrootconfig",
|
||||
"getdbrootpmconfig",
|
||||
"getsystemdbrootconfig",
|
||||
"checkdbfunctional",
|
||||
"getsystemreadflags",
|
||||
"setsystemqueryready",
|
||||
""
|
||||
};
|
||||
|
||||
|
||||
#endif
|
76
oamapps/mcsadmin/mcsadmin.kdevelop
Normal file
76
oamapps/mcsadmin/mcsadmin.kdevelop
Normal file
@@ -0,0 +1,76 @@
|
||||
<?xml version="1.0"?>
|
||||
<kdevelop>
|
||||
<general>
|
||||
<author></author>
|
||||
<email>dhill@srvhill04.calpont.com</email>
|
||||
<version>$VERSION$</version>
|
||||
<projectmanagement>KDevCustomProject</projectmanagement>
|
||||
<primarylanguage>C++</primarylanguage>
|
||||
<ignoreparts>
|
||||
</ignoreparts>
|
||||
</general>
|
||||
<kdevcustomproject>
|
||||
<run>
|
||||
<mainprogram>mcsadmin</mainprogram>
|
||||
</run>
|
||||
</kdevcustomproject>
|
||||
<kdevdebugger>
|
||||
<general>
|
||||
<dbgshell></dbgshell>
|
||||
</general>
|
||||
</kdevdebugger>
|
||||
<kdevdoctreeview>
|
||||
<ignoretocs>
|
||||
<toc>ada</toc>
|
||||
<toc>ada_bugs_gcc</toc>
|
||||
<toc>bash</toc>
|
||||
<toc>bash_bugs</toc>
|
||||
<toc>clanlib</toc>
|
||||
<toc>fortran_bugs_gcc</toc>
|
||||
<toc>gnome1</toc>
|
||||
<toc>gnustep</toc>
|
||||
<toc>gtk</toc>
|
||||
<toc>gtk_bugs</toc>
|
||||
<toc>haskell</toc>
|
||||
<toc>haskell_bugs_ghc</toc>
|
||||
<toc>java_bugs_gcc</toc>
|
||||
<toc>java_bugs_sun</toc>
|
||||
<toc>kde2book</toc>
|
||||
<toc>opengl</toc>
|
||||
<toc>pascal_bugs_fp</toc>
|
||||
<toc>php</toc>
|
||||
<toc>php_bugs</toc>
|
||||
<toc>perl</toc>
|
||||
<toc>perl_bugs</toc>
|
||||
<toc>python</toc>
|
||||
<toc>python_bugs</toc>
|
||||
<toc>qt-kdev3</toc>
|
||||
<toc>ruby</toc>
|
||||
<toc>ruby_bugs</toc>
|
||||
<toc>sdl</toc>
|
||||
<toc>sw</toc>
|
||||
<toc>w3c-dom-level2-html</toc>
|
||||
<toc>w3c-svg</toc>
|
||||
<toc>w3c-uaag10</toc>
|
||||
<toc>wxwidgets_bugs</toc>
|
||||
</ignoretocs>
|
||||
<ignoreqt_xml>
|
||||
<toc>Guide to the Qt Translation Tools</toc>
|
||||
<toc>Qt Assistant Manual</toc>
|
||||
<toc>Qt Designer Manual</toc>
|
||||
<toc>Qt Reference Documentation</toc>
|
||||
<toc>qmake User Guide</toc>
|
||||
</ignoreqt_xml>
|
||||
<ignoredoxygen>
|
||||
<toc>KDE Libraries (Doxygen)</toc>
|
||||
</ignoredoxygen>
|
||||
</kdevdoctreeview>
|
||||
<kdevfilecreate>
|
||||
<filetypes/>
|
||||
<useglobaltypes>
|
||||
<type ext="ui" />
|
||||
<type ext="cpp" />
|
||||
<type ext="h" />
|
||||
</useglobaltypes>
|
||||
</kdevfilecreate>
|
||||
</kdevelop>
|
BIN
oamapps/mcsadmin/mcsadmin.o
Normal file
BIN
oamapps/mcsadmin/mcsadmin.o
Normal file
Binary file not shown.
Reference in New Issue
Block a user