Bug 3364 - [DOC] Document disk space monitoring
Summary: [DOC] Document disk space monitoring
Status: VERIFIED FIXED
Alias: None
Product: Reference
Classification: Documentation
Component: handbook (show other bugs)
Version: unspecified
Hardware: All Multiple
: Medium enhancement
Target Milestone: 1.4
Assignee: Scott Rifenbark
QA Contact:
URL: http://git.yoctoproject.org/cgit/cgit...
Whiteboard: 14 Nov 2012 - Resolved
Depends on:
Blocks:
 
Reported: 2012-10-30 16:13 UTC by Paul Eggleton
Modified: 2013-03-14 11:38 UTC (History)
8 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eggleton 2012-10-30 16:13:49 UTC
There is some information here:

http://cgit.openembedded.org/bitbake/commit/?id=4d173d441d2beb8e6492b6b1842682f8cf32e6cc

We should at least document the variables used (BB_DISKMON_DIRS, BB_DISKMON_WARNINTERVAL).
Comment 1 Saul Wold 2012-10-31 08:21:17 UTC
Robert, please provide additional details for the documentation person to work with and then assign it back to Scott R.
Comment 2 Robert Yang 2012-10-31 08:36:46 UTC
Hi Saul,

There is several information in meta-yocto/conf/local.conf.sample.extended, which has described how to use it:

#
# Disk space monitor, take action when the disk space or the amount of
# inode is running low, it is enabled when BB_DISKMON_DIRS is set.
#
# Set the directories to monitor for disk usage, if more than one
# directories are mounted in the same device, then only one directory
# would be monitored since the monitor is based on the device.
# The format is:
# "action,directory,minimum_space,minimum_free_inode"
#
# The "action" must be set and should be one of:
# ABORT: Immediately abort
# STOPTASKS: The new tasks can't be executed any more, will stop the build
#           when the running tasks have been done.
# WARN: show warnings (see BB_DISKMON_WARNINTERVAL for more information)
#
# The "directory" must be set, any directory is OK.
#
# Either "minimum_space" or "minimum_free_inode" (or both of them)
# should be set, otherwise the monitor would not be enabled,
# the unit can be G, M, K or none, but do NOT use GB, MB or KB
# (B is not needed).
#BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K"
#
# Set disk space and inode interval (only works when the action is "WARN",
# the unit can be G, M, or K, but do NOT use the GB, MB or KB
# (B is not needed), the format is:
# "disk_space_interval,disk_inode_interval", the default value is
# "50M,5K" which means that it would warn when the free space is
# lower than the minimum space(or inode), and would repeat the warning
# when the disk space reduces 50M (or the amount of inode reduces 5k).
#BB_DISKMON_WARNINTERVAL = "50M,5K"
Comment 3 Scott Rifenbark 2012-11-02 17:25:35 UTC
Here is a link to the BB_DISKMON_DIRS variable description.  I am unsure of the exact syntax to use if you omit min_free_inode or min_space.  Please look it over and comment.

http://www.yoctoproject.org/docs/1.4/poky-ref-manual/poky-ref-manual.html#var-BB_DISKMON_DIRS

Scott
Comment 4 Scott Rifenbark 2012-11-02 20:34:30 UTC
Updated the manual to have both variables.  Please review the information.  I am a little unclear on some of the syntax and on the role of <dir> when used with no disk space monitoring.  Not sure also if the inode stuff is number of free inodes available or memory used for the entire inode structure.  Also, is there just one inode structure on the entire host development system?  Or, are inode structures identified with individual directorires?

Anyway... check these variable definitions out and provide corrections and feedback:

http://www.yoctoproject.org/docs/1.4/poky-ref-manual/poky-ref-manual.html#BB_DISKMON_DIRS

http://www.yoctoproject.org/docs/1.4/poky-ref-manual/poky-ref-manual.html#BB_DISKMON_WARNINTERVAL

Scott
Comment 5 Robert Yang 2012-11-04 09:29:28 UTC
(In reply to comment #4)
> Updated the manual to have both variables.  Please review the information. 
> I am a little unclear on some of the syntax and on the role of <dir> when
> used with no disk space monitoring.  Not sure also if the inode stuff is

Sorry, I'm not sure what did you mean about the "with no disk space monitoring" mean.

> number of free inodes available or memory used for the entire inode

The number of the free inodes.

> structure.  Also, is there just one inode structure on the entire host
> development system?  Or, are inode structures identified with individual
> directorires?
> 

Inode structure is based on the filesystem (also known as disk partition),
each disk partition can have their own disk inodes. We specify the directories
in the BB_DISKMON_DIRS, but what really used is the disk partition (or filesystem), the monitor will figure out which disk is the directory on and
monitor it.


> Anyway... check these variable definitions out and provide corrections and
> feedback:
> 

I've checked the content, they are fine except that the BB_DISKMON_WARNINTERVAL has a default value when not specified:

BB_DISKMON_WARNINTERVAL = "50M,5K"

Which means that ould repeat the warning when the disk space reduces 50M (or the amount of inode reduces 5k).

And the syntax of omitting min_free_inode or min_space is correct in the document.

// Robert

> http://www.yoctoproject.org/docs/1.4/poky-ref-manual/poky-ref-manual.
> html#BB_DISKMON_DIRS
> 
> http://www.yoctoproject.org/docs/1.4/poky-ref-manual/poky-ref-manual.
> html#BB_DISKMON_WARNINTERVAL
> 
> Scott
Comment 6 Scott Rifenbark 2012-11-09 16:11:37 UTC
Robert, 

How exactly does the default for BB_DISKMON_WARNINTERVAL work?  Is the default active if the statement is missing entirely from the local.conf file?  Or is the default active if the user provides the statement but does not put any values such as the following:

BB_DISKMON_WARNINTERVAL = ""

Thanks,
Scott
Comment 7 Robert Yang 2012-11-13 02:13:38 UTC
(In reply to comment #6)
> Robert, 
> 
> How exactly does the default for BB_DISKMON_WARNINTERVAL work?  Is the
> default active if the statement is missing entirely from the local.conf
> file?  Or is the default active if the user provides the statement but does
> not put any values such as the following:
> 
> BB_DISKMON_WARNINTERVAL = ""

This equals to "nothing from the local.conf", it will use the default value "50M,5K", which means that it will repeat the warning when 50M free disk space or 5K amount of free inodes has been used again.

// Robert

> 
> Thanks,
> Scott
Comment 8 Scott Rifenbark 2012-11-14 16:09:48 UTC
I added the default behavior information into the BB_DISKMON_WARNINTERVAL variable description. You can see the updated version at http://www.yoctoproject.org/docs/1.4/poky-ref-manual/poky-ref-manual.html#var-BB_DISKMON_WARNINTERVAL.

Bug is resolved.
Comment 9 Stoicescu Cornel 2013-03-14 11:38:51 UTC
All the mentioned information is inside the In Progress: Reference Manual.