×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

KStars/EKOS crashing when imaging; Astroberry, RPi 4-4GB

  • Posts: 349
  • Thank you received: 107
if you use basic free shell command then "free" really means totally unused memory. what you should look at is available as OS can easily free most of memory occupied by cache.
What I don't get is why swap is going up. I don't think this is memory issue but something else.

Try run "gdb kstars" then press enter "run" command and wait until kstars crash. Then use "bt" command to get backtrace and post it here.
1 year 10 months ago #82948

Please Log in or Create an account to join the conversation.

  • Posts: 19
  • Thank you received: 1
Thanks Nigel & Nou,
Seems like Nigel is getting similar thing - Nou, can I direct you to the updated script in the 1st post - I output all types of memory in this, or is "free" just a bad idea as output?
I'm running another session at present, where disabling Conky seems to be working "better" - it completed 10000 successful simulation images, and I've upped it to run 100k, just to see how things fare over duration.
Looking at the memory figures though, it's still using lots of Swap, which in my limited googling and understanding, seems like an issue:
*************************************************************************
**      New record of system info started at 2022-05-18, 15:10:22      **
**   Total RAM available is 3.7GB and total SWAP available is  99MB.   **
*************************************************************************
2022-05-18 15:10:26 Temp=39.4ºC. RAM 'Used': 314MB ( 8.3%); RAM 'Free': 3.0GB (82.5%); RAM 'Available': 3.2GB (86.9%); RAM used in Shared & Buffer: 10.5%. Swap used: 0.0%. µSD @/dev/root uses 39,559,852kB.
2022-05-18 15:10:28 Temp=38.4ºC. RAM 'Used': 314MB ( 8.3%); RAM 'Free': 3.1GB (82.7%); RAM 'Available': 3.2GB (87.2%); RAM used in Shared & Buffer: 10.1%. Swap used: 0.0%. µSD @/dev/root uses 39,559,852kB.
2022-05-18 15:10:30 Temp=38.4ºC. RAM 'Used': 313MB ( 8.3%); RAM 'Free': 3.1GB (82.7%); RAM 'Available': 3.2GB (87.2%); RAM used in Shared & Buffer: 10.1%. Swap used: 0.0%. µSD @/dev/root uses 39,559,852kB.
2022-05-18 15:10:32 Temp=39.4ºC. RAM 'Used': 313MB ( 8.3%); RAM 'Free': 3.1GB (82.8%); RAM 'Available': 3.2GB (87.2%); RAM used in Shared & Buffer: 10.1%. Swap used: 0.0%. µSD @/dev/root uses 39,559,852kB.
2022-05-18 15:10:34 Temp=38.4ºC. RAM 'Used': 314MB ( 8.3%); RAM 'Free': 3.1GB (82.8%); RAM 'Available': 3.2GB (87.2%); RAM used in Shared & Buffer: 10.1%. Swap used: 0.0%. µSD @/dev/root uses 39,559,852kB.
 
<Skip a few thousand output lines!>
 
2022-05-19 13:07:24 Temp=38.9ºC. RAM 'Used': 1.5GB (41.7%); RAM 'Free':  78MB ( 2.1%); RAM 'Available': 2.0GB (52.9%); RAM used in Shared & Buffer: 57.9%. Swap used:100.0%. µSD @/dev/root uses 76,427,688kB.
2022-05-19 13:07:25 Temp=38.4ºC. RAM 'Used': 1.5GB (41.7%); RAM 'Free':  76MB ( 2.2%); RAM 'Available': 2.0GB (53.1%); RAM used in Shared & Buffer: 58.0%. Swap used:100.0%. µSD @/dev/root uses 76,430,256kB.
2022-05-19 13:07:27 Temp=37.4ºC. RAM 'Used': 1.5GB (41.5%); RAM 'Free':  78MB ( 2.1%); RAM 'Available': 2.0GB (53.0%); RAM used in Shared & Buffer: 58.2%. Swap used:100.0%. µSD @/dev/root uses 76,430,260kB.
2022-05-19 13:07:29 Temp=38.4ºC. RAM 'Used': 1.5GB (41.6%); RAM 'Free':  81MB ( 2.1%); RAM 'Available': 2.0GB (52.8%); RAM used in Shared & Buffer: 57.9%. Swap used:100.0%. µSD @/dev/root uses 76,432,824kB.
I've tried to keep the syntax of 'FREE" :


A next update to the output might be to include '-w' to split buffer & shared. Obviously I switch to % too - would it be more helpful to keep all same unit (i.e. output in MB or % overall?)
Last edit: 1 year 10 months ago by Pete Simpson.
1 year 10 months ago #82950
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 349
  • Thank you received: 107
What is important is available not free. Linux just keeps any read/writen file in memory cache until it is knocked out by program allocating some memory or by other read/write operation.
You can clear this memory cache by running "echo 3 | sudo tee /proc/sys/vm/drop_cache"
1 year 10 months ago #82952

Please Log in or Create an account to join the conversation.

  • Posts: 155
  • Thank you received: 12
Hi Nou

that’s what I was getting at. The top command wasn’t showing any actual change in the memory used by kstars etc. Unfortunately I didn’t have chance to let it run to see if kstars/ekos crashed once all the memory & swap had been used up.
1 year 10 months ago #82954

Please Log in or Create an account to join the conversation.

  • Posts: 19
  • Thank you received: 1
Hi guys,
In effort to clear some terminology up, I've been using the 'free -h' command in the terminal (via shell script to extract ALL the memory sections that the command returns. This is then reported in the output file with the same 'fields' as the terminal window shows:
I'm hoping to update the script to output more user friendly units, probably everything as percentage of original. More on that later.
@Nou - your comment about using the basic "free" command suggests that there may be a more useful/better way of doing this? I'm not a computer guru so make things up from scratch and lots of searching to get what I need - I attach the script I am using to show what I mean here - a programmer would be sick at the variables I'm sure, but it seemed to be showing what I wanted to see (I've copied the code from shell script to text file as need this format to upload and didn't want to paste the hundred lines in here as the topic would just get foolish). Thoughts and comments welcome!

File Attachment:

File Name: SampleShell.txt
File Size:4 KB

Anyway, after further testing...
Simulator ran on 18/5, doing 10k 'images', completed successfully as noted above, although system memory "free" still decreasing throughout, including swap being used.
Final lines of log file from KStars:
[2022-05-18T23:59:49.778 BST DEBG ][           org.kde.kstars.indi] - CCD Simulator : "[DEBUG] BLOB transfer took 0.136006 seconds "
[2022-05-18T23:59:49.778 BST DEBG ][           org.kde.kstars.indi] - CCD Simulator : "[DEBUG] Upload complete "
[2022-05-18T23:59:49.811 BST INFO ][   org.kde.kstars.ekos.capture] - "Received image 10000 out of 10000."
[2022-05-18T23:59:50.294 BST DEBG ][     org.kde.kstars.ekos.guide] - Reset non guiding dithering position
[2022-05-18T23:59:50.302 BST DEBG ][   org.kde.kstars.ekos.capture] - setMeridianFlipStage:  "MF_READY"
[2022-05-18T23:59:50.302 BST DEBG ][   org.kde.kstars.ekos.capture] - All capture jobs complete.
[2022-05-18T23:59:50.325 BST DEBG ][   org.kde.kstars.ekos.capture] - setMeridianFlipStage:  "MF_READY"
[2022-05-18T23:59:50.381 BST DEBG ][                       default] - WARNING: Phonon::createPath: Cannot connect  Phonon::MediaObject ( no objectName ) to  Phonon::AudioOutput ( no objectName ).
[2022-05-18T23:59:50.391 BST DEBG ][           org.kde.kstars.indi] - Telescope Simulator : "[SCOPE] mountToApparentRaDec 90.000000, 90.000000 to ha 90.000000, ra 131.562230, 90.000000 "
[2022-05-18T23:59:50.391 BST DEBG ][           org.kde.kstars.indi] - Telescope Simulator : "[SCOPE] Current RA:  8:46:15 Current DEC: 90:00:00 "

Memory stats at this point:
2022-05-18 23:59:42 Temp=39.4ºC. RAM 'Used': 1.2GB (31.9%); RAM 'Free':  90MB ( 2.4%); RAM 'Available': 2.3GB (63.3%); RAM used in Shared & Buffer: 65.8%. Swap used:61.0%. µSD @/dev/root uses 65,207,256kB.
2022-05-18 23:59:44 Temp=38.4ºC. RAM 'Used': 1.2GB (31.9%); RAM 'Free': 115MB ( 3.0%); RAM 'Available': 2.3GB (63.5%); RAM used in Shared & Buffer: 65.8%. Swap used:61.0%. µSD @/dev/root uses 65,207,260kB.
2022-05-18 23:59:46 Temp=38.9ºC. RAM 'Used': 1.2GB (32.1%); RAM 'Free': 108MB ( 3.0%); RAM 'Available': 2.3GB (63.5%); RAM used in Shared & Buffer: 65.9%. Swap used:61.0%. µSD @/dev/root uses 65,209,820kB.
2022-05-18 23:59:47 Temp=39.4ºC. RAM 'Used': 1.2GB (31.9%); RAM 'Free': 112MB ( 3.0%); RAM 'Available': 2.3GB (63.5%); RAM used in Shared & Buffer: 65.9%. Swap used:61.0%. µSD @/dev/root uses 65,209,824kB.
2022-05-18 23:59:49 Temp=38.4ºC. RAM 'Used': 1.2GB (32.0%); RAM 'Free': 110MB ( 2.9%); RAM 'Available': 2.3GB (63.5%); RAM used in Shared & Buffer: 65.9%. Swap used:61.0%. µSD @/dev/root uses 65,212,388kB.
2022-05-18 23:59:51 Temp=38.4ºC. RAM 'Used': 1.2GB (31.9%); RAM 'Free': 105MB ( 2.8%); RAM 'Available': 2.3GB (63.5%); RAM used in Shared & Buffer: 66.1%. Swap used:61.0%. µSD @/dev/root uses 65,212,388kB.
2022-05-18 23:59:52 Temp=38.4ºC. RAM 'Used': 1.2GB (31.9%); RAM 'Free': 106MB ( 2.8%); RAM 'Available': 2.3GB (63.5%); RAM used in Shared & Buffer: 66.1%. Swap used:61.0%. µSD @/dev/root uses 65,212,392kB.
2022-05-18 23:59:54 Temp=38.4ºC. RAM 'Used': 1.2GB (31.9%); RAM 'Free': 105MB ( 2.8%); RAM 'Available': 2.3GB (63.5%); RAM used in Shared & Buffer: 66.1%. Swap used:61.0%. µSD @/dev/root uses 65,212,392kB.
2022-05-18 23:59:56 Temp=37.9ºC. RAM 'Used': 1.2GB (31.9%); RAM 'Free': 106MB ( 2.8%); RAM 'Available': 2.3GB (63.5%); RAM used in Shared & Buffer: 66.1%. Swap used:61.0%. µSD @/dev/root uses 65,212,396kB.
Still shows significant use on the FREE ram, and the Swap also.
So with this dataset completing, I started a further one, 9 hours later once I saw the results
[2022-05-19T09:01:00.692 BST DEBG ][           org.kde.kstars.indi] - Telescope Simulator : "[SCOPE] Current RA: 17:48:55 Current DEC: 90:00:00 "
[2022-05-19T09:01:00.876 BST DEBG ][           org.kde.kstars.indi] - Telescope Simulator : "[SCOPE] mountToApparentRaDec 90.000000, 90.000000 to ha 90.000000, ra -92.771706, 90.000000 "
[2022-05-19T09:01:00.877 BST DEBG ][           org.kde.kstars.indi] - Telescope Simulator : "[SCOPE] Current RA: 17:48:55 Current DEC: 90:00:00 "
[2022-05-19T09:01:01.041 BST DEBG ][           org.kde.kstars.indi] - CCD Simulator : "[DEBUG] Uploading file. Ext: bin, Size: 2621440, sendImage? Yes, saveImage? No "
[2022-05-19T09:01:01.135 BST DEBG ][           org.kde.kstars.indi] - CCD Simulator : "[DEBUG] BLOB transfer took 0.0755511 seconds "
[2022-05-19T09:01:01.136 BST DEBG ][           org.kde.kstars.indi] - CCD Simulator : "[DEBUG] Upload complete "
[2022-05-19T09:01:01.165 BST INFO ][   org.kde.kstars.ekos.capture] - "Received image 1 out of 100000."
[2022-05-19T09:01:02.250 BST DEBG ][           org.kde.kstars.indi] - Telescope Simulator : "[SCOPE] mountToApparentRaDec 90.000000, 90.000000 to ha 90.000000, ra -92.770659, 90.000000 "
[2022-05-19T09:01:02.250 BST DEBG ][           org.kde.kstars.indi] - Telescope Simulator : "[SCOPE] Current RA: 17:48:55 Current DEC: 90:00:00 "
[2022-05-19T09:01:02.281 BST INFO ][   org.kde.kstars.ekos.capture] - "Capturing 2.500-second Luminance image..."
[2022-05-19T09:01:02.860 BST DEBG ][           org.kde.kstars.indi] - Telescope Simulator : "[SCOPE] mountToApparentRaDec 90.000000, 90.000000 to ha 90.000000, ra -92.769612, 90.000000 "
Memory situation hasn't improved much over the period of not capturing images:
2022-05-19 09:00:55 Temp=37.0ºC. RAM 'Used': 1.2GB (33.1%); RAM 'Free': 116MB ( 3.1%); RAM 'Available': 2.3GB (61.1%); RAM used in Shared & Buffer: 65.5%. Swap used:61.3%. µSD @/dev/root uses 65,259,284kB.
2022-05-19 09:00:57 Temp=37.4ºC. RAM 'Used': 1.2GB (33.1%); RAM 'Free': 116MB ( 3.1%); RAM 'Available': 2.3GB (61.2%); RAM used in Shared & Buffer: 65.5%. Swap used:61.3%. µSD @/dev/root uses 65,259,284kB.
2022-05-19 09:00:59 Temp=38.4ºC. RAM 'Used': 1.2GB (33.1%); RAM 'Free': 115MB ( 3.0%); RAM 'Available': 2.3GB (61.1%); RAM used in Shared & Buffer: 65.5%. Swap used:61.3%. µSD @/dev/root uses 65,259,288kB.
2022-05-19 09:01:01 Temp=37.4ºC. RAM 'Used': 1.2GB (33.1%); RAM 'Free': 110MB ( 2.9%); RAM 'Available': 2.3GB (61.1%); RAM used in Shared & Buffer: 65.6%. Swap used:61.3%. µSD @/dev/root uses 65,261,852kB.
2022-05-19 09:01:03 Temp=37.4ºC. RAM 'Used': 1.2GB (33.1%); RAM 'Free': 112MB ( 3.0%); RAM 'Available': 2.3GB (61.1%); RAM used in Shared & Buffer: 65.6%. Swap used:61.3%. µSD @/dev/root uses 65,261,856kB.
2022-05-19 09:01:05 Temp=38.4ºC. RAM 'Used': 1.2GB (33.0%); RAM 'Free': 113MB ( 3.0%); RAM 'Available': 2.3GB (61.2%); RAM used in Shared & Buffer: 65.6%. Swap used:61.3%. µSD @/dev/root uses 65,264,416kB.
2022-05-19 09:01:06 Temp=37.9ºC. RAM 'Used': 1.2GB (33.0%); RAM 'Free': 113MB ( 3.0%); RAM 'Available': 2.3GB (61.2%); RAM used in Shared & Buffer: 65.7%. Swap used:61.3%. µSD @/dev/root uses 65,264,420kB.

A different message though at the end of the log file - things appear to freeze 6 hours later, and then ~14 hours of nothing before error reported:
[2022-05-19T15:37:25.542 BST DEBG ][           org.kde.kstars.indi] - CCD Simulator : "[DEBUG] Upload complete "
[2022-05-19T15:37:25.649 BST INFO ][   org.kde.kstars.ekos.capture] - "Received image 6867 out of 100000."
[2022-05-19T15:37:26.475 BST DEBG ][           org.kde.kstars.indi] - Telescope Simulator : "[SCOPE] mountToApparentRaDec 90.000000, 90.000000 to ha 90.000000, ra 6.602958, 90.000000 "
[2022-05-19T15:37:26.476 BST DEBG ][           org.kde.kstars.indi] - Telescope Simulator : "[SCOPE] Current RA:  0:26:25 Current DEC: 90:00:00 "
[2022-05-19T15:37:26.477 BST DEBG ][           org.kde.kstars.indi] - Telescope Simulator : "[SCOPE] mountToApparentRaDec 90.000000, 90.000000 to ha 90.000000, ra 6.604005, 90.000000 "
[2022-05-19T15:37:26.477 BST DEBG ][           org.kde.kstars.indi] - Telescope Simulator : "[SCOPE] Current RA:  0:26:25 Current DEC: 90:00:00 "
[2022-05-19T15:37:26.478 BST DEBG ][           org.kde.kstars.indi] - Telescope Simulator : "[SCOPE] mountToApparentRaDec 90.000000, 90.000000 to ha 90.000000, ra 6.605052, 90.000000 "
[2022-05-19T15:37:26.478 BST DEBG ][           org.kde.kstars.indi] - Telescope Simulator : "[SCOPE] Current RA:  0:26:25 Current DEC: 90:00:00 "
[2022-05-19T15:37:26.479 BST DEBG ][           org.kde.kstars.indi] - Telescope Simulator : "[SCOPE] mountToApparentRaDec 90.000000, 90.000000 to ha 90.000000, ra 6.606098, 90.000000 "
[2022-05-19T15:37:26.480 BST DEBG ][           org.kde.kstars.indi] - Telescope Simulator : "[SCOPE] Current RA:  0:26:25 Current DEC: 90:00:00 "
[2022-05-20T05:47:44.246 BST DEBG ][           org.kde.kstars.indi] - Telescope Simulator : "[SCOPE] mountToApparentRaDec 90.000000, 90.000000 to ha 90.000000, ra -140.237616, 90.000000 "
[2022-05-20T05:47:44.248 BST DEBG ][           org.kde.kstars.indi] - Telescope Simulator : "[SCOPE] Current RA: 14:39:03 Current DEC: 90:00:00 "
[2022-05-20T05:47:44.496 BST DEBG ][           org.kde.kstars.indi] - Telescope Simulator : "[SCOPE] mountToApparentRaDec 90.000000, 90.000000 to ha 90.000000, ra -140.236569, 90.000000 "
[2022-05-20T05:47:44.496 BST DEBG ][           org.kde.kstars.indi] - Telescope Simulator : "[SCOPE] Current RA: 14:39:03 Current DEC: 90:00:00 "
[2022-05-20T05:47:44.745 BST DEBG ][           org.kde.kstars.indi] - Telescope Simulator : "[SCOPE] mountToApparentRaDec 90.000000, 90.000000 to ha 90.000000, ra -140.235521, 90.000000 "
[2022-05-20T05:47:44.748 BST DEBG ][           org.kde.kstars.indi] - Telescope Simulator : "[SCOPE] Current RA: 14:39:03 Current DEC: 90:00:00 "
[2022-05-20T05:47:44.922 BST WARN ][                       default] - QObject::killTimer: Timers cannot be stopped from another thread
[2022-05-20T05:47:44.924 BST WARN ][                       default] - QObject::~QObject: Timers cannot be stopped from another thread

Memory at time of writing still isn't improving on the RPi:
2022-05-20 09:49:31 Temp=37.0ºC. RAM 'Used': 304MB ( 8.0%); RAM 'Free': 3.0GB (82.4%); RAM 'Available': 3.3GB (88.2%); RAM used in Shared & Buffer:  9.9%. Swap used:95.3%. µSD @/dev/root uses 82,909,640kB.

and the same generated straight from the terminal now:


I'll restart the RPi, and do again with using the "gdb kstars"

Another thought is to include in my memory script - is there a clean memory command that would help free any "unused" or "leaking memory" up? Whilst this may help, it's probably not the "best"(!) solution to this issue.
Thoughts and comments again please!
1 year 10 months ago #82970
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 349
  • Thank you received: 107
No free command is fine. I just wanted to make sure that your log is from that free command and something else.

But that Phonon::createPath: Cannot connect remind me that there was issue with sound notification. After a while kstars process run out of available file descriptors and crashed. I am not sure if it was fixed but go and disable all sound nofitication in Kstars Settings->Notification settings.There is play triangle next to them.
1 year 10 months ago #82971

Please Log in or Create an account to join the conversation.

  • Posts: 19
  • Thank you received: 1
"But that Phonon::createPath: Cannot connect remind me that there was issue ..."
Dang! My original post in SGL comments on this where I say
"I'm assuming that's not one to chase down (just yet)?"

So I'm changing things over in KStars to output any notifications that originally had sounds attached to text file (for my reference), and will re-run as before and we'll see what happens. Script also being changed to output ONLY percentages rather than a mix. This will make things easier to see on the whole.
Hopefully the sound issue is the cause, fingers (and lots of cables on a mount!) crossed!
BTW, thanks @Nou :D
Last edit: 1 year 10 months ago by Pete Simpson.
1 year 10 months ago #82972

Please Log in or Create an account to join the conversation.

  • Posts: 19
  • Thank you received: 1
For those interested, new scripting output is a bit cleaner:
*************************************************************************
**      New record of system info started at 2022-05-20, 13:12:51      **
**   Total RAM available is 3.7GB and total SWAP available is  99MB.   **
**   Total space on micro SD card (located @/dev/root) is 116.935GB    **
*************************************************************************
2022-05-20 13:12:56 Temp=38.9ºC. RAM 'Used': 12.9%; RAM 'Free': 73.9%; RAM in Shared:  1.9%; RAM in Buffer:  1.7%; RAM in Cache: 11.5%; RAM 'Available': 81.7%. Swap used:   0.0%. µSD has 30.188% free space.
2022-05-20 13:12:57 Temp=37.0ºC. RAM 'Used': 12.9%; RAM 'Free': 73.9%; RAM in Shared:  1.9%; RAM in Buffer:  1.7%; RAM in Cache: 11.5%; RAM 'Available': 81.7%. Swap used:   0.0%. µSD has 30.188% free space.
2022-05-20 13:12:59 Temp=37.9ºC. RAM 'Used': 12.9%; RAM 'Free': 73.9%; RAM in Shared:  1.9%; RAM in Buffer:  1.7%; RAM in Cache: 11.5%; RAM 'Available': 81.8%. Swap used:   0.0%. µSD has 30.188% free space.
I'll upload the script if anyone else wants to test.
Let's see how 'muting' notifications works...
So to clean things up, I've rebooted RPi, started my script, then just running KStars - EKOS - connect - setup 100k x 2.5sec exposures, start imaging session. Nothing else is opened at startup to ensure a fair test (anydesk connection only)
Last edit: 1 year 10 months ago by Pete Simpson.
1 year 10 months ago #82973

Please Log in or Create an account to join the conversation.

  • Posts: 19
  • Thank you received: 1
Oh dear, not worked I'm afraid @Nou
*************************************************************************
**      New record of system info started at 2022-05-20, 13:22:30      **
**   Total RAM available is 3.7GB and total SWAP available is  99MB.   **
**   Total space on micro SD card (located @/dev/root) is 116.935GB    **
*************************************************************************
2022-05-20 13:22:34 Temp=38.9ºC. RAM 'Used':  8.3%; RAM 'Free': 82.5%; RAM in Shared:  1.4%; RAM in Buffer:  1.1%; RAM in Cache:  8.1%; RAM 'Available': 86.9%. Swap used:   0.0%. µSD has 51.071% free space.
2022-05-20 13:22:36 Temp=37.4ºC. RAM 'Used':  8.5%; RAM 'Free': 81.7%; RAM in Shared:  1.4%; RAM in Buffer:  1.1%; RAM in Cache:  8.6%; RAM 'Available': 86.5%. Swap used:   0.0%. µSD has 51.071% free space.
2022-05-20 13:22:38 Temp=38.4ºC. RAM 'Used':  8.8%; RAM 'Free': 81.2%; RAM in Shared:  1.4%; RAM in Buffer:  1.1%; RAM in Cache:  8.9%; RAM 'Available': 86.5%. Swap used:   0.0%. µSD has 51.071% free space.
2022-05-20 13:22:39 Temp=37.4ºC. RAM 'Used':  8.5%; RAM 'Free': 81.3%; RAM in Shared:  1.4%; RAM in Buffer:  1.1%; RAM in Cache:  9.2%; RAM 'Available': 86.8%. Swap used:   0.0%. µSD has 51.071% free space.
 
<+ 1 hour of lines cropped out>
 
2022-05-20 14:48:47 Temp=37.9ºC. RAM 'Used': 12.5%; RAM 'Free':  2.6%; RAM in Shared:  1.1%; RAM in Buffer:  1.6%; RAM in Cache: 83.4%; RAM 'Available': 82.5%. Swap used:   4.8%. µSD has 47.266% free space.
2022-05-20 14:48:48 Temp=37.9ºC. RAM 'Used': 12.6%; RAM 'Free':  2.5%; RAM in Shared:  1.1%; RAM in Buffer:  1.6%; RAM in Cache: 83.5%; RAM 'Available': 82.4%. Swap used:   4.8%. µSD has 47.264% free space.
2022-05-20 14:48:50 Temp=37.4ºC. RAM 'Used': 12.5%; RAM 'Free':  2.5%; RAM in Shared:  1.1%; RAM in Buffer:  1.6%; RAM in Cache: 83.5%; RAM 'Available': 82.4%. Swap used:   4.8%. µSD has 47.264% free space.
2022-05-20 14:48:51 Temp=37.0ºC. RAM 'Used': 12.5%; RAM 'Free':  2.3%; RAM in Shared:  1.1%; RAM in Buffer:  1.6%; RAM in Cache: 83.5%; RAM 'Available': 82.4%. Swap used:   4.8%. µSD has 47.262% free space.
2022-05-20 14:48:53 Temp=37.4ºC. RAM 'Used': 12.5%; RAM 'Free':  2.4%; RAM in Shared:  1.1%; RAM in Buffer:  1.6%; RAM in Cache: 83.5%; RAM 'Available': 82.4%. Swap used:   4.8%. µSD has 47.262% free space.

Swap getting used too. Interestingly, the micro SD card has 30% free before the restart, and then has 50% - I've not deleted any of the simulation *.bin files. I've done a cleanup so the next report should look a little cleaner (shorter lines, so no wrapping when displaying here, or that may just be my settings)
Nigel reported seeing the buffer/cache increasing as free decreases - this also agrees.
So some way to clean out the cache on the fly" might help get around the issue (although it would obviously be better solving it). Anyone want to throw in $0.02?!
Last edit: 1 year 10 months ago by Pete Simpson.
1 year 10 months ago #82975

Please Log in or Create an account to join the conversation.

  • Posts: 19
  • Thank you received: 1
Now I'm onto something:
2022-05-20 15:17:05 Temp=38.9ºC. RAM parameters: Used: 13.2%; Free:  3.3%; Shared:  1.9%; Buffer:  1.5%; Cache: 82.1%; Available: 81.0%. Swap used:  7.5%. µSD has 46.059% free space.
2022-05-20 15:17:06 Temp=38.9ºC. RAM parameters: Used: 13.1%; Free:  3.3%; Shared:  1.9%; Buffer:  1.5%; Cache: 82.1%; Available: 81.0%. Swap used:  7.5%. µSD has 46.059% free space.
2022-05-20 15:17:08 Temp=37.9ºC. RAM parameters: Used: 13.2%; Free:  3.2%; Shared:  1.9%; Buffer:  1.5%; Cache: 82.2%; Available: 81.0%. Swap used:  7.5%. µSD has 46.057% free space.
2022-05-20 15:17:10 Temp=38.9ºC. RAM parameters: Used: 13.1%; Free:  9.4%; Shared:  1.9%; Buffer:  0.0%; Cache: 75.5%; Available: 81.0%. Swap used:  7.5%. µSD has 46.057% free space.
2022-05-20 15:17:11 Temp=38.9ºC. RAM parameters: Used: 13.3%; Free: 28.8%; Shared:  1.9%; Buffer:  0.0%; Cache: 55.7%; Available: 81.2%. Swap used:  7.5%. µSD has 46.055% free space.
2022-05-20 15:17:13 Temp=38.9ºC. RAM parameters: Used: 13.1%; Free: 50.8%; Shared:  1.9%; Buffer:  0.0%; Cache: 33.7%; Available: 81.3%. Swap used:  7.5%. µSD has 46.055% free space.
2022-05-20 15:17:15 Temp=38.9ºC. RAM parameters: Used: 13.2%; Free: 71.8%; Shared:  1.9%; Buffer:  0.0%; Cache: 12.5%; Available: 81.5%. Swap used:  7.5%. µSD has 46.053% free space.
2022-05-20 15:17:16 Temp=38.4ºC. RAM parameters: Used: 13.1%; Free: 77.7%; Shared:  1.9%; Buffer:  0.0%; Cache:  9.1%; Available: 81.6%. Swap used:  7.5%. µSD has 46.053% free space.
2022-05-20 15:17:18 Temp=39.4ºC. RAM parameters: Used: 13.1%; Free: 79.1%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.7%; Available: 81.8%. Swap used:  7.5%. µSD has 46.051% free space.
2022-05-20 15:17:20 Temp=39.4ºC. RAM parameters: Used: 13.1%; Free: 79.1%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.7%; Available: 81.8%. Swap used:  7.5%. µSD has 46.051% free space.
2022-05-20 15:17:21 Temp=39.4ºC. RAM parameters: Used: 13.1%; Free: 79.0%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.8%; Available: 81.8%. Swap used:  7.5%. µSD has 46.049% free space.
2022-05-20 15:17:23 Temp=38.9ºC. RAM parameters: Used: 13.1%; Free: 79.0%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.8%; Available: 81.8%. Swap used:  7.5%. µSD has 46.049% free space.
2022-05-20 15:17:24 Temp=38.4ºC. RAM parameters: Used: 13.1%; Free: 79.0%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.9%; Available: 81.8%. Swap used:  7.5%. µSD has 46.047% free space.
2022-05-20 15:17:26 Temp=38.9ºC. RAM parameters: Used: 13.1%; Free: 79.0%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.9%; Available: 81.8%. Swap used:  7.5%. µSD has 46.047% free space.
2022-05-20 15:17:27 Temp=38.4ºC. RAM parameters: Used: 13.1%; Free: 78.9%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.9%; Available: 81.7%. Swap used:  7.5%. µSD has 46.044% free space.
2022-05-20 15:17:29 Temp=38.9ºC. RAM parameters: Used: 13.1%; Free: 78.9%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.9%; Available: 81.7%. Swap used:  7.5%. µSD has 46.044% free space.
2022-05-20 15:17:30 Temp=39.4ºC. RAM parameters: Used: 13.1%; Free: 78.8%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.0%; Available: 81.8%. Swap used:  7.5%. µSD has 46.042% free space.
2022-05-20 15:17:32 Temp=37.9ºC. RAM parameters: Used: 13.1%; Free: 78.8%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.0%; Available: 81.8%. Swap used:  7.5%. µSD has 46.042% free space.
2022-05-20 15:17:34 Temp=37.9ºC. RAM parameters: Used: 13.1%; Free: 78.8%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.1%; Available: 81.7%. Swap used:  7.5%. µSD has 46.040% free space.
2022-05-20 15:17:35 Temp=38.9ºC. RAM parameters: Used: 13.1%; Free: 78.7%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.1%; Available: 81.6%. Swap used:  7.5%. µSD has 46.039% free space.
2022-05-20 15:17:37 Temp=38.9ºC. RAM parameters: Used: 13.1%; Free: 78.7%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.1%; Available: 81.7%. Swap used:  7.5%. µSD has 46.038% free space.
2022-05-20 15:17:39 Temp=39.4ºC. RAM parameters: Used: 13.1%; Free: 78.6%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.2%; Available: 81.8%. Swap used:  7.5%. µSD has 46.036% free space.
2022-05-20 15:17:40 Temp=38.4ºC. RAM parameters: Used: 13.1%; Free: 78.6%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.2%; Available: 81.8%. Swap used:  7.5%. µSD has 46.036% free space.
2022-05-20 15:17:42 Temp=38.9ºC. RAM parameters: Used: 13.2%; Free: 78.5%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.2%; Available: 81.8%. Swap used:  7.5%. µSD has 46.034% free space.
2022-05-20 15:17:44 Temp=38.4ºC. RAM parameters: Used: 13.1%; Free: 78.5%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.3%; Available: 81.7%. Swap used:  7.5%. µSD has 46.034% free space.
2022-05-20 15:17:45 Temp=38.9ºC. RAM parameters: Used: 13.3%; Free: 78.4%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.3%; Available: 81.8%. Swap used:  7.5%. µSD has 46.032% free space.
2022-05-20 15:17:47 Temp=39.4ºC. RAM parameters: Used: 13.1%; Free: 78.5%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.3%; Available: 81.8%. Swap used:  7.5%. µSD has 46.032% free space.
2022-05-20 15:17:48 Temp=37.4ºC. RAM parameters: Used: 13.3%; Free: 78.4%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.4%; Available: 81.7%. Swap used:  7.5%. µSD has 46.030% free space.
2022-05-20 15:17:50 Temp=38.4ºC. RAM parameters: Used: 13.1%; Free: 78.4%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.4%; Available: 81.7%. Swap used:  7.5%. µSD has 46.030% free space.
2022-05-20 15:17:51 Temp=39.4ºC. RAM parameters: Used: 13.2%; Free: 78.3%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.5%; Available: 81.7%. Swap used:  7.5%. µSD has 46.028% free space.
2022-05-20 15:17:53 Temp=38.9ºC. RAM parameters: Used: 13.1%; Free: 78.3%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.5%; Available: 81.7%. Swap used:  7.5%. µSD has 46.028% free space.
2022-05-20 15:17:54 Temp=37.9ºC. RAM parameters: Used: 13.2%; Free: 78.3%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.5%; Available: 81.7%. Swap used:  7.5%. µSD has 46.026% free space.
2022-05-20 15:17:56 Temp=39.4ºC. RAM parameters: Used: 13.1%; Free: 78.2%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.4%; Available: 81.7%. Swap used:  7.5%. µSD has 46.026% free space.
2022-05-20 15:17:58 Temp=38.9ºC. RAM parameters: Used: 13.1%; Free: 79.1%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.7%; Available: 81.8%. Swap used:  7.5%. µSD has 46.024% free space.
2022-05-20 15:17:59 Temp=38.4ºC. RAM parameters: Used: 13.1%; Free: 79.0%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.7%; Available: 81.7%. Swap used:  7.5%. µSD has 46.024% free space.
2022-05-20 15:18:01 Temp=38.4ºC. RAM parameters: Used: 13.1%; Free: 79.1%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.7%; Available: 81.8%. Swap used:  7.5%. µSD has 46.021% free space.
2022-05-20 15:18:02 Temp=38.4ºC. RAM parameters: Used: 13.1%; Free: 79.1%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.7%; Available: 81.7%. Swap used:  7.5%. µSD has 46.021% free space.
2022-05-20 15:18:04 Temp=38.4ºC. RAM parameters: Used: 13.1%; Free: 79.0%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.8%; Available: 81.7%. Swap used:  7.5%. µSD has 46.019% free space.
2022-05-20 15:18:05 Temp=37.9ºC. RAM parameters: Used: 13.1%; Free: 79.0%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.8%; Available: 81.7%. Swap used:  7.5%. µSD has 46.019% free space.
2022-05-20 15:18:07 Temp=38.9ºC. RAM parameters: Used: 13.1%; Free: 78.9%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.8%; Available: 81.8%. Swap used:  7.5%. µSD has 46.017% free space.
2022-05-20 15:18:08 Temp=37.9ºC. RAM parameters: Used: 13.1%; Free: 78.9%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.8%; Available: 81.7%. Swap used:  7.5%. µSD has 46.017% free space.
2022-05-20 15:18:10 Temp=38.4ºC. RAM parameters: Used: 13.1%; Free: 78.9%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.9%; Available: 81.8%. Swap used:  7.5%. µSD has 46.015% free space.
2022-05-20 15:18:12 Temp=38.4ºC. RAM parameters: Used: 13.1%; Free: 78.9%; Shared:  1.9%; Buffer:  0.1%; Cache:  7.9%; Available: 81.8%. Swap used:  7.5%. µSD has 46.015% free space.
2022-05-20 15:18:13 Temp=39.4ºC. RAM parameters: Used: 13.1%; Free: 78.8%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.0%; Available: 81.7%. Swap used:  7.5%. µSD has 46.013% free space.
2022-05-20 15:18:15 Temp=38.9ºC. RAM parameters: Used: 13.1%; Free: 78.8%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.0%; Available: 81.7%. Swap used:  7.5%. µSD has 46.013% free space.
2022-05-20 15:18:16 Temp=38.9ºC. RAM parameters: Used: 13.1%; Free: 78.7%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.0%; Available: 81.7%. Swap used:  7.5%. µSD has 46.011% free space.
2022-05-20 15:18:18 Temp=38.9ºC. RAM parameters: Used: 13.1%; Free: 78.7%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.0%; Available: 81.7%. Swap used:  7.5%. µSD has 46.011% free space.
2022-05-20 15:18:19 Temp=39.4ºC. RAM parameters: Used: 13.1%; Free: 78.7%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.1%; Available: 81.7%. Swap used:  7.5%. µSD has 46.009% free space.
2022-05-20 15:18:21 Temp=37.4ºC. RAM parameters: Used: 13.1%; Free: 78.7%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.1%; Available: 81.7%. Swap used:  7.5%. µSD has 46.009% free space.
2022-05-20 15:18:22 Temp=38.4ºC. RAM parameters: Used: 13.1%; Free: 78.6%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.2%; Available: 81.7%. Swap used:  7.5%. µSD has 46.007% free space.
2022-05-20 15:18:24 Temp=37.4ºC. RAM parameters: Used: 13.1%; Free: 78.6%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.2%; Available: 81.7%. Swap used:  7.5%. µSD has 46.007% free space.
2022-05-20 15:18:25 Temp=38.4ºC. RAM parameters: Used: 13.1%; Free: 78.5%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.3%; Available: 81.8%. Swap used:  7.5%. µSD has 46.005% free space.
2022-05-20 15:18:26 Temp=38.4ºC. RAM parameters: Used: 13.1%; Free: 78.5%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.3%; Available: 81.8%. Swap used:  7.5%. µSD has 46.005% free space.
2022-05-20 15:18:28 Temp=37.9ºC. RAM parameters: Used: 13.1%; Free: 78.4%; Shared:  1.9%; Buffer:  0.1%; Cache:  8.3%; Available: 81.7%. Swap used:  7.5%. µSD has 46.003% free space.
Pretty obvious that I've done something major in the middle!
After multple tries with "sync" and errors, googled the error and found this site .
Pasting
sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'
into terminal, mass amount of cache freed up.

It's still increasing whilst watching, but I figure that if I can add this into my memory script to repeat every minute or something like that, then I should get around the issue. Again, I'm trying to get around it - can someone suggest what the issue is or how to fix long-term?
I have been also debating trying with Stellarmate OS, but could someone confirm I won't have the same issue for this OS if the issue is coming from KStars/EKOS/INDI?
Again, comments etc welcome!
1 year 10 months ago #82976

Please Log in or Create an account to join the conversation.

  • Posts: 19
  • Thank you received: 1
Aha! So written it into script and ran in terminal:
for i in `seq 1 $SECONDS`; do
	***Line here outputs the string to text file. It's long, so removing it from forum for now ***
	sleep 1
	if ! ((i % 5)) || ((i == 1)); then
		echo "$i, would execute clean script here"
		sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'
	fi
done

The purpose of the echo is for debugging whilst writing, and the i==1 so that on first purge that a sudo password is required. Therefore my thinking is this: run the purge on first time output, enter the SU password which will then be remembered and redo the purge every Nth second. Set as the MODULO , obviously not to be purged eveery 5 seconds - I figure every 10min to do this. Alternatively if the cache gets above 50%, I could do it then...
1 year 10 months ago #82978
Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 19
  • Thank you received: 1
Right!
I've solved (or it appears I have solved) the issue for my setup.
All the pre-mentioned memory issues still appear to occur, but I have a solution that will "fix" the issue for me at this time.
Whilst I know the fix isn't solving the issue, I'm hoping that it makes it known that I've found an issue and able to get around the problem.
As previous, I note the usage in specific elements of RAM going up (mainly cache) when imaging with KStars/EKOS/Indi on RPi4 (4GB). It might be those with 8GB models don't see the issue as there's more resource to 'lose', but there are then later times when the software crashes with no obvious issue at the front end.
Through reading about different memory allocations, etc on Linux and my limited scripting abilities, I've written a script that outputs the memory usage every second or so for reference. This script was also updated several times and eventually finalised with one that will force a memory purge by the system, should the resources available become too little.
Prior to the memory purge, I could run the EKOS simulators and cause the software to crash, similar to the real-life imaging that I was experiencing earlier in the year (before the clocks changed and imaging conditions became a bit too short!).
I'm more familiar with Matlab coding and wrote a script that will take the text file and output the data in a numerical format to plot it and have the following after a 12hour simulation session (15k images obtained). Sure enough, one can see that the memory is purged sevaral times throughout the simulation, but I do not suffer from any crash - I ran this prior and ended up filling the 128GB µSD card with simulation images in one go, so very happy that at least I've something that will work.


Can an admin look into this for me and see is there a memory leak or something similar?
I'm prepared to try a new µSD or whatever, but there appears to be at least a few of us with similar issues.
Script file attached, hoping it comments enough to allow other/better coders to let them know my thought process.
Regards to all

File Attachment:

File Name: SampleShel...5-24.txt
File Size:5 KB
1 year 10 months ago #83085
Attachments:

Please Log in or Create an account to join the conversation.

Moderators: Radek Kaczorek
Time to create page: 2.094 seconds