上一页 1 ··· 5 6 7 8 9 10 11 12 下一页

[development][C][thread_local] 线程全局变量

摘要: 线程全局变量, 线程本地存储, thread_local storage 只需要在变量定义的最前边添加 __thread 关键字. 用法: https://gcc.gnu.org/onlinedocs/gcc-3.4.1/gcc/Thread-Local.html 原理: http://docs.o 阅读全文
posted @ 2017-10-17 16:34 toong 阅读(429) 评论(0) 推荐(0) 编辑

[development][C] C语言标准

摘要: GUN C的标准文档: 也就是glibc https://www.gnu.org/software/libc/ http://man7.org/linux/man-pages/dir_section_3.html POSIX C 的标准文档: http://pubs.opengroup.org/on 阅读全文
posted @ 2017-10-16 13:37 toong 阅读(191) 评论(0) 推荐(0) 编辑

[daily][centos][nginx] 在centos7使用nginx启用对文件目录的http访问

摘要: 1. 安装nginx 2. 修改配置 2.1 提供目录权限: 我需要访问的目录是 /home/data, 用户是data, 所以修改如下配置: 否则会出现这样的错误: 2.2 创建新的配置, 在/etc/nginx/conf.d/目录下, 这个目录下的配置, 会被配置文件/etc/nginx/ngi 阅读全文
posted @ 2017-10-13 17:24 toong 阅读(531) 评论(0) 推荐(0) 编辑

[daily][centos][iptables][firewalld] firewalld的初步了解

摘要: CentOS7中默认使用firewalld代替了iptables . 接下来将对firewalld, 做一些初步的了解. 首先读一下, redhat的文档: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/ 阅读全文
posted @ 2017-10-13 16:33 toong 阅读(197) 评论(0) 推荐(0) 编辑

[development][dpdk] dpdk与CONFIG_RTE_MAX_MEMSEG有关的错误

摘要: dpdk程序无法启动, 错误如下: 因为内存的碎片化比较严重,或内存占用比较多. 重启后可以正常启动. http://dpdk.org/ml/archives/dev/2015-March/015079.html 阅读全文
posted @ 2017-10-12 15:35 toong 阅读(687) 评论(0) 推荐(0) 编辑

[daily][pcaman] pacman滚动升级跳过指定包

摘要: 有时候有些包是坏的, 我们在Syu的时候,想把它跳过去. 可以在pacman.conf 中使用如下选项: https://wiki.archlinux.org/index.php/Pacman#Skip_package_from_being_upgraded 然后, 无论pacman还是yaourt 阅读全文
posted @ 2017-10-12 11:06 toong 阅读(776) 评论(0) 推荐(0) 编辑

[development][libconfig] 配置文件库

摘要: 以前,一直用ini的配置文件. 简单清晰但是不灵活. 换一个: 试试libconfig 主页: http://www.hyperrealm.com/oss_libconfig.shtml github 上最新版本是1.6, 但是1.5和1.6在centos7上编译的时候都依赖automake 1-1 阅读全文
posted @ 2017-10-10 16:59 toong 阅读(1026) 评论(0) 推荐(0) 编辑

[daily][centos] redhat增加扩展仓库

摘要: https://rpmfusion.org/Configuration 阅读全文
posted @ 2017-10-10 14:16 toong 阅读(144) 评论(0) 推荐(0) 编辑

[daily][ulimit][coredump] coredump文件为啥没了

摘要: http://www.cnblogs.com/hugetong/p/6898608.html 一个程序挂掉了, 怎么办? 启动coredump 写一个脚本: [root@T185 ~]# cat /etc/a.sh ulimit -c 204800 cd /data/coredump/ /root/ 阅读全文
posted @ 2017-09-28 11:48 toong 阅读(1167) 评论(0) 推荐(0) 编辑

[daily][dpdk] 内核模块(网卡驱动)无法卸载

摘要: 由于程序的异常退出, 内核的引用计数没有被清除(我猜的). 所以驱动不能被卸载掉, 强制也不行. 如下: 因为 -f 参数实际上是没有起作用的. 可以修改内存参数使其其作用, 这样就能强制卸载了. 这个参数的名字是: 不过需要重新编译内核才行. 阅读全文
posted @ 2017-09-28 11:36 toong 阅读(1779) 评论(0) 推荐(0) 编辑

[development][tcp/ip][ids] 一个简单有参考价值的库 libnids

摘要: libhtp 中的例子, 可以通过libnids快速使用. 或者可以快速的写个sniffer. 支持三个功能 ip分片重组, tcp乱序重排, 端口扫描发现. 工程: https://github.com/MITRECND/libnids 例子: http://libnids.sourceforge 阅读全文
posted @ 2017-09-22 15:04 toong 阅读(364) 评论(0) 推荐(0) 编辑

[development][http][libhtp] suricata的http库--libhtp

摘要: 首先,从文档来看, 它支持管道化的http, 也可以说过于重量级. 其次, 还没有达到产品化的稳定性. 并不是完全对应我的需求, http模块是一个整体性能相关模块. 应该按需定制更合理. 但是,功能满足, 适合快速产品化. 文档: https://github.com/OISF/libhtp/bl 阅读全文
posted @ 2017-09-22 09:52 toong 阅读(848) 评论(0) 推荐(0) 编辑

[skill][http] http管道化连接

摘要: 已知http的请求响应是一对一的. 就是一个请求跟着接下来的响应便是与之配对了. 而另一种方式, 可以依靠顺序, 即发送多个http请求, 然后返回对个http响应. 严格按照顺序将他们对应起来, 称为管道化链接. 但是由于有很多问题, 支持的都不好. 实际应用应该也是比较少的. 转发一篇如下: 原 阅读全文
posted @ 2017-09-21 19:15 toong 阅读(3261) 评论(0) 推荐(0) 编辑

[skill][telnet] 用telnet获取一个网页

摘要: 一直也搞不懂, telnet到底是干嘛用的. 然而, 它可以得到一个网页. 阅读全文
posted @ 2017-09-21 17:47 toong 阅读(194) 评论(0) 推荐(0) 编辑

[daily][grub2] grub2修改内核选项

摘要: 以前, 我们就直接去修改 /boot/grub/grub.cfg 文件了. 其实这并不正确. 正确的做法是: 1. 修改 /etc/default/grub 文件. 2. 使用命令成配置 阅读全文
posted @ 2017-09-18 11:42 toong 阅读(364) 评论(0) 推荐(0) 编辑

[knowledge] big data things

摘要: http://hadoop.apache.org/ https://spark.apache.org/ https://nifi.apache.org/ https://www.cloudera.com/products/open-source/apache-hadoop/key-cdh-compo 阅读全文
posted @ 2017-08-24 15:22 toong 阅读(96) 评论(0) 推荐(0) 编辑

[knowledge][dpdk] open data plane

摘要: https://www.opendataplane.org/ https://en.wikipedia.org/wiki/OpenDataPlane odp vs dpdk: http://dpdk.org/ml/archives/dev/2015-December/029373.html 阅读全文
posted @ 2017-08-23 13:49 toong 阅读(238) 评论(0) 推荐(0) 编辑

[daily] docker

摘要: what docker is? https://www.docker.com/what-docker 一: archlinux 安装docker: 我之前装了一个, 然后好久没用, 今天发现不能用了, 启动不了. 于是重装: 1. pacman -Rsun docker 2. rm -rf /var 阅读全文
posted @ 2017-08-21 17:00 toong 阅读(360) 评论(0) 推荐(0) 编辑

[knowledge] 停止等待协议

摘要: 再读TCP/IP详解 说到流量控制, 可能便涉及了两方面 1. 停止等待协议. https://baike.baidu.com/item/%E5%81%9C%E6%AD%A2%E7%AD%89%E5%BE%85%E5%8D%8F%E8%AE%AE 2. 滑动窗口协议 阅读全文
posted @ 2017-08-21 11:06 toong 阅读(204) 评论(0) 推荐(0) 编辑

[skill][vim] 常用技巧与配置

摘要: 一: 光标行列高亮 可以使用 :help highlight 查看相信帮助可颜色配置. 阅读全文
posted @ 2017-08-16 10:09 toong 阅读(146) 评论(0) 推荐(0) 编辑

[skill][graphviz] 到底用什么画图: graphviz/inkscape/yed

摘要: 官方教程文档:http://www.graphviz.org/pdf/dotguide.pdf 一:在文档里抄一个简单的例子 /home/tong/Src/copyright/onescorpion/chimpanzee/doc [git::master *] [tong@T7] [15:36] > 阅读全文
posted @ 2017-08-08 15:40 toong 阅读(404) 评论(0) 推荐(0) 编辑

[development][profile][dpdk] KK程序性能调优

摘要: KK程序: 1. 两个线程,第一个从DPDK收包,通过一个ring数据传递给第二个线程。第二个线程将数据写入共享内存。 2. 第二个内存在发现共享内存已满时,会直接丢弃数据。 3. 线程二有个选项debug,用于每一次ring_dequeue之后,都将数据写入内存。 当这个选项为on时,内存未满,也 阅读全文
posted @ 2017-07-28 18:01 toong 阅读(626) 评论(0) 推荐(0) 编辑

[troubleshoot][automake] automake编译的时候发生死循环

摘要: 在某台特有设备上,编译dssl工程时,竟然发生了死循环。 https://github.com/tony-caotong/libdssl 错误日志如下: checking zlib.h presence... yes checking for zlib.h... yes checking opens 阅读全文
posted @ 2017-07-25 18:19 toong 阅读(743) 评论(0) 推荐(0) 编辑

[development][vim] vim显示空白字符

摘要: 1. 作为一个严谨的程序员,你必须关心你敲下过的没一个字符。其中包括空白字符。 2. 有时候你需要review别人的代码,对于哪些肆意使用tab,space,enter的人。你怎么发现那些被他们留下的乱七八糟的字符。 我们使用vim 带着这样的配置: https://gist.github.com/ 阅读全文
posted @ 2017-07-25 13:56 toong 阅读(524) 评论(0) 推荐(0) 编辑

[troubleshoot][daily][redhat] 设备反复重启故障排查

摘要: 一台服务器设备,反复重启,每天重启数次。 一: 原因分析及初步排异。 1. 硬件,内存主板,一一更换,甚至除了硬盘将整台机器都换掉了,依然重启。 2. 排除电源问题,换了电源线,换了插座,还是重启。 3. 那么接下来,还有三种可能: A。内核问题,内核crash。(redhat的稳定性还是十分让人信 阅读全文
posted @ 2017-07-25 10:07 toong 阅读(2546) 评论(0) 推荐(0) 编辑

[development][lockless][dpdk] 无锁队列

摘要: dpdk: http://dpdk.org/doc/guides/prog_guide/ring_lib.html#ring-library linux: https://lwn.net/Articles/340400/ https://lwn.net/Articles/340443/ freeBS 阅读全文
posted @ 2017-07-20 18:44 toong 阅读(353) 评论(0) 推荐(0) 编辑

[development][dpdk][pktgen] 网卡收发包性能测试-详细数据

摘要: 三层包测试 发包方式: 192.168.20.205 发包工具: pktgen 发包网卡: i350 收包设备: 1922.168.20.185 CPU: Intel(R) Xeon(R) CPU E5 2620 0 @ 2.00GHz 收包方式: 网卡ixgeb驱动,~~单队列,~~promisc 阅读全文
posted @ 2017-07-06 15:55 toong 阅读(6888) 评论(0) 推荐(0) 编辑

[developmemt][dpdk] dpdk优化(转)

摘要: 转发:https://software.intel.com/en-us/articles/dpdk-performance-optimization-guidelines-white-paper 转发:http://zhaozhanxu.com/2016/08/09/DPDK/2016-08-09- 阅读全文
posted @ 2017-07-05 15:43 toong 阅读(6331) 评论(0) 推荐(0) 编辑

[development][dpdk][pktgen] 网卡收发包性能测试

摘要: 一: 多队列及中断信息收集 [root@T185 ~]# cat /proc/interrupts |less -S [root@T185 ~]# cat /proc/interrupts CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7 CPU8 CPU9 CPU10 阅读全文
posted @ 2017-07-04 20:11 toong 阅读(1827) 评论(0) 推荐(0) 编辑

[daily][device][archlinux][trackpoint] 修改指点杆速度/敏捷度

摘要: 修改指点杆速度,敏捷度: 改不改的,好像没什么变化捏。 update @ 2017-07-05 有变化有变化,而且效果和明显。 我最后选了,sensitivity 245, speed 220 取值范围在0-255 之间。 手指头终于没那么累了。 目前方法是使用一个脚本手动设置,过两天改成自动配置。 阅读全文
posted @ 2017-07-04 11:02 toong 阅读(511) 评论(0) 推荐(0) 编辑

[development][security][suricata] suricata 使用与调研

摘要: 0: OISF:https://oisf.net/ 1: suricata是什么 https://suricata-ids.org/ 2:安装 https://redmine.openinfosecfoundation.org/projects/suricata/wiki/CentOS_Instal 阅读全文
posted @ 2017-06-29 19:54 toong 阅读(480) 评论(0) 推荐(0) 编辑

[daily][mirror][daemonlogger][tc] 我想把一个网卡(port A)的流量,镜像到虚拟机的一个网卡(port VA)上去

摘要: iptables tee 模块 https://blog.gnuers.org/?p=740 http://blog.csdn.net/wesleyflagon/article/details/38588507 tcpcopy: 没试过,不知道这玩意行不行。 https://github.com/s 阅读全文
posted @ 2017-06-29 17:02 toong 阅读(779) 评论(0) 推荐(0) 编辑

[development][security][modsecurity][nginx] nginx / modsecurity development things

摘要: 接续前节:[security][modsecurity][nginx] nginx 与 modsecurity nginx开发手册:https://nginx.org/en/docs/dev/development_guide.html#introduction modsecurity开发手册:ht 阅读全文
posted @ 2017-06-23 10:17 toong 阅读(432) 评论(0) 推荐(0) 编辑

[UI] UI things

摘要: 反正我不懂。 但是很酷。 https://facebook.github.io/react/ https://cn.vuejs.org/ https://angular.cn/ 阅读全文
posted @ 2017-06-22 18:06 toong 阅读(134) 评论(0) 推荐(0) 编辑

[algorithm][security] 模糊哈希(转)

摘要: modsecurity中用到: http://ssdeep.sourceforge.net/ 原文:http://www.xuebuyuan.com/1536438.html 最近看一篇paper,无意中看见了一种模糊哈希算法——fuzzy hash算法。于是立刻去翻阅相关资料,整理出如下文章。 首 阅读全文
posted @ 2017-06-19 21:00 toong 阅读(662) 评论(0) 推荐(0) 编辑

=[Mathematics] 数学主题

摘要: https://www.douban.com/group/maths/ 圆锥体体积公式的证明 阅读全文
posted @ 2017-06-19 13:25 toong 阅读(173) 评论(0) 推荐(0) 编辑

[troubleshoot][archliunx][chromium][flash] chrome提示flash不是最新

摘要: 最近chrome总是在提示flash不是最新要求更新。 原来以前用的flash包 chromium-pepper-flash 不见了,改名变成了pepper-flash. 参考: https://wiki.archlinux.org/index.php/Chromium#Flash_Player_p 阅读全文
posted @ 2017-06-19 11:21 toong 阅读(176) 评论(0) 推荐(0) 编辑

[security][modsecurity] modsecurity 规则说明/中文/转发

摘要: 原文转发以防丢失。 地址: http://www.catssec.com:8090/exploit/?p=691 转来细读之后,并没有太多的参考价值 :( modsecurity规则手册 通用格式 SecRule VARIABLES OPERATOR [TRANSFORMATION_FUNCTION 阅读全文
posted @ 2017-06-15 10:09 toong 阅读(1187) 评论(0) 推荐(0) 编辑

[security][modsecurity][nginx] nginx 与 modsecurity

摘要: 参考文档: https://github.com/SpiderLabs/ModSecurity/wiki/Reference-Manual#installation-for-nginx nginx不支持动态加载模块,所以需要重新编译,将modsecurity和nginx整合。 一: 软件准备: Mo 阅读全文
posted @ 2017-06-14 20:48 toong 阅读(654) 评论(0) 推荐(0) 编辑

[archlinux][crypto] 从T450迁移archlinux操作系统至T460s笔记本

摘要: 从T450笔记本迁移archlinux操作系统之T460s笔记本,同时: 1。 使用cryptsetup做底层块加密。 2. 全新使用btrfs文件系统。 一,硬盘分区。 1T的SSD,使用UEFI启动。 二, 块加密 [cipher][archlinux][disk encryption][btr 阅读全文
posted @ 2017-06-11 21:20 toong 阅读(791) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 下一页