How to check what the active state of managedsoftwareupdate is?

9 views
Skip to first unread message

miq...@gmail.com

unread,
Feb 3, 2023, 9:57:54 AM2/3/23
to munki-discuss
Hi all,

Can the active status of munki client be guessed from currently running managedsoftwareupdate processes?

I was thinking to implement a service window agent which should know what munki is currently doing (checking, installing) before violently rebooting Mac and possibly breaking a sw installation.

br,
-MiqViq

Alan

unread,
Feb 3, 2023, 10:32:56 AM2/3/23
to munki-...@googlegroups.com
I don't think there's a command flag for managedsoftwareupdate that checks the status, but you could conceivably check the /Library/Managed Installs/Logs/ManagedSoftwareUpdate.log file to see what's happening.

--
You received this message because you are subscribed to the Google Groups "munki-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to munki-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/munki-discuss/24a71bab-fdf6-41c9-9f98-66cea6b47675n%40googlegroups.com.

Gregory Neagle

unread,
Feb 3, 2023, 11:03:21 AM2/3/23
to 'Gregory Neagle' via munki-discuss
If by this you mean “can I check to see if managedsoftwareupdate is running?” You can can do what managedsoftwareupdate itself does to see if another instance is running. It’s basically:

ps -eo 'pid=,command=' | grep -i python | grep managedsoftwareupdate


If that returns anything, managedsoftwareupdate is running.


-Greg


miq...@gmail.com

unread,
Feb 3, 2023, 12:02:52 PM2/3/23
to munki-discuss
Yes, ps shows that munki is doing "something" but is there any way to inspect what is it doing exactly? Like downloading, installing, etc?
I guess that one should check the latest events in the logs?

-MiqViq

Gregory Neagle

unread,
Feb 3, 2023, 12:05:15 PM2/3/23
to munki-...@googlegroups.com
Other than looking at the logs, no. I’d think that would be terribly fragile.

-Greg

miq...@gmail.com

unread,
Feb 3, 2023, 12:07:15 PM2/3/23
to munki-discuss
Yes, that seems to be the most reliable way.

Thanks!

-MiqViq

Reply all
Reply to author
Forward
0 new messages