Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG, Page 252 of 804  Not logged in ELOG logo
IDdown Date Icon Author Author Email Category OS ELOG Version Subject
  67770   Tue Jan 27 15:59:59 2015 Reply Andreas Luedekeandreas.luedeke@psi.chQuestionAll3.3Re: calculate the value of one attribute depending upon the value of other attribute.

Yes, I forgot to mention that you need to enable shell script execution by starting the server with "elogd -x".

Before you start elogd from the command line you need to shutdown any running elogd; otherwise the port is blocked and the command line elogd cannot start: "sudo /sbin/service elogd stop"

From Linux you can edit instead /etc/init.d/elogd and add there the option "-x" to the line where "elogd" is started and then restart the service: "sudo /sbin/service elogd restart".

dev wrote:

I tried that It is not calculating  and it is giving the error "Shell execution not enabled via -x flag ".I started elogd -x from command prompt  it still gives the same error.

Andreas Luedeke wrote:

If you have the following elogd.cfg:

Attributes = START, END, DURATION
subst DURATION = $shell( /usr/local/elog/diff.sh \"$START\" \"$END\")
Show Attributes Edit = START, END

And the shell script /usr/local/elog/diff.sh is:

#!/bin/sh
s1=$(date -d "$1" +%s)
s2=$(date -d "$2" +%s)
d=$(echo "($s2-$s1)/3600"|bc -lq)
printf "%.0f hours" $d

Then DURATION is calculated from START and END in full hours.

It appears that if you define START and END as "datetime", then only the date part would be passed to the script. This may is a bug of elogd: Stefan, have you ever tried?

dev wrote:

I HAVE A LOGBOOK WHICH KEEPS THE RECORD OF ALL FAULT BOOKED BY DIFFERENT SUBSCRIBER.THIS LOGBOOK HAS THREE ATTRIBUTE DOWNTIME,UPTIME & TOTAL DURATION (DATE &TIME FORMAT) . I WANT TO CALCULATE THE TOTAL DURATION AUTOMATICALLY WHENEVR UPTIME VALUE IS GIVEN AND IF THE UPTIME IS NOT GIVEN IT SHOULD CALCULATE DEPENDING UPON THE SYSTEM PRESENT TIME.PLEAS EXPLAIN IT WITH EXAMPLE.

PS: Please do NOT write all capital text in a forum. Thank you!

 

 

  67769   Mon Jan 26 23:13:47 2015 Question Eric Quinteroericq@caltech.eduQuestionAll3.0.0Link to full resolution image attachments

Hi all,

It's possible my question is entirely within the domain of CKeditor, but I figure it may also have something to do with how it's plugged into ELOG. 

In essence, when attaching a PDF to an ELOG post as an image, the post body shows the generated thumbnail and there is a link to the full resolution PDF at the bottom of the post. 

However, if instead, I attach a JPG or PNG, the link to the full resolution image is not present in the post (though it can be accessed through the small paperclip icon).

Is there a way to show links to the thumbnailed images, or even for the thumbnail itself to be a hyperlink to the full resolution source?

Thanks for your time,

Eric Q. 

  67768   Mon Jan 26 19:24:02 2015 Reply devjoshi868b@gmail.comQuestionAll3.3Re: calculate the value of one attribute depending upon the value of other attribute.

I tried that It is not calculating  and it is giving the error "Shell execution not enabled via -x flag ".I started elogd -x from command prompt  it still gives the same error.

Andreas Luedeke wrote:

If you have the following elogd.cfg:

Attributes = START, END, DURATION
subst DURATION = $shell( /usr/local/elog/diff.sh \"$START\" \"$END\")
Show Attributes Edit = START, END

And the shell script /usr/local/elog/diff.sh is:

#!/bin/sh
s1=$(date -d "$1" +%s)
s2=$(date -d "$2" +%s)
d=$(echo "($s2-$s1)/3600"|bc -lq)
printf "%.0f hours" $d

Then DURATION is calculated from START and END in full hours.

It appears that if you define START and END as "datetime", then only the date part would be passed to the script. This may is a bug of elogd: Stefan, have you ever tried?

dev wrote:

I HAVE A LOGBOOK WHICH KEEPS THE RECORD OF ALL FAULT BOOKED BY DIFFERENT SUBSCRIBER.THIS LOGBOOK HAS THREE ATTRIBUTE DOWNTIME,UPTIME & TOTAL DURATION (DATE &TIME FORMAT) . I WANT TO CALCULATE THE TOTAL DURATION AUTOMATICALLY WHENEVR UPTIME VALUE IS GIVEN AND IF THE UPTIME IS NOT GIVEN IT SHOULD CALCULATE DEPENDING UPON THE SYSTEM PRESENT TIME.PLEAS EXPLAIN IT WITH EXAMPLE.

PS: Please do NOT write all capital text in a forum. Thank you!

 

  67767   Mon Jan 26 15:56:41 2015 Reply Andreas Luedekeandreas.luedeke@psi.chQuestionAll3.3Re: calculate the value of one attribute depending upon the value of other attribute.

If you have the following elogd.cfg:

Attributes = START, END, DURATION
subst DURATION = $shell( /usr/local/elog/diff.sh \"$START\" \"$END\")
Show Attributes Edit = START, END

And the shell script /usr/local/elog/diff.sh is:

#!/bin/sh
s1=$(date -d "$1" +%s)
s2=$(date -d "$2" +%s)
d=$(echo "($s2-$s1)/3600"|bc -lq)
printf "%.0f hours" $d

Then DURATION is calculated from START and END in full hours.

It appears that if you define START and END as "datetime", then only the date part would be passed to the script. This may is a bug of elogd: Stefan, have you ever tried?

dev wrote:

I HAVE A LOGBOOK WHICH KEEPS THE RECORD OF ALL FAULT BOOKED BY DIFFERENT SUBSCRIBER.THIS LOGBOOK HAS THREE ATTRIBUTE DOWNTIME,UPTIME & TOTAL DURATION (DATE &TIME FORMAT) . I WANT TO CALCULATE THE TOTAL DURATION AUTOMATICALLY WHENEVR UPTIME VALUE IS GIVEN AND IF THE UPTIME IS NOT GIVEN IT SHOULD CALCULATE DEPENDING UPON THE SYSTEM PRESENT TIME.PLEAS EXPLAIN IT WITH EXAMPLE.

PS: Please do NOT write all capital text in a forum. Thank you!

  67766   Mon Jan 26 15:46:04 2015 Question devjoshi868b@gmail.comRequestAll3.3how to calculate the time

I HAVE A LOGBOOK WHICH KEEPS THE RECORD OF ALL FAULT BOOKED BY DIFFERENT SUBSCRIBER.THIS LOGBOOK HAS THREE ATTRIBUTE DOWNTIME,UPTIME & TOTAL DURATION (DATE &TIME FORMAT) . I WANT TO CALCULATE THE TOTAL DURATION AUTOMATICALLY WHENEVR UPTIME VALUE IS GIVEN AND IF THE UPTIME IS NOT GIVEN IT SHOULD CALCULATE DEPENDING UPON THE SYSTEM PRESENT TIME.PLEAS EXPLAIN IT WITH EXAMPLE.

  67765   Mon Jan 26 15:06:49 2015 Reply Maikolk Keinjavier.sanchez@wincor-nixdorf.comQuestionLinux3.0.0Re: Kerberos auth not available on 3.0 ?


No no, i used the rpm form the website... I was thinking on having the bianries compiled, im downloading the server install dvd

to replicate the environment and have the same functionality.

 

Thanks for the answer ;-)

 

Regards

 

Andreas Luedeke wrote:
Hi Maikolk,
I have elogd 3.0 running with kerberos: I had no problems with that.
Maybe you forgot to change the Makefile before compiling?
Uncomment line 28 to:

# flag for Kerberos support, please turn on if you need Kerberos
USE_KRB5   = 1

and then "make clean" and "make install" (or "make update").

Regards, Andreas

Maikolk Kein wrote:
Hi all !!!
i have just updated and 2.9.2-1 elog instance, and i have problems with the kerberos configuration.
I was surprised to see on the logs, that the 3.0 daemon was refusing to start because the system
config has kerberos listed as an authentication method. I saw on the logs that the current daemon
didnt have kerberos support compiled in.
Ive seen that there is ldap support, but couldnt find anything about configuring this auth sytem, does
amnyone have any example i could check ?
Did i have to use a patched version ? or compile it on my own ?
Regards

 

 

  67764   Mon Jan 26 15:04:38 2015 Reply Andreas Luedekeandreas.luedeke@psi.chQuestionLinux3.0.0Re: Kerberos auth not available on 3.0 ?
Hi Maikolk,
I have elogd 3.0 running with kerberos: I had no problems with that.
Maybe you forgot to change the Makefile before compiling?
Uncomment line 28 to:

# flag for Kerberos support, please turn on if you need Kerberos
USE_KRB5   = 1

and then "make clean" and "make install" (or "make update").

Regards, Andreas

Maikolk Kein wrote:
Hi all !!!
i have just updated and 2.9.2-1 elog instance, and i have problems with the kerberos configuration.
I was surprised to see on the logs, that the 3.0 daemon was refusing to start because the system
config has kerberos listed as an authentication method. I saw on the logs that the current daemon
didnt have kerberos support compiled in.
Ive seen that there is ldap support, but couldnt find anything about configuring this auth sytem, does
amnyone have any example i could check ?
Did i have to use a patched version ? or compile it on my own ?
Regards

 

  67763   Mon Jan 26 10:30:40 2015 Disagree Maikolk Keinjavier.sanchez@wincor-nixdorf.comQuestionLinux3.0.0Kerberos auth not available on 3.0 ?

Hi all !!!

 

i have just updated and 2.9.2-1 elog instance, and i have problems with the kerberos configuration.

I was surprised to see on the logs, that the 3.0 daemon was refusing to start because the system

config has kerberos listed as an authentication method. I saw on the logs that the current daemon

didnt have kerberos support compiled in.

 

Ive seen that there is ldap support, but couldnt find anything about configuring this auth sytem, does

amnyone have any example i could check ?

 

Did i have to use a patched version ? or compile it on my own ?

 

 

Regards

ELOG V3.1.5-3fb85fa6