分类:linux日期:2013-05-31 - 22:18:27评论:13条作者:老谢
正常我的VPS内存使用在220MB左右,由于一次折腾导致VPS重启后发现内存一直在330M左右,虽然我768MB的内存完全足够,但是对于一个有点小洁癖的人来说,无法忍受。。于是乎检查之。。。
[root@www ~]# ps -A --sort -rss -o comm,pmem,pcpu |uniq -c |head -15
1 COMMAND %MEM %CPU
1 clamd 12.6 0.0
1 httpd 4.2 0.1
1 httpd 4.1 0.1
1 iscsiuio 4.1 0.0
1 httpd 4.1 0.2
1 httpd 4.0 0.1
1 httpd 3.9 0.1
1 httpd 3.8 0.1
1 httpd 3.8 0.4
1 httpd 1.4 0.1
1 httpd 1.1 0.0
1 httpd 1.0 0.2
1 mysqld 1.0 1.4
1 httpd 0.8 0.0 |
[root@www ~]# ps -A --sort -rss -o comm,pmem,pcpu |uniq -c |head -15
1 COMMAND %MEM %CPU
1 clamd 12.6 0.0
1 httpd 4.2 0.1
1 httpd 4.1 0.1
1 iscsiuio 4.1 0.0
1 httpd 4.1 0.2
1 httpd 4.0 0.1
1 httpd 3.9 0.1
1 httpd 3.8 0.1
1 httpd 3.8 0.4
1 httpd 1.4 0.1
1 httpd 1.1 0.0
1 httpd 1.0 0.2
1 mysqld 1.0 1.4
1 httpd 0.8 0.0
clamd居然吃了12.6%的内存,猛然想起来这货是我装的一个杀软…卸载后完事….
接着还有iscsiuio这个东西,至于这是什么。。老谢也不知道。。man了一下,描述如下:
DESCRIPTION
iscsiuio is the UserSpace I/O driver for the Broadcom NetXtreme II BCM5706/5708/5709 series PCI/PCI-X Gigabit
Ethernet Network Interface Card (NIC) and for the Broadcom NetXtreme II BCM57710/57711/57712/57800/57810/57840
series PCI-E 10 Gigabit Ethernet Network Interface Card. The driver has been tested on 2.6.28 kernels and
above.
Refer to the README.TXT from the driver package on how to compile and install the driver.
Refer to various Linux documentations on how to configure network protocol and address.
没看懂啥意思,反正国内外论坛都搜了,说是可以关闭,不对系统造成影响,既然如此就关掉好了
chkconfig iscsi off
chkconfig iscsid off
service iscsid stop |
chkconfig iscsi off
chkconfig iscsid off
service iscsid stop
接着…..世界终于爽了………
[root@www ~]# vmstat -S M
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 0 0 548 0 69 0 0 22 10 0 161 4 0 87 9 0
[root@www ~]# free -m
total used free shared buffers cached
Mem: 768 219 548 0 0 68
-/+ buffers/cache: 150 617
Swap: 0 0 0 |
[root@www ~]# vmstat -S M
procs -----------memory---------- ---swap-- -----io---- --system-- -----cpu------
r b swpd free buff cache si so bi bo in cs us sy id wa st
0 0 0 548 0 69 0 0 22 10 0 161 4 0 87 9 0
[root@www ~]# free -m
total used free shared buffers cached
Mem: 768 219 548 0 0 68
-/+ buffers/cache: 150 617
Swap: 0 0 0
PS:服务商一定喜欢我酱紫的客户….Orz
分类:乱七八糟日期:2013-05-27 - 22:39:05评论:10条作者:老谢
经过一番挣扎,最终决定购买美利达550山地车,本来是打算购买捷安特ATX777,但是由于价格有点高,烧不起,于是乎在某客服忽悠下,选中了美利达550
配置为24速 M395油压碟刹 车子在配送中 到手后会发详细的实拍图 先发个网络图片YY一下
最终买了美利达公爵500!下面是实物图,2013-06-09拍摄

继续阅读…
分类:吐槽日期:2013-05-26 - 0:43:34评论:4条作者:老谢
2013-05-26 00:38 就在敲这篇水文标题的这一刻外面雨下大了
本来敲了一大堆废话,结果全部删掉了,就吐槽这么一句吧,好了,晚安
分类:网站技术日期:2013-05-25 - 14:40:40评论:4条作者:老谢
想在页脚加上服务器的uptime,于是乎搜相关php代码,用exec函数可以很轻松搞定,但是为了安全,该函数早在配置vps环境后就被我在php.ini里面禁用了,经过一番搜索,找到下面一段代码,希望对大家有用
调用:

<?php
function sys_linux()
{
if (false === ($str = @file("/proc/uptime"))) return false;
$str = explode(" ", implode("", $str));
$str = trim($str[0]);
$min = $str / 60;
$hours = $min / 60;
$days = floor($hours / 24);
$hours = floor($hours - ($days * 24));
$min = floor($min - ($days * 60 * 24) - ($hours * 60));
if ($days !== 0) $res['uptime'] = $days."天";
if ($hours !== 0) $res['uptime'] .= $hours."小时";
$res['uptime'] .= $min."分钟";
return$res;
}
$sysInfo = sys_linux();
$uptime = $sysInfo['uptime'];
echo$uptime;
?>
源码源于:http://www.linuxidc.com/Linux/2012-12/75977.htm |
<?php
function sys_linux()
{
if (false === ($str = @file("/proc/uptime"))) return false;
$str = explode(" ", implode("", $str));
$str = trim($str[0]);
$min = $str / 60;
$hours = $min / 60;
$days = floor($hours / 24);
$hours = floor($hours - ($days * 24));
$min = floor($min - ($days * 60 * 24) - ($hours * 60));
if ($days !== 0) $res['uptime'] = $days."天";
if ($hours !== 0) $res['uptime'] .= $hours."小时";
$res['uptime'] .= $min."分钟";
return$res;
}
$sysInfo = sys_linux();
$uptime = $sysInfo['uptime'];
echo$uptime;
?>
源码源于:http://www.linuxidc.com/Linux/2012-12/75977.htm
分类:折腾日期:2013-04-24 - 10:11:31评论:5条作者:老谢
为了方便统计文章的阅读数所以安装了WP-PostViews插件,为了节约资源占用安装了WP Super Cache插件,但是安装WP Super Cache会导致WP-PostViews不计数的一个问题,发现这个问题已久,但是因为感觉影响不大就一直懒得解决,但是新发的帖子一晚上阅读数还是0让我看着默默蛋疼,于是乎决定解决这个问题,当然直祭出谷歌大神,很轻松找到解决方案,老谢所使用的解决方案如下:
编辑wp-postviews.php,找到下面的代码:
if(defined(’WP_CACHE’) && WP_CACHE) |
if(defined(’WP_CACHE’) && WP_CACHE)
修改为:
if((defined(’WP_CACHE’) && WP_CACHE) || (defined(’COSMETA’) && COSMETA)) |
if((defined(’WP_CACHE’) && WP_CACHE) || (defined(’COSMETA’) && COSMETA))

本文参考链接:http://www.libertystudio.net/wordpress/wp-super-cache-and-wp-postviews-conflict-resolution.html
分类:吐槽日期:2013-04-23 - 18:13:33评论:13条作者:老谢
上周报了驾校,本周末考理论,求过!!(120页的题库,至目前止只看了20页。。。Orz..)
考完理论就可以学车了,跟教练交流后得知6个月内能拿到照就不错了,考试人太多,得排队,我瞬间无奈了(天朝人就是多……多……)。。
接着近期打算开始录制《独立博客建站教程》,由于问怎么做独立博客的人太多,一个一个回答也麻烦,于是乎打算一劳永逸,做一套教程,教程目前想法是免费公开,另外由于找不到专业学播音主持专业的朋友来录配音,于是乎老谢决定要自己来了。。
老谢也从来木有做过视频,所以可见这次视频教程会制作的非常非常艰辛并漫长。。。
另外最后推荐个妹纸的博客:http://clorain.com/
分类:吐槽日期:2013-04-11 - 13:29:25评论:20条作者:老谢
上阵子免费翻倍流量就算了,现在又免费翻倍内存。。啥时候翻倍硬盘呢。。。
[root@cookvps ~]# free -m
total used free shared buffers cached
Mem: 1000 749 251 0 32 516
-/+ buffers/cache: 200 800
Swap: 255 0 255 |
[root@cookvps ~]# free -m
total used free shared buffers cached
Mem: 1000 749 251 0 32 516
-/+ buffers/cache: 200 800
Swap: 255 0 255
分类:吐槽日期:2013-04-03 - 21:15:48评论:22条作者:老谢
http://laoxiehost.com/域名闲置太久,403页面又略丑,然后布吉岛挂什么内容,正巧看到老罗锤子rom的官网够个性,于是乎模仿一把,恩恩,关于标题的前半部分说完了,下面是后半广告部分。
下面是广告
http://ershou.taobao.com/item.htm?spm=0.0.0.0.Kk6ZYK&id=17832953523
3000元出售Thinkpad T410,I5-540M/8G/无HD/NVS3100 256M独显/指纹/蓝牙 电池损耗48% 送光驱硬盘托架
最新评论
秦大叔:现在都是够用就好,不想太折腾了。
Andy烧麦:X1C 5th 2017年-2022年,走南闯北...
王叨叨:自从换了typecho,博客也不怎么出问...
王叨叨:我准备给我的老笔记本搞一个linux系...
大D:台式机现在只能是AMD YES!
springwood:查询了一下,ThinkPad x1c 9th ...
黑石:特斯拉和小米,选哪个?不是很懂车,就...
Huo:电车的确开着舒服,也是纠结想换电车,...
zwwooooo:类似以前做网站开发时,一开始有自...
老陳网志:有点高端,像我们整点nas玩玩就够...