Saturday, 3 February 2007

Alert: Windows EventLog

I can send you a message when an entry is written to the Windows EventLog (useful to monitor a server)
Open the "<installDir>/Addins/LogWatcher.xml" file:

Configure the Watcher elements (here we are monitoring the "Application" log for "Warning" and "Error" messages only).
Use the "logwatch" command to start monitoring:

You can type "logwatch /list" to display the list of monitored logs, and "logwatch /stop" to stop monitoring.

Command: help

You can type "help" to display all available commands and your own aliases:

Saturday, 27 January 2007

Installation: Windows service

There is a new way to run MyHAL on Windows. Download the Windows setup, extract it and run setup.exe. Go in the installation directory (by default: "C:\Program Files\MyHAL project\MyHal") and modify the "MyHal.Service.exe.config" as explained here.
Then go in "Start"-"Control Panel"-"Administrative tools"-"Service" and start the "MyHal" service. Now, MyHAL will start automatically with your machine.

(see the "MyHal.log" file in the installation directory in case of any errors)

Saturday, 20 January 2007

Command: "alias"

You can create your own commands by using the "alias" command.
For example, you want to launch a TV recording program remotely. Firt add a new command:

(/action: [a]dd, [r]emove or [l]ist aliases. Here we're adding a new alias, named "tv")
Now you have you own "tv" command!

You can also specify arguments to the program launched:

Now, by typing "ie", Internet Explorer will be launched with google as its start page.

You can list and remove aliases:

Command: "!" (history)

I can display your 10 latest commands by typing "!":

Wednesday, 17 January 2007

Command: "ps"

The "ps" command displays running processes:

/p displays the PID, /r displays the priority, /sort is used to sort by name, pid or priority.

(to display the help, type: "ps /?" or "ps /help")

Alert: File System

I can send you a message when a file is created on your disk. (e.g. you want to be warned when a file download is finished).
Open the "<installDir>/Addins/FileWatcher.xml" file:

Add as many "Watcher" tag as you have directories to monitor. Here the first Watcher monitors the creation of text files (.txt) in "c:\" (for Windows systems); the second Watcher monitors the creation of any file in "/home/jc" (for Linux systems).
Use the "fwatch" command to start monitoring:

(here you can see that only one directory will be monitored because the second one doesn't exist)

As soon as a file is created in a watched directory and matches the filter, I send you a message:

You can type "fwatch /list" to display the list of monitored directories, and "fwatch /stop" to stop monitoring.