January 2008 Archives

daemontools 常用操作

| No Comments | No TrackBacks

这里可说的是DJB写的 daemontools , 不是DAEMON Tools那个虚拟光驱哦.

启停daemon

svc -t /service/lighttpd # 重启lighttpd
svc -u /service/lighttpd # 启动lighttpd
svc -d /service/lighttpd # 停止lighttpd

删除daemon

cd /service/lighttpd
rm -rf /service/lighttpd
svc -dx .

查看daemon的状态

svstat /service

查看daemon log

tailn64log /service/lighttpd/log/main/current

PS. 用daemontools管理lighttpd再好不过了,能够准确的定位多个lighttpd服务中你想要的那个~

Perl Module 的编写

| No Comments | No TrackBacks
package YourModule; 
# gives you Exporter's import() method directly
use Exporter 'import'; 
@EXPORT_OK = qw(munge frobnicate);
@EXPORT = qw(sth);

@EXPORT_OK 中声明的函数需要在use YourModule后加入qw//来申请进入全局。而@EXPORT 中声明的函数是默认就进入全局的。

October 2008

Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  

Friends' Links

Recent Comments

  • jianingy: test read more
  • mmx: thank u very much ! read more
  • FW: pls contact me with email.about APIHook. read more
  • jianingy: 这个lc是啥意思? -------- read more
  • cnhackTNT: 晕,被过滤掉了,再试试: s/(?<!\\)\$NICK/lc/e; 汗,过滤了小于符号,只好写<了呵呵 read more
  • cnhackTNT: s/(? 这样可以少打几个字呵呵 read more
  • R.Q.: 酱紫哦,了了 -------- read more

Archives

Powered by Movable Type 4.21-en