需要安装这个:
http://smartmontools.sourceforge.net/
如果是centos直接运行yum install smartmontools -y就可以了
然后输入这个:
smartctl -A /dev/sda
如果不行用df看看硬盘名称,把sda换了即可
=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000f 083 063 044 Pre-fail Always – 204269687
3 Spin_Up_Time 0x0003 099 099 000 Pre-fail Always – 0
4 Start_Stop_Count 0x0032 100 100 020 Old_age Always – 18
5 Reallocated_Sector_Ct 0x0033 100 100 036 Pre-fail Always – 0
7 Seek_Error_Rate 0x000f 069 060 030 Pre-fail Always – 7825289
9 Power_On_Hours 0x0032 099 099 000 Old_age Always – 1626
10 Spin_Retry_Count 0x0013 100 100 097 Pre-fail Always – 0
12 Power_Cycle_Count 0x0032 100 037 020 Old_age Always – 18
184 Unknown_Attribute 0x0032 100 100 099 Old_age Always – 0
187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always – 0
188 Unknown_Attribute 0x0032 100 099 000 Old_age Always – 12
189 High_Fly_Writes 0x003a 100 100 000 Old_age Always – 0
190 Airflow_Temperature_Cel 0x0022 072 069 045 Old_age Always – 28 (Lifetime Min/Max 25/31)
194 Temperature_Celsius 0x0022 028 040 000 Old_age Always – 28 (0 22 0 0)
195 Hardware_ECC_Recovered 0x001a 050 047 000 Old_age Always – 204269687
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always – 0
198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline – 0
199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always – 0
其中Power_On_Hours就是硬盘使用小时了,如果是Power_On_Minutes就是硬盘使用分钟,例如:
9 Power_On_Minutes 0x0032 201 201 000 Old_age Always – 649h+23m
另外,不支持vps的,用vps的就别试了……
美国很多idc使用的收费和客服系统ubersmith
About Ubersmith
Founded in 2003 and based in Troy, NY, Ubersmith was the first to offer automated billing and monitoring of server usage to the IT infrastructure industry. The company offers the leading single-platform workflow solution that supports real-time billing of bandwidth and overage usage, alongside mission-critical features to automate device lifecycle management, customer relationship management (CRM), support and trouble ticket resolution, real-time performance monitoring, and advanced profitability evaluation and business reporting.
The latest release of its flagship product, Ubersmith DE, extends all of the platform’s workflow and operational benefits, which Ubersmith has been bringing to physical servers over the past seven years, to the world of virtualization, and enables a similar framework for cloud computing providers.
netbeans php cannot find java 1.5
安装了 java 6 ( jre6 – netbeans php 只需要 jre 就可以了,不需要 jdk) .运行 免安装的netbeans php。还是提示 Cannot find Java 1.5 or higher。
解决方法:打开NetBeans下的目录〈etc〉的netbeans.conf文件。找到下面这一行。
#netbeans_jdkhome="/path/to/jdk"
将它改为把#去掉,改为:netbeans_jdkhome="C:\Program Files\Java\jre6"
PHP使用msmtp代替sendmail发邮件
刚才在配置WP-DB-Backup时随手google了一下wordpress使用的是何种方式发的邮件,因为之前对这个不是很了解,大致看了下,也就是两种方法,一种是使用PHP的mail函数,透过本地SMTP发信,说这种办法怎么怎么麻烦,怎么怎么不适用个人的服务器。
原帖:http://lazyhack.net/php-use-msmtp-replace-sent-mail/
安装
多IP的问题,ip子网
如果你购买了66.96.198.48/28,那么你就有13个可以用的IP,是66.96.198.50-62。其中66.96.198.48作为网络,66.96.198.49作为网关,66.96.198.63作为广播,均不可用。
也就是说,你购买了一段IP,那么认66.96.198.48/28,最后一个IP是作为广播的,第一个是作为网络,第二个作为网关,总共3个IP不能使用。
子网掩码上面也给出示例了,如果你无法确认你的资料,可以到https://www.burst.net/SubnetCalc.php输入巴斯给你的类似于66.96.198.48/28这样的代码,巴斯就会给你自动计算出相关IP资料。
以网卡是venet0为例,那么就新建个range,比如,vi /etc/sysconfig/network-scripts/ifcfg-venet0-range0
然后service network restart重启网络,Over~~
不知道有没有错的地方请高手指正,谢谢~