Page 1 of 1

Add commit=600 to fstab?

Posted: 16 Apr 2019, 22:19
by nanZor
If I wanted to change the commit time to say every ten minutes (commit=600) to the /etc/fstab, (danger Will Robinson) how would I go about it?

I know you can't edit that file directly, and wonder what the best procedure for Porteus is?

Ed tipped me off to using the EXIT cheatcode, and that works fine for write-on-exit, but I'm wondering about something in between?

Add commit=600 to fstab?

Posted: 16 Apr 2019, 23:21
by Ed_P
You can manually save your changes with the save-session command.

Add commit=600 to fstab?

Posted: 22 May 2019, 00:37
by nanZor
Ah, a followup as I was thinking about using the mopt cheatcode - but be forewarned:

Cheatcode mopt=commit=1 blows up Porteus. Suggestions?

Seems only applicable to ext3/4, and you'd have to edit your linuxrc inside initrd.xz to do so.

For now, think I'll just stick to the EXIT:/ cheatcode to cover all the filesystems in use...

and make a cron job for save-session every 10 minutes or whatever I feel is necessary. Sneaky teach' Ed_p. :)

Add commit=600 to fstab?

Posted: 22 May 2019, 02:32
by nanZor
** SOLVED **

Egads - fanthom is always just one little step ahead of me all the time! :) I'll edit original thread later.

save session [Solved]

But instead of the graphical save-session, I'll use the dump-session command as root instead in a cron job. How about 10 minutes after each hour?

As root:

Code: Select all

crontab -e
Added this to the crontab file activated by crontab -e

Code: Select all

10 * * * * /usr/bin/dump-session
Even though /usr/bin/dump-session is a link to the script in /opt/porteus-scripts, this way when I refer to the doc in the future, and if the actual script location changes in the future, this will still work. Ideally.

What makes this so cool is that by using the EXIT: cheatcode, along with a cron timed dump-session, I can finely tune how much I write to an ssd for example with the least amount of hassle.

Ok fanthom, enough Kiosk fun. Time to come back bro. :)

Add commit=600 to fstab?

Posted: 22 May 2019, 03:01
by nanZor
OT: This EXIT: and cronjob combo solves an issue for me in regards to cheap hardware ...

Some of the no-name boxes out there may advertise as having in internal ssd, when in fact all they are is micro sd-cards soldered down and show up as mmcblk devices. Reducing writes to those, especially when they aren't vetted for performance and reliability should benefit from reduced writes - yet at the same time I want *some* writes to happen periodically instead of waiting for shutdown.

OR, just avoid purchasing such devices in the first place. :)

Add commit=600 to fstab?

Posted: 22 May 2019, 04:52
by Ed_P
Don't forget you can tweak what gets saved when shutting down with the changes-exit.conf file.

These are what I have added to my file:

Code: Select all

!/var/run
!/var/tmp
!/home/guest/.cache/thumbnails/normal
!/home/guest/.cache/mozilla/firefox/dxsqumip.default/thumbnails/
!/home/guest/.mozilla/firefox/Crash?Reports/pending/
!/home/guest/.mozilla/firefox/dxsqumip.default/storage/default/
!/home/guest/.mozilla/firefox/dxsqumip.default/datareporting/archived
!/home/guest/.java/deployment/cache/6.0/
I have no idea if these apply to save-sessions/dump-sessions.

Add commit=600 to fstab?

Posted: 22 May 2019, 07:49
by nanZor
Super sweet! I guess I'd have to check if this is an "exit:" only option and not part of the dump session. Then again, it is browser stuff which may not be too critical, unless it's like an education kiosk or something.

Interesting - thanks for the reminder.

Add commit=600 to fstab?

Posted: 28 May 2019, 00:09
by nanZor
nanZor wrote:
22 May 2019, 07:49
Super sweet! I guess I'd have to check if this is an "exit:" only option and not part of the dump session. Then again, it is browser stuff which may not be too critical, unless it's like an education kiosk or something.
Aha! It is specifically mentioned in the changelog for 2.1 rc2 I believe ..
- added 'dump-session' script for saving live session on a request when 'changes=EXIT' cheatcode is used
The release announcement and changelogs are fun to read. The zeal and excitement for the project really shows through. Makes ya' feel good about using Porteus!

Add commit=600 to fstab?

Posted: 28 May 2019, 01:33
by Ed_P
:good: Good research namZor.