Oct 17 2008

节能。。。

Category: 技术ssmax @ 14:26:15

今天刚搞好freeradius,向总又来说有东西要搞。。。节能。。。tmd老板这么多钱节约个头啊,要晚上把服务器休眠或者关机,然后早上用网卡wake on lan,tnnd这个东西不是每个网卡都支持的,而且网络环境不同,magic wake up的包未必能传送到目标机器啊,郁闷。

ethtool eth0 看看网卡支持什么模式
Supports Wake-on: g
Wake-on: d

一般就是g了,ethtool -s eth0 wol g
写在shutdown脚本或者其它地方,如果bios里面不改好的话好像每次都会改回来的。

wol p|u|m|b|a|g|s|d…
Set Wake-on-LAN options. Not all devices support this. The
argument to this option is a string of characters specifying
which options to enable.
p Wake on phy activity
u Wake on unicast messages
m Wake on multicast messages
b Wake on broadcast messages
a Wake on ARP
g Wake on MagicPacket(tm)
s Enable SecureOn(tm) password for MagicPacket(tm)
d Disable (wake on nothing). This option clears all previous
options.

3 Responses to “节能。。。”

  1. Jefrrey says:

    发现你很强,关于Sudo tty的问题就是从你这里查到的,谢谢。
    想问你个问题
    我想在apache运行php的时候运行abc用户的程序x.exe
    用 sudo -u abc x.exe为什么不行呢?看httpd.log提示说我没有权限
    这样是不是就可以运行用户abc的程序?
    我的sudo配置里有apache ALL=(ALL) NOPASSWD:ALL

  2. Comx says:

    我心情低落,快俾我锤两野

  3. ssmax says:

    to Jefrrey :
    你看看你的apache是用什么权限运行的,ps 就可以看一下,一般是daemon或者nobody,你的sudoers配置里面改成
    daemon ALL=NOPASSWD: ALL
    或者
    nobody ALL=NOPASSWD: ALL
    就好了,当然你最好在apache配置里面指定一个另外的用户吧,daemon这种用户很多程序都会用。

    to comx:
    你丫快还钱。

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.