自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

一个手艺人的专栏

一个奋斗在一线的,普通的软件工程师的文章集。

  • 博客(68)
  • 资源 (1)
  • 收藏
  • 关注

原创 我的新博客--nanxiao.me上线了

终于有了一个以自己名字命名的域名(nanxiao.me),以后de

2014-10-28 08:34:01 1484

原创 学习Bash shell编程资料推荐

我一直觉得写好Bash shell脚本是一件很cool的事,短短几行代码,就能完成其它编程语言几十行甚至上百行代码才能完成的功能,可惜我自己写Bash shell脚本能力实在不敢恭维。在这篇文章,我把自己认为一些比较好的Bash shell编程资料分享出来,希望可以给大家一点帮助。我个人看过的最好的Bash shell编程入门资料是《Linux程序设计》的第二章:shell程序设计,看

2014-10-18 19:48:25 1686

原创 《Systems Performance: Enterprise and the Cloud》读书笔记系列(九) —— 第二章(八)

1. Workload Characterization: workload characterization is a simple and effective method for identifying a class of issues: those due to the load applied. It focuses on the input to the system, rath

2014-10-17 18:03:10 1127

原创 《Systems Performance: Enterprise and the Cloud》读书笔记系列(八) —— 第二章(七)

1. Tools Method: A tools-oriented method is as follows:1) List available performance tools (optionally, install or purchase more).2) For each tool, list useful metrics it provided.3) For each me

2014-10-14 13:10:49 1065

原创 《Systems Performance: Enterprise and the Cloud》读书笔记系列(七) —— 第二章(六)

1. Ad Hoc Checklist Method: Step through a canned checklist is a common methodology used by support professionals when asked to check and tune a  system, often in a short time frame. These checklist

2014-10-11 13:18:17 974

原创 在Solaris上使用LD_OPTIONS环境变量诊断编译链接问题

最近在Solaris上编译一款开源软件,在最后链接阶段出了问题,导致ld程序core dump。由于没有ld程序源代码,导致完全没思路,没办法,只好在stackoverflow上求教:http://stackoverflow.com/questions/26009192/why-the-ld-crash-in-building-libgd。从回复中我才知道可以通过设置LD_OPTIONS环境变

2014-10-10 21:56:14 947

原创 《Systems Performance: Enterprise and the Cloud》读书笔记系列(六) —— 第二章(五)

1. Streetlight Anti-Method: This method is actually the absence of a deliberate methodology. The user analyzes performances by choosing observability tools that are familiar, found on the Internet,

2014-10-10 13:14:40 1124

原创 2014“十一”回家之旅

眨眼之间,

2014-10-06 11:06:40 882

原创 tcpreplay(3.4版本)程序显示统计结果的一个问题

最近,我在Solaris系统上用tcpreplay程序(sunfreeware网站提供的3.4.4版本的安装包,目前sunfreeware已经不再提供免费的Solaris系统安装包下载了,但还是可以通过其它ftp下载到)辅助测试。发现tcpreplay输出是这样的:Actual: 400000 packets (78200000 bytes) sent in 18.03 seconds.

2014-09-28 14:46:36 1638

原创 提高个人能力的几个小建议

(1)拥有一个云笔记

2014-09-27 19:36:27 1302

原创 gcc的 "-fpack-struct" 编译选项导致程序core dump的分析

最近team引入gcov来做代码分析。编译好的程序在Solaris上运行的好好的,结果在Linux上一运行就会产生core dump文件。这篇文章就介绍整个分析过程。首先用gdb分析core文件,显示是strlen调用出了问题:(gdb) bt#0 0x00000034e433386f in __strlen_sse42 () from /lib64/libc.so.6#1

2014-09-27 08:42:52 1928

原创 《Systems Performance: Enterprise and the Cloud》读书笔记系列(五) —— 第二章(四)

1. There are two common perspectives for performance analysis, each with different audiences, metrics and approaches. They are  workload analysis and resource analysis. They can be thought of as eit

2014-09-25 13:40:12 729

原创 往GNU邮件组发邮件要用纯文本格式

昨天遇到gcc使用方面的一个问题,就往gcc-help([email protected])邮件组发了一封求助邮件。但是通过浏览归档(https://gcc.gnu.org/ml/gcc-help/)找不到我发的邮件,应该是没有发送成功。今天在hellogcc的IRC里请教了一下,才知道应该用纯文本格式发送。我用的是QQ邮箱,没找到设置纯文本。于是就改用gmail的邮箱发送,果然一下就成功了

2014-09-25 13:17:54 1377

原创 Windows/Unix文本格式转换导致“/usr/bin/env: No such file or directory”

今天在用同事写的一个python脚本,一运行就出现了以下错误:/usr/bin/env: No such file or directory用ls命令查看了一下,“/usr/bin/env”明明存在:bash-3.2# ls -lt /usr/bin/env-r-xr-xr-x 1 root bin 5780 Jan 23  2005 /usr/bin/en

2014-09-24 09:36:03 7264

原创 如何写gdb命令脚本

作为UNIX/Linux下使用广泛的调试器,gdb不仅提供了丰富的命令,还引入了对脚本的支持:一种是对已存在的脚本语言支持,比如python,用户可以直接书写python脚本,由gdb调用python解释器执行;另一种是命令脚本(command file),用户可以在脚本中书写gdb已经提供的或者自定义的gdb命令,再由gdb执行。在这篇文章里,我会介绍一下如何写gdb的命令脚本。  

2014-09-21 14:07:17 974

原创 UNIX/Linux C 程序员需要掌握的七种武器

我是一名普通的软件工程师,不是什么技术大牛。这篇文章所提到的“七种武器”只是我这些年工作经验的一点体会和感悟,如果有错误的地方,还请大家指正。(一)C语言作为一名C程序员,熟练掌握C语言是最基本的一项技能。关于如何学好C语言,以及C语言话题的讨论,网上有很多经典的文章,我就不一一列举了。在这里,我只想谈一点我个人的体会:刚毕业时,我来到一家比较大的软件公司工作,而公司的工作

2014-09-21 10:27:49 1056

原创 我心目中理想的软件开发过程

我心目中理想的软件开发过程是这样的:  (1)RD(程序员)写完一段代码后,会review两遍,这样很多基本的问题就都能被发现。在完成整块代码功能后,通过使用gdb等工具,改变程序的执行流程,以保证每个分支,每条语句都能执行一遍。在这个过程中,要检查变量的值和代码逻辑,看看是否和预期的一样。最后写测试用例,执行集成测试,确保不会出现很低级的bug;执行稳定性测试,确保程序可以长时间运行

2014-09-20 17:03:50 1497

原创 《Systems Performance: Enterprise and the Cloud》读书笔记系列(四) —— 第二章(三)

1. The degree to which more work is requested of a resource than it can process is saturation. Saturation begins to occur at 100% utilization (capacity-based), as extra work cannot be processed and

2014-09-19 17:47:51 977

原创 《Systems Performance: Enterprise and the Cloud》读书笔记系列(三) —— 第二章(二)

1. The notion of known-knowns, known-unknowns and unknown-unknowns is important for the field of performance:a) Known-knowns: These are things you know;b) Known-unknowns: These are things you know

2014-09-17 09:25:51 1143

原创 《Systems Performance: Enterprise and the Cloud》读书笔记系列(二) —— 第二章(一)

分析术语简介

2014-09-14 21:04:07 1552

原创 《Systems Performance: Enterprise and the Cloud》读书笔记系列(一) —— 第一章

最近开始读Brendan Gregg这本《Systems Performance: Enterprise and the Cloud》。为了防止像以前一样,读完一遍没有任何印象,我决定开始记读书笔记,以下就是第一章:1. System performance is the study of the entire system, including all physical comp

2014-09-12 17:26:08 5009 1

原创 关于“error: conflicting types for 'function'”编译错误的分析

在使用gcc

2014-09-05 17:23:59 7967

原创 为什么gcc在64位Solaris上编译出来的程序默认是32位的?

最近发现一个问题,gcc在

2014-08-31 16:50:08 1608

原创 使用SonarQube的一点经验

这两天在折腾SonarQube(也就是Sonar),有一点心得体会。

2014-08-27 15:37:47 8574

原创 liteIDE写Golang程序引用外面的package不能自动补全的问题

在使用liteIDE开发Golang程序时,会出现Golang自带的package可以自动补全,而引用外面的package则不能自动补全。今天终于在stackoverflow(http://stackoverflow.com/questions/19876902/liteide-no-autocomplete)找到了答案:在使用外面的package时,应该把package安装成功(使用go get

2014-08-19 15:30:27 5645

原创 第一次南下之旅

由于个人原因,2014年8yu

2014-08-16 12:30:50 977

原创 监控redis的内存使用情况

redis可以配置使用内存的最大值,配置项是maxmemory。如果不设置的话,64位程序默认内存没有限制,而32位程序的默认值为3G。相关代码如下:redis使用zmalloc去做内存的分配和释放工作,这样便于统计当前redis进程消耗了多少内存。通过“info”命令,我们可以得到当前redis使用的内存:used_memory字段;通过“config get maxme

2014-08-13 17:14:19 4763 1

原创 关于知乎话题“程序员有哪些借口可以让自己写出低质量的代码?”的一点想法

一下是知乎上一个有趣话题:“程序员有哪些借口可以让自己写出低质量的代码?”

2014-08-10 21:07:48 1575

原创 编译gdb注意事项:一定要用一个干净的build文件夹

上周收到gdb的tzh邮件

2014-08-03 10:17:02 2323

原创 一个分享DTrace知识的中文站点--chinadtrace.org上线了!

经过一段时间的准备,chinadtrace终于有了自己的网站:http://chinadtrace.org/。目前所有的文章都已经迁移过去了,欢迎大家继续关注和访问。ton

2014-07-20 12:47:02 1364

原创 在Solaris上编译redis(2.8.13)

最近由于

2014-07-15 17:08:56 2264

原创 Source Insight的“Expand tabs”选项介绍

Source Insight有个“”

2014-07-14 18:13:15 3864 1

原创 tracecore.net上线了

作为一名软件工程师,一直觉得应该you

2014-07-05 12:05:42 978

原创 100个gcc小技巧项目

在推出100个gdb小技巧xia

2014-07-05 11:46:21 1397

原创 关于不在本博客继续更新chinadtrace微信公众号文章的通知

为了减少不必要的复制,粘贴工作,以及所带来的时间和资源的浪费,本博客将不再继续更新chinadtrace微信公众号的文章。所有的chinadtrace微信公众号的文章将只在微信和http://blog.segmentfault.com/chinadtrace上发布。希望大家一如既往地支持chinadtrace微信公众号!

2014-06-19 08:52:59 989

原创 100个gdb小技巧项目

Hellogcc发起了一个项目:100个

2014-06-07 19:02:58 2061

原创 DTrace tricks and tips (3) - 访问程序全局变量

在stackoverflow上有人

2014-06-07 12:23:19 797

原创 分享一篇文章《Using DTrace to Instrument Your System》

Joyent的工程师Max Bruning

2014-05-31 12:26:05 991

原创 Don't show confirmation prompt when quitting the gdb

When you want to quit the gdb, a confirmation prompt will appear:“A debugging session is active.        Inferior 1 [process 19114    ] will be killed.Quit anyway? (y or n)“It m

2014-05-29 18:02:51 946

原创 C programming tips in SPARC architecture

If you are a newbie of C programmers in SPARC architecture (For example, working on Solaris), you should pay attention to the following tips:(1) By default, SPARC is big-endian. It means for an

2014-05-28 18:20:54 831

OpenMP little book

一本介绍使用OpenMP并发编程的原创著作。

2018-12-20

空空如也

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

TA关注的人

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