Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Section
Column

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. 

 

Column
width350px
Panel

이 페이지의 주요 내용

Table of Contents
maxLevel4

Info

MCCS 는 설치시 최초 사용자 계정으로 id 가 'admin' 암호가 'password'인 계정을 생성합니다.
CLI 명령을 실행시 id 와 password를 입력하지 않으면 , 위의 최초 사용자 계정의 id와 암호로 실행됩니다.
따라서 최초 사용자의 패스워드 변경시, 필수적으로 CLI 명령에 id와 password를 옵션으로 입력해야만 합니다 When you install MCCS, the initial user account ID is set to 'admin' and the password is set to 'password'.
When you run the CLI command, you need to enter the ID and the password. Otherwise, the above initial ID and password will be used.
Thus, when you change the initial user password, you must enter the ID/password in the CLI command as options.

Examples of Batch script with MCCS CLI

...

Code Block
titleCLITestGroup 생성
@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."

...

In group CLITestGroup, create the CLITestProcess process and go online

Code Block
title그룹 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"