ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Hi everyone, I've been searching around but can't really seem to understand how the
--gauge option works for dialog( or Xdialog but I'm currently focusing on just dialog).
Where the variables are filled in by the user through dialog. What I want to do is
use gauge to show the file progress while it's creating and more importantly I
would like to understand WHY it works the way it does. I've played around a lot
with different things (using mkfifo, expr) and can get some amount of success but
since I don't understand what's going on I can't get any farther. Thanks.
the bailout function deletes some temp files, unmounts drives, etc.
Now, when I try to use this in my script it will start creating the file and the dialog pops up,
everything looks good until it get's to about 90% and it slows way down. I know the file is finished creating but gauge never gets to 100%. I don't know enough about the status="`expr`" line to know why this is happening. Can anyone offer any insight. Thanks for your time.
Thanks Hko, I understand it a lot better now. Like I said before I've been trying to get this to work with dd ( or mkfs, etc.) But now it seems that what one really has to do is to simply guess (thus the expr from the knoppix example above) in a way that makes it LOOK like it is keeping track of the current status of the file or whatever. This is a REALLY POOR soultion in my opinion. I have found a few ways that it's possible to know where dd is in the creation process. For instance I found while dd is running I can kill the process and by sending it -USR1 what it does is pause, display how far along it is and continue, sounds like just what I need. The problem though is that this of course stops the file creation for a moment and it seems that the overall overhead is not worth it. Another idea I had would be to have a seperate thread which would just keep doing a du on the file that is being created and compare it to the total filesize it's to create to and use this information to update gauge. Either way it would be more overhead. I havn't seen anyone else who actually checks for the real file progress. It SEEMS that EVERYONE just guesses. So I ask, what is the point of even having a progress bar if the information it displays is not accurate. Maybe I'm missing something here. As a final note I just want to say to everyone here at linuxquestions.org that this forum has become my first stop when looking for information(about Linux). I use to go to google first but I've recently started to realise that google always ends up pointing me back here. So just a big thanks to all of you.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.