• SDCard -- install here and deploy there?

    From Markus Robert Kessler@3:770/3 to All on Thu Oct 22 12:07:10 2020
    Hi all,

    I have Raspberries in different locations. One of them, more than 100
    miles away didn't come back from a reboot. Hence, I suspect the SDCard to
    be corrupted. This one worked one and a half year without any trouble,
    but now its time seems over.

    I have to install a new one. Well. But:

    Since I have only little time when visiting, I'd like to prepare a fresh install and put the card into the RPi when I am there.

    Reason for asking is, that I have different machine type, and not two are
    the same.

    The card I have to install now is for machine type "Raspberry A" (SDCard / Micro-SD with adapter), and the machines on which I could do the setup
    here are "Raspberry 3 / quad core proc." or "Raspberry Zero / WLAN".

    Can this work at all -- according to you experience -- to install on one machine type and use in a completely different one?

    Thanks for info!

    Best regards,

    Markus


    --
    Please reply to group only.
    For private email please use http://www.dipl-ing-kessler.de/email.htm

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Chris Elvidge@3:770/3 to Markus Robert Kessler on Thu Oct 22 13:33:56 2020
    On 22/10/2020 01:07 pm, Markus Robert Kessler wrote:
    Hi all,

    I have Raspberries in different locations. One of them, more than 100
    miles away didn't come back from a reboot. Hence, I suspect the SDCard to
    be corrupted. This one worked one and a half year without any trouble,
    but now its time seems over.

    I have to install a new one. Well. But:

    Since I have only little time when visiting, I'd like to prepare a fresh install and put the card into the RPi when I am there.

    Reason for asking is, that I have different machine type, and not two are
    the same.

    The card I have to install now is for machine type "Raspberry A" (SDCard / Micro-SD with adapter), and the machines on which I could do the setup
    here are "Raspberry 3 / quad core proc." or "Raspberry Zero / WLAN".

    Can this work at all -- according to you experience -- to install on one machine type and use in a completely different one?

    Thanks for info!

    Best regards,

    Markus



    If you're using Raspbian, it will probably work - other OSs may not.
    Why not hedge your bets (it could be an RPi complete failure) and get a
    new one to set up from scratch.


    --

    Chris Elvidge, England

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dave Liquorice@3:770/3 to Chris Elvidge on Thu Oct 22 14:13:25 2020
    On Thu, 22 Oct 2020 13:33:56 +0100, Chris Elvidge wrote:

    I have Raspberries in different locations. One of them, more than
    100
    miles away didn't come back from a reboot. Hence, I suspect the
    SDCard
    to be corrupted.

    Why not hedge your bets (it could be an RPi complete failure) and get a
    new one to set up from scratch.

    That would be wise. A Zero is not exactly expensive... Also "didn't
    come back from a reboot" is a bit vague. Is that just waiting after
    issuing a reboot command or after a shut down and power cycle? Has it
    been power cycled? Has the SD card been reseated and the power
    cycled? Is there a micro SD to SD card adpater in use?

    --
    Cheers
    Dave.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From alister@3:770/3 to Markus Robert Kessler on Thu Oct 22 17:47:23 2020
    On Thu, 22 Oct 2020 17:35:12 +0000, Markus Robert Kessler wrote:

    On Thu, 22 Oct 2020 14:13:25 +0100 Dave Liquorice wrote:

    On Thu, 22 Oct 2020 13:33:56 +0100, Chris Elvidge wrote:

    I have Raspberries in different locations. One of them, more than
    100
    miles away didn't come back from a reboot. Hence, I suspect the
    SDCard
    to be corrupted.

    Why not hedge your bets (it could be an RPi complete failure) and get
    a new one to set up from scratch.

    That would be wise. A Zero is not exactly expensive... Also "didn't
    come back from a reboot" is a bit vague. Is that just waiting after
    issuing a reboot command or after a shut down and power cycle? Has it
    been power cycled? Has the SD card been reseated and the power cycled?
    Is there a micro SD to SD card adpater in use?

    Hi, what I've done in short:

    I start a python script via crontab every 10 minutes which reads I2C
    data from a BME280 sensor. This script calculates the temperature,
    relative humidity and relative air pressure and sends it to a webserver.

    This works perfectly.

    To be on the safe side I make / made a reboot every night. From this the questioned machine didn't return, now. I see in the log that the last transmission was ok, then the reboot was started and the connection was
    lost. So, I doubt that the machine completely broke down. Most likely
    the SDCard gave up.

    So, I also have to re-think if it is a good idea to make daily reboots
    even though the resources are not locked or eaten up. Maybe one reboot
    per week will also do?

    P.S. I'd rather prefer to use "Raspberry Zero / WLAN" only for
    installation, since it has only Wifi and the network there is cable
    based.

    Best regards,

    Markus

    1st rule of Linux :-
    Reboots are for hardware changes only




    --
    The people rule.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Markus Robert Kessler@3:770/3 to All on Thu Oct 22 17:35:12 2020
    On Thu, 22 Oct 2020 14:13:25 +0100 Dave Liquorice wrote:

    On Thu, 22 Oct 2020 13:33:56 +0100, Chris Elvidge wrote:

    I have Raspberries in different locations. One of them, more than
    100
    miles away didn't come back from a reboot. Hence, I suspect the
    SDCard
    to be corrupted.

    Why not hedge your bets (it could be an RPi complete failure) and get a
    new one to set up from scratch.

    That would be wise. A Zero is not exactly expensive... Also "didn't come
    back from a reboot" is a bit vague. Is that just waiting after issuing a reboot command or after a shut down and power cycle? Has it been power cycled? Has the SD card been reseated and the power cycled? Is there a
    micro SD to SD card adpater in use?

    Hi, what I've done in short:

    I start a python script via crontab every 10 minutes which reads I2C data
    from a BME280 sensor. This script calculates the temperature, relative
    humidity and relative air pressure and sends it to a webserver.

    This works perfectly.

    To be on the safe side I make / made a reboot every night. From this the questioned machine didn't return, now. I see in the log that the last transmission was ok, then the reboot was started and the connection was
    lost. So, I doubt that the machine completely broke down. Most likely the SDCard gave up.

    So, I also have to re-think if it is a good idea to make daily reboots
    even though the resources are not locked or eaten up. Maybe one reboot
    per week will also do?

    P.S. I'd rather prefer to use "Raspberry Zero / WLAN" only for
    installation, since it has only Wifi and the network there is cable based.

    Best regards,

    Markus


    --
    Please reply to group only.
    For private email please use http://www.dipl-ing-kessler.de/email.htm

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Jim Jackson@3:770/3 to All on Thu Oct 22 18:22:31 2020
    1st rule of Linux :-
    Reboots are for hardware changes only


    Or a kernel upgrade

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Markus Robert Kessler@3:770/3 to All on Thu Oct 22 18:52:27 2020
    On Thu, 22 Oct 2020 18:22:31 +0000 Jim Jackson wrote:

    1st rule of Linux :-
    Reboots are for hardware changes only


    Or a kernel upgrade

    Yes, yes, or for glibc upgrades. Well. But there are special cases where
    the USB (2.0) bus hangs if making snapshots from a webcam with fswebcam.

    Then the machine has to be rebooted to reanimate the bus.

    Best regards,

    Markus

    --
    Please reply to group only.
    For private email please use http://www.dipl-ing-kessler.de/email.htm

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dave Liquorice@3:770/3 to All on Thu Oct 22 20:11:45 2020
    On Thu, 22 Oct 2020 17:35:12 -0000 (UTC), Markus Robert Kessler
    wrote:

    I start a python script via crontab every 10 minutes which reads I2C
    data from a BME280 sensor. This script calculates the temperature,
    relative humidity and relative air pressure and sends it to a webserver.

    Can't help think why you start the script every 10 mins instead of
    having in a loop with a 10 minute sleep. If you want *exactly* 10
    minutes between each sample one would have to code around the
    (variable) time taken for the data sampling, processing and up load
    but that's not difficult.

    To be on the safe side I make / made a reboot every night. From this the questioned machine didn't return, now. I see in the log that the last transmission was ok, then the reboot was started and the connection was
    lost. So, I doubt that the machine completely broke down. Most likely
    the SDCard gave up.

    So it hasn't been power cycled and/or the SD card reseated? It could
    just be a build up of corrosion in the slot connections. Almost all
    Rapsberry boot problems I've had have been down to the latter or a
    bad micro SD to SD adapater.

    Not sure why you think you need to reboot if it's only running a
    simple script. A Pi Zero here:

    pi@PiZ-StoveB:~ $ w
    19:37:30 up 49 days, 10:24,

    That Pi has extra hardware attached: An ENC28J60 ethernet port, ex
    nokia LCD phone display (both on SPI buses), a rotary encoder and a
    PWM driven solid state relay (4 GPIO's). It's talking on two 1-Wire
    buses (2 more GPIO's) with eight or so devices across the two buses.
    Every minute it reads all the 1-Wire devices, updates the display,
    logs the data (over ethernet and locally), decides if the PWM drive
    to the SSR is correct for the data it gathered and adjusts as
    required. The display has an animated "heartbeat" symbol that shows
    the system is alive when the PWM is off. If the PWM is on it rotates
    the symbol at the appropiate speed. This is all under a multi
    threaded python script. Oh almost forgot a bi-color LED that flashes
    green as the 1-Wire buses are read or pulses red at rate determined
    by the PWM.

    It's also running a web server (nginx) that can produce plots of the
    logged data on demand.

    It's also running pi-hole.

    As you can see it's doing all that and been up nearly 50 days... I've
    never known it crash in use.

    P.S. I'd rather prefer to use "Raspberry Zero / WLAN" only for
    installation, since it has only Wifi and the network there is cable
    based.

    Don't follow that either. B-) How does the WLAN help with getting
    an ethernet connection?

    --
    Cheers
    Dave.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Richard Falken@1:123/115 to Markus Robert Kessler on Thu Oct 22 14:48:11 2020
    Re: Re: SDCard -- install here and deploy there?
    By: Markus Robert Kessler to All on Thu Oct 22 2020 05:35 pm

    To be on the safe side I make / made a reboot every night. From this the

    I know I am not helping, but rebooting "just because" is bad practice.

    If anything, reboot the service you need to reboot. And it is still bad.

    Much better to have a watchdog or something email you if there is any issue.

    --
    gopher://gopher.operationalsecurity.es
    --- SBBSecho 3.11-Linux
    * Origin: Palantir * palantirbbs.ddns.net * Pensacola, FL * (1:123/115)
  • From Markus Robert Kessler@3:770/3 to All on Thu Oct 22 19:54:44 2020
    On Thu, 22 Oct 2020 20:11:45 +0100 Dave Liquorice wrote:

    On Thu, 22 Oct 2020 17:35:12 -0000 (UTC), Markus Robert Kessler wrote:

    I start a python script via crontab every 10 minutes which reads I2C
    data from a BME280 sensor. This script calculates the temperature,
    relative humidity and relative air pressure and sends it to a
    webserver.

    Can't help think why you start the script every 10 mins instead of
    having in a loop with a 10 minute sleep. If you want *exactly* 10
    minutes between each sample one would have to code around the (variable)
    time taken for the data sampling, processing and up load but that's not difficult.

    To be on the safe side I make / made a reboot every night. From this
    the questioned machine didn't return, now. I see in the log that the
    last transmission was ok, then the reboot was started and the
    connection was lost. So, I doubt that the machine completely broke
    down. Most likely the SDCard gave up.

    So it hasn't been power cycled and/or the SD card reseated? It could
    just be a build up of corrosion in the slot connections. Almost all
    Rapsberry boot problems I've had have been down to the latter or a bad
    micro SD to SD adapater.

    Not sure why you think you need to reboot if it's only running a simple script. A Pi Zero here:

    pi@PiZ-StoveB:~ $ w
    19:37:30 up 49 days, 10:24,

    That Pi has extra hardware attached: An ENC28J60 ethernet port, ex nokia
    LCD phone display (both on SPI buses), a rotary encoder and a PWM driven solid state relay (4 GPIO's). It's talking on two 1-Wire buses (2 more GPIO's) with eight or so devices across the two buses. Every minute it
    reads all the 1-Wire devices, updates the display, logs the data (over ethernet and locally), decides if the PWM drive to the SSR is correct
    for the data it gathered and adjusts as required. The display has an
    animated "heartbeat" symbol that shows the system is alive when the PWM
    is off. If the PWM is on it rotates the symbol at the appropiate speed.
    This is all under a multi threaded python script. Oh almost forgot a
    bi-color LED that flashes green as the 1-Wire buses are read or pulses
    red at rate determined by the PWM.

    It's also running a web server (nginx) that can produce plots of the
    logged data on demand.

    It's also running pi-hole.

    As you can see it's doing all that and been up nearly 50 days... I've
    never known it crash in use.

    P.S. I'd rather prefer to use "Raspberry Zero / WLAN" only for
    installation, since it has only Wifi and the network there is cable
    based.

    Don't follow that either. B-) How does the WLAN help with getting an ethernet connection?

    WLAN doesn't help at all since at that site Wifi is deactivated. So,
    replacing an RPI-A with a RPI-Zero means one has to attach an eth-to-usb module. Better use it just for installing a new SDCard and then put this
    card into the RPI-A.

    Well, some months ago I wrote here about lost SDCards during reboot on RPI-Zero. Every 10 or 20 reboots the card was no longer found during
    reboot and had to be put into a desktop Linux PC. Then the partitions on
    the card were found instantly and the card worked again even in a RPI-
    Zero. Whoever I asked -- no clue why.

    So I decided to use RPI-Zero only for testing purposes and for logging
    data I use RPI-A, RPI-B and RPI-3.

    So, still interested in getting infos about if or not it is possible to
    install a new SDCard in a different RPI and then just put it into the
    mentioned RPI-A and it works?

    Thanks again,
    best regards,

    Markus


    --
    Please reply to group only.
    For private email please use http://www.dipl-ing-kessler.de/email.htm

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dennis Lee Bieber@3:770/3 to All on Thu Oct 22 16:36:11 2020
    On Thu, 22 Oct 2020 20:11:45 +0100 (BST), "Dave Liquorice" <allsortsnotthisbit@howhill.com> declaimed the following:

    On Thu, 22 Oct 2020 17:35:12 -0000 (UTC), Markus Robert Kessler
    wrote:

    I start a python script via crontab every 10 minutes which reads I2C
    data from a BME280 sensor. This script calculates the temperature,
    relative humidity and relative air pressure and sends it to a webserver.

    Can't help think why you start the script every 10 mins instead of
    having in a loop with a 10 minute sleep. If you want *exactly* 10

    That aspect is quite logical... Using a crontab entry means if the script failed at some point for some reason, a fresh process will be
    started 10 minutes later (give or take OS overhead).

    While an internal loop might support more precise 10-minute intervals, if the script dies then nothing will be left running.


    For a remote sensor node that relays readings to another server, I do think I'd want as many temporary files as possible to be running in RAM
    disk, and not off the SD card.


    --
    Wulfraed Dennis Lee Bieber AF6VN
    wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Markus Robert Kessler@3:770/3 to All on Thu Oct 22 22:08:22 2020
    On Thu, 22 Oct 2020 14:48:10 +1300 Richard Falken wrote:

    Re: Re: SDCard -- install here and deploy there?
    By: Markus Robert Kessler to All on Thu Oct 22 2020 05:35 pm

    To be on the safe side I make / made a reboot every night. From this
    the

    I know I am not helping, but rebooting "just because" is bad practice.

    If anything, reboot the service you need to reboot. And it is still bad.

    Much better to have a watchdog or something email you if there is any
    issue.

    Hi,

    on my RPI-3 I used to have a watchdog service. But by some reason the
    system hung instead of doing a hardware-reboot. Maybe there was a kernel
    module mismatch. So, I switched it off.

    Besides this, a watchdog may put your SDCard in a state where an fsck is demanded for. So, the system does not start non-interactively next time.

    best regards,

    Markus

    --
    Please reply to group only.
    For private email please use http://www.dipl-ing-kessler.de/email.htm

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Markus Robert Kessler@3:770/3 to All on Thu Oct 22 22:15:44 2020
    On Thu, 22 Oct 2020 19:54:44 +0000 Markus Robert Kessler wrote:

    On Thu, 22 Oct 2020 20:11:45 +0100 Dave Liquorice wrote:

    On Thu, 22 Oct 2020 17:35:12 -0000 (UTC), Markus Robert Kessler wrote:

    I start a python script via crontab every 10 minutes which reads I2C
    data from a BME280 sensor. This script calculates the temperature,
    relative humidity and relative air pressure and sends it to a
    webserver.

    Can't help think why you start the script every 10 mins instead of
    having in a loop with a 10 minute sleep. If you want *exactly* 10
    minutes between each sample one would have to code around the
    (variable)
    time taken for the data sampling, processing and up load but that's not
    difficult.

    To be on the safe side I make / made a reboot every night. From this
    the questioned machine didn't return, now. I see in the log that the
    last transmission was ok, then the reboot was started and the
    connection was lost. So, I doubt that the machine completely broke
    down. Most likely the SDCard gave up.

    So it hasn't been power cycled and/or the SD card reseated? It could
    just be a build up of corrosion in the slot connections. Almost all
    Rapsberry boot problems I've had have been down to the latter or a bad
    micro SD to SD adapater.

    Not sure why you think you need to reboot if it's only running a simple
    script. A Pi Zero here:

    pi@PiZ-StoveB:~ $ w
    19:37:30 up 49 days, 10:24,

    That Pi has extra hardware attached: An ENC28J60 ethernet port, ex
    nokia LCD phone display (both on SPI buses), a rotary encoder and a PWM
    driven solid state relay (4 GPIO's). It's talking on two 1-Wire buses
    (2 more GPIO's) with eight or so devices across the two buses. Every
    minute it reads all the 1-Wire devices, updates the display, logs the
    data (over ethernet and locally), decides if the PWM drive to the SSR
    is correct for the data it gathered and adjusts as required. The
    display has an animated "heartbeat" symbol that shows the system is
    alive when the PWM is off. If the PWM is on it rotates the symbol at
    the appropiate speed. This is all under a multi threaded python script.
    Oh almost forgot a bi-color LED that flashes green as the 1-Wire buses
    are read or pulses red at rate determined by the PWM.

    It's also running a web server (nginx) that can produce plots of the
    logged data on demand.

    It's also running pi-hole.

    As you can see it's doing all that and been up nearly 50 days... I've
    never known it crash in use.

    P.S. I'd rather prefer to use "Raspberry Zero / WLAN" only for
    installation, since it has only Wifi and the network there is cable
    based.

    Don't follow that either. B-) How does the WLAN help with getting an
    ethernet connection?

    WLAN doesn't help at all since at that site Wifi is deactivated. So, replacing an RPI-A with a RPI-Zero means one has to attach an eth-to-usb module. Better use it just for installing a new SDCard and then put this
    card into the RPI-A.

    Well, some months ago I wrote here about lost SDCards during reboot on RPI-Zero. Every 10 or 20 reboots the card was no longer found during
    reboot and had to be put into a desktop Linux PC. Then the partitions on
    the card were found instantly and the card worked again even in a RPI-
    Zero. Whoever I asked -- no clue why.

    So I decided to use RPI-Zero only for testing purposes and for logging
    data I use RPI-A, RPI-B and RPI-3.

    So, still interested in getting infos about if or not it is possible to install a new SDCard in a different RPI and then just put it into the mentioned RPI-A and it works?

    Thanks again,
    best regards,

    Markus

    Sorry, forget to mention:

    Yes, I try to install Raspbian OS.

    Reason for asking all this, is, that once I saw a warning saying that installing newer Raspberry machines like "Rpi-Zero" will only be possible
    by using the most recent Raspbian versions. Older ones cannot do.

    So, it seems that there are indeed some differences regarding accessing
    the hardware architecture, but hopefully newer OS-es -- once installed --
    can serve older hardware like "RPI-A" as well.

    Let's see.

    Best regards,

    Markus


    --
    Please reply to group only.
    For private email please use http://www.dipl-ing-kessler.de/email.htm

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Dennis Lee Bieber@3:770/3 to All on Thu Oct 22 20:22:23 2020
    On Thu, 22 Oct 2020 22:15:44 -0000 (UTC), Markus Robert Kessler <no_reply@dipl-ing-kessler.de> declaimed the following:


    Sorry, forget to mention:

    Yes, I try to install Raspbian OS.

    Reason for asking all this, is, that once I saw a warning saying that >installing newer Raspberry machines like "Rpi-Zero" will only be possible
    by using the most recent Raspbian versions. Older ones cannot do.

    So, it seems that there are indeed some differences regarding accessing
    the hardware architecture, but hopefully newer OS-es -- once installed --
    can serve older hardware like "RPI-A" as well.

    The 4B has a significantly different boot process, only supported with the Raspbian based on Debian 10 (Buster). The foundation actually released
    a Raspbian version some two weeks before Buster went official -- just
    because the 4B had been released, and no earlier Raspbian would support its boot.

    The 3B+, I believe, also required some additions to the boot system, but I think that was still in the late Debian 9 (Stretch) period.

    ALL Raspbian releases contain the boot configuration files needed by all Raspberry Pi models at the time of its release. The boot loader selects
    the correct file once it determines which board it is running on. Just look
    at all the bcm####*.dtb files in the FAT partition.


    --
    Wulfraed Dennis Lee Bieber AF6VN
    wlfraed@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From druck@3:770/3 to Dennis Lee Bieber on Fri Oct 23 10:59:45 2020
    On 22/10/2020 21:36, Dennis Lee Bieber wrote:
    On Thu, 22 Oct 2020 20:11:45 +0100 (BST), "Dave Liquorice" <allsortsnotthisbit@howhill.com> declaimed the following:

    On Thu, 22 Oct 2020 17:35:12 -0000 (UTC), Markus Robert Kessler
    wrote:

    I start a python script via crontab every 10 minutes which reads I2C
    data from a BME280 sensor. This script calculates the temperature,
    relative humidity and relative air pressure and sends it to a webserver.

    I've been doing that for all my Pi's for over 4 years now. I've got a
    BME280, lots of htu21df (temp and humidity) and a few DS18B20s (temp only).

    Can't help think why you start the script every 10 mins instead of
    having in a loop with a 10 minute sleep. If you want *exactly* 10

    That aspect is quite logical... Using a crontab entry means if the script failed at some point for some reason, a fresh process will be
    started 10 minutes later (give or take OS overhead).

    I use crontab for all my discrete sensor measurement scripts, which run
    at 5 and 15 minute intervals.

    While an internal loop might support more precise 10-minute intervals, if the script dies then nothing will be left running.

    If you register your script as a service with systemd you can get it to automatically restart after a crash.

    I use looping for things which run more often than a minute, for example
    my CPU temperature averaging code takes reading every second, and
    produces a rolling 5 or 15 minute average, min and max values - which
    are then picked up by the cron script.

    For a remote sensor node that relays readings to another server, I do think I'd want as many temporary files as possible to be running in RAM
    disk, and not off the SD card.

    Yes. Its a compromise though, most of the 2MB to 10MB that my Pis write
    to the card every day is logging (the higher number on log rotates), so
    logging to RAM would make the SD card last a lot longer. But in the
    event of a crash resulting in a reboot, I wouldn't know what happened.

    There is a lot of scope to turn off logging you don't need, and to set
    critical logging to SD card or a remote server, and not critical stuff
    to RAM. I haven't got around to sorting that out though,

    ---druck

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From druck@3:770/3 to Markus Robert Kessler on Fri Oct 23 10:42:31 2020
    On 22/10/2020 23:08, Markus Robert Kessler wrote:
    On Thu, 22 Oct 2020 14:48:10 +1300 Richard Falken wrote:

    Re: Re: SDCard -- install here and deploy there?
    By: Markus Robert Kessler to All on Thu Oct 22 2020 05:35 pm

    > To be on the safe side I make / made a reboot every night. From this
    > the

    I know I am not helping, but rebooting "just because" is bad practice.
    If anything, reboot the service you need to reboot. And it is still bad.
    Much better to have a watchdog or something email you if there is any
    issue.

    I agree with that. The majority of downtime across my dozen Pis are
    issues after reboots. It ranges from network dropping out while booting,
    to hardware not being ready, and of course the SD card throwing a wobbly.

    If the system is remote, I would not automatically reboot. If it needs rebooting, have someone there power cycle it, and wait until it has
    rebooted in case it needs another power cycle.

    on my RPI-3 I used to have a watchdog service. But by some reason the
    system hung instead of doing a hardware-reboot. Maybe there was a kernel module mismatch. So, I switched it off.

    Besides this, a watchdog may put your SDCard in a state where an fsck is demanded for. So, the system does not start non-interactively next time.

    You can configure it to do an automated fsck on every reboot, which
    doesn't need any interaction. It can add a minute or two to the boot
    time, and you need to check the logs regularly as if the card is
    starting to get dodgy it can struggle on fixing itself up to the point
    where it dies completely. What you should do is replace it immediately
    there is any doubt.

    But the best solution (if not using a Pi A or Zero) is to use something
    other than SD for the root filing system.

    ---druck

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Charlie Gibbs@3:770/3 to alister on Fri Oct 23 17:16:39 2020
    On 2020-10-22, alister <alister.ware@ntlworld.com> wrote:

    1st rule of Linux :-
    Reboots are for hardware changes only

    Actually, that's been a rule for just about any serious
    professional shop since time immemorial. It was Microsoft
    who introduced the concept of re-booting anytime for the
    hell of it. Making spontaneous reboots part of computing
    culture is one more of their crimes against humanity.

    --
    /~\ Charlie Gibbs | "Some of you may die,
    \ / <cgibbs@kltpzyxm.invalid> | but it's sacrifice
    X I'm really at ac.dekanfrus | I'm willing to make."
    / \ if you read it the right way. | -- Lord Farquaad (Shrek)

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Charlie Gibbs@3:770/3 to nospam.Richard.Falken@f1.n770.z5613 on Fri Oct 23 17:16:40 2020
    On 2020-10-22, Richard Falken
    <nospam.Richard.Falken@f1.n770.z5613.fidonet.org> wrote:

    Re: Re: SDCard -- install here and deploy there?
    By: Markus Robert Kessler to All on Thu Oct 22 2020 05:35 pm

    To be on the safe side I make / made a reboot every night. From this the

    I know I am not helping, but rebooting "just because" is bad practice.

    Go easy on him, he probably started out as a Microsoft vict^H^H^H^Huser.

    --
    /~\ Charlie Gibbs | "Some of you may die,
    \ / <cgibbs@kltpzyxm.invalid> | but it's sacrifice
    X I'm really at ac.dekanfrus | I'm willing to make."
    / \ if you read it the right way. | -- Lord Farquaad (Shrek)

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Eli the Bearded@3:770/3 to jj@franjam.org.uk on Fri Oct 23 18:21:14 2020
    In comp.sys.raspberry-pi, Jim Jackson <jj@franjam.org.uk> wrote:
    1st rule of Linux :-
    Reboots are for hardware changes only
    Or a kernel upgrade

    These days, where so much hardware is hot swappable (even on little
    computers, where USB is how much hardware is attached), I find kernel /
    low level software / underlying hypervisor issues to be the main reasons
    to reboot.

    I attach and detach sound "cards" and disks with USB regularly on
    personal and $WORK laptops. The rack mounted $WORK servers get non-USB
    disks, power supplies, and network devices swapped without reboots. But
    all of them need reboots for kernel changes.

    Elijah
    ------
    the k8s pods get restarted on new hosts regularly as hardware needs work

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From druck@3:770/3 to Markus Robert Kessler on Fri Oct 23 21:04:27 2020
    On 22/10/2020 23:15, Markus Robert Kessler wrote:
    Reason for asking all this, is, that once I saw a warning saying that installing newer Raspberry machines like "Rpi-Zero" will only be possible
    by using the most recent Raspbian versions. Older ones cannot do.

    So, it seems that there are indeed some differences regarding accessing
    the hardware architecture, but hopefully newer OS-es -- once installed --
    can serve older hardware like "RPI-A" as well.

    You should always do a fresh install with the latest version in any case.

    However, you may want to move an existing set up to a newer Pi, and this
    can be done even if that older install wouldn't work on the new Pi. What
    you need to do while running on the old Pi is to do a:-

    sudo rpi-update

    This will install all the newer components in /boot to allow use of any
    Pi. There is one gotcha though, you need to ensure your boot partition
    is big enough for al the new files. Older installs may have only had a
    64MB boot partition, but 256MB is recommended now.

    You can use gparted to enlarge the boot partition, but that requires
    moving the root partition upwards, which may take a long time for a
    large card. It may then be quicker to reformat and reinstall.

    ---druck

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From NY@3:770/3 to druck on Fri Oct 23 21:52:19 2020
    "druck" <news@druck.org.uk> wrote in message
    news:rmvd0f$tng$1@dont-email.me...
    On 22/10/2020 23:15, Markus Robert Kessler wrote:
    Reason for asking all this, is, that once I saw a warning saying that
    installing newer Raspberry machines like "Rpi-Zero" will only be possible
    by using the most recent Raspbian versions. Older ones cannot do.

    So, it seems that there are indeed some differences regarding accessing
    the hardware architecture, but hopefully newer OS-es -- once installed --
    can serve older hardware like "RPI-A" as well.

    You should always do a fresh install with the latest version in any case.

    However, you may want to move an existing set up to a newer Pi, and this
    can be done even if that older install wouldn't work on the new Pi. What
    you need to do while running on the old Pi is to do a:-

    sudo rpi-update

    This will install all the newer components in /boot to allow use of any
    Pi. There is one gotcha though, you need to ensure your boot partition is
    big enough for al the new files. Older installs may have only had a 64MB
    boot partition, but 256MB is recommended now.

    You can use gparted to enlarge the boot partition, but that requires
    moving the root partition upwards, which may take a long time for a large card. It may then be quicker to reformat and reinstall.

    From bitter experience, I'd say "don't try to use gparted if you've
    installed Raspbian from NOOBS". NOOBS seems to create all sorts of other
    little partitions which prevent gparted from working. I installed and configured my new Pi4 on the 16 GB card that it comes with. But I'm left
    with only a gig or so of free SD space. I thought I'd be able to copy the
    card onto a 32 GB card and then enlarge the almost-16 GB partition to use
    all the remaining space... but those pesky little partitions seem to get in
    the way.

    Can I be arsed to start again from scratch, installing onto the 32 GB card
    (but not via NOOBS!) and then doing all the configuration again? TVHeadend
    is a real pig to configure, because it "sees" all the regional versions of
    ITV1 as having the same name, whereas I want to call them "ITV1 London",
    "ITV1 Yorkshire (West)" etc so I can watch/record whichever local news
    happens to have greater coverage than the national news for a local story.
    It's a case of going through looking at PIDs and matching them against a
    list such as https://www.lyngsat.com/Astra-2E-2F-2G.html. Tedious, but I'd
    got it set up just right - and then discovered the low free space and
    thought how restricting it would be if I want to install anything extra.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From A. Dumas@3:770/3 to druck on Fri Oct 23 21:01:00 2020
    druck <news@druck.org.uk> wrote:
    However, you may want to move an existing set up to a newer Pi, and this
    can be done even if that older install wouldn't work on the new Pi. What
    you need to do while running on the old Pi is to do a:-

    sudo rpi-update

    Do not use that, it loads beta firmware. "sudo apt update && sudo apt -y full-upgrade" gets generally released firmware (and all the other updates).

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Markus Robert Kessler@3:770/3 to All on Sat Oct 24 10:39:35 2020
    On Fri, 23 Oct 2020 17:16:40 +0000 Charlie Gibbs wrote:

    On 2020-10-22, Richard Falken <nospam.Richard.Falken@f1.n770.z5613.fidonet.org> wrote:

    Re: Re: SDCard -- install here and deploy there?
    By: Markus Robert Kessler to All on Thu Oct 22 2020 05:35 pm

    To be on the safe side I make / made a reboot every night. From this
    the

    I know I am not helping, but rebooting "just because" is bad practice.

    Go easy on him, he probably started out as a Microsoft vict^H^H^H^Huser.

    Vict-what? -- Victim?

    At work I use to boot my machines only every few months and some even
    once per year. For headless servers this is sufficient. But these have typically 16 GB of RAM or even more.

    We are talking about a "Raspberry A" with 256 MB (MegaByte). Under load
    this amount will be eaten up soon. That was one of the reasons for
    inventing repeated reboots. On more sophisticated RPIs with 1 GB this is
    not necessary of course.

    Markus


    --
    Please reply to group only.
    For private email please use http://www.dipl-ing-kessler.de/email.htm

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Markus Robert Kessler on Sat Oct 24 12:09:07 2020
    On 24/10/2020 11:39, Markus Robert Kessler wrote:
    We are talking about a "Raspberry A" with 256 MB (MegaByte). Under load
    this amount will be eaten up soon.

    ??? WTF ???


    That was one of the reasons for
    inventing repeated reboots. On more sophisticated RPIs with 1 GB this is
    not necessary of course.

    Good grief...

    --
    “when things get difficult you just have to lie”

    ― Jean Claud Jüncker

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Pancho@3:770/3 to Ahem A Rivet's Shot on Sat Oct 24 12:43:03 2020
    On 24/10/2020 12:19, Ahem A Rivet's Shot wrote:
    On Sat, 24 Oct 2020 10:39:35 -0000 (UTC)
    Markus Robert Kessler <no_reply@dipl-ing-kessler.de> wrote:

    We are talking about a "Raspberry A" with 256 MB (MegaByte). Under load
    this amount will be eaten up soon. That was one of the reasons for
    inventing repeated reboots.

    Reboots to cure memory leaks ? IOW reboots as a workaround for bad programming! That has never been acceptable in my book since times when
    256Mb was a dream as disc capacity.

    Yeah, back in the real world it's an optimisation problem. Is it more
    efficient to reboot a server or invest time debugging leaky code. Time
    is money.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Ahem A Rivet's Shot@3:770/3 to Markus Robert Kessler on Sat Oct 24 12:19:40 2020
    On Sat, 24 Oct 2020 10:39:35 -0000 (UTC)
    Markus Robert Kessler <no_reply@dipl-ing-kessler.de> wrote:

    We are talking about a "Raspberry A" with 256 MB (MegaByte). Under load
    this amount will be eaten up soon. That was one of the reasons for
    inventing repeated reboots.

    Reboots to cure memory leaks ? IOW reboots as a workaround for bad programming! That has never been acceptable in my book since times when
    256Mb was a dream as disc capacity.

    I ran a 256Mb Rpi for a long time as router, DNS, DHCP, VPN and asterisk server, it never needed regular reboots. These days I need more
    CPU and better networking in the router (gigabit PPPoE takes a fairly fast processor).

    --
    Steve O'Hara-Smith | Directable Mirror Arrays C:\>WIN | A better way to focus the sun
    The computer obeys and wins. | licences available see
    You lose and Bill collects. | http://www.sohara.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Martin Gregorie@3:770/3 to Pancho on Sat Oct 24 11:50:36 2020
    On Sat, 24 Oct 2020 12:43:03 +0100, Pancho wrote:

    On 24/10/2020 12:19, Ahem A Rivet's Shot wrote:
    On Sat, 24 Oct 2020 10:39:35 -0000 (UTC)
    Markus Robert Kessler <no_reply@dipl-ing-kessler.de> wrote:

    We are talking about a "Raspberry A" with 256 MB (MegaByte). Under
    load this amount will be eaten up soon. That was one of the reasons
    for inventing repeated reboots.

    Reboots to cure memory leaks ? IOW reboots as a workaround for bad
    programming! That has never been acceptable in my book since times when
    256Mb was a dream as disc capacity.

    Yeah, back in the real world it's an optimisation problem. Is it more efficient to reboot a server or invest time debugging leaky code. Time
    is money.

    But seeing that the code is leaky is dead simple: just run top and look
    at the display every so often.


    --
    --
    Martin | martin at
    Gregorie | gregorie dot org

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Tauno Voipio@3:770/3 to All on Sat Oct 24 15:33:13 2020
    On 23.10.20 23.52, NY wrote:

    Can I be arsed to start again from scratch, installing onto the 32 GB
    card (but not via NOOBS!) and then doing all the configuration again? TVHeadend is a real pig to configure, because it "sees" all the regional versions of ITV1 as having the same name, whereas I want to call them
    "ITV1 London", "ITV1 Yorkshire (West)" etc so I can watch/record
    whichever local news happens to have greater coverage than the national
    news for a local story. It's a case of going through looking at PIDs and matching them against a list such as https://www.lyngsat.com/Astra-2E-2F-2G.html. Tedious, but I'd got it set
    up just right - and then discovered the low free space and thought how restricting it would be if I want to install anything extra.


    NOOBS is a system to not be touched by man or beast.

    It spoiled perfectly good cards by turning on the irreversible
    write protect bit in the SD controller on the card. The card
    someway works, but the partitioning cannot be rectified.

    On a normal Raspbian card, gparted works fine, but of course,
    it has to be run on a Linux machine separate from the target
    Pi. I used Ubuntu 20.04LTS on a VMware virtual guest.

    --

    -TV

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Ahem A Rivet's Shot@3:770/3 to Pancho on Sat Oct 24 13:07:58 2020
    On Sat, 24 Oct 2020 12:43:03 +0100
    Pancho <Pancho.Dontmaileme@outlook.com> wrote:

    On 24/10/2020 12:19, Ahem A Rivet's Shot wrote:
    On Sat, 24 Oct 2020 10:39:35 -0000 (UTC)
    Markus Robert Kessler <no_reply@dipl-ing-kessler.de> wrote:

    We are talking about a "Raspberry A" with 256 MB (MegaByte). Under load
    this amount will be eaten up soon. That was one of the reasons for
    inventing repeated reboots.

    Reboots to cure memory leaks ? IOW reboots as a workaround for
    bad programming! That has never been acceptable in my book since times
    when 256Mb was a dream as disc capacity.

    Yeah, back in the real world it's an optimisation problem. Is it more efficient to reboot a server or invest time debugging leaky code. Time
    is money.

    Out here in my bit of the real world if we create a service that we can't stop leaking then we arrange to restart the *service* periodically because our customers look on unexpected reboots with great disfavour. They like their expensive servers to be serving not rebooting.

    --
    Steve O'Hara-Smith | Directable Mirror Arrays C:\>WIN | A better way to focus the sun
    The computer obeys and wins. | licences available see
    You lose and Bill collects. | http://www.sohara.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From The Natural Philosopher@3:770/3 to Ahem A Rivet's Shot on Sat Oct 24 13:54:14 2020
    On 24/10/2020 13:07, Ahem A Rivet's Shot wrote:
    On Sat, 24 Oct 2020 12:43:03 +0100
    Pancho <Pancho.Dontmaileme@outlook.com> wrote:

    On 24/10/2020 12:19, Ahem A Rivet's Shot wrote:
    On Sat, 24 Oct 2020 10:39:35 -0000 (UTC)
    Markus Robert Kessler <no_reply@dipl-ing-kessler.de> wrote:

    We are talking about a "Raspberry A" with 256 MB (MegaByte). Under load >>>> this amount will be eaten up soon. That was one of the reasons for
    inventing repeated reboots.

    Reboots to cure memory leaks ? IOW reboots as a workaround for
    bad programming! That has never been acceptable in my book since times
    when 256Mb was a dream as disc capacity.

    Yeah, back in the real world it's an optimisation problem. Is it more
    efficient to reboot a server or invest time debugging leaky code. Time
    is money.

    Out here in my bit of the real world if we create a service that we can't stop leaking then we arrange to restart the *service* periodically because our customers look on unexpected reboots with great disfavour. They like their expensive servers to be serving not rebooting.

    Very good point



    --
    “when things get difficult you just have to lie”

    ― Jean Claud Jüncker

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Pancho@3:770/3 to Ahem A Rivet's Shot on Sat Oct 24 13:54:35 2020
    On 24/10/2020 13:07, Ahem A Rivet's Shot wrote:
    On Sat, 24 Oct 2020 12:43:03 +0100
    Pancho <Pancho.Dontmaileme@outlook.com> wrote:

    On 24/10/2020 12:19, Ahem A Rivet's Shot wrote:
    On Sat, 24 Oct 2020 10:39:35 -0000 (UTC)
    Markus Robert Kessler <no_reply@dipl-ing-kessler.de> wrote:

    We are talking about a "Raspberry A" with 256 MB (MegaByte). Under load >>>> this amount will be eaten up soon. That was one of the reasons for
    inventing repeated reboots.

    Reboots to cure memory leaks ? IOW reboots as a workaround for
    bad programming! That has never been acceptable in my book since times
    when 256Mb was a dream as disc capacity.

    Yeah, back in the real world it's an optimisation problem. Is it more
    efficient to reboot a server or invest time debugging leaky code. Time
    is money.

    Out here in my bit of the real world if we create a service that we can't stop leaking then we arrange to restart the *service* periodically because our customers look on unexpected reboots with great disfavour. They like their expensive servers to be serving not rebooting.


    No doubt. However many customers like cheap code delivered fast.

    I have tended to work on projects where rapid development time was
    crucial and once developed it was often cheaper to throw hardware at
    problems, rather than developer time.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Pancho@3:770/3 to Martin Gregorie on Sat Oct 24 13:54:44 2020
    On 24/10/2020 12:50, Martin Gregorie wrote:
    On Sat, 24 Oct 2020 12:43:03 +0100, Pancho wrote:

    On 24/10/2020 12:19, Ahem A Rivet's Shot wrote:
    On Sat, 24 Oct 2020 10:39:35 -0000 (UTC)
    Markus Robert Kessler <no_reply@dipl-ing-kessler.de> wrote:

    We are talking about a "Raspberry A" with 256 MB (MegaByte). Under
    load this amount will be eaten up soon. That was one of the reasons
    for inventing repeated reboots.

    Reboots to cure memory leaks ? IOW reboots as a workaround for bad
    programming! That has never been acceptable in my book since times when
    256Mb was a dream as disc capacity.

    Yeah, back in the real world it's an optimisation problem. Is it more
    efficient to reboot a server or invest time debugging leaky code. Time
    is money.

    But seeing that the code is leaky is dead simple: just run top and look
    at the display every so often.


    Yes, it is often dead simple to see that code doesn't work, however
    fixing it....

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From alister@3:770/3 to Pancho on Sat Oct 24 13:03:24 2020
    On Sat, 24 Oct 2020 12:43:03 +0100, Pancho wrote:

    On 24/10/2020 12:19, Ahem A Rivet's Shot wrote:
    On Sat, 24 Oct 2020 10:39:35 -0000 (UTC)
    Markus Robert Kessler <no_reply@dipl-ing-kessler.de> wrote:

    We are talking about a "Raspberry A" with 256 MB (MegaByte). Under
    load this amount will be eaten up soon. That was one of the reasons
    for inventing repeated reboots.

    Reboots to cure memory leaks ? IOW reboots as a workaround for bad
    programming! That has never been acceptable in my book since times when
    256Mb was a dream as disc capacity.

    Yeah, back in the real world it's an optimisation problem. Is it more efficient to reboot a server or invest time debugging leaky code. Time
    is money.

    I this type of thinking is precisely why there is so much bad code with security vulnerabilities in the wild.

    If you cant afford to do it right how on earth can you afford the losses
    from a data breach?



    --
    lisp, v.:
    To call a spade a thpade.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Martin Gregorie@3:770/3 to Pancho on Sat Oct 24 13:48:14 2020
    On Sat, 24 Oct 2020 13:54:44 +0100, Pancho wrote:

    On 24/10/2020 12:50, Martin Gregorie wrote:
    On Sat, 24 Oct 2020 12:43:03 +0100, Pancho wrote:

    On 24/10/2020 12:19, Ahem A Rivet's Shot wrote:
    On Sat, 24 Oct 2020 10:39:35 -0000 (UTC)
    Markus Robert Kessler <no_reply@dipl-ing-kessler.de> wrote:

    We are talking about a "Raspberry A" with 256 MB (MegaByte). Under
    load this amount will be eaten up soon. That was one of the reasons
    for inventing repeated reboots.

    Reboots to cure memory leaks ? IOW reboots as a workaround for bad
    programming! That has never been acceptable in my book since times
    when 256Mb was a dream as disc capacity.

    Yeah, back in the real world it's an optimisation problem. Is it more
    efficient to reboot a server or invest time debugging leaky code. Time
    is money.

    But seeing that the code is leaky is dead simple: just run top and look
    at the display every so often.


    Yes, it is often dead simple to see that code doesn't work, however
    fixing it....

    Yes, seeing that a bit of code doesn't work is simple, but realising that
    it might be a memory leak, not so much unless its Java, when you get told
    in no uncertain terms what happened if your program hit the size limit on
    the JVM's memory allocation pool.

    I'm always surprised by the number of people don't know that 'top'
    exists, let alone understand what it can show you.


    --
    --
    Martin | martin at
    Gregorie | gregorie dot org

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Pancho@3:770/3 to alister on Sun Oct 25 00:06:18 2020
    On 24/10/2020 14:03, alister wrote:

    Yeah, back in the real world it's an optimisation problem. Is it more
    efficient to reboot a server or invest time debugging leaky code. Time
    is money.

    I this type of thinking is precisely why there is so much bad code with security vulnerabilities in the wild.

    If you cant afford to do it right how on earth can you afford the losses
    from a data breach?


    Data Breach? pah!, peanuts. I could show you how to write code to really
    lose money.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From NY@3:770/3 to Markus Robert Kessler on Sun Oct 25 20:07:35 2020
    "Markus Robert Kessler" <no_reply@dipl-ing-kessler.de> wrote in message news:rn1097$jd$1@dont-email.me...
    On Fri, 23 Oct 2020 17:16:40 +0000 Charlie Gibbs wrote:

    On 2020-10-22, Richard Falken
    <nospam.Richard.Falken@f1.n770.z5613.fidonet.org> wrote:

    Re: Re: SDCard -- install here and deploy there?
    By: Markus Robert Kessler to All on Thu Oct 22 2020 05:35 pm

    To be on the safe side I make / made a reboot every night. From this
    the

    I know I am not helping, but rebooting "just because" is bad practice.

    Go easy on him, he probably started out as a Microsoft vict^H^H^H^Huser.

    Vict-what? -- Victim?

    At work I use to boot my machines only every few months and some even
    once per year. For headless servers this is sufficient. But these have typically 16 GB of RAM or even more.

    We are talking about a "Raspberry A" with 256 MB (MegaByte). Under load
    this amount will be eaten up soon. That was one of the reasons for
    inventing repeated reboots. On more sophisticated RPIs with 1 GB this is
    not necessary of course.

    In the 1990s, one of our UNIX servers (hostname "ozz" - yes, someone
    couldn't spell: I know the Wizard was from Oz) was a real pig to get all the processes running after a reboot - it required a lot of black-art tinkering
    by one of the UNIX gurus. Consequently it was never restarted Fortunately it never need kernel rebuilds for incorporating new device drivers.
    Surprisingly, in view of its kittle and vulnerable state, it wasn't
    connected to a UPS. One day there was a fairly dramatic power cut, when a
    JCB working nearby put its jib through a high-voltage cable (*). Whereas everyone else went to investigate the loud explosion, the brilliant flash
    and the cloud of black smoke, ozz's "handler" went into paroxysms of despair
    at the amount of time he was going to waste getting it going again when the power eventually came back.


    (*) The JCB partially melted. The driver was less lucky.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From NY@3:770/3 to All on Sun Oct 25 20:23:17 2020
    "Ahem A Rivet's Shot" <steveo@eircom.net> wrote in message news:20201024121940.637fbc604370d7cfa1860012@eircom.net...
    On Sat, 24 Oct 2020 10:39:35 -0000 (UTC)
    Markus Robert Kessler <no_reply@dipl-ing-kessler.de> wrote:

    We are talking about a "Raspberry A" with 256 MB (MegaByte). Under load
    this amount will be eaten up soon. That was one of the reasons for
    inventing repeated reboots.

    Reboots to cure memory leaks ? IOW reboots as a workaround for bad programming! That has never been acceptable in my book since times when
    256Mb was a dream as disc capacity.

    256 Mb. So 64 MB? <four Yorkshiremen>That's luxury!</four Yorkshiremen>

    I can remember when I bought my first computer, in 1981, a CPM/3-based
    "Wren" (*). I decided that I could just about afford the RAM upgrade from 16
    KB to 256 KB, but I couldn't justify or afford the disk upgrade from 2
    floppies to 1 floppy and a 5 MB hard disk.

    My first IBM-compatible PC, based on an 8086, came with a 20 MB HDD. It ran MS-DOS fine, but it wasn't up to running Windows 1 - and I used up most of
    the HDD even installing it from the multitude of diskettes that I borrowed
    from work to try it out of curiosity.


    (*) I remember it was the first time I'd even driven in London, in the car
    that I'd bought a few weeks earlier after passing my test - navigating along the A40, Marylebone Road/Euston Road, Gray's Inn Road to Theobalds Road
    where the shop was. I even managed to find my way back home again ;-) The
    Wren still worked until I last tried it a few years ago, when I found that
    the PSU (a very obsolete design) had finally packed up.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Ahem A Rivet's Shot@3:770/3 to me@privacy.invalid on Sun Oct 25 21:09:55 2020
    On Sun, 25 Oct 2020 20:23:17 -0000
    "NY" <me@privacy.invalid> wrote:

    "Ahem A Rivet's Shot" <steveo@eircom.net> wrote in message news:20201024121940.637fbc604370d7cfa1860012@eircom.net...
    On Sat, 24 Oct 2020 10:39:35 -0000 (UTC)
    Markus Robert Kessler <no_reply@dipl-ing-kessler.de> wrote:

    We are talking about a "Raspberry A" with 256 MB (MegaByte). Under load
    this amount will be eaten up soon. That was one of the reasons for
    inventing repeated reboots.

    Reboots to cure memory leaks ? IOW reboots as a workaround for bad programming! That has never been acceptable in my book since times when 256Mb was a dream as disc capacity.

    256 Mb. So 64 MB? <four Yorkshiremen>That's luxury!</four Yorkshiremen>

    <grin>

    I can remember when I bought my first computer, in 1981, a CPM/3-based
    "Wren" (*). I decided that I could just about afford the RAM upgrade from

    A bit later than 1981 I think - CP/M 3 didn't come out until 1983
    CPN for the Torch (1982) was based on CP/M 2.2, I'd have just ported CP/M 3
    if it had been available.

    --
    Steve O'Hara-Smith | Directable Mirror Arrays C:\>WIN | A better way to focus the sun
    The computer obeys and wins. | licences available see
    You lose and Bill collects. | http://www.sohara.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Martin Gregorie@3:770/3 to All on Sun Oct 25 22:58:40 2020
    On Sun, 25 Oct 2020 20:23:17 +0000, NY wrote:

    256 Mb. So 64 MB? <four Yorkshiremen>That's luxury!</four Yorkshiremen>

    Certainly was <<LUXURY>>!

    I first learned to program in Algol 60 on an Elliott 503 with 8 Kwords
    (39 bit words) with input on paper tape and output on a lineprinter.

    Then learned assembler on an ICL 1901 with 4KWords of 24 bit memory, card input, compiler loaded from magnetic tape and output on a lineprinter.

    My first home machine was as a 48KB system with an MC6809 running FLEX-09
    from two floppies. Input from keyboard, output to an Epson dot matrix
    printer (remember them?).

    At work I was programming an ICL 2966 mainframe running 12 online
    database systems, for a few hundred uses, written in COBOL and on 16MB
    RAM. with a roomful of 400MB, washing machine sized disk drives. (you can
    go see one at TNMOC at Bletchley Park).

    Mutter..mutter - tell that the the kidz of today and they won't believe
    you...

    Now a Lenovo T440 laptop with 8GB RAM and 500 GB disk, running Linux,
    with Internet connections and a laser printer does everything I need and
    is fast enough to avoid waiting except for system updates.


    --
    --
    Martin | martin at
    Gregorie | gregorie dot org

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From A. Dumas@3:770/3 to me@privacy.invalid on Mon Oct 26 03:03:10 2020
    NY <me@privacy.invalid> wrote:
    "Ahem A Rivet's Shot" <steveo@eircom.net> wrote:
    256Mb was a dream as disc capacity.

    256 Mb. So 64 MB? <four Yorkshiremen>That's luxury!</four Yorkshiremen>

    32, you mean. Also, technically, it's MiB. https://en.wikipedia.org/wiki/Mebibyte

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Ahem A Rivet's Shot@3:770/3 to Martin Gregorie on Mon Oct 26 06:02:21 2020
    On Sun, 25 Oct 2020 22:58:40 -0000 (UTC)
    Martin Gregorie <martin@mydomain.invalid> wrote:

    I first learned to program in Algol 60 on an Elliott 503 with 8 Kwords
    (39 bit words) with input on paper tape and output on a lineprinter.

    Lucky sod! Dartmouth BASIC[10] on a 4K word (32 bit) IBM 1130, but there was a 1442 card reader/punch attached as well as the paper tape
    reader and a 1403 (not N1 so I missed out on that joy).

    [10] Then 1130 FORTRAN, then assembler. I didn't meet Algol 60 until the
    1130 was replaced by an Eclipse and we switched to using terminals and
    stopped being allowed into the machine room.

    --
    Steve O'Hara-Smith | Directable Mirror Arrays C:\>WIN | A better way to focus the sun
    The computer obeys and wins. | licences available see
    You lose and Bill collects. | http://www.sohara.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Pancho@3:770/3 to All on Mon Oct 26 10:58:23 2020
    On 25/10/2020 20:23, NY wrote:

    256 Mb. So 64 MB? <four Yorkshiremen>That's luxury!</four Yorkshiremen>

    I can remember when I bought my first computer, in 1981, a CPM/3-based
    "Wren" (*). I decided that I could just about afford the RAM upgrade
    from 16 KB to 256 KB, but I couldn't justify or afford the disk upgrade
    from 2 floppies to 1 floppy and a 5 MB hard disk.

    My first IBM-compatible PC, based on an 8086, came with a 20 MB HDD. It
    ran MS-DOS fine, but it wasn't up to running Windows 1 - and I used up
    most of the HDD even installing it from the multitude of diskettes that
    I borrowed from work to try it out of curiosity.


    (*) I remember it was the first time I'd even driven in London, in the
    car that I'd bought a few weeks earlier after passing my test -
    navigating along the A40, Marylebone Road/Euston Road, Gray's Inn Road
    to Theobalds Road where the shop was. I even managed to find my way back
    home again ;-) The Wren still worked until I last tried it a few years
    ago, when I found that the PSU (a very obsolete design) had finally
    packed up.

    <four Yorkshiremen>
    You were clearly posh. I didn't have a car. I road my bike to pick up my
    first RAM extender and I didn't get to ride on the Marylebone road, I
    had to ride underneath it.
    </four Yorkshiremen>

    Actually true, a trip to Watford Electronics via Edgeware Rd, a shop
    that specialised in bits for the Acorn BBC B.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Ahem A Rivet's Shot@3:770/3 to Pancho on Mon Oct 26 11:17:20 2020
    On Mon, 26 Oct 2020 10:58:23 +0000
    Pancho <Pancho.Dontmaileme@outlook.com> wrote:

    Actually true, a trip to Watford Electronics via Edgeware Rd, a shop
    that specialised in bits for the Acorn BBC B.

    Oh now that's a familiar trip - going back to before the BBC B when
    I used to go there to get transistors and suchlike.

    --
    Steve O'Hara-Smith | Directable Mirror Arrays C:\>WIN | A better way to focus the sun
    The computer obeys and wins. | licences available see
    You lose and Bill collects. | http://www.sohara.org/

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From Martin Gregorie@3:770/3 to Ahem A Rivet's Shot on Mon Oct 26 13:48:37 2020
    On Mon, 26 Oct 2020 06:02:21 +0000, Ahem A Rivet's Shot wrote:

    On Sun, 25 Oct 2020 22:58:40 -0000 (UTC)
    Martin Gregorie <martin@mydomain.invalid> wrote:

    I first learned to program in Algol 60 on an Elliott 503 with 8 Kwords
    (39 bit words) with input on paper tape and output on a lineprinter.

    Lucky sod! Dartmouth BASIC[10] on a 4K word (32 bit) IBM 1130, but there was a 1442 card reader/punch attached as well as the paper tape
    reader and a 1403 (not N1 so I missed out on that joy).

    The Elliott 503 was fast for its time. As well as its 8kword 39-bit 3.6uS ferrite core main memory it had another 16Kwords of 39-bit 50uS ferrite
    core memory that could be used as workspace for large matrix operations
    but was normally used as fast external storage: during normal operation
    the Algol compiler was loaded from for each compiler run.

    I was using the Elliott to analyse spectra output by a Mossbauer
    Spectrometer which used a 400 channel Multichannel analyser to capture
    output from a scintillation radiation detector. The Eliott was fast
    enough for me to analyse the results from a 24 hour spectrometer run
    during a standard 3 minute testing slot rather then needing to book time
    on it. Three minutes was more than enough time to read my program from a
    3 - 3.5 inch roll of paper tape, compile it, read in the data tape output
    by the multichannel analyser, analyse it and print the results.

    But the Elliott was a physical monster occupying six 2m x 1m x 0.6m steel cabinets, each weighing 465Kg. In addition there was an operators desk
    and full-size 1200 lpm lineprinter. The machine was pre-integrated
    circuit technology, so was built entirely from discrete transistors.

    Its most unusual feature was that its FP arithmetic operations were 5-10% faster than integer operations and it stored 2 instructions per word.


    --
    --
    Martin | martin at
    Gregorie | gregorie dot org

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From NY@3:770/3 to A. Dumas on Mon Oct 26 17:02:51 2020
    "A. Dumas" <alexandre@dumas.fr.invalid> wrote in message news:rn5e9e$u99$1@dont-email.me...
    NY <me@privacy.invalid> wrote:
    "Ahem A Rivet's Shot" <steveo@eircom.net> wrote:
    256Mb was a dream as disc capacity.

    256 Mb. So 64 MB? <four Yorkshiremen>That's luxury!</four Yorkshiremen>

    32, you mean. Also, technically, it's MiB. https://en.wikipedia.org/wiki/Mebibyte

    Yes, Ahem and I made various errors/typos: Ahem wrote Mb (10^6) when he
    should have written Mib (2^20=1024*1024 or *approximately* 10^6). I did the same with MB which should have been Mib (not only did I confuse M with Mi
    but I also mutated bits into bytes - the latter was a typo). Then to
    compound my error, I also couldn't divide 256 by 8 ;-)

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)
  • From NY@3:770/3 to All on Mon Oct 26 17:17:56 2020
    "Ahem A Rivet's Shot" <steveo@eircom.net> wrote in message news:20201025210955.7d73536af893a6cbdba964d8@eircom.net...
    On Sun, 25 Oct 2020 20:23:17 -0000
    "NY" <me@privacy.invalid> wrote:

    "Ahem A Rivet's Shot" <steveo@eircom.net> wrote in message
    news:20201024121940.637fbc604370d7cfa1860012@eircom.net...
    On Sat, 24 Oct 2020 10:39:35 -0000 (UTC)
    Markus Robert Kessler <no_reply@dipl-ing-kessler.de> wrote:

    We are talking about a "Raspberry A" with 256 MB (MegaByte). Under
    load
    this amount will be eaten up soon. That was one of the reasons for
    inventing repeated reboots.

    Reboots to cure memory leaks ? IOW reboots as a workaround for bad
    programming! That has never been acceptable in my book since times when
    256Mb was a dream as disc capacity.

    256 Mb. So 64 MB? <four Yorkshiremen>That's luxury!</four Yorkshiremen>

    <grin>

    I can remember when I bought my first computer, in 1981, a CPM/3-based
    "Wren" (*). I decided that I could just about afford the RAM upgrade from

    A bit later than 1981 I think - CP/M 3 didn't come out until 1983
    CPN for the Torch (1982) was based on CP/M 2.2, I'd have just ported CP/M
    3
    if it had been available.

    You could well be right. I thought at first I already had the computer when
    I started at university in 1982, but I may have got it a year later. In
    which case it wasn't just after I'd passed my driving test (in 1981) but a while later. Probably still the first time I drove in central London *on my own* as opposed to having my dad for moral support and to navigate.

    Anyway, CP/M3, BBC Basic (which had been ported from 6502 on BBC Micro to
    Z80), Perfect Office (Writer, Calc, Exec) office suite, Prestel display and modem. All in a very heavy case that was "luggable" (though it left you
    walking lopsided!) because the unit with the motherboard, PSU, screen and floppies could be slid back to expose the keyboard or slid forward to a lid could be clipped over to make a self-contained unit with a (strong) carrying handle.

    I was quite proud when I managed to write a Z80 routine (embedded in and
    called from a BASIC program) for bubble-sorting an array - which it did
    *many* times quicker than the same algorithm in BASIC. I found a listing of
    it the other day and was quite impressed with what my younger self had
    managed ;-) I also made little circuit boards which plugged into the
    parallel port and interfaced with a) a digital-to-analogue chip and b) an analogue-to-digital chip. Not long ago I came across a sound recording I'd
    made this way from a CD player - Dire Straits' "Why Worry" - and it was a perfectly good 8-bit WAV file once I'd added the necessary file header. I
    also made an RGB-to-PAL converter (again, using an IC which did the job,
    with a suitable 4.33 MHz crystal) so I could display colour on a TV from the RGB port, since the Wren only had a monochrome amber screen.

    --- SoupGate-Win32 v1.05
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)