How do I check the free space of a Linux partition for relevance?
I tried:
if free space of “/var” > 100000
but the console said it was a syntax error.
How do I check the free space of a Linux partition for relevance?
I tried:
if free space of “/var” > 100000
but the console said it was a syntax error.
How about:
free space of filesystem "/var" > 100000
For reference, please see https://developer.bigfix.com/relevance/reference/filesystem.html#free-space-of-filesystem-integer
Just to point out that @aram has a solution for the endpoint (client relevance) but as you mentioned “console” then you might be trying session relevance which doesn’t access the file system.
Ok maybe I didn’t give enough information. I am trying to create a task on the console to perform some action if the free space on the /var partition of the client is over some number (I am using 100000 as an example).
I tried changing the relevance statement from: if free space of “/var” > 100000 to: if free space of filesystem “/var” > 100000 but I still get a syntax error. Am I missing some “of it”'s?
You can leverage an ‘if’ statement if you wish, but it isn’t necessary. The example I provide above will return a TRUE or FALSE (boolean) value, which is all we need/want for applicability relevance.
That said, if you would like to leverage an ‘if’ statement, the following should work:
if (free space of filesystem "/var" > 100000) then TRUE else FALSE
(You may want to include some additional relevance clauses to filter the scope of endpoints to those of interest…for instance those that have a “/var” filesystem, or are Linux, etc…though this isn’t technically necessary)