Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 8 Next »

MCCS CLI is a function that provides the command from command prompt of Window O.S to MCCS service.

Types of CLI that MCCS provides are mclog.exe (add logs arbitrarily in MCCS log), mrgroup.exe (send command to MCCS group) and mcres.exe (send commands to MCCS resources).

In general, CLI is used to write script(*.bat, *.cmd) file and send commands to MCCS service.

MCCS CLI exists in '%MCCS_HOME%\bin' directory. 

이 페이지의 주요 내용

MCCS 는 설치시 최초 사용자 계정으로 id 가 'admin' 암호가 'password'인 계정을 생성합니다.
CLI 명령을 실행시 id 와 password를 입력하지 않으면 , 위의 최초 사용자 계정의 id와 암호로 실행됩니다.
따라서 최초 사용자의 패스워드 변경시, 필수적으로 CLI 명령에 id와 password를 옵션으로 입력해야만 합니다.


Examples of Batch script with MCCS CLI

Create CLITestGroup

CLITestGroup 생성
@echo on 
@echo ### Create a new group
set mclog="%MCCS_HOME%\bin\mclog.exe" 
set mcgroup="%MCCS_HOME%\bin\mcgroup.exe" 
%mclog% -n 192.168.100.2 -p 4321 -s CLITestGroup -l INFO -m "Start CLI Test Code." 

%mcgroup% -state CLITestGroup 
if not errorlevel 1 goto end 

@echo ### Create CLITestGroup.
%mclog% -n 192.168.100.2 -p 4321 -s CLITestGroup -l INFO -m "Creat new group since CLITestGroup does not exist." 
%mcgroup% -u admin -pw password -add CLITestGroup 
%mcgroup% -u admin -pw password -modify CLITestGroup -a TargetNodeList Beta,Alpha 
%mclog% -n 192.168.100.2 -p 4321 -s CLITestGroup -l INFO -m "CLITestGroup is created"  

:end
%mclog% -n 192.168.100.2 -p 4321 -s CLITestGroup -l INFO -m "Terminates CLI Test Node."

그룹 CLITestGroup에 프로세스 CLITestProcess 생성 및 온라인

그룹 CTITestGroup에 CLITestProcess 생성 및 온라인
@echo on 
@echo ### Starts CLITestProcess. 
set mclog="%MCCS_HOME%\bin\mclog.exe" 
set mcres="%MCCS_HOME%\bin\mcres.exe" 

%mclog% -n 192.168.100.2 -p 4321 -s CLITestProcess -l INFO -m "Starts CLI Test Code." 

@echo ### Test if CLITestProcess exist
%mcres% -u admin -pw password -list CLITestProcess 
if not errorlevel 3 goto end 

:cliTestProcessCreat 
@echo ### CLITestProcess  After creating a resource, enable it.
%mclog% -n 192.168.100.2 -p 4321 -s CLITestProcess -l INFO -m "Create and cause CLITestProcess resource go online." 

%mcres% -u admin -pw password -add CLITestProcess -t Process -g CLITestGroup 
%mcres% -u admin -pw password -modify CLITestProcess -a Path c:\wordpad01.exe 
%mcres% -u admin -pw password -modify CLITestProcess -a InteractWithDesktop true 
%mcres% -u admin -pw password -enable CLITestProcess 
%mcres% -u admin -pw password -online CLITestProcess -n Beta 

:end 
@echo ### Monitors group state. 
%mclog% -n 192.168.100.2 -p 4321 -s CLITestGroup -l INFO -m "Terminates CLI Test Code."
mclog -n 192.168.100.2 -p 4321 -s cli -l ERROR -m "mclog test message"
  • No labels