Re: du in ROOT

From: Chiara Zampolli <Chiara.Zampolli_at_bo.infn.it>
Date: Wed, 26 Nov 2008 18:03:18 +0100


Hi Valeri,

    thanks a lot! I have tried in fact, but I don't get anything back. Am i missing something? See below:             

zampolli_at_pcalice134:/home/zampolli/SOFT/AliRoot/AliRoot_NewTrunk>df -h

            Filesystem            Size  Used Avail Use% Mounted on
            /dev/hda2             9.7G  7.5G  1.7G  82% /
            /dev/hda1              99M   23M   71M  25% /boot
            none                 1013M     0 1013M   0% /dev/shm
            /dev/hda4              99G   42M   99G   1% /mnt/extra
            /dev/sda1             280G   46G  235G  17% /mnt/sata
            AFS                   8.6G     0  8.6G   0% /afs
            

zampolli_at_pcalice134:/home/zampolli/SOFT/AliRoot/AliRoot_NewTrunk>root -l

            WELCOME to ALICE

            root [0] Long_t* id;
            root [1] Long_t* bsize;
            root [2] Long_t* blocks;
            root [3] Long_t* bfree;
            root [4] Int_t ciccio = 
(TUnixSystem*)gSystem->GetFsInfo("/dev/hda4/",id,bsize$
            root [5] ciccio
            (Int_t)(1)
            root [6]  


I have tried also to pass as the first argument the path of where the file system is mounted, but in this case it crashes, see here. Thanks again,

          chiara


root [0] Long_t* id;
root [1] Long_t* bsize;
root [2] Long_t* blocks;
root [3] Long_t* bfree;
root [4] Int_t ciccio = 

(TUnixSystem*)gSystem->GetFsInfo("/mnt/sata/",id,bsize$

Fine, Valeri wrote:

> Check
>
> http://root.cern.ch/root/html/TSystem.html#TSystem:GetFsInfo
>
>   Get info about a file system: 
>
>   fs type, 
>   block size, 
>   number of blocks,
>   number of free blocks.
>
> http://root.cern.ch/root/html/TUnixSystem.html#TUnixSystem:GetFsInfo
>
>
> Best Regards
>                          Valeri Fine
> ---------------
> Brookhaven National Laboratory
> Upton, NY 11973, USA
> Phone: +1 631 344 7806
> Fax:     +1 631 344 4206
> E-mail: fine_at_bnl.gov
>
>   
>> -----Original Message-----
>> From: owner-roottalk_at_root.cern.ch [mailto:owner-roottalk_at_root.cern.ch]
>>     
> On
>   
>> Behalf Of Chiara Zampolli
>> Sent: Wednesday, November 26, 2008 10:29 AM
>> To: Rene Brun
>> Cc: Root
>> Subject: Re: [ROOT] du in ROOT
>>
>> Hi Rene,
>>
>>     yes, I know. I was wondering whether this was already implemented
>>     
> as
>   
>> a method of some class, because what I would need is then to see how
>> much free space I have left (in percentage), which would mean to call
>> awk, but if you had something like GetDiskUsed() and
>>     
> GetDiskAvailable(),
>   
>> it would have been nicer...
>>     Thanks!
>>
>>              c.
>>
>>
>> Rene Brun wrote:
>>     
>>> Chiara,
>>>
>>> You can always do:
>>> gSystem->Exec("du . >du.log")
>>>
>>> Rene Brun
>>>
>>> Chiara Zampolli wrote:
>>>       
>>>> Hi all,
>>>>
>>>>    is there a way in ROOT to get the same information as those one
>>>> can get from the unix command du?
>>>>    Thanks and cheers,
>>>>
>>>>             Chiara
>>>>
>>>>         
>
>   
Received on Wed Nov 26 2008 - 18:03:40 CET

This archive was generated by hypermail 2.2.0 : Wed Nov 26 2008 - 23:50:01 CET