2009-01-08 08:35:41     how to check ramfs usage

Document created by Aaronwu Employee on Aug 9, 2013
Version 1Show Document
  • View in full screen mode

2009-01-08 08:35:41     how to check ramfs usage

Nikolay Chokoev (IRELAND)

Message: 67623   

 

Hi,

 

how to check how much space is occupied from the kernel and other stuff. Runninf 'df' gives me:

 

root:/usr/bin> df

Filesystem           1K-blocks      Used Available Use% Mounted on

 

Best regards,

 

Nikolay

QuoteReplyEditDelete

 

 

2009-01-08 08:38:56     Re: how to check ramfs usage

Mike Frysinger (UNITED STATES)

Message: 67624   

 

edit df.c that is in busybox and remove the line where it ignores "rootfs"

QuoteReplyEditDelete

 

 

2009-01-09 04:35:45     Re: how to check ramfs usage

Nikolay Chokoev (IRELAND)

Message: 67694   

 

Hi Mike,

 

I found

 

    static const char ignored_mounts[] ALIGN1 =

      "rootfs\0";

 

on this file.

 

How exactly I have to change it? I tried with empty string, but the result is the same...

QuoteReplyEditDelete

 

 

2009-01-09 04:57:19     Re: how to check ramfs usage

Mike Frysinger (UNITED STATES)

Message: 67697   

 

that's half the equation.  i seem to recall embedded systems have a feature where {ram,tmp}fs filesystems dont actually do accounting.  that means you cant stat() to get said information.

 

you can get a pretty close answer with `du`:

root:/> du -s -h -x /

1.5M

QuoteReplyEditDelete

 

 

2009-01-09 06:10:16     Re: how to check ramfs usage

Nikolay Chokoev (IRELAND)

Message: 67706   

 

Thanks Mike,

 

That do the job!

 

Best Regards,

 

Nikolay

Attachments

    Outcomes