Set boottime with actionscript

On AIX I would like to change the value in besclient.config:

BootTime = Fri%20Mar%2024%2008:11:39%202017

to {now}.

Trying with
setting “BootTime” = “{now}” on “{now}” for GlobalOptions or
setting “BootTime” “{now}” on “{now}” for Client

didn’t work, the second line add’s a new Key into besclient.config, the first one just ends with a syntax error.

Is there anyway to set the values underneath […\GlobalOptions] ?

Next try would be to change it with shell commands, but i would prefer changing ist with standard action commands.

The following action script should work assuming that BootTime is the setting that you want.

setting "BootTime" = "{now}" on "{now}" for client

The above lines up with the IBM BigFix documentation for creating/setting a client setting.

If the above doesn’t work for you, you’ll want to enable BESClient debug logging and then re-run the action to create/update the client setting in question.

While I wouldn’t recommend going the shell route, if you go that way you’ll want to stop the BESClient while editing the besclient.config under /var/opt/BESClient.

1 Like

Thanks for your reply. I wrote a small shellscript which is running on the client:

  1. creating a backup of the besclient.config
  2. stopping the client
  3. changing the value in besclient.config
  4. starting the client

Um, I have to ask, why are you trying to change this?

The reason it’s not working for you, is that this is not a client setting. As @cmcannady states, his action command is the correct syntax for modifying a setting, but settings are stored at [Software\BigFix\EnterpriseClient\Settings\Client], not at [Software\BigFix\EnterpriseClient\GlobalOptions].

What you’re modifying is the client’s understanding of the system boot time, which should change every time the machine reboots. I supposed this exists in that location because the ‘boot time of operating system’ inspector may be expensive, and it is convenient for performance reasons to cache the result in that location.

1 Like

Yes there are a lot of things in GlobalOptions that are states of the BESAgent and should not be manipulated such as the ComputerId

And @JasonWalker is correct that this is stored here as its expensive to calculate and should not be manipulated or functionality would be potentially broken within the system

The reason for changing the value is that we set the status “pending restart” for the client after applying patches. To avoid a reboot and get rid of “pending restart” setting the boottime seems to be a proper way.

On AIX the boottime value is listed under Global Options:
StoragePath = /var/opt/BESClient
LastClientVersion =
ActionLockController = console
BootTime = Wed%20Feb%20%208%2008:33:12%202017

But as well I’m happy with the shellscript solution.

Just to be clear… you do understand that if a patch requires a reboot, and you do not perform the reboot, the patch has not actually been applied yet and you are still vulnerable?

The “pending restart” is a helpful indicator to you. Removing the indicator is not a good way to proceed. If you want to ignore the pending restart, well… just ignore it, don’t remove the indicator.

Yes, I have a clear understanding of the requirement of a reboot. As well we place in our baselines at the end a fixlet “action requires restart” to be sure the server will be restarted after patching, even if not every patch requires an reboot (e.g. the ifix for ntp restarts the ntp service).

In the past we had some issues with the BigFix Agent which caused some machines to keep “pending restart” even after rebooting them. These issues were the initiator for my origin question.