cf.open_files_threshold_exceeded

cf.open_files_threshold_exceeded()[source]

Return True if the total number of open files is greater than the current threshold. LINUX.

The threshold is defined as a fraction of the maximum possible number of concurrently open files (an operating system dependent amount). The fraction is retrieved and set with the OF_FRACTION function.

Returns:
out : bool

Whether or not the number of open files exceeds the threshold.

Examples:

In this example, the number of open files is 75% of the maximum possible number of concurrently open files:

>>> cf.OF_FRACTION()
0.5
>>> print cf.open_files_threshold_exceeded()
True
>>> cf.OF_FRACTION(0.9)
>>> print cf.open_files_threshold_exceeded()
False

Previous topic

cf.open_files

Next topic

cf.pickle

This Page