• 软件测试技术
  • 软件测试博客
  • 软件测试视频
  • 开源软件测试技术
  • 软件测试论坛
  • 软件测试沙龙
  • 软件测试资料下载
  • 软件测试杂志
  • 软件测试人才招聘
    暂时没有公告

字号: | 推荐给好友 上一篇 | 下一篇

SUN服务器的自动当机及自动唤醒

发布: 2007-6-08 22:43 | 作者: seanhe | 来源: | 查看: 27次 | 进入软件测试论坛讨论

领测软件测试网
文件的要求是:每天晚上10点关机,第2天的8点开机,因为我不会用crontab命令,先谢谢了!!!因为老板要求每天关机,怕发火,因为公司发过一次火,所以要求关机

 wanahoo 回复于:2003-09-26 18:38:10
关机容易,开机用手动吧。

 gang5415 回复于:2003-09-26 18:45:00
开机需要手动档啊

 gang5415 回复于:2003-09-26 18:46:36
你如果是基于Intel的硬件,而且主板BIOS支持,那么开机还是可以自动化的。

 whitecat 回复于:2003-09-26 19:08:32
crontab -e增加一行
0 22 * * * shutdown
根据情况自已修改关机命令

开机不知道行不行

 whitecat 回复于:2003-09-26 19:09:26
crontab-操作每个用户的守护程序和该执行的时间表。  

部分参数说明  
crontab file [-u user]-用指定的文件替代目前的crontab。  
crontab-[-u user]-用标准输入替代目前的crontab.  
crontab-1[user]-列出用户目前的crontab.  
crontab-e[user]-编辑用户目前的crontab.  
crontab-d[user]-删除用户目前的crontab.  
crontab-c dir- 指定crontab的目录。  
crontab文件的格式:M H D m d cmd.  
M: 分钟(0-59)。  
H:小时(0-23)。  
D:天(1-31)。  
m: 月(1-12)。  
d: 一星期内的天(0~6,0为星期天)。  
cmd要运行的程序,程序被送入sh执行,这个shell只有USER,HOME,SHELL这三个环境变量。  
下面是一个例子文件:  
#MIN HOUR DAY MONTH DAYOFWEEK COMMAND  
#每天早上6点  
106* * * date  

#每两个小时  
0*/2* * * date  

#晚上11点到早上8点之间每两个小时,早上部点  
0 23-7/2,8* * * date  

#每个月的4号和每个礼拜的礼拜一到礼拜三的早上11点  
0 11 4* mon-wed date  

#1月份日早上4点  
0 4 1 jan* date  
范例  
lark:~>crontab-1 列出用户目前的crontab.  
#MIN HOUR DAY MONTH DAYOFWEEK COMMAND  
10 6* * * date  
0*/2* * * date  
0 23-7/2,8 * * * date

 xiongshoufen 回复于:2003-09-26 19:55:23
看来还是要问race了,好象我问的问题还没有回答不出的。

 lizhiqing 回复于:2003-09-27 10:23:13
关机了crontab还怎么运行啊。如果主板支持的话可以考虑网络唤醒。

 laoxia 回复于:2003-10-13 09:31:24
[b:e514e9279c]System AutoShutdown and AutoWakeup Controls[/b:e514e9279c]

You can use the Dtpower program to specify times for your system to shut down automatically. This feature is called AutoShutdown. If you have a sun4u desktop machine, you can also set your system to power on automatically at a specified time. This feature is called AutoWakeup.


--------------------------------------------------------------------------------

Note - Read "Choosing to Use Suspend-Resume" before you change the AutoShutdown settings.


--------------------------------------------------------------------------------

AutoShutdown uses the Suspend feature to automatically power off your system. When the system powers up again, the system resumes in the state in which the system was suspended.

Through the Dtpower window, you can activate or deactivate the AutoShutdown and AutoWakeup features. You can also specify the following values:

The number of minutes of idle time before AutoShutdown attempts to suspend the system

The start and finish times when AutoShutdown can occur during each day. If you specify the same time for both start and finish, AutoShutdown can occur at any time of day. See Figure 23-11.

The time of day when the system automatically powers on and resumes (AutoWakeup) after being suspended by AutoShutdown. This feature is only available on sun4u desktop systems.

Figure 23-11 AutoShutdown Configuration for All Day

[img:e514e9279c]http://proxy.unizar.es/sun_docs/C/solaris_9/SUNWabe/CDEUG/figures/autoshutallday.gif[/img:e514e9279c]

Note - AutoWakeup does not occur after you suspend a system manually. AutoWakeup can occur only after an AutoShutdown.


--------------------------------------------------------------------------------

To Set an Idle Time for AutoShutdown
Start Dtpower.


--------------------------------------------------------------------------------

Note - Consecutive executions of AutoShutdown do not occur less than five minutes apart, even if the idle time setting is under five minutes.


--------------------------------------------------------------------------------

In the Dtpower basic window, click More.

The window expands to show the Quick Edit tab.

In the Quick Edit tab, check Enable AutoShutdown.

Click Edit.

The AutoShutdown window is displayed.

Figure 23-12 AutoShutdown Window

[img:e514e9279c]http://proxy.unizar.es/sun_docs/C/solaris_9/SUNWabe/CDEUG/figures/autoshutdown.gif[/img:e514e9279c]

Enter the time you want the AutoShutdown feature to start to be active.

Enter the time you want the AutoShutdown feature to cease being active.

In the numerical box for Shutdown During This Interval If Idle for, enter the duration for which the computer must be idle before shutting down.

In Figure 23-12, the AutoShutdown occurs after 1 hour of idle time between the hours of 6:00 p.m. and 8:00 a.m.

Click OK when all the settings you want are displayed.

If you want to reject the displayed settings, select Cancel. The currently active settings are displayed in the window. 

To Disable AutoShutdown
Start Dtpower.

In the Dtpower basic window, click More.

The window expands to show the Quick Edit tab.

In the Quick Edit tab, uncheck Enable AutoShutdown.

Click OK.

 laoxia 回复于:2003-10-13 09:33:13
自动唤醒只有SUN4U才可实现

This is list of sun4u:

[url]http://sunsolve.sun.com/handbook_pub/Devices/Boot_PROM/BootPROM_Sun4u.html[/url]

 soway 回复于:2003-10-13 09:52:38
哈哈,厉害,不过机器从来都不关的
除非停电,那个时候还要ups哦

 xiongshoufen 回复于:2003-10-13 10:35:24
laoxia:

  我是菜鸟啊!,你还是写一个crontab文件给我把,磕头了!!

 laoxia 回复于:2003-10-13 10:42:00
跑dtpower, 进入图形界面不就完了

要跑CRONJOB,问题是的知道命令,我也不知道命令

告诉你的领导,叫一个服务器就不应当让它当机,省几个电钱还不如将来修机器

 houji 回复于:2003-10-13 11:12:18
是呀,服务器经常关机,不是要出问题吗。折腾几次坏个设备就知道了。

延伸阅读

文章来源于领测软件测试网 https://www.ltesting.net/


关于领测软件测试网 | 领测软件测试网合作伙伴 | 广告服务 | 投稿指南 | 联系我们 | 网站地图 | 友情链接
版权所有(C) 2003-2010 TestAge(领测软件测试网)|领测国际科技(北京)有限公司|软件测试工程师培训网 All Rights Reserved
北京市海淀区中关村南大街9号北京理工科技大厦1402室 京ICP备10010545号-5
技术支持和业务联系:info@testage.com.cn 电话:010-51297073

软件测试 | 领测国际ISTQBISTQB官网TMMiTMMi认证国际软件测试工程师认证领测软件测试网