已经被做成应用的fetionAPI
http://fetionapi.appspot.com
http://sms.api.bz/
比较准确的是: getconf LONG_BIT, 就可以在32/64位平台上得到正确的值。
也可以参考如下系统信息。
cd /proc
ls
cat version
cat cpuinfo
来源:http://www.cnitblog.com/201/archive/2006/08/03/14632.html
MySQL密码忘记后该怎么办
首先杀掉原有的mysqld进程.再启动一个跳过grant的mysqld服务
/path/to/mysql/bin/mysqld_safe --skip-grant --user=mysql &
然后直接登陆
/path/to/mysql/bin/mysql -uroot
登陆以后就可以设置密码了:
mysql> use mysql;
mysql> update user set password=password("new-password") where user="root";
mysql> flush privileges;
mysql> exit这时候再正常启动mysql就可以使用新的密码了。
取自”http://kb.discuz.net/index.php?title=MySQL%E9%81%97%E5%BF%98%E5%AF%86%E7%A0%81″
http://www.cnitblog.com/alsan/archive/2008/08/14/3507.html
在这个文件里
/etc/sysconfig/network
HOSTNAME=local.localdomain
临时更改可以运行hostname thename
文件REBOOTWHENLOADISHIGH的内容
SERVERLOAD=$(uptime|awk -F 'load average:' '{print $2}'|awk -F \. '{print $1}')
if [ $SERVERLOAD -gt 10 ]
then
echo "server load : $SERVERLOAD"
echo "the server is rebooting"
shutdown -r now
elif [ $SERVERLOAD -gt 2 ]
then
echo "server load : $SERVERLOAD"
fi
添加到crontab
crontab -e
发送到icest@qq.com
MAILTO="icest@qq.com"
* * * * * /root/REBOOTWHENLOADISHIGH
参考:
http://www.linuxquestions.org/questions/programming-9/check-server-load-with-bash-703464/
https://forums.misdivision.com/showthread.php?t=703
http://www.chinaunix.net/jh/7/575412.html