ID |
Date |
Icon |
Author |
Author Email |
Category |
OS |
ELOG Version |
Subject |
66975
|
Tue Dec 14 20:16:46 2010 |
| Arno Teunisse | A.teeling3@chello.nl | Question | Windows | 280-5 | Re: How can Elog start automatically on Windows Server 2008 on startup ? |
Stefan Ritt wrote: |
Philipp W. wrote: |
Hi all,
i have a question... How can i manage it that elog starts automatically on windows startup ? I always need to type "elogd -p 85" in the console that it starts ...
Can anyone help me ? =)
Thanks
SenoX
|
If you install elog with the installer from the distribution, it installs elog as a windows service, which is started automatically when windows starts.
|
Hello
When the install did not work properly ( I've never had that problem ) you can start the elog service with the SC.EXE command like this :
sc.exe create Elog binpath= "\"c:\program files\elog\elogd.exe\" -D -c \"c:\program files\elog\elogd.cfg\"" displayname= "Elogbook services" start= auto type= own
Please notice the spaces after the = ( they are required )
You can now use :
net start elog
and
net stop elog
to start the service without a reboot.
Maybe this helps.
|
66977
|
Wed Dec 15 16:42:32 2010 |
| Stefan Ritt | stefan.ritt@psi.ch | Question | Windows | 2.8 | Re: elog as a service in windows not detect Imagemagick |
Diego Obradors Campos wrote: |
I have installed elog 2.8 in a windows pc with the installer from the distribution, it installs elog as a windows service, which is started automatically when windows starts.
It is done as:
"C:\Archivos de programa\ELOG\elogd.exe" -D -c "C:\Archivos de programa\ELOG\elogd.cfg"
Moreover Imagemagick and GhostScript are in the path:
Version: ImageMagick 6.6.4-6 2010-09-21 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features: OpenMP
However the indexing loogbooks are only working fine when elog is started interactively. Is there any posiblity to start elog as a service and use thumbnails for quick preview?
Thank you in advance!
|
This is a know problem. I did not achieve to create the imagemagic subprocess and read its output when elogd is started as a service. Attached is the code doing that, I found it as an example from Microsoft. But even after hours of work, I could not get it running inside the service. If anybody has any idea, please let me know. |
Attachment 1: my_shell.c
|
int my_shell(char *cmd, char *result, int size)
{
HANDLE hChildStdinRd, hChildStdinWr, hChildStdinWrDup,
hChildStdoutRd, hChildStdoutWr, hChildStderrRd, hChildStderrWr, hSaveStdin, hSaveStdout, hSaveStderr;
SECURITY_ATTRIBUTES saAttr;
PROCESS_INFORMATION piProcInfo;
STARTUPINFO siStartInfo;
char buffer[10000];
DWORD dwRead, dwAvail, i;
/* Set the bInheritHandle flag so pipe handles are inherited. */
saAttr.nLength = sizeof(SECURITY_ATTRIBUTES);
saAttr.bInheritHandle = TRUE;
saAttr.lpSecurityDescriptor = NULL;
/* Save the handle to the current STDOUT. */
hSaveStdout = GetStdHandle(STD_OUTPUT_HANDLE);
/* Create a pipe for the child's STDOUT. */
if (!CreatePipe(&hChildStdoutRd, &hChildStdoutWr, &saAttr, 0))
return 0;
/* Set a write handle to the pipe to be STDOUT. */
if (!SetStdHandle(STD_OUTPUT_HANDLE, hChildStdoutWr))
return 0;
/* Save the handle to the current STDERR. */
hSaveStderr = GetStdHandle(STD_ERROR_HANDLE);
/* Create a pipe for the child's STDERR. */
if (!CreatePipe(&hChildStderrRd, &hChildStderrWr, &saAttr, 0))
return 0;
/* Set a read handle to the pipe to be STDERR. */
if (!SetStdHandle(STD_ERROR_HANDLE, hChildStderrWr))
return 0;
/* Save the handle to the current STDIN. */
hSaveStdin = GetStdHandle(STD_INPUT_HANDLE);
/* Create a pipe for the child's STDIN. */
if (!CreatePipe(&hChildStdinRd, &hChildStdinWr, &saAttr, 0))
return 0;
/* Set a read handle to the pipe to be STDIN. */
if (!SetStdHandle(STD_INPUT_HANDLE, hChildStdinRd))
return 0;
/* Duplicate the write handle to the pipe so it is not inherited. */
if (!DuplicateHandle(GetCurrentProcess(), hChildStdinWr, GetCurrentProcess(), &hChildStdinWrDup, 0, FALSE, /* not inherited */
DUPLICATE_SAME_ACCESS))
return 0;
CloseHandle(hChildStdinWr);
/* Now create the child process. */
memset(&siStartInfo, 0, sizeof(siStartInfo));
siStartInfo.cb = sizeof(STARTUPINFO);
siStartInfo.lpReserved = NULL;
siStartInfo.lpReserved2 = NULL;
siStartInfo.cbReserved2 = 0;
siStartInfo.lpDesktop = NULL;
siStartInfo.dwFlags = 0;
/* command to execute */
sprintf(buffer, "cmd /q /c %s", cmd);
if (!CreateProcess(NULL, buffer, /* command line */
NULL, /* process security attributes */
NULL, /* primary thread security attributes */
TRUE, /* handles are inherited */
0, /* creation flags */
NULL, /* use parent's environment */
NULL, /* use parent's current directory */
&siStartInfo, /* STARTUPINFO pointer */
&piProcInfo)) /* receives PROCESS_INFORMATION */
return 0;
/* After process creation, restore the saved STDIN and STDOUT. */
SetStdHandle(STD_INPUT_HANDLE, hSaveStdin);
SetStdHandle(STD_OUTPUT_HANDLE, hSaveStdout);
SetStdHandle(STD_ERROR_HANDLE, hSaveStderr);
memset(result, 0, size);
do {
/* query stdout */
do {
if (!PeekNamedPipe(hChildStdoutRd, buffer, 256, &dwRead, &dwAvail, NULL))
break;
if (dwRead > 0) {
ReadFile(hChildStdoutRd, buffer, 256, &dwRead, NULL);
buffer[dwRead] = 0;
strlcat(result, buffer, size);
}
} while (dwAvail > 0);
/* query stderr */
do {
if (!PeekNamedPipe(hChildStderrRd, buffer, 256, &dwRead, &dwAvail, NULL))
break;
if (dwRead > 0) {
ReadFile(hChildStderrRd, buffer, 256, &dwRead, NULL);
buffer[dwRead] = 0;
strlcat(result, buffer, size);
}
} while (dwAvail > 0);
/* check if subprocess still alive */
if (!GetExitCodeProcess(piProcInfo.hProcess, &i))
break;
if (i != STILL_ACTIVE)
break;
/* give some CPU to subprocess */
Sleep(10);
} while (TRUE);
CloseHandle(hChildStdinWrDup);
CloseHandle(hChildStdinRd);
CloseHandle(hChildStderrRd);
CloseHandle(hChildStdoutRd);
/* strip trailing CR/LF */
while (strlen(result) > 0 && (result[strlen(result) - 1] == '\r' || result[strlen(result) - 1] == '\n'))
result[strlen(result) - 1] = 0;
return 1;
}
|
66980
|
Fri Jan 7 05:45:41 2011 |
| Behdad D | behdad@inbox.com | Question | Windows | 2.8 | Multiple Insances of eLog on the same machine | Hello,
Is it possible to run multiple instance of elog on the same windows box where each instance listens on a different port?
Thanks.
Behdad. |
66981
|
Fri Jan 7 08:37:49 2011 |
| Stefan Ritt | stefan.ritt@psi.ch | Question | Windows | 2.8 | Re: Multiple Insances of eLog on the same machine |
Behdad D wrote: |
Hello,
Is it possible to run multiple instance of elog on the same windows box where each instance listens on a different port?
Thanks.
Behdad.
|
Sure. Just start with one subdirectory for each instance with a separate elogd.cfg file, where you specify a different port. Note however that there is also the concept of "top groups" (see documentation) which lets a single instance of elog look like several independent installations. |
66982
|
Sun Jan 9 07:04:00 2011 |
| Behdad D | behdad@inbox.com | Question | Windows | 2.8 | Re: Multiple Insances of eLog on the same machine |
Stefan Ritt wrote: |
Behdad D wrote: |
Hello,
Is it possible to run multiple instance of elog on the same windows box where each instance listens on a different port?
Thanks.
Behdad.
|
Sure. Just start with one subdirectory for each instance with a separate elogd.cfg file, where you specify a different port. Note however that there is also the concept of "top groups" (see documentation) which lets a single instance of elog look like several independent installations.
|
Great. Thanks Stefan.
I also am already using the top groups. This is just to totally separate my work and home elog.....I have to admit I am really an elog addict. 
This elog and the idea behind it is absolutely brilliant. Very useful, easy to maintain, migrate, configure, easy to use, versatile, etc... Good on you all.
Cheers,
Behdad. |
66985
|
Mon Jan 17 17:24:35 2011 |
| Michael Dannmeyer | michael.dannmeyer@solvias.com | Question | Windows | 2.7.8-2280 | Quick Filter does not work | Hello,
i have a logbook with the following parameters for the Attribute "Typ":
[TEST1]
Options Typ = SDB{2}, Qualifizierung B.12.S227{4}, Qualifizierung PRO/REP{3}, Dokument zur Qualifizierung{2}, Prüf- und Wartungsvorschrift{2}, SOP ohne Change Request{2}, SOP mit Change Request{1}, Validierung PRO/REP{3}, Dokument zur Verifizierung{2}, Überprüfung und Verlängerung{2}, Spec.Sheet{2}, CoA (sofern nicht LIMS){2}, Änderungen Tg4.B07{5}, OOS (Plan/Bericht){3}, Transfer PRO/REP{3}, Studie PRO/REP{3}, Studie ohne Plan{2}, Anderes{2}
Quick filter = Date, Typ
If i choose an Entry from the "Typ" Quick Filter it shows me that there are no entries in the logbook but I'm shure that there are entries.
Can you please help? I cannot see what's wrong.
Best Regards
Michael
|
66986
|
Wed Jan 19 08:44:28 2011 |
| Stefan Ritt | stefan.ritt@psi.ch | Question | Windows | 2.7.8-2280 | Re: Quick Filter does not work |
Michael Dannmeyer wrote: |
Hello,
i have a logbook with the following parameters for the Attribute "Typ":
[TEST1]
Options Typ = SDB{2}, Qualifizierung B.12.S227{4}, Qualifizierung PRO/REP{3}, Dokument zur Qualifizierung{2}, Prüf- und Wartungsvorschrift{2}, SOP ohne Change Request{2}, SOP mit Change Request{1}, Validierung PRO/REP{3}, Dokument zur Verifizierung{2}, Überprüfung und Verlängerung{2}, Spec.Sheet{2}, CoA (sofern nicht LIMS){2}, Änderungen Tg4.B07{5}, OOS (Plan/Bericht){3}, Transfer PRO/REP{3}, Studie PRO/REP{3}, Studie ohne Plan{2}, Anderes{2}
Quick filter = Date, Typ
If i choose an Entry from the "Typ" Quick Filter it shows me that there are no entries in the logbook but I'm shure that there are entries.
Can you please help? I cannot see what's wrong.
Best Regards
Michael
|
I tried your configuration and it worked fine:
So can you try version 2.8.1 if that makes any difference. If not, can you send me your complete elogd.cfg, so that I can reproduce your problem.
- Stefan |
66987
|
Wed Jan 19 09:19:53 2011 |
| Michael Dannmeyer | michael.dannmeyer@solvias.com | Question | Windows | 2.7.8-2280 | Re: Quick Filter does not work |
Stefan Ritt wrote: |
Michael Dannmeyer wrote: |
Hello,
i have a logbook with the following parameters for the Attribute "Typ":
[TEST1]
Options Typ = SDB{2}, Qualifizierung B.12.S227{4}, Qualifizierung PRO/REP{3}, Dokument zur Qualifizierung{2}, Prüf- und Wartungsvorschrift{2}, SOP ohne Change Request{2}, SOP mit Change Request{1}, Validierung PRO/REP{3}, Dokument zur Verifizierung{2}, Überprüfung und Verlängerung{2}, Spec.Sheet{2}, CoA (sofern nicht LIMS){2}, Änderungen Tg4.B07{5}, OOS (Plan/Bericht){3}, Transfer PRO/REP{3}, Studie PRO/REP{3}, Studie ohne Plan{2}, Anderes{2}
Quick filter = Date, Typ
If i choose an Entry from the "Typ" Quick Filter it shows me that there are no entries in the logbook but I'm shure that there are entries.
Can you please help? I cannot see what's wrong.
Best Regards
Michael
|
I tried your configuration and it worked fine:
So can you try version 2.8.1 if that makes any difference. If not, can you send me your complete elogd.cfg, so that I can reproduce your problem.
- Stefan
|
I installed 2.81 (Elog-latest) but this Version did not work. I got Error 193: %1 is not a valid Win32 Application as I tried to start the service. So i will sent you the complete elogd.cfg via Mail.
Best regards
Michael |
|