In there a way to manually trigger updates of mender inside yocto via CLI?

I configured my yocto system with mender using my MENDER_UPDATE_POLL_INTERVAL_SECONDS and MENDER_INVENTORY_POLL_INTERVAL_SECONDS. Everything is ok.

However, sometime it’s useful to update mender with the current device status and to check for an update in a forced way overriding the variables above.

How can I do that? Is there something like “mender --force-update” or other commands.
Trying to use “mender --help” i found “-check-update”. Is it right to use “-check-update” to solve this scenario?
I want to both update mender with device information and both to trigger the update (previously deployed on mender server on my device)

Thanks.

I believe that mender -check-update should cover this scenario. Meaning that it will force the running Mender client to contact the server and check if there is an update for it. This will bypass the polling intervals that you mentioned.

Perfect about the update.
Probably I explained the problem in a terrible way

I also expect that also the “Last checkin” date of device inventory should be updated with this or another command, but this isn’t happening.

I wan’t to run something like “mender -check-inventory” and then “mender -check-update”.
The second command seems ok, but I don’t understand if there is a command to check inventory bypassing its polling interval.

but I don’t understand if there is a command to check inventory bypassing its polling interval.

There is a command for this,

mender -send-inventory

I’m trying on a device with mender 1.7.0 but “mender -help” doesn’t show this command. And if I try to run it I get: “ERRO[0000] flag provided but not defined: -send-inventory module=main”.

Is it only available from mender 2 or greater?

Is it only available from mender 2 or greater?

Actually it is only available in 2.1 and great (2.1 is in the process of being released)

ok, thanks for the answer