Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon5.gif   Executing a shell command using elogd Windows service, posted by Frank Baptista on Sun Nov 24 20:29:24 2019 Signal_tower.jpg
    icon2.gif   Re: Executing a shell command using elogd Windows service, posted by Frank Baptista on Sun Nov 24 21:10:28 2019 
       icon2.gif   Re: Executing a shell command using elogd Windows service, posted by Stefan Ritt on Mon Nov 25 16:32:07 2019 
          icon2.gif   Re: Executing a shell command using elogd Windows service, posted by Frank Baptista on Sat Nov 30 15:46:16 2019 
Message ID: 69069     Entry time: Sat Nov 30 15:46:16 2019     In reply to: 69067
Icon: Reply  Author: Frank Baptista  Author Email: caffeinejazz@gmail.com 
Category: Request  OS: Windows  ELOG Version: 3.1.3-fd7f1e2 
Subject: Re: Executing a shell command using elogd Windows service 

Well, there I was, eating Thanksgiving dinner, when suddenly, it hit me (no, not indigestion).  I can write a simple program that parses out the latest "Status" from the most recent logbook file -- a relatively easy task, since it's a text file.  This solution avoids having to execute a shell command at all.  GOOOOOOAAAAAAL!!! smiley

As always, I appreciate all your help...can't thank you enough!

All the best,
Frank

Stefan Ritt wrote:

Wow, having these color signal lamps really looke like a cute solution, made me laugh.

No, there is no other way than the Execute new thing. I have given up long time ago to use Windows services, because they are very hard to debug and very limited. So at our site everything runs under Linux.

Have you tried to specify the explicit path of your log file? Like Execute new = echo $Status > C:\Path\Last_status.log

Best,
Stefan

Frank Baptista wrote:

Sorry -- I somehow selected the wrong OS in my original message. Asleep at the wheel again.

Frank Baptista wrote:

Greetings!

We've been successfully running nearly a dozen separate logbooks on independent laptops -- all of them are running elogd as a Windows service. This works well, since I've also set up auto recovery options in the event that the service inadvertently stops.

Now, I have a need to place the value of an attribute of the latest log entry into a basic text file.  Of course, this works just fine if I have launched elogd -x as a normal executable, using
Execute new = echo $Status > Last_status.log in my CFG file.  However, I would like to be able to do this using the Windows service which is running in the background. 

Is there another way to write the value of an attribute into a separate file?  If not, do I have to have a special build of ELOG in order to be able to enable the Windows service to execute shell commands?  For the record, these logbooks are running on secure laptops that are isolated onto their own network, and the user is unable to edit the CFG file.

In case you're wondering about the reason for the separate text file -- I've written a separate program which illuminates one of 4 different color signal lamps (mounted on a test station), based on the latest "Status" of the test station. (Running, Idle, Broken, Other).

I appreciate any guidance here -- this is a "big deal" here, as one glance over the floor gives us an idea of what's running (or not).

Thanks!
Frank

 

 

 

ELOG V3.1.5-3fb85fa6