0

I configured the service - calc_mem.service

as the following

Restart=on-failure
RestartSec=5
StartLimitInterval=400
StartLimitBurst=3

the configuration above should do the following

the service have 3 retries when service exit with error and before service start it will wait 5 seconds

also we want to update the /var/log/message about any retry from the service

for example

lets say we start the service , and service fail so it will try the first try , and on the first try service successfully started

is it possible to write the fail of service start to /var/log/message ?

note - we have redhat Linux machine version - 7.2

  • Hmm, what is in /var/log/messages already? Does it show "Starting" and "Started" lines for calc_mem.service? – sourcejedi Mar 22 at 10:14
  • please edit to confirm your version number of RHEL or CentOS – sourcejedi Mar 22 at 10:17
  • my redhat version is 7.2 – yael Mar 22 at 10:19
  • I guess its show service started , but for sure its not show when its fail or not start correctly – yael Mar 22 at 10:20
  • Thanks. I think you should edit to show what those messages look like. Then, what does the RHEL rsyslog.conf look like? I wonder if you see the messages in /var/log/error or /var/log/warn or something like that. – sourcejedi Mar 22 at 10:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.