Patchwork [bitbake-devel,0/2] Disk space monitoring

login
register
mail settings
Submitter Robert Yang
Date Dec. 15, 2011, 10:44 a.m.
Message ID <cover.1323944674.git.liezhi.yang@windriver.com>
Download mbox
Permalink /patch/16999/
State New
Headers show

Pull-request

git://git.pokylinux.org/poky-contrib robert/disk-space-monitor

Comments

Robert Yang - Dec. 15, 2011, 10:44 a.m.
Here are the test info:
1) set the following variables in conf/local.conf for testing:
   BB_DISKMON_DIRS = "${TMPDIR} ${DL_DIR} ${SSTATE_DIR} /home/lyang1"
   BB_DISKMON_MINSPACE = "200G"
   BB_DISKMON_MININODES = "20M"
   BB_DISKMON_INTERVAL = "30s"

   The TMPDIR, DL_DIR and SSTATE_DIR are in the same disk(/dev/sdb4) in
   my build, so I added another direcotory /home/lyang1 to test the
   ability of monitoring multi mount points.

2) bitbake core-image-sato
   WARNING: The free space of /dev/sdb5 is running low (25.915GB left)
   WARNING: The free inode of /dev/sdb5 is running low (1788.202K left)
   WARNING: The free space of /dev/sdb4 is running low (189.309GB left)
   WARNING: The free inode of /dev/sdb4 is running low (18005.443K left)

3) Aalso have tested about the following items:
   a) Use ctrl-c to stop the monitor
   b) The monitor should stop when the build stops
   c) Test the space unit G, B, K(case in-sensitive) and the time unit
      h, m, s(case-sensitive)

// Robert


The following changes since commit 9d136b2db8f906c562cbdb23a9b238f0e237074b:

  gdk-pixbuf: Ensure the binaries can be relocated (2011-12-13 18:00:25 +0000)

are available in the git repository at:
  git://git.pokylinux.org/poky-contrib robert/disk-space-monitor
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/disk-space-monitor

Robert Yang (2):
  Disk space monitoring
  Add config sample for disk space monitoring

 bitbake/bin/bitbake               |   12 +++
 bitbake/lib/bb/monitordisk.py     |  153 +++++++++++++++++++++++++++++++++++++
 meta-yocto/conf/local.conf.sample |   28 +++++++
 3 files changed, 193 insertions(+), 0 deletions(-)
 create mode 100644 bitbake/lib/bb/monitordisk.py
Robert Yang - Dec. 15, 2011, 10:58 a.m.
On 12/15/2011 06:44 PM, Robert Yang wrote:
> Here are the test info:
> 1) set the following variables in conf/local.conf for testing:
>     BB_DISKMON_DIRS = "${TMPDIR} ${DL_DIR} ${SSTATE_DIR} /home/lyang1"
>     BB_DISKMON_MINSPACE = "200G"
>     BB_DISKMON_MININODES = "20M"
>     BB_DISKMON_INTERVAL = "30s"
>
>     The TMPDIR, DL_DIR and SSTATE_DIR are in the same disk(/dev/sdb4) in
>     my build, so I added another direcotory /home/lyang1 to test the
>     ability of monitoring multi mount points.
>
> 2) bitbake core-image-sato
>     WARNING: The free space of /dev/sdb5 is running low (25.915GB left)
>     WARNING: The free inode of /dev/sdb5 is running low (1788.202K left)
>     WARNING: The free space of /dev/sdb4 is running low (189.309GB left)
>     WARNING: The free inode of /dev/sdb4 is running low (18005.443K left)
>

And the messages will print every 30 seconds(the BB_DISKMON_INTERVAL), until
the build stops.

// Robert

> 3) Aalso have tested about the following items:
>     a) Use ctrl-c to stop the monitor
>     b) The monitor should stop when the build stops
>     c) Test the space unit G, B, K(case in-sensitive) and the time unit
>        h, m, s(case-sensitive)
>
> // Robert
>
>
> The following changes since commit 9d136b2db8f906c562cbdb23a9b238f0e237074b:
>
>    gdk-pixbuf: Ensure the binaries can be relocated (2011-12-13 18:00:25 +0000)
>
> are available in the git repository at:
>    git://git.pokylinux.org/poky-contrib robert/disk-space-monitor
>    http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/disk-space-monitor
>
> Robert Yang (2):
>    Disk space monitoring
>    Add config sample for disk space monitoring
>
>   bitbake/bin/bitbake               |   12 +++
>   bitbake/lib/bb/monitordisk.py     |  153 +++++++++++++++++++++++++++++++++++++
>   meta-yocto/conf/local.conf.sample |   28 +++++++
>   3 files changed, 193 insertions(+), 0 deletions(-)
>   create mode 100644 bitbake/lib/bb/monitordisk.py
>
Mark Hatle - Dec. 15, 2011, 3:59 p.m.
Is the disk space monitoring implemented in the correct place in the system?

I would have expected this to have been implemented in the meta/class files, 
both in the initial sanity checking and also in something that can watch the 
events and doing the repetition/rechecking as necessary.

(BTW the code looks fine to me as implemented, I'm just not sure if it belongs 
in bitbake itself.)

--Mark

On 12/15/11 4:44 AM, Robert Yang wrote:
> Here are the test info:
> 1) set the following variables in conf/local.conf for testing:
>     BB_DISKMON_DIRS = "${TMPDIR} ${DL_DIR} ${SSTATE_DIR} /home/lyang1"
>     BB_DISKMON_MINSPACE = "200G"
>     BB_DISKMON_MININODES = "20M"
>     BB_DISKMON_INTERVAL = "30s"
>
>     The TMPDIR, DL_DIR and SSTATE_DIR are in the same disk(/dev/sdb4) in
>     my build, so I added another direcotory /home/lyang1 to test the
>     ability of monitoring multi mount points.
>
> 2) bitbake core-image-sato
>     WARNING: The free space of /dev/sdb5 is running low (25.915GB left)
>     WARNING: The free inode of /dev/sdb5 is running low (1788.202K left)
>     WARNING: The free space of /dev/sdb4 is running low (189.309GB left)
>     WARNING: The free inode of /dev/sdb4 is running low (18005.443K left)
>
> 3) Aalso have tested about the following items:
>     a) Use ctrl-c to stop the monitor
>     b) The monitor should stop when the build stops
>     c) Test the space unit G, B, K(case in-sensitive) and the time unit
>        h, m, s(case-sensitive)
>
> // Robert
>
>
> The following changes since commit 9d136b2db8f906c562cbdb23a9b238f0e237074b:
>
>    gdk-pixbuf: Ensure the binaries can be relocated (2011-12-13 18:00:25 +0000)
>
> are available in the git repository at:
>    git://git.pokylinux.org/poky-contrib robert/disk-space-monitor
>    http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/disk-space-monitor
>
> Robert Yang (2):
>    Disk space monitoring
>    Add config sample for disk space monitoring
>
>   bitbake/bin/bitbake               |   12 +++
>   bitbake/lib/bb/monitordisk.py     |  153 +++++++++++++++++++++++++++++++++++++
>   meta-yocto/conf/local.conf.sample |   28 +++++++
>   3 files changed, 193 insertions(+), 0 deletions(-)
>   create mode 100644 bitbake/lib/bb/monitordisk.py
>
Robert Yang - Dec. 16, 2011, 3:25 a.m.
Hi Mark,

Thanks for your replying, Richard suggested we add this to bitbake itself,
here is his reply in 8 months ago:

As for disk monitoring, I'd suggest we just add this to bitbake itself
as it doesn't really fit the task model. It can be controlled via some
variables like:

# Set the directories to monitor for disk usage
BB_DISKMON_DIRS = "${TMPDIR} ${DL_DIR}"
# Set the minimum amount of disk space to exit on
BB_DISKMON_MINSPACE = "1GB"
# Set the monitor frequency
BB_DISKMON_INTERVAL = "60s"

and if the variables are not set, it doesn't get activated.


// Robert


On 12/15/2011 11:59 PM, Mark Hatle wrote:
> Is the disk space monitoring implemented in the correct place in the system?
>
> I would have expected this to have been implemented in the meta/class files,
> both in the initial sanity checking and also in something that can watch the
> events and doing the repetition/rechecking as necessary.
>
> (BTW the code looks fine to me as implemented, I'm just not sure if it belongs
> in bitbake itself.)
>
> --Mark
>
> On 12/15/11 4:44 AM, Robert Yang wrote:
>> Here are the test info:
>> 1) set the following variables in conf/local.conf for testing:
>> BB_DISKMON_DIRS = "${TMPDIR} ${DL_DIR} ${SSTATE_DIR} /home/lyang1"
>> BB_DISKMON_MINSPACE = "200G"
>> BB_DISKMON_MININODES = "20M"
>> BB_DISKMON_INTERVAL = "30s"
>>
>> The TMPDIR, DL_DIR and SSTATE_DIR are in the same disk(/dev/sdb4) in
>> my build, so I added another direcotory /home/lyang1 to test the
>> ability of monitoring multi mount points.
>>
>> 2) bitbake core-image-sato
>> WARNING: The free space of /dev/sdb5 is running low (25.915GB left)
>> WARNING: The free inode of /dev/sdb5 is running low (1788.202K left)
>> WARNING: The free space of /dev/sdb4 is running low (189.309GB left)
>> WARNING: The free inode of /dev/sdb4 is running low (18005.443K left)
>>
>> 3) Aalso have tested about the following items:
>> a) Use ctrl-c to stop the monitor
>> b) The monitor should stop when the build stops
>> c) Test the space unit G, B, K(case in-sensitive) and the time unit
>> h, m, s(case-sensitive)
>>
>> // Robert
>>
>>
>> The following changes since commit 9d136b2db8f906c562cbdb23a9b238f0e237074b:
>>
>> gdk-pixbuf: Ensure the binaries can be relocated (2011-12-13 18:00:25 +0000)
>>
>> are available in the git repository at:
>> git://git.pokylinux.org/poky-contrib robert/disk-space-monitor
>> http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=robert/disk-space-monitor
>>
>> Robert Yang (2):
>> Disk space monitoring
>> Add config sample for disk space monitoring
>>
>> bitbake/bin/bitbake | 12 +++
>> bitbake/lib/bb/monitordisk.py | 153 +++++++++++++++++++++++++++++++++++++
>> meta-yocto/conf/local.conf.sample | 28 +++++++
>> 3 files changed, 193 insertions(+), 0 deletions(-)
>> create mode 100644 bitbake/lib/bb/monitordisk.py
>>
>
>
> _______________________________________________
> bitbake-devel mailing list
> bitbake-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/bitbake-devel
>