FreeBSD

共 688 篇文章。

关于system call

• Kernel

在 FreeBSD 开发手册 中,有一部分内容介绍了关于系统调用。里面有这样一段话:

Linux is a UNIX like system. However, its kernel uses the same system-call convention of passing parameters in registers MS-DOS does. As with the UNIX convention, the function number is placed in EAX. The parameters, however, are not passed on the stack but in EBX, ECX, EDX, ESI, EDI, EBP:

open:
  mov eax, 5
  mov ebx, path
  mov ecx, flags
  mov edx, mode
  int 80h

This convention has a great disadvantage over the UNIX way, at least as far as assembly language programming is concerned: Every time you make a kernel call you must push the registers, then pop them later. This makes your code bulkier and slower. Nevertheless, FreeBSD gives you a choice.

可能有人会问了,为什么说 UNIX way (将参数压栈) 更好呢?

阅读全文… ( 本文约 606 字,阅读大致需要 2 分钟 )

freefall is now running 6.0-STABLE

• Kernel

After it has runned 4.x series for a too long time, finally kensmith@ has stepped up to upgrade it.

Needless to say what this means, just upgrade all your boxes to FreeBSD 6.x. FreeBSD 6.0-RELEASE is the best release we have released in the recent years, and the best .0 release ever, as proven by many installations and developers’ code review.

参与评论

HOWTO: upgrade OpenLDAP from a major release to another

• SysAdmin

Just for reference for future upgrades.

Today I managed to upgrade from OpenLDAP 2.2.29 to OpenLDAP 2.3.11. This is a large upgrade, so all and foremost thing is to backup. Additionally, to keep downtime as less as possible, build these stuff first!

On FreeBSD, the recommended way of installing third party software is to use ports(7). Note that OpenLDAP is separated into two ports, openldap2X-server and openldap2X-client, and building the server requires the client library, therefore, you can not easily do build on the production server (and this SHOULD be avoided anyway).

A solution is to use a separated box (or jail for smaller deployments), to build packages and use pkg_add to install them.

阅读全文… ( 本文约 445 字,阅读大致需要 3 分钟 )

11月的最后一天

• Life

离这个Q结束还有1个月,来总结一下:

工作:

  • 基本完成了内部版本的FreeBSD 6.0-RELEASE,并已开始用于生产服务器
  • 替换了公司的一组基于qmail的转发服务器,采用FreeBSD 6.0和postfix
  • 实现了一个验证服务
  • 设计并实现了一组全新的反垃圾策略,有效地将垃圾邮件的数量降低了若干量级,并且用户无不良反映(最开始出现过一次问题,但并不是策略本身的问题)
  • 设计了一组新的用户行为分析系统,并实现了其初级部分。该系统将进一步提高邮件系统的可用性
  • 追和扑灭了邮件系统中的一批中等和严重程度的隐患
  • 1314同学撤退后客串跑了若干次机房扑火
  • 赶猪,逮老鼠,上大包……(暗语,内部人员偷着乐就行了,不要泄露国家机密;)
    (不过李逵却说……算了还是不说了)

开源软件方面的掺和:

  • 为FreeBSD 6.0-RELEASE的发布进行了一些工作,总体而言得到了认可
  • 翻译完了FreeBSD Architecture Handbook的SMP章节
阅读全文… ( 本文约 616 字,阅读大致需要 2 分钟 )