Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What happens to backround processes at midnight..?

41 views
Skip to first unread message

Bengt Törnqvist

unread,
Nov 12, 2023, 10:55:23 AM11/12/23
to
In my Raspberry Pi I have processes ongoing i background. However they seems, for some reason..., to become disabled at midnight
(at 00:00).

For the time being I have to restart them, with crontab, at 00:01 every night.

/var/log/syslog does not give any clarification.


Greatful for hints on how to solve the problem.

Brian Gregory

unread,
Nov 12, 2023, 1:13:03 PM11/12/23
to
What sort of thing are these misbehaving processes?

Could some external process like the loss of internet connection or
maybe timeout of a TCP connection be crashing them?

--
Brian Gregory (in England).

The Natural Philosopher

unread,
Nov 12, 2023, 4:09:46 PM11/12/23
to
On 12/11/2023 15:55, Bengt Törnqvist wrote:
> In my Raspberry Pi I have processes ongoing i background. However they seems, for some reason..., to become disabled at midnight
> (at 00:00).
>
In my Raspberry Pi I have processes ongoing in background. However they
seems, for some reason to stay enabled at midnight.
So its a process specifiic problem, and since you give no detail. on the
processes, its pretty hard to say why.


> For the time being I have to restart them, with crontab, at 00:01 every night.
>
> /var/log/syslog does not give any clarification.
>
>
> Greatful for hints on how to solve the problem.

If they are managed by systemd look in ITS logs.
Also consider if they have any code that cares about the time in them,
and if it doesn't like going from e.g. 23:59 to 00:01.

Make them spew our debug info,

--
There is nothing a fleet of dispatchable nuclear power plants cannot do
that cannot be done worse and more expensively and with higher carbon
emissions and more adverse environmental impact by adding intermittent
renewable energy.

Bengt Törnqvist

unread,
Nov 13, 2023, 1:24:19 PM11/13/23
to
My assumption was that there might be some clean up procedure i Linux, started at midnight, which I was not aware of, that disabled my background procedures.
I have now learnt that this could not be the case. I have to dig further in my programs myself in order to try to find the reason(s).

Thank you all for responding.

Vincent Coen

unread,
Nov 13, 2023, 4:20:13 PM11/13/23
to
Hello Bengt!
Using root and your login take a look at if there are any processes in crontab
by doing crontab -l

It is possible that there is a midnight process that is scheduled but saying
that there should not be any that do so with running processes but does depend
on your installed distro.

Vincent

druck

unread,
Nov 13, 2023, 5:46:02 PM11/13/23
to
On 12/11/2023 15:55, Bengt Törnqvist wrote:
> In my Raspberry Pi I have processes ongoing i background. However they seems, for some reason..., to become disabled at midnight
> (at 00:00).

Are you using systemd with StandardOutput to invoke your process, and
have log rotation set up? If so you probably aren't handling the HUP
signal when the log file is rotated. Using CopyTuncate in the logrotate
conf might solve the issue.

---druck

Martin Gregorie

unread,
Nov 13, 2023, 6:55:41 PM11/13/23
to
On Mon, 13 Nov 2023 10:24:17 -0800 (PST), Bengt Törnqvist wrote:

> My assumption was that there might be some clean up procedure i Linux,
> started at midnight, which I was not aware of, that disabled my
> background procedures.
>
Have you had a look to see exactly what is run at set times and/or
intervals?

Jobs defined in /etc/cron.* are run hourly, daily, weekly and monthly and
are never automatically removed, i.e. thay are run at the specified
intervals forever.

Scripts dropped into /etc/crontab are run pnce and then deleted.




> I have now learnt that this could not be the case. I have to dig
> further in my programs myself in order to try to find the reason(s).
>
> Thank you all for responding.





--

Martin | martin at
Gregorie | gregorie dot org

Bengt Törnqvist

unread,
Nov 17, 2023, 3:38:42 AM11/17/23
to
I have come to the conclusion that the problem is related to that I have a program using a "gpio out port".

If I, for testing, disables the program using the "out port", the problem disappears.

The Natural Philosopher

unread,
Nov 17, 2023, 4:53:54 AM11/17/23
to
On 17/11/2023 08:38, Bengt Törnqvist wrote:
> I have come to the conclusion that the problem is related to that I have a program using a "gpio out port".
>
> If I, for testing, disables the program using the "out port", the problem disappears.

Well it cant be a *general* issue, because I have a background daemon
that controls 4 gpio ports as outputs and have been running now....

heating-controller:~ $ uptime
09:51:18 up 22 days, 21:44, 1 user, load average: 0.15, 0.07, 0.01

...clicking it's little relays.

So there is something specific to that program or how it is interacting
with the hardware.
--
"And if the blind lead the blind, both shall fall into the ditch".

Gospel of St. Mathew 15:14


0 new messages