Sponsored Content
Full Discussion: True Shutdown help!
Top Forums UNIX for Dummies Questions & Answers True Shutdown help! Post 302073476 by 01000101 on Sunday 14th of May 2006 09:48:04 PM
Old 05-14-2006
True Shutdown help!

ok, i know the syntax that goes along with the Shutdown command... but my box never wants to ... well... shutdown.. it only halts, kills all the process's, stalls the comp to a complete stop, but does actually kill the monitor and/or shut off the physical computer. it will reboot properly though, but i dotn want it to start back up, i just want it to shutoff completely.

some help would be appreciated, thnx. oh, and why doesnt the command system("logout"); work in c/c++ ??.. is it because it wont terminate the program running that line??.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

ksh [ HP True 64 v5.1 ] and HP-UX B.11.11i

Hi Friends, We have migrated our Unix from HP True 64 v5.1 to HP-UX B.11.11i recently and copied all my shell scripts ( Korn shell ) to new HP-UX B.11.11i unix machine. I've encountered lot of errors during execution of the scripts for example: cat x.sh #!/usr/bin/ksh if then echo... (3 Replies)
Discussion started by: krishna
3 Replies

2. UNIX for Dummies Questions & Answers

true dummie calling

hi i think this will make me seem dummier than most, actually i don't even understand most of the posts in the dummie section... i have a project and i need to learn fortran programming, im working on a windows xp pc and so i have installed cygwin. and the cygwin site basically says learn unix so... (4 Replies)
Discussion started by: holyhive
4 Replies

3. UNIX for Dummies Questions & Answers

is it true or not

I have heard for a long time that in maybe 2039 Unix will no longer be useable due the length of the date value. Anyone know anything about this? (4 Replies)
Discussion started by: dhlopomo
4 Replies

4. Shell Programming and Scripting

how to exit a while true loop

Hi guys, I'm new to unix but loving it!! BUT this is driving me nuts as i can't work out the best way to do it. I have a while true loop that i use to monitor something. For my own reasons in ths script i have disabled the CTRL C using the trap command. But i want to put in a option to exit... (5 Replies)
Discussion started by: Noob e
5 Replies

5. UNIX for Dummies Questions & Answers

Funny but true....

Hallo everybody I am having a shell script called auto_run.sh in that only the first line works. the second line which has sed command is working only at the # prompt. not within the shell script. What could be the reason. *... sed 's/ //g' KTI >abc works in another shell script without the... (6 Replies)
Discussion started by: naushad
6 Replies

6. UNIX for Dummies Questions & Answers

Script to force Oracle database shutdown when shutdown immediate does not work

I have Oracle 9i R2 on AIX 5.2. My Database is running in shared server mode (MTS). Sometimes when I shutdown the database it shutsdown cleanly in 4-5 mints and sometimes it takes good 15-20 minutes and then I get some ora-600 errors and only way to shutdown is by opening another session and... (7 Replies)
Discussion started by: aixhp
7 Replies

7. Shell Programming and Scripting

loop until true

Hi I need help with a script to loop unitl the statement is true done some thing like this until if then cp filename filename.anto fi done Regards, (3 Replies)
Discussion started by: antointoronto
3 Replies

8. Shell Programming and Scripting

While loop true problem

hi, i am new in bash scripting. i am trying to write a Bash script to monitor how many process are running in my Redhat6 Linux machine. example : let say there must be always 5 process from the same kind that must run and if one off them fails down the script must wake up another process... (2 Replies)
Discussion started by: zigizag
2 Replies

9. Shell Programming and Scripting

Explaination on if true

Hi Team, I need to know why ppl use If true loop instead of just writing down the sequence of code lines. 1: echo "Line1" if true; then echo "Line2" fi echo "Line3" 2: echo "Line1" echo "Line2" echo "Line3" Could you explain what does the if true loop make difference in 1st compare... (3 Replies)
Discussion started by: chandana hs
3 Replies
shutdown(1M)															      shutdown(1M)

NAME
shutdown - terminate all processing SYNOPSIS
[grace] [grace] DESCRIPTION
The command is part of the HP-UX system operation procedures. Its primary function is to terminate all currently running processes in an orderly and cautious manner. can be used to put the system in single-user mode for administrative purposes such as backup or file system consistency checks (see fsck(1M)), to halt or reboot the system, or to make the partition ready for reconfiguration. By default, is an interactive program. Options and Arguments recognizes the following options and arguments. Shut down the system and halt. Shut down the system and reboot automatically. Shut down the system to a ready-to-reconfigure state and reboot if possible. If the partition is unable to reboot, it will stop at a ready-to-reconfigure state. However, if the option is also speci- fied, the system will always stop at ready-to-reconfigure state. This option is available only on systems that support hardware partitions. Shut down the system to a ready-to-reconfigure state and do not reboot. This option can be used only in combination with the option. This option is available only on systems that support hard- ware partitions. Do not require any interactive responses from the user. (Respond or as appropriate to all questions, such that the user does not interact with the shutdown process.) When executed on the cluster in a diskless cluster environment, shutdown the only and do not reboot If this argument is not entered the default behav- ior is to reboot all when the is shutdown. grace Either a decimal integer that specifies the duration in seconds of a grace period for users to log off before the system shuts down, or the word The default is 60. If grace is either 0 or runs more quickly, giving users very little time to log out. If (reboot) or (halt) or (reconfigure) are not specified, and systems are placed in single-user state. Either (reboot) or (halt) must be specified for a shutdown to single-user state is not allowed for a See init(1M). If the optional bundle is installed on the system, the system reboot time may improve for the (reboot), the (halt), and the (reconfigure) options. Shutdown Procedure goes through the following steps: o The environment variable is reset to o The environment variable is reset to space, tab, newline. o The user is checked for authorization to execute the command. Only authorized users can execute the command. See for more information on the authorization file. o The current working directory is changed to the root directory o All file systems' super blocks are updated; see sync(1M). This must be done before rebooting the system to ensure file system integrity. o The real user ID is set to that of the superuser. o A broadcast message is sent to all users currently logged in on the system telling them to log out. The administrator can spec- ify a message at this time; otherwise, a standard warning message is displayed. o The next step depends on whether a system is a or a o If the system is is executed to shut down subsystems, unmount file systems, and perform other tasks to bring the system to run level 0. o If the system is a the optional argument is used to determine if all in the cluster should also be rebooted. The default behavior (command-line parameter is not entered) is to reboot all using entering results in the only being rebooted and the being left alone. Then is executed to shut down subsystems, unmount file systems, and perform other tasks to bring the system to run level 0. o If the system is a is executed to bring the system down to run-level 2, and then is executed. Shutdown to the single-user state is not an allowed option for o The system is rebooted, halted, or put in the ready-to-reconfigure state by executing if the or or option was chosen. If the system was not a cluster client and the system was being brought down to single-user state, a signal is sent to the process to change states (see init(1M)). DIAGNOSTICS
This is the most commonly encountered error diagnostic, and happens when a particular file system could not be unmounted; see mount(1M). User is not authorized to shut down the system. User and system must both be included in the authorization file EXAMPLES
Immediately reboot the system and run HP-UX again: Halt the system in 5 minutes (300 seconds) with no interactive questions and answers: Go to run-level in 10 minutes: Immediately shut down a partition so that it can be deleted: Reboot a partition in 5 minutes so that new cells that have been assigned to the partition become active: WARNINGS
The user name compared with the entry in the file is obtained using (see getpwent(3C)). The hostname in is compared with the hostname obtained using (see gethostent(3N)). must be executed from a directory on the root volume, such as the directory. The maximum broadcast message that can be sent is approximately 970 characters. When executing on an NFS diskless cluster server and the option is not entered, clients of the server will be rebooted. No clients should be individually rebooted or shutdown while the cluster is being shutdown. If the option is used in a virtual partition environment on a partitionable system, then the requested reconfiguration will not take place until all the virtual partitions on that hard partition are shut down and the virtual partition monitor is rebooted. FILES
Authorization file. The file contains lines that consist of a system host name and the login name of a user who is authorized to reboot or halt the system. A superuser's login name must be included in this file in order to execute However, if the file is missing or of zero length, the user can run the program to bring the system down. This file does not affect authorization to bring the system down to single-user state for maintenance purposes; that operation is permitted only when invoked by a superuser. A comment character, at the beginning of a line causes the rest of the line to be ignored (comments cannot span multiple lines without additional comment characters). Blank lines are also ignored. The wildcard character can be used in place of a host name or a user name to specify all hosts or all users, respectively (see hosts.equiv(4)). For example: SEE ALSO
fsck(1M), init(1M), killall(1M), mount(1M), reboot(1M), sync(1M), gethostent(3N), getpwent(3C), hosts.equiv(4). For more information about shutdowns and reboots on Superdome systems, see the manual, available on the web at shutdown(1M)
All times are GMT -4. The time now is 03:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy