Autoshutdown in Solaris


 
Thread Tools Search this Thread
Operating Systems Solaris Autoshutdown in Solaris
# 1  
Old 12-14-2011
Power Autoshutdown in Solaris

Hi

I want to make a auto shutdown program which will shutdown my sun solaris machine automatically after two days.

Please help me out in this. I dont have a GUI. Want to do it through command prompt.

Regards
Guru
# 2  
Old 12-14-2011
Never used it, but see if you can use a at job for this
# 3  
Old 12-14-2011
We don't know your system, or what version of Solaris you have, or what Shell you (or your cron) uses.
Please post what you normally type when you shut your system down.
# 4  
Old 12-19-2011
Auto shutdown: my system details

hi

I am using BASH. I used to do halt for shutdown manually.

Machine: Solaris v250, OS: Solaris 10

Regards
Guru
# 5  
Old 12-19-2011
Don't use halt but "init 5", as the former doesn't properly stop services. To shutdown your machine after two days, simply run this command as root:
Code:
echo init 5 | at now +2 days

If you want this to be down two days after each reboot, put this single line in /etc/rc3.d/S99autoshutdown

If you change your mind, use
Code:
at -r <job-id>

to remove the job from the scheduled one.

Last edited by jlliagre; 12-19-2011 at 06:36 PM.. Reason: Bad bug ...
# 6  
Old 12-19-2011
Shouldn't that be
Code:
echo init 5 | at now +2 days


??
This User Gave Thanks to hergp For This Post:
# 7  
Old 12-19-2011
Definitely ... Smilie
Reply corrected.
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. Solaris

Patching Procedure in Solaris 10 with sun cluster having Solaris zone

Hi Gurus I am not able to find the patching procedure for solaris 10 ( sol10 u11) to latest patchset with sun cluster having failover zones so that same I should follow. Take an instance, there are sol1 and sol2 nodes and having two failover zones like sozone1-rg and sozone2-rg and currently... (1 Reply)
Discussion started by: nick101
1 Replies

2. Solaris

Solaris ssh client hangs when connecting to another Solaris machine

Got a strange problem. I have 4 Solaris servers all configured the same, Solaris 10 x86 update 10. When I try to ssh from one Solaris 10 server to another server ssh hangs. I have an identical server and when I try this everything works fine. The weird thing is if I am root on the server... (1 Reply)
Discussion started by: ccj4467
1 Replies

3. Solaris

dual boot solaris/solaris zfs file system

Hi, I am running into a some problems creating a dual boot system of 2 solaris instances using ZFS file system and I was wondering if someone can help me out. First some back ground. I have been asked to change the file system of our server from UFS to ZFS. Currently we are using Solaris... (3 Replies)
Discussion started by: estammis
3 Replies

4. Solaris

Unable to login using ssh,telnet onto my solaris machine with solaris 10 installed

Hi, I am unable to login into my terminal hosting Solaris 10 and get the below error message "Server refused to allocate pty ld.so.1: sh: fatal: libc.so.1: open failed: No such file or directory " Is there anyways i can get into my machine and what kind of changes are required to be... (7 Replies)
Discussion started by: sankasu
7 Replies

5. Solaris

application compiled on solaris 10 throwing error when executed on solaris 9

I have compiled my application on Solaris 10 with following description SunOS ldg1 5.10 Generic_138888-03 sun4v sparc SUNW,Sun-Blade-T6320 The compiler is Sun C++ 5.9 SunOS_sparc Patch 124863-01 2007/07/25 But when installing the application on Solaris 9 SunOS odcarch02 5.9... (2 Replies)
Discussion started by: ash_bit2k2
2 Replies
Login or Register to Ask a Question