| Author |
Message |
John Brandon *nix forums beginner
Joined: 19 Feb 2005
Posts: 11
|
Posted: Fri Feb 11, 2005 2:51 pm Post subject:
Re: REBOOT or SHUTDOWN, how to tell in SYSSHUTDWN.COM
|
|
|
Roy Omond wrote:
| Quote: | When SYSHUTDWN.COM gets invoked, if it does:
$ delete/symbol P1
.
.
$ delete/symbol P8
|
Thanks! Now I do not have to change SYS$SYSTEM:SHUTDOWN.COM
John "REBOOT" Brandon
VMS Systems Administrator
firstname.lastname.spam.me.not@dalsemi.com |
|
| Back to top |
|
 |
David J Dachtera *nix forums Guru
Joined: 26 Jun 2005
Posts: 1067
|
Posted: Mon Feb 07, 2005 12:43 am Post subject:
Re: REBOOT or SHUTDOWN, how to tell in SYSSHUTDWN.COM
|
|
|
John Brandon wrote:
| Quote: |
David J Dachtera
I'd be curious to know what you would do differently in either case.
Kind of looks like I have no choice.
I am trying to avoid having to create procedures outside of the normal shutdown
process. That way any upgrades or forgetting to use the proper procedure
(say as in an emergency reboot) will not affect the process.
|
Well, o.k., but I'm still wondering why a reboot differs from a
shutdown. Either way, everything stops.
--
David J Dachtera
dba DJE Systems
http://www.djesys.com/
Unofficial OpenVMS Hobbyist Support Page:
http://www.djesys.com/vms/support/
Unofficial Affordable OpenVMS Home Page:
http://www.djesys.com/vms/soho/
Unofficial OpenVMS-IA32 Home Page:
http://www.djesys.com/vms/ia32/
Coming soon:
Unofficial OpenVMS Marketing Home Page |
|
| Back to top |
|
 |
Beach Runner *nix forums addict
Joined: 04 Feb 2005
Posts: 80
|
Posted: Sun Feb 06, 2005 5:13 pm Post subject:
Re: REBOOT or SHUTDOWN, how to tell in SYSSHUTDWN.COM
|
|
|
In the procedure, @sys$system:shutdown, then you can control all variables.
Z wrote:
| Quote: | norm.raphael@metso.com wrote:
Did I misread the orig request?
I'd guess, yes.
Why won't that work?
I should ask you to go back and reread the thread, but in short, he
does not want to edit sys$system:shutdwn.com, so ther is no place to
put your code if he uses the symbols he has to invoke shutdown with
only the documented parameters.
I must be missing a post or two because I see no such prior stipulation
in any post in this thread. Sorry. |
|
|
| Back to top |
|
 |
Z *nix forums Guru Wannabe
Joined: 28 Jul 2005
Posts: 163
|
Posted: Sat Feb 05, 2005 4:26 pm Post subject:
Re: REBOOT or SHUTDOWN, how to tell in SYSSHUTDWN.COM
|
|
|
norm.raphael@metso.com wrote:
| Quote: | Did I misread the orig request?
I'd guess, yes.
Why won't that work?
I should ask you to go back and reread the thread, but in short, he
does not want to edit sys$system:shutdwn.com, so ther is no place to
put your code if he uses the symbols he has to invoke shutdown with
only the documented parameters.
|
I must be missing a post or two because I see no such prior stipulation
in any post in this thread. Sorry. |
|
| Back to top |
|
 |
Dave Froble *nix forums Guru
Joined: 21 Jul 2005
Posts: 1172
|
Posted: Sat Feb 05, 2005 3:08 am Post subject:
Re: REBOOT or SHUTDOWN, how to tell in SYSSHUTDWN.COM
|
|
|
norm.raphael@metso.com wrote:
| Quote: |
Z <Z@no.spam> wrote on 02/04/2005 03:34:59 PM:
norm.raphael@metso.com wrote:
$ if p2 .eqs. "REBOOT"
$ then
$ write ... "REBOOT ..."
$ else
$ write ... "STANDALONE ..."
$ endif
To paraphrase H. L. Menchen: "For every problem there is a simple
solution
that probably won't work."
Did I misread the orig request?
I'd guess, yes.
Why won't that work?
I should ask you to go back and reread the thread, but in short, he does
not want
to edit sys$system:shutdwn.com, so ther is no place to put your code if he
uses
the symbols he has to invoke shutdown with only the documented parameters.
How could you not realize that if the solution was as easy as
if...then...else
he would not have needed to ask (That's a rhetorical question!)?
|
From the earlier posts, I thought it was SYS$SYSTEM:SHUTDOWN.COM that he didn't
want to change. In fact, this file should NOT be changed. As for
SYS$MANAGER:SYSHUTDWN.COM, this is the site specific shutdown file, specifically
for such modifications, and is preserved through an upgrade.
Caviet, I haven't touched this stuff on my VMS systems for 2 years or more, and
am subject to faulty memory.
Dave |
|
| Back to top |
|
 |
norm.raphael@metso.com *nix forums Guru Wannabe
Joined: 02 Jun 2005
Posts: 227
|
Posted: Fri Feb 04, 2005 8:26 pm Post subject:
Re: REBOOT or SHUTDOWN, how to tell in SYSSHUTDWN.COM
|
|
|
Z <Z@no.spam> wrote on 02/04/2005 03:34:59 PM:
| Quote: | norm.raphael@metso.com wrote:
$ if p2 .eqs. "REBOOT"
$ then
$ write ... "REBOOT ..."
$ else
$ write ... "STANDALONE ..."
$ endif
To paraphrase H. L. Menchen: "For every problem there is a simple
solution
that probably won't work."
Did I misread the orig request?
|
I'd guess, yes.
| Quote: |
Why won't that work?
|
I should ask you to go back and reread the thread, but in short, he does
not want
to edit sys$system:shutdwn.com, so ther is no place to put your code if he
uses
the symbols he has to invoke shutdown with only the documented parameters.
How could you not realize that if the solution was as easy as
if...then...else
he would not have needed to ask (That's a rhetorical question!)? |
|
| Back to top |
|
 |
Z *nix forums Guru Wannabe
Joined: 28 Jul 2005
Posts: 163
|
Posted: Fri Feb 04, 2005 7:34 pm Post subject:
Re: REBOOT or SHUTDOWN, how to tell in SYSSHUTDWN.COM
|
|
|
norm.raphael@metso.com wrote:
| Quote: | $ if p2 .eqs. "REBOOT"
$ then
$ write ... "REBOOT ..."
$ else
$ write ... "STANDALONE ..."
$ endif
To paraphrase H. L. Menchen: "For every problem there is a simple solution
that probably won't work."
|
Did I misread the orig request?
Why won't that work? |
|
| Back to top |
|
 |
JF Mezei *nix forums Guru
Joined: 21 Jul 2005
Posts: 2556
|
Posted: Fri Feb 04, 2005 7:27 pm Post subject:
Re: REBOOT or SHUTDOWN, how to tell in SYSSHUTDWN.COM
|
|
|
Z wrote:
| Quote: | During STARTUP if this file is detected then I can assume that the server was
SHUTDOWN and did not experience a CRASH. If the file is NOT there then the
server CRASHed.
|
Your use of terminology is not quite correct.
From what you are trying to achieve, whether you do a full shutdown or
one which has an automatic reboot makes no difference to you. In both
cases, the shutdown procedure executes fully. Whether the reboot is done
seconds after or hours later doesn't really make a difference.
In the local shutdown procedure, you can simply create your file whether
or not an automatic reboot was requested or not just after your software
was properly shutdown.
Then, in the local startup procedure (SYSTARTUP_VMS.com) you check for
the existence of this file. If it exists, it means that there was a
proper shutdown performed and you then delete the file and restart your
software , ortherwise, you perform whatever you need to do after an
improper system shutdown.
In fact, you might consider putting this login in your application's
startup and shutdown procedures. This way, if the application crashes
without the system crashing, the logic will be there when you restart
the app to realise that the application,s proper shutdown had not been called. |
|
| Back to top |
|
 |
norm.raphael@metso.com *nix forums Guru Wannabe
Joined: 02 Jun 2005
Posts: 227
|
Posted: Fri Feb 04, 2005 7:05 pm Post subject:
Re: REBOOT or SHUTDOWN, how to tell in SYSSHUTDWN.COM
|
|
|
Z <Z@no.spam> wrote on 02/04/2005 02:59:40 PM:
| Quote: | John Brandon wrote:
REBOOT == "@SYS$SYSTEM:SHUTDOWN 0 REBOOT NO YES YES YES
REMOVE_NODE,REBOOT_CHECK"
SHUTDOWN == "@SYS$SYSTEM:SHUTDOWN 0 STANDALONE NO YES NO NO
REMOVE_NODE,REBOOT_CHECK"
(Nothing more than the standard REBOOT and SHUTDOWN symbols)
P2 = REBOOT or STANDALONE
In SYS$SYSTEM:SYSHUTDWN.COM I log the SHUTDOWN request in a text file:
$ TYPE SYS$MANAGER:_SHUTDOWN_<node>.XXX;
SHUTDOWN/REBOOT (SHUTDOWN) on <node> requested by <user> at <date-time
During STARTUP if this file is detected then I can assume that
theserver was
SHUTDOWN and did not experience a CRASH. If the file is NOT there then
the
server CRASHed.
$ if p2 .eqs. "REBOOT"
$ then
$ write ... "REBOOT ..."
$ else
$ write ... "STANDALONE ..."
$ endif
|
To paraphrase H. L. Menchen: "For every problem there is a simple solution
that probably won't work." |
|
| Back to top |
|
 |
Z *nix forums Guru Wannabe
Joined: 28 Jul 2005
Posts: 163
|
Posted: Fri Feb 04, 2005 6:59 pm Post subject:
Re: REBOOT or SHUTDOWN, how to tell in SYSSHUTDWN.COM
|
|
|
John Brandon wrote:
| Quote: | REBOOT == "@SYS$SYSTEM:SHUTDOWN 0 REBOOT NO YES YES YES REMOVE_NODE,REBOOT_CHECK"
SHUTDOWN == "@SYS$SYSTEM:SHUTDOWN 0 STANDALONE NO YES NO NO REMOVE_NODE,REBOOT_CHECK"
(Nothing more than the standard REBOOT and SHUTDOWN symbols)
P2 = REBOOT or STANDALONE
In SYS$SYSTEM:SYSHUTDWN.COM I log the SHUTDOWN request in a text file:
$ TYPE SYS$MANAGER:_SHUTDOWN_<node>.XXX;
SHUTDOWN/REBOOT (SHUTDOWN) on <node> requested by <user> at <date-time
During STARTUP if this file is detected then I can assume that the server was
SHUTDOWN and did not experience a CRASH. If the file is NOT there then the
server CRASHed.
|
$ if p2 .eqs. "REBOOT"
$ then
$ write ... "REBOOT ..."
$ else
$ write ... "STANDALONE ..."
$ endif |
|
| Back to top |
|
 |
John Brandon *nix forums beginner
Joined: 19 Feb 2005
Posts: 11
|
Posted: Fri Feb 04, 2005 12:53 pm Post subject:
Re: REBOOT or SHUTDOWN, how to tell in SYSSHUTDWN.COM
|
|
|
David J Dachtera
| Quote: | I'd be curious to know what you would do differently in either case.
|
Kind of looks like I have no choice.
I am trying to avoid having to create procedures outside of the normal shutdown
process. That way any upgrades or forgetting to use the proper procedure
(say as in an emergency reboot) will not affect the process.
As suggested by John Laird - "Edit it and pass as many of the Pn parameters as you need to syshutdwn.com ?
It's only a single line change and if you forget to check after your next
upgrade (if/when shutdown.com may change), you could have your site-specific
procedure write out something if any or all parameters are found to be
missing." Will probably be my only solution.
John "REBOOT" Brandon
VMS Systems Administrator
firstname.lastname.spam.me.not@dalsemi.com |
|
| Back to top |
|
 |
David J Dachtera *nix forums Guru
Joined: 26 Jun 2005
Posts: 1067
|
Posted: Fri Feb 04, 2005 1:35 am Post subject:
Re: REBOOT or SHUTDOWN, how to tell in SYSSHUTDWN.COM
|
|
|
John Brandon wrote:
| Quote: |
I am wondering if there is a way to capture the P2 flag when executing
SYS$SYSTEM:SHUTDOWN.COM
For example, I have the following two symbols:
REBOOT == "@SYS$SYSTEM:SHUTDOWN 0 REBOOT NO YES YES YES REMOVE_NODE,REBOOT_CHECK"
SHUTDOWN == "@SYS$SYSTEM:SHUTDOWN 0 STANDALONE NO YES NO NO REMOVE_NODE,REBOOT_CHECK"
(Nothing more than the standard REBOOT and SHUTDOWN symbols)
P2 = REBOOT or STANDALONE
In SYS$SYSTEM:SYSHUTDWN.COM I log the SHUTDOWN request in a text file:
$ TYPE SYS$MANAGER:_SHUTDOWN_<node>.XXX;
SHUTDOWN/REBOOT (SHUTDOWN) on <node> requested by <user> at <date-time
During STARTUP if this file is detected then I can assume that the server was
SHUTDOWN and did not experience a CRASH. If the file is NOT there then the
server CRASHed.
Therefore I can differentiate between a CRASH and a requested SHUTDOWN.
However it would be nice to differentiate between a REBOOT and a STANDALONE.
I could change the symbols (REBOOT and SHUTDOWN) to execute a command file to
do so but I would rather not.
Any ideas?
|
I'd be curious to know what you would do differently in either case.
--
David J Dachtera
dba DJE Systems
http://www.djesys.com/
Unofficial OpenVMS Hobbyist Support Page:
http://www.djesys.com/vms/support/
Unofficial Affordable OpenVMS Home Page:
http://www.djesys.com/vms/soho/
Unofficial OpenVMS-IA32 Home Page:
http://www.djesys.com/vms/ia32/
Coming soon:
Unofficial OpenVMS Marketing Home Page |
|
| Back to top |
|
 |
John Brandon *nix forums beginner
Joined: 19 Feb 2005
Posts: 11
|
Posted: Thu Feb 03, 2005 6:53 pm Post subject:
Re: REBOOT or SHUTDOWN, how to tell in SYSSHUTDWN.COM
|
|
|
Dave Greenwood writes:
| Quote: | Looking at SYS$SYSTEM:SHUTDOWN.COM, I see that the logical name OPC$REBOOT is
set to the value of P6 which is the answer to the question about doing an
automatic reboot. You should be able to check the translation of that
logical name in SYSHUTDWN.COM to see if you're doing a (standalone) shutdown
or a reboot.
|
I wish it was that easy. The OPC$REBOOT logical is defined after SYSHUTDWN.COM
is executed... :(
John Laird wites:
| Quote: | Edit it and pass as many of the Pn parameters as you need to syshutdwn.com ?
It's only a single line change and if you forget to check after your next
upgrade (if/when shutdown.com may change), you could have your site-specific
procedure write out something if any or all parameters are found to be
missing.
|
I was hoping to avoid changing that file.
John "REBOOT" Brandon
VMS Systems Administrator
firstname.lastname.spam.me.not@dalsemi.com |
|
| Back to top |
|
 |
Dave Greenwood *nix forums beginner
Joined: 27 May 2005
Posts: 25
|
Posted: Thu Feb 03, 2005 6:14 pm Post subject:
Re: REBOOT or SHUTDOWN, how to tell in SYSSHUTDWN.COM
|
|
|
In a previous article, brandon@dalsemi.com (John Brandon) wrote:
| Quote: | I am wondering if there is a way to capture the P2 flag when executing
SYS$SYSTEM:SHUTDOWN.COM
For example, I have the following two symbols:
REBOOT == "@SYS$SYSTEM:SHUTDOWN 0 REBOOT NO YES YES YES REMOVE_NODE,REBOOT_CHECK"
SHUTDOWN == "@SYS$SYSTEM:SHUTDOWN 0 STANDALONE NO YES NO NO REMOVE_NODE,REBOOT_CHECK"
(Nothing more than the standard REBOOT and SHUTDOWN symbols)
P2 = REBOOT or STANDALONE
In SYS$SYSTEM:SYSHUTDWN.COM I log the SHUTDOWN request in a text file:
$ TYPE SYS$MANAGER:_SHUTDOWN_<node>.XXX;
SHUTDOWN/REBOOT (SHUTDOWN) on <node> requested by <user> at <date-time
During STARTUP if this file is detected then I can assume that the server was
SHUTDOWN and did not experience a CRASH. If the file is NOT there then the
server CRASHed.
Therefore I can differentiate between a CRASH and a requested SHUTDOWN.
However it would be nice to differentiate between a REBOOT and a STANDALONE.
I could change the symbols (REBOOT and SHUTDOWN) to execute a command file to
do so but I would rather not.
|
Looking at SYS$SYSTEM:SHUTDOWN.COM, I see that the logical name OPC$REBOOT is
set to the value of P6 which is the answer to the question about doing an
automatic reboot. You should be able to check the translation of that
logical name in SYSHUTDWN.COM to see if you're doing a (standalone) shutdown
or a reboot.
Dave
--------------
Dave Greenwood Email: Greenwoodde@ORNL.GOV
Oak Ridge National Lab %STD-W-DISCLAIMER, I only speak for myself |
|
| Back to top |
|
 |
John Laird *nix forums beginner
Joined: 02 Feb 2005
Posts: 30
|
Posted: Thu Feb 03, 2005 6:07 pm Post subject:
Re: REBOOT or SHUTDOWN, how to tell in SYSSHUTDWN.COM
|
|
|
On Thu, 03 Feb 2005 11:49:57 -0600, brandon@dalsemi.com (John Brandon)
wrote:
| Quote: | I am wondering if there is a way to capture the P2 flag when executing
SYS$SYSTEM:SHUTDOWN.COM
|
Edit it and pass as many of the Pn parameters as you need to syshutdwn.com ?
It's only a single line change and if you forget to check after your next
upgrade (if/when shutdown.com may change), you could have your site-specific
procedure write out something if any or all parameters are found to be
missing.
--
I couldn't repair your brakes, so I made your horn louder.
Mail john rather than nospam... |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|