From: David K. <da...@ke...> - 2017-08-30 02:31:41
|
I think using something that is formally part of the application is the best approach. Is there anyway to test it? David On Tue, Aug 29, 2017 at 9:37 PM, Lonnie Abelbeck <li...@lo...> wrote: > Well, it turns out e2fsck has a "progress" bar feature, simply add "-C 0" > to the command line. > > I'm not sure how this will look when a serial console is attached mid-way > through the progress, but there will be activity and it won't look like the > box is hung. > > So if we replace the current > -- > e2fsck -y $ASTURW >/dev/null > -- with -- > e2fsck -y -C 0 $ASTURW > -- > we will get an extra line for the typical case, and several more lines and > possibly a progress bar for the "dirty" case. > > Is this the best approach ? > > Lonnie > > > On Aug 29, 2017, at 5:56 PM, The Cadillac Kid via Astlinux-devel < > ast...@li...> wrote: > > > I thought fsck printed out as it goes? with the -v option? does the > version in astlinux not? > > -Christopher > > > > From: Lonnie Abelbeck <li...@lo...> > > To: AstLinux Developers Mailing List <astlinux-devel@lists. > sourceforge.net> > > Sent: Tuesday, August 29, 2017 5:52 PM > > Subject: Re: [Astlinux-devel] Adding a "spinner" indicator when e2fsck > is working > > > > Hi Michael, > > > > First, this issue that Tim Turpin reported today does not occur very > often, but as larger SSD's become less expensive and easier to find, the > time it takes to do a fsck after a hard power failure or corruption will > become longer and longer. > > > > Consider Tim's case, he notices his AstLinux box is not up, power is on > ... so he checks the console ... unless there is some "activity" on the > console it would appear the box is locked-up, but actually e2fsck is fixing > his drive. > > > > I don't think some static text before the e2fsck would help too much, > easily missed and the asynchronous kernel logs make things more confusing > coming in after the e2fsck log. > > > > Lonnie > > > > > > On Aug 29, 2017, at 5:18 PM, Michael Knill <michael.knill@ipcsolutions. > com.au> wrote: > > > > > Do you really need a spinner? > > > Couldn't you just echo a comment that e2fsk is working and this could > take a REAL long time so don't panic? > > > You could then have another comment after e2fsk saying its done! > > > > > > Regards > > > Michael Knill > > > > > > -----Original Message----- > > > From: Lonnie Abelbeck <li...@lo...> > > > Reply-To: AstLinux Developers Mailing List <astlinux-devel@lists. > sourceforge.net> > > > Date: Wednesday, 30 August 2017 at 7:58 am > > > To: AstLinux Developers Mailing List <astlinux-devel@lists. > sourceforge.net> > > > Subject: Re: [Astlinux-devel] Adding a "spinner" indicator when e2fsck > is working > > > > > > > > > On Aug 29, 2017, at 1:42 PM, Michael Keuter <li...@mk...> > wrote: > > > > > >>>> > > >>>> Lonnie, don't give up so quickly :-). > > >>>> What you have already is quite a good starting point. > > >>>> What about adding "something needed" to our initrd busybox.config … > > >>>> > > >>>> Michael > > >>> > > >>> The initrd busybox config is not the problem, this is a fundamental > problem using shell, though easily solved with bash, but bash is not a > practical option with our initrd. > > >>> > > >>> Get exit status of process that's piped to another > > >>> https://unix.stackexchange.com/questions/14270/get-exit- > status-of-process-thats-piped-to-another > > >>> > > >>> I dont see an elegant solution. > > >>> > > >>> My only other thought would be to create a background "spinner" > process, then call "e2fsck -y $1 >/dev/null" and status="$?" then stop the > background spinner process. > > >> > > >> Sounds not so bad, at least worth a test. > > > > > > Here is a working test of a "spinner" function: > > > https://gist.github.com/abelbeck/40c1da054ae6740f03e09ef70452cf70 > > > > > > In our case, instead of the test examples: > > > -- > > > date > > > sleep 2 > > > date > > > sleep 10 > > > -- > > > we would have: > > > -- > > > e2fsck -y $ASTURW >/dev/null > > > status=$? > > > -- > > > > > > Seems to work, the question is whether it is worth adding. > > > > > > Lonnie > > > ------------------------------------------------------------ > ------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Astlinux-devel mailing list > Ast...@li... > https://lists.sourceforge.net/lists/listinfo/astlinux-devel > |