Re: Percentage complete of unix task
Re: Percentage complete of unix task
- Subject: Re: Percentage complete of unix task
- From: Mark Douma <email@hidden>
- Date: Fri, 25 Mar 2005 14:23:07 -0500
On Mar 25, 2005, at 12:34 PM, Rudi Sherry wrote:
On Mar 25, 2005, at 3:22 AM, Tom Birch wrote:
On 25/03/2005, at 9:45 PM, Rakka wrote:
Disk Utility and Installer can do this because they control
everything that's happening -- they don't just issue a single
unix command and wait for it to be done, "monitoring" the
progress in some way. They have a series of steps they go
through and each step counts for some known percentage... which
eventually adds up to 100%.
Thanks a lot for the info. I'm sure that Disk Utility runs
diskutil's repairPermissions command and feeds the output to a
textfield, but what are the other steps they go through to figure
out how much of the command is done? I don't see how it works :-)
i doubt that, I think they both just use the same API, but one has
a command line interface, one has nice gui interface. You can try
looking in top for a call to "diskutil" when you run Disk Utility
- I doubt you will find it.
Although I don't know for sure, I tend to agree with Tom -- that
Disk Utility does its own stuff without diskutil -- although it's
also possible that Disk Utility traverses the folder hierarchy
manually once counting, then manually again calling diskutil's
repairPermissions on each folder... so it knows what folder
diskutil is repairing and how far into the process that is. It's
also possible that diskutil's repairPermissions has a verbose
output (I'm not familiar with it) and Disk Utility is using that to
show what folder it's currently repairing, although Disk Utility
would still have to have pre-traversed the folder hierarchy to know
the progress percentage.
Disk Utility in Jaguar and Panther both use a secondary process to
check the disk permissions, but it isn't "diskutil". In Jaguar, it's
the "Disk Utility Agent" executable inside the Disk Utility
application bundle, and in Panther, it's the "DiskManagementTool"
buried inside the private DiskManagement.framework in the system domain.
Take a look at my page here for more info: http://homepage.mac.com/
mdouma46/fdup/fdup.html
Hope this helps....
------------------------------------------------------------------------
---
Mark Douma
Grand Rapids, MI, USA
email@hidden
http://homepage.mac.com/mdouma46/
------------------------------------------------------------------------
---
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden