[erlang-questions] use of disksup
Tue Jan 13 09:39:55 CET 2009
It is a bug (on Windows only) that the total disk size is reported in
bytes instead of as documented kbytes. This will be corrected in R13
(i.e the next scheduled release).
The fix is simple, just BSR 10 on the value.
/Kenneth Erlang/OTP Ericsson
On Mon, Jan 12, 2009 at 11:08 PM, Kenneth Lundin
> The disksup module belongs to the os_mon application which in turn is
> dependent on the sasl application.
> Therefore you need to start these applications before you call
> Like this (in the Erlang shell)
> 1> application:start(sasl).
> 2> application:start(os_mon).
> 3> disksup:get_disk_data().
> The above result was what I got on my Windows XP machine.
> It means that C: has a total space of 200047001600 bytes and 69% is
> occupied, G: has 39991275520 bytes and 35% is occupied.
> While writing this I noticed that the documentation says that the unit
> should be Kbytes but it is not in this case. I have to check
> if there is a documentation error or if it is a different behaviour on
> Windows than on Linux.
> I think the use of disksup on Windows is very sparse compared to Linux
> and Solaris and that might be the reason for not detecting this
> before, if it is bytes only on Windows.
> /Regards Kenneth Erlang/OTP Ericsson
> On Mon, Jan 12, 2009 at 9:56 PM,
> <> wrote:
>> Hi! I'm new in eralng programming; I want to write a small application for know
>> the size of a disk and its available space, in Windows environment. I found the
>> module disksup (function get_disk_data()). I try to use it but without success,
>> I'm not able to configure it (it need a configuration with module os_mon). Can
>> you help me? I need to configure get_disk_data() function and to specify the
>> disk I want to analyze (for example I want to know the space's amount of drive
>> a:). If you write a few line of source of exemple I'm very happy. (well there
>> are an infinity of way to know the size of a disk but I want to do it with
>> thankyou, see you at next
>> erlang-questions mailing list
More information about the erlang-questions