I am sending a reboot and shutdown command to a Free BSD computer. However I want to check that will that computer be shutdown or reboot really (I send this command from a reboot computer and I want to be sure that if my command will run) I don't want to ping or etc, is there any command to learn it?
EDIT 1: I think that I should be more clear about my question. From my java server application I send one of that commands:
reboot // or any other command to reboot
shutdown -p now
I call that commands at another Java program at client side. Let's think reboot scenario. After I send reboot command from server side, I want to check will client reboot or not. If I ping it after I send that reboot command, client Free BSD machine may be still alive. However it can reboot after a time later. On the other hand After I send reboot command, something may happen bad and that communication breaks and client may not receive that reboot command.
How can I handle this issue(I don't want solution with Java side) Does Free BSD keeps that reboot or shutdown signals at somewhere (to know that machine will be reboot or shutdown) and can I query that will machine scheduled itself to reboot or shutdown immediately?
EDIT 2: Server sends one of that commands to client(my server and client coded at Java ) If I ping after I send i.e. shutdown command, maybe machine will shutdown but still alive(it will shutdown maybe after 2 seconds later.) If I can query my client did it received a shutdown(or reboot) command even it is still alive I will accept that OK it will shutdown(or reboot) If I can not get an answer to my query to client it means that it is not alive, so I will accept that it is shutted down(or rebooting). How can I query my machine like that?