自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

韦编二绝

读书破万卷 下笔如有神

  • 博客(288)
  • 收藏
  • 关注

转载 linux异步IO编程实例分析

linux异步IO编程实例分析

2016-04-21 18:16:18 3237

转载 文章标题

電郵伺服器是如何工作 (How Mail Server Works)

2016-04-04 11:45:30 1000

转载 Check if you are behind a transparent proxy

文章出处:http://www.sajalkayan.com/check-if-you-are-behind-a-transparent-proxy.htmlMany Asian ISPs do not provide clean internet. They route all HTTP sessions thru atransparent proxy.Here is a

2015-07-20 12:23:38 1255

转载 Understanding load average vs. cpu usage

文章出处:http://stackoverflow.com/questions/21617500/understanding-load-average-vs-cpu-usageFirst, top does not calculate load average itself. It just readsload average from the /proc/loadavg

2015-06-19 19:16:00 848

转载 Linux上如何查看某个进程的线程

文章出处:https://linux.cn/article-5633-1.html问题: 我的程序在其内部创建并执行了多个线程,我怎样才能在该程序创建线程后监控其中单个线程?我想要看到带有它们名称的单个线程详细情况(如,CPU/内存使用率)。线程是现代操作系统上进行并行执行的一个流行的编程方面的抽象概念。当一个程序内有多个线程被叉分出用以执行多个流时,这些线程就会在它们

2015-06-18 19:24:49 3839

转载 在linux上使用交换文件扩展交换空间

文章出处:https://linux.cn/article-5654-1.html想像一种情景,当我们的Linux系统用尽交换空间时,在这种情况下,我们想要使用swap分区扩展交换空间,但在某些情况下磁盘上已经没有可用的空闲分区了,致使我们不能把它扩大。因此,在这种情况下,我们可以使用交换文件增加swap空间。以下是使用交换文件在Linux上扩展sw

2015-06-18 18:57:39 824

转载 nginx网络服务器上如何阻止特定用户代理(UA)

文章出处:http://linux.cn/article-5487-1.html问题: 我注意到有一些机器人经常访问我的nginx驱动的网站,并且进行一些攻击性的扫描,导致消耗掉了我的网络服务器的大量资源。我一直尝试着通过用户代理符串来阻挡这些机器人。我怎样才能在nginx网络服务器上阻挡掉特定的用户代理呢?现代互联网滋生了大量各种各样的恶意机器人和网络爬虫

2015-05-22 10:26:33 1706

转载 Nginx问题定位之监控进程异常退出

文章出处:http://blog.lifeibo.com/blog/2012/12/25/nginx-process-exit.htmlnginx在运行过程中是否稳定,是否有异常退出过?这里总结几项平时会用到的小技巧。1. 在error.log中查看是否有signal项,如果有,看看signal是多少。比如,这是一个异常退出的情况:$grep signa

2015-05-15 20:43:28 1436

转载 I/O重定向的原理和实现

文章出处:http://www.cnblogs.com/weidagang2046/p/io-redirection.html在Unix系统中,每个进程都有STDIN、STDOUT和STDERR这3种标准I/O,它们是程序最通用的输入输出方式。几乎所有语言都有相应的标准I/O函数,比如,C语言可以通过scanf从终端输入字符,通过printf向终端输出字符。熟悉Shell的朋友

2015-03-29 15:51:16 4970

转载 Resident and Virtual memory on Linux: A short example

文章出处:http://www.darkcoding.net/software/resident-and-virtual-memory-on-linux-a-short-example/Tools like top show processes using two kinds of memory:Resident memory, labelled RES: How much

2015-02-01 16:14:49 868

转载 使用 nice、cpulimit 和 cgroups 限制 cpu 占用率

文章出处:http://www.linux.cn/article-4742-1.htmlLinux内核是一名了不起的马戏表演者,它在进程和系统资源间小心地玩着杂耍,并保持系统的正常运转。 同时,内核也很公正:它将资源公平地分配给各个进程。但是,如果你需要给一个重要进程提高优先级时,该怎么做呢? 或者是,如何降低一个进程的优先级? 又或者,如何限制一组进程所使用的

2015-01-26 18:45:53 2209

转载 popen和pclose

文章出处:http://coderworm.com/unix/2013/12/16/unix-process-communicate-b.html上边介绍了unix进程通信的其中一个方式:pipe, 不过如果直接使用原生的函数的话,需要我们自己去fork进程,关闭管道的不使用端等等。这里,介绍标准I/O库提供的两个函数:FILE* popen(const char *cmdst

2015-01-24 20:10:23 3132

转载 为什么寄存器比内存快?

文章出处:http://www.ruanyifeng.com/blog/2013/10/register.html计算机的存储层次(memory hierarchy)之中,寄存器(register)最快,内存其次,最慢的是硬盘。同样都是晶体管存储设备,为什么寄存器比内存快呢?Mike Ash写了一篇很好的解释,非常通俗地回答了这个问题,有助于加深对硬件的理解。下面就是我

2015-01-24 17:45:10 586

转载 聊聊多线程程序的load balance

文章出处:http://www.searchtb.com/2014/11/%E8%81%8A%E8%81%8A%E5%A4%9A%E7%BA%BF%E7%A8%8B%E7%A8%8B%E5%BA%8F%E7%9A%84load-balance.html说起load balance,一般比较容易想到的是大型服务在多个replica之间的load balance、和kernel的l

2015-01-24 16:50:31 1359

转载 10 examples to help you understand top command usage in Unix/Linux

文章出处:http://www.golinuxhub.com/2014/03/8-examples-to-help-you-understand-top.htmltop is one of my favorite tool for monitoring system usage and also to make any change for improving system perfo

2015-01-17 19:46:21 1216

转载 Thrift的安装和简单示例

文章出处:http://www.open-open.com/lib/view/open1400460273402.html本文只是简单的讲解Thrift开源框架的安装和简单使用示例,对于详细的讲解,后面在进行阐述。Thrift简述                                                                       

2015-01-17 17:40:47 705

转载 daemon reparented / init --user

文章出处:https://www.osso.nl/blog/daemon-reparented-init-user/While I was battling an obscure Ubuntu shutdown issue — more about that later — I noticed that daemonized jobs started from my X sessi

2015-01-17 16:31:30 1353

转载 Daemonizing and Upstart

文章出处:https://blog.nekoconeko.nl/blog/2014/11/12/daemonizing-and-upstart.htmlWhen creating command-line applications, the user is usually present at the terminal to provide commands to the appl

2015-01-17 15:19:10 970

转载 在VMware和iSCSI阵列上关闭延迟确认

文章出处:http://www.360doc.com/content/15/0115/11/21412_441002570.shtml#有网友发给我一篇关于VMware的文章,说怎么都读不明白。我一开始还不以为然,没想到读了一半就想拍案叫绝——表面看来平淡无奇,但内在隐含的技术细节太妙了!要是早一点看到它,一定会收录到拙作《Wireshark网络分析就这么简单》的第三部分。

2015-01-16 20:23:00 2532

转载 Advanced Linux System Statistics and Diagnostics with SystemTap

文章出处:http://bencane.com/2012/08/20/advanced-linux-system-statistics-and-diagnostics-with-systemtap/In one of the first posts of this blog I covered some basic SystemTap functionality from an e

2015-01-12 20:08:40 786

转载 xargs: Build and Execute Commands with Arguments from Standard Input

文章出处:http://bencane.com/2012/08/13/xargs-build-and-execute-commands-with-arguments-from-standard-input/For me when it comes to useful commands xargs ranks along side commands like find, top an

2015-01-12 19:55:45 818

转载 Argument list too long

文章出处:http://bencane.com/2011/07/13/argument-list-too-long/If you've been an administrator for long enough eventually you will have run into an issue like so.[bcane@bcane toomany]$ rm * bas

2015-01-12 19:30:53 1028

转载 Troubleshooting High I/O Wait in Linux --- A walkthrough on how to find processes that are causing h

文章出处:http://bencane.com/2012/08/06/troubleshooting-high-io-wait-in-linux/Linux has many tools available for troubleshooting some are easy to use, some are more advanced.I/O Wait is an issu

2015-01-12 18:26:21 953

转载 使用iptables抵抗常见攻击

文章出处:http://drops.wooyun.org/tips/1424#yjs_add_arg=658711.  防止syn攻击思路一:限制syn的请求速度(这个方式需要调节一个合理的速度值,不然会影响正常用户的请求)iptables -N syn-flood iptables -A INPUT -p tcp --syn -j syn-flood iptabl

2015-01-10 17:14:00 6803

转载 SSL handshake latency and HTTPS optimizations.

文章出处:http://www.semicomplete.com/blog/geekery/ssl-latency.htmlAt work today, I started investigating the latency differences for similarrequests between HTTP and HTTPS. Historically, I was run

2015-01-10 14:58:00 967

转载 linux使用denyhosts防ssh暴力破解

文章出处:http://coolnull.com/2068.html说明:DenyHosts是Python语言写的一个程序,它会分析sshd的日志文件(默认是/var/log/secure),当发现重复的攻击时就会记录IP到/etc/hosts.deny文件,启用tcp_wrappers,从而达到自动屏IP的功能。 通过http://denyhosts.sourceforg

2014-12-31 11:28:38 2209

转载 linux下shell脚本防ssh暴力破解

文章出处:http://coolnull.com/2059.html说明:本篇实现shell统计访问失败的IP和次数,从而根据这些再通过防火墙规则来限制这些IP再次暴破,脚本如下:实现:1.编写shell脚本# cat /root/ssh_failed.sh //内容如下#!/bin/shSCANIP=`grep "Failed" /var/log/secur

2014-12-30 20:27:24 2584

转载 一个多线程程序挂起问题解决

文章出处:http://www.dbafree.net/?p=1128N个线程,做同样的事,跑的一直好好的,突然某个线程就挂住了。于是使用 ps -eLf|grep name查看了线程相关的PID,并对其进行了strace.如下:$ strace -p 13251 Process 13251 attached - interrupt to quit futex(0x1fcc

2014-12-26 18:18:28 9547

转载 浅谈时间函数gettimeofday的成本

文章出处:http://blog.csdn.net/russell_tao/article/details/7185588

2014-11-03 17:33:10 706

转载 C++11 新特性:Lambda 表达式

文章出处:http://www.devbean.net/2012/05/cpp11-lambda/擦

2014-10-23 18:21:10 647

转载 Queueing in the Linux Network Stack

文章出处:http://www.coverfire.com/articles/queueing-in-the-linux-network-stack/

2014-08-30 19:42:22 2777

转载 SO_DONTROUTE和SO_BINDTODEVICE的深层次分析

文章出处:http://blog.csdn.net/dog250/article/details/5814023

2014-08-27 18:42:37 3364

转载 当无知的记者面对万恶的运营商——100M带宽被缩水了么?

文章出处:http://www.guokr.com/blog/770117/

2014-08-16 17:44:21 1952

转载 关于 tun/tap 设备

文章出处:http://wangcong.org/blog/archives/1679长期以来对tun和tap这对兄弟分不太清,今天下定决心研究了一下代码,总算是搞明白了。首先它们都是从/dev/net/tun里ioctl出来的虚拟设备,一个是通过IFF_TUN,另一个是 IFF_TAP。最好的例子莫过于vpnc里面的代码了。

2014-08-16 17:30:45 1060

转载 TCP的那些事儿(上)

文章出处:http://coolshell.cn/articles/11564.html    TCP是一个巨复杂的协议,因为他要解决很多问题,而这些问题又带出了很多子问题和阴暗面。所以学习

2014-06-01 11:49:59 3711

转载 SkipList跳表

文章出处:http://blog.csdn.net/likun_tech/article/details/7354306

2014-05-30 19:05:23 584

转载 高性能网络编程 之 TCP连接的内存使用

文章出处:http://taohui.org.cn/tcpperf7.html

2014-05-26 21:08:51 1091

转载 Linux内核调度算法

文章出处:http://www.uml.org.cn/embeded/201203024.asp

2014-05-23 11:38:40 887

转载 数学常数e的含义

文章出处:http://www.ruanyifeng.com/blog/2011/07/mathematical_constant_e.html

2014-05-08 12:19:21 785

转载 UNIX Load Average Part 1: How It Works

文章来源: 网络

2014-05-06 19:37:48 1277

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除