<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "New feature to Command line clients"]]></title>
		<link>http://www.openegg.org/forums/posts/list/4.page</link>
		<description><![CDATA[Latest messages posted in the topic "New feature to Command line clients"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>New feature to Command line clients</title>
				<description><![CDATA[ <br /> The Command Line client can be scripted.<br /> This is be useful for those wanting to manage their RAID configurations through scripts or their favorite automation tools. :)<br /> <br /> <br /> ----------------------------------------------------------------------<br /> [u][b]Quick tutorial[/b][/u] (full tutorial will be posted on the main site when I get a chance to)<br /> <br /> To run the command line client in:<br /> - Interactive mode: FlexRAIDClient [Host] [Port] [Timeout]<br /> - Non-Interactive mode: FlexRAIDClient Host Port Timeout Command<br /> <br /> The Host/Port/Timeout parameters are optional in interactive mode, but required in non-interactive mode.<br /> <br /> To use the default values for the Port and Timeout parameter, use a '-' as value.<br /> Ex: FlexRAIDClient localhost [color=red]- -[/color] [b]run C:\cmds\create.txt[/b]<br /> <br /> For the non-interactive mode, the "Command" parameter represents the command you would normally type in interactive mode.<br /> In the previous example, the bolded text is the command.<br /> <br /> In non-interactive mode, the client will return an exit-code that you can make use of in your script.<br /> <br /> Exit-Codes:<br /> [code]<br /> SUCCESS = 0<br /> <br /> STATE_PROCESSING = 100<br /> STATE_RESUMING = 101<br /> STATE_PAUSING = 102<br /> STATE_RESUMING_TO_ABORT = 103<br /> STATE_ABORTING = 104<br /> STATE_PAUSED = 105<br /> STATE_ABORTED = 106<br /> <br /> MISSING_COMMAND_FILE_TO_RUN = -100<br /> MISSING_COMMAND_FILE_TO_UPLOAD = -101<br /> <br /> COMMAND_NOT_SUPPORTED_IN_INTERACTIVE_MODE_PREFIX = -200<br /> COMMAND_NOT_SUPPORTED_IN_INTERACTIVE_MODE_POSTFIX = -201<br /> COMMAND_NOT_SUPPORTED_IN_INTERACTIVE_MODE_CONNECT = -202<br /> <br /> VALIDATE_ALERT_HAS_CORRUPTED_CHANGED_DELETED = -300<br /> VALIDATE_ALERT_HAS_CORRUPTED_CHANGED = -301<br /> VALIDATE_ALERT_HAS_CORRUPTED_DELETED = -302<br /> VALIDATE_ALERT_HAS_CHANGED_DELETED = -303<br /> VALIDATE_ALERT_HAS_CORRUPTED = -304<br /> VALIDATE_ALERT_HAS_CHANGED = -305<br /> VALIDATE_ALERT_HAS_DELETED = -306<br /> <br /> NO_RESPONSE_RECEIVED = -400<br /> <br /> ERROR_AN_ERROR_HAS_OCCURRED = -500<br /> ERROR_AN_EXCEPTION_HAS_OCCURRED = -501<br /> ERROR_INVALID_TASK = -510<br /> ERROR_INVALID_COMMAND = -520<br /> ERROR_INVALID_PARAMETERS = -530<br /> ERROR_INVALID_PARAMETERS_FOR_UPLOAD_COMMAND = -531<br /> ERROR_INVALID_PARAMETERS_FOR_RUN_COMMAND = -532<br /> ERROR_INVALID_PARAMETERS_FOR_MAX_COMMAND = -533<br /> ERROR_NOT_YET_IMPLEMENTED = -540<br /> ERROR_NOT_YET_SUPPORTED = -550<br /> ERROR_NON_EXISTENT_ELEMENT = -560<br /> ERROR_NO_SUCH_PROCESS_ID = -561<br /> ERROR_NO_COMMAND_SPECIFIED = -570<br /> ERROR_CONCURRENT_PROCESS_NOT_ALLOWED_ON_THE_SAME_CONFIG = -580<br /> ERROR_VALIDATION_ERROR = -590<br /> [/code]<br /> <br /> Sample script 1:<br /> [code]<br /> FlexRAID myhost - - run C:\cmds\create.txt<br /> [/code]<br /> <br /> Sample script 2:<br /> [code]<br /> <br /> rem Here we start the host<br /> cd "C:\Program Files\OpenEgg.org\FlexRAID Basic Host Service 1.0"<br /> C:<br /> start /min FlexRAID<br /> <br /> rem This here is to wait for the host to finish starting - waiting 3 seconds<br /> @ping 127.0.0.1 -n 3 -w 1000&gt; nul<br /> <br /> rem Now we switch to the command-line client<br /> cd "C:\Program Files\OpenEgg.org\FlexRAID Basic CMD Client 1.0"<br /> C:<br /> <br /> set myhost=localhost<br /> rem '-' means use the default value (9595)<br /> set myPort=-<br /> rem '-' means use the default value (2000 - [in milliseconds])<br /> set myTimeOut=-<br /> set configFile=C:\cmds\config.txt<br /> set create=%configFile% create<br /> set update=%configFile% rsynch<br /> set validate=%configFile% validate<br /> set quick-validate=%configFile% quick-validate<br /> set verify=%configFile% verify<br /> set cmdStart=FlexRAIDClient %myhost% %myPort% %myTimeOut%<br /> set logFile=C:\logs\myLog.txt<br /> <br /> %cmdStart% run %update% &gt;&gt; %logFile%<br /> IF %ERRORLEVEL% GTR 0 goto report<br /> <br /> rem This will block until the task has completed<br /> %cmdStart% monitor &gt;&gt; %logFile%<br /> <br /> :report<br /> rem IF %ERRORLEVEL% GTR 0 (<br /> rem call sendEmail "me@email.com" "my ERROR message" %ERRORLEVEL%<br /> rem goto done <br /> rem )<br /> <br /> rem IF %ERRORLEVEL% EQU 0 (<br /> rem call sendEmail "me@email.com" "my SUCCESS message"<br /> rem )<br /> <br /> :done<br /> %cmdStart% shutdown-server &gt;&gt; %logFile%<br /> [/code]<br /> <br /> Where config.txt would contain something like (see command templates package for more info):<br /> [code]<br /> metadata=D:\Data\P<br /> <br /> data=DRU1{D:\Data\D1}|DRU2{D:\Data\D2}|DRU3{D:\Data\D3}<br /> parity=PPU1{D:\Data\P}<br /> [/code]]]></description>
				<guid isPermaLink="true">http://www.openegg.org/forums/posts/preList/67/606.page</guid>
				<link>http://www.openegg.org/forums/posts/preList/67/606.page</link>
				<pubDate><![CDATA[Sun, 23 Nov 2008 20:23:20]]> GMT</pubDate>
				<author><![CDATA[ Brahim]]></author>
			</item>
			<item>
				<title>Re:New feature to Command line clients</title>
				<description><![CDATA[ Are you referring to 009?<br /> <br /> And is this something to be used on schedulers, right?]]></description>
				<guid isPermaLink="true">http://www.openegg.org/forums/posts/preList/67/608.page</guid>
				<link>http://www.openegg.org/forums/posts/preList/67/608.page</link>
				<pubDate><![CDATA[Mon, 24 Nov 2008 05:22:23]]> GMT</pubDate>
				<author><![CDATA[ gorman]]></author>
			</item>
			<item>
				<title>Re:New feature to Command line clients</title>
				<description><![CDATA[ [quote=gorman]Are you referring to 009?<br /> <br /> And is this something to be used on schedulers, right?[/quote]<br /> <br /> This will be on the command line clients.<br /> There multiple parts to FlexRAID:<br /> <br /> - A Host service: currently at RC 3 build 008 (009 released to select users)<br /> - A Web UI client: currently at build 3<br /> - A DOS/Shell client: currently at RC2 build 001 <br /> <br /> The next release of the DOS/Shell client will have the stated feature.<br /> Currently, you can only use the DOS/Shell client in interactive mode (you cannot script against it).<br /> <br /> The non-interactive mode will be useful for those not wanting to use the Web UI but wanting to automate/manage FlexRAID through a script and their own scheduler/tool of choice.<br /> <br /> The Web UI has a lot of features including a very good scheduler and e-mail alerts.<br /> However, some users might prefer a more "lightweight" client configuration.<br /> <br /> For instance, you will able to create a simple script (DOS script in this example) as follow:<br /> [code]<br /> FlexRAID myhost - - run C:\cmds\create.txt<br /> [/code]<br /> <br /> Of course, there will be full documentation of how to use the DOS/Shell clients in non-interactive mode along with the full list of error and status codes.]]></description>
				<guid isPermaLink="true">http://www.openegg.org/forums/posts/preList/67/611.page</guid>
				<link>http://www.openegg.org/forums/posts/preList/67/611.page</link>
				<pubDate><![CDATA[Mon, 24 Nov 2008 11:26:32]]> GMT</pubDate>
				<author><![CDATA[ Brahim]]></author>
			</item>
			<item>
				<title>Re:New feature to Command line clients</title>
				<description><![CDATA[ Another thing to add is that, you could have a file monitoring tool kick off the parity update script.<br /> <br /> Some users have expressed the idea of kicking off the parity update task (rsynch) when data changes are detected.<br /> Those users could use a tool like [url=http://technet.microsoft.com/en-us/sysinternals/bb896642.aspx]FileMon for Windows[/url] to detect data changes and kick off the script.<br /> <br /> On that note, is there a .NET developer here willing to go through this article(<a class="snap_shots" href="http://articles.techrepublic.com.com/5100-10878_11-6165137.html" target="_blank" rel="nofollow">http://articles.techrepublic.com.com/5100-10878_11-6165137.html</a>) and create a nice disk/folder monitoring tool for us? <img src="http://www.openegg.org/forums//images/smilies/3b63d1616c5dfcf29f8a7a031aaa7cad.gif" />]]></description>
				<guid isPermaLink="true">http://www.openegg.org/forums/posts/preList/67/612.page</guid>
				<link>http://www.openegg.org/forums/posts/preList/67/612.page</link>
				<pubDate><![CDATA[Mon, 24 Nov 2008 18:37:12]]> GMT</pubDate>
				<author><![CDATA[ Brahim]]></author>
			</item>
			<item>
				<title>Re:New feature to Command line clients</title>
				<description><![CDATA[ I'd just like to add that for anyone that wants to get an email everytime your rsynch or whatnot failed, use the script below:<br /> <br /> [code]Set objEmail = CreateObject("CDO.Message")<br /> objEmail.From = "&lt;EMAIL ADDRESS&gt;"<br /> objEmail.To = "&lt;EMAIL ADDRESS&gt;"<br /> objEmail.Subject = "Problem" <br /> objEmail.Textbody = "Something went wrong"<br /> objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = "2"<br /> objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "&lt;SMTP SERVER&gt;"<br /> objEmail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = "25"<br /> objEmail.Configuration.Fields.Update<br /> objEmail.Send<br /> [/code]<br /> <br /> Put the above code, edited of course, in a .vbs file and call it within the script Brahim posted at the top of this thread. Now, every time the exit code is greater than 0 (error), I get an email so I can investigate further.]]></description>
				<guid isPermaLink="true">http://www.openegg.org/forums/posts/preList/67/1028.page</guid>
				<link>http://www.openegg.org/forums/posts/preList/67/1028.page</link>
				<pubDate><![CDATA[Mon, 23 Mar 2009 22:48:48]]> GMT</pubDate>
				<author><![CDATA[ f00kie]]></author>
			</item>
			<item>
				<title>Re:New feature to Command line clients</title>
				<description><![CDATA[ Cool stuff. <br /> <br /> Nice and very clean. <img src="http://www.openegg.org/forums//images/smilies/3b63d1616c5dfcf29f8a7a031aaa7cad.gif" /><br /> <br /> ]]></description>
				<guid isPermaLink="true">http://www.openegg.org/forums/posts/preList/67/1034.page</guid>
				<link>http://www.openegg.org/forums/posts/preList/67/1034.page</link>
				<pubDate><![CDATA[Tue, 24 Mar 2009 13:31:03]]> GMT</pubDate>
				<author><![CDATA[ Brahim]]></author>
			</item>
			<item>
				<title>Re:New feature to Command line clients</title>
				<description><![CDATA[ I'm having hard time getting my script to work.<br /> <br /> What is the correct extension I should be using? .bat .cmd?<br /> <br /> I've created the below script:<br /> <br /> [quote]<br /> cd &quot;C:\Program Files(x86)\OpenEgg.org\FlexRAID Basic CMD Client 1.0&quot;<br /> c:<br /> set myhost=localhost   <br /> rem '-' means use the default value (9595)   <br /> set myPort=-   <br /> rem '-' means use the default value (2000 - [in milliseconds])   <br /> set myTimeOut=-   <br /> set cmdStart=FlexRAIDClient %myhost% %myPort% %myTimeOut%   <br /> set logFile=C:\logs\myLog.txt<br /> %cmdStart% run C:\cmd\quick-validate.txt &gt;&gt; %logFile% [/quote]<br /> <br /> If I type all of the above lines in a cmd window, it works without a problem and I'll get an entry in the log file.<br /> <br /> But when I try to run the .bat or .cmd nothing happens.  <br /> <br /> ]]></description>
				<guid isPermaLink="true">http://www.openegg.org/forums/posts/preList/67/3082.page</guid>
				<link>http://www.openegg.org/forums/posts/preList/67/3082.page</link>
				<pubDate><![CDATA[Sun, 21 Mar 2010 14:33:18]]> GMT</pubDate>
				<author><![CDATA[ jrwalte]]></author>
			</item>
			<item>
				<title>Re:New feature to Command line clients</title>
				<description><![CDATA[ Did you check that the host did not receive the command?<br /> <br /> If you run the script by just double clicking, then you might need to pause it to see the output.<br /> Otherwise, it will run quickly and close the window.<br /> <br /> You are not monitoring the task.<br /> So, your script essentially just sends the command and exists.<br /> <br /> ]]></description>
				<guid isPermaLink="true">http://www.openegg.org/forums/posts/preList/67/3084.page</guid>
				<link>http://www.openegg.org/forums/posts/preList/67/3084.page</link>
				<pubDate><![CDATA[Sun, 21 Mar 2010 16:14:43]]> GMT</pubDate>
				<author><![CDATA[ Brahim]]></author>
			</item>
			<item>
				<title>New feature to Command line clients</title>
				<description><![CDATA[ I ended up trying the webclient again (I couldn't get it to work previously) and it worked. It could have been that I changed from FlexRAID 1.2 to 1.3 or that I re-downloaded the webclient package.<br /> <br /> All I had to do was import my .meta file and then setup a schedule and it's working without a hitch. Even have the email functionality working. The webclient is definitely a nice feature.]]></description>
				<guid isPermaLink="true">http://www.openegg.org/forums/posts/preList/67/3133.page</guid>
				<link>http://www.openegg.org/forums/posts/preList/67/3133.page</link>
				<pubDate><![CDATA[Tue, 23 Mar 2010 11:08:54]]> GMT</pubDate>
				<author><![CDATA[ jrwalte]]></author>
			</item>
	</channel>
</rss>
