Restarting client

(imported topic written by kaushalw91)

Hi,

I have a bigfix script to restart systems in 30 seconds. When I execute the action, some systems rebooted fine, some system mention “Pending Message” as their status. I referred to Console guide of Bigfix and pending message means it is waiting for user to accept the message. In bigfix, i selected the 2nd option located which mentions " Run independently… " . I just want to force reboot irrespective of the user presence. Any script which can force them to reboot in xx seconds ?

Thanks,

Kaushal

(imported comment written by BenKus)

Hi Kaushal,

The “force restart” option in the “Post-Action” part of the Take-Action Dialog will control this behavior and should give you the option you are looking for. “pending message” will be the initial status returned (because it is the last thing the agent reports before restart), but the computer should restart and should update its status after the restart.

Ben

(imported comment written by kaushalw91)

There is no “force restart” option available in Post-Action dialog. There are 3 otions

  1. Do Nothing…

  2. Restart computer after action…

  3. Shudown the computer…

What would be the action script. For Windows XP I use following

dos “shutdown -r -f 10”

The above restarts Windows XP after 10 seconds. I have windows 2000 professional and server How do I restart them ?

(imported comment written by jessewk)

Hi kaushalw,

I highly recommend you use the built in settings of the take action dialog rather than trying to force the shutdown/restart through dos. Our code to cause restarts/shutdowns has had considerable effort applied to make sure restarts occur reliably and the clients report their current state and action statuses appropriately. Over time it has proven to be very reliable.

Here are the settings you need on the post action tab to force a reboot.

  • Restart computer after action…
  • Leave ‘allow user to cancel restart’ unchecked
  • Set deadline to any period (minimum 1 minute) to allow any active users to see the restart message and have a chance to save work.
  • Select ‘At Deadline… restart automatically’.

Jesse

(imported comment written by kaushalw91)

Hi,

Thanks for the reply. I want to reboot the systems., so what settings and script should I use to restart systems.

What should be the script? and What are the settings to be done in “Post-Action” Dialog?

Thanks,

Kaushal

(imported comment written by jessewk)

The relevance can be anything as long as it evaluates to true. The simple statement ‘true’ would be enough. You don’t need any action script. You can leave it blank and just use the settings in the post action dialog. The settings for the post-action dialog are in my post above.

(imported comment written by Rominal91)

I have a simular question for resrating machines. When we push updates, pc’s can be in either one of three states: 1.Powered on - no user logged on.

  1. Powered on and user logged on

  2. Turned off. laptop or user that powers off at night.

We want a single policy that would handle any of these, like apply the patch or update then restart now if no user is logged on, apply the update and offer the user to restart and give then time to restart.

Do we have the ability to do that in the Post action tab?

(imported comment written by BenKus)

Hey Rominal,

The standard “restart computer” should take care of this… If the user is logged in, they will be prompted and if not, the computer will be restarted automatically…

Is there a behavior that you are seeing that you don’t like?

Ben

(imported comment written by Rominal91)

Yes, the behavior I see is that if I set the restart message for the user at 1hr, then the machines that have no user logged on will also wait the 1 hr before they restart. We have to give the users a day or two to restart because they are facing deadlines and can’t restart at that shift, but I want the machines that can be restarted to then go ahead an restart. I will do more testing to verify.

(imported comment written by BenKus)

Hey Rominal,

How you are requesting it should work is how it is supposed to work… let us know how your testing goes…

Ben

(imported comment written by Rominal91)

Testing the restart action is going as expecetd. But I have been given another scenario for the production environment. Can the post action be configured to only restart if the no one is logged on? In other words, run the baseline to all machines, if no one is looged on, restart. If a laptop user then logs on, he will get the baseline but no message to restart because he will every night anyway. I only want the users that never seem to log off to get the message to restart. How would you go about this?

(imported comment written by BenKus)

Hey Rominal,

The post-action parameters are tied to the overall action relevance so you can’t have a different criteria for each… but you could do this:

  1. Create a Task with the relevance “not exists logged on user” and the action “restart 300”… Once you have this Task, it has the behavior you want, which is to only restart when a user is not logged in.

  2. Put this Task in your baselines at the end. (Make sure the “include in baseline relevance” checkbox is NOT checked).

  3. When you take your baseline action, don’t specify the post-action restart (the Task will take care of that).

This should accomplish what you want, but you should test it to make sure.

Ben