How many EAs are too much and how much time is too much?

beeboo
Contributor

while not across the board, i have certain EAs that sometimes how up as blank.

I have verified the script works
I have ensured the <result> tag is there
I have checked the time on the script and it doesnt seems terrible, but thats part of the reason of the post as I dont have a clear guideline on if time to run matters on an EA, and if so, whats a time to be under
Sometimes it auto updates with recon in the back, sometimes running a manual recon fixes/breaks it

Usually grepping versions is okay, but i have a handful that, when i actually run recon, it will show the result as an EA.
thats not sometime dependable as even with 2 forced recons in a day, ive almost never seen my EA status report accurately for this one EA script.

so the script literally looks for any file with a specific file extension in "~"
it then counts the line, then i convert it to show the actual numerical value, sed'ing all the extra crap away
its a one liner

the time for the script is
real 0m1.357s
user 0m0.288s
sys 0m0.810s

the result should be 2

ea shows 0
(see first screenshot)

then i run a sudo jamf recon on my machine and get the actual real number, 2
(see 2nd screenshot)

inevitably, tomorrow the result will be blank :(

the inconsistency is driving me nuts, and any reporting required for that value is now inconsistent too

533e63b2a0bf40f58efd255716d7516a

cb2a55828d39445cad88f09f9f752f06

4 REPLIES 4

mm2270
Legendary Contributor III

You might want to take a look at this thread - https://www.jamf.com/jamf-nation/discussions/34767/extension-attribute-scripts-retaining-variables
It's possible you're running into the issue discussed in it.

beeboo
Contributor

it looks like, any alternatives you would suggest?

writing to tmp file maybe?

AdamCraig
Contributor III

@jcheLC One thing you may want to consider that I found in this post: https://www.jamf.com/jamf-nation/discussions/30916/search-criteria-for-computers-that-have-desktop-and-documents-in-the-cloud#responseChild189302

Is making the Extension Attribute a text field and then you can have a script that updates the text EA at a interval different than how often inventory is run. In this example with people enabling icloud documents and desktop I think I have that script run once a week. This isn't a setting that people turn on and off that often so having it every day or multiple times a day (if it was a true EA) would be unnecessary.

dan-snelson
Valued Contributor II

@jcheLC In case this helps …

Extension Attribute Frequency