洛阳铲的日志

2009年07月22日

What is this .nfsxxxxxxxxxxxxxx file and why can’t I remove it

Filed under: FreeBSD,Linux — blog @ 18:15

What is this .nfsxxxxxxxxxxxxxx file and why can’t I remove it?

Under unix, if you remove a file that a currently running process still has open, the file isn’t really removed. Once the process closes the file, the OS then removes the file handle and frees up the disk blocks. This process is complicated slightly when the file that is open and removed is on an NFS mounted filesystem. Since the process that has the file open is running on one machine (such as a workstation in your office or lab) and the files are on the file server, there has to be some way for the two machines to communicate information about this file. The way NFS does this is with the .nfsNNNN files. If you try to remove one of these file, and the file is still open, it will just reappear with a different number. So, in order to remove the file completely you must kill the process that has it open.
If you want to know what process has this file open, you can use ‘lsof .nfs1234’. Note, however, this will only work on the machine where the processes that has the file open is running. So, if your process is running on bobac and you run the lsof on some other burrow machine, you won’t see anything.

For example:

% echo test > foo
% tail -f foo
test
^Z
Suspended
% rm foo
% ls -A
.nfsB23D
% rm .nfsB23D
% ls -A
.nfsC23D
% lsof .nfsC23D
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
tail 1257 robh 0r VREG 176,6 5 3000753 .nfsC23D
%

So, once you have located and killed the process that has the file open, the .nfs file will go away automatically. In the above example, when you kill the tail process, the .nfsC23D file will disappear.

The useful tools: ps, lsof

2009年07月7日

不瞎忙

Filed under: 生活小札 — HackGou @ 10:22

“不差钱”孪生。打倒标题党!
一周下来时常感觉全瞎忙
google一番,听说GTD(Get Thing Done)可以把自己从中解脱出来。
网上一大堆GTD的理论和工具。
说来这个东西(GTD)和那个烧开水的统筹安排类似, 大致属于统筹法一类,
效法它,可以很容易的从瞎忙中解脱出来。
具体如何实施,有很多人把它分成七七八八、九九十十个阶段: http://farm4.static.flickr.com/3356/3509478727_c1794c556a_o.jpg http://sqybi.com/blog/wp-content/uploads/gtd4.png
毋容置疑:我是记不住的 按照KISS(keep it simple,Stupid)原则,我把他了解为: *收集 =》分类 =》 执行 * 来处理手上的事情,在分类、执行环节,按照下面的优先级(从高到底)来处理:
1. 重要且紧急
2. 重要非紧急
3. 非重要但紧急
4. 非重要也非紧急
简单说来就是:重要,紧急两元素的排列。 实验过两个月(其中),发现真的很好,很强大。
这两月中最重要的事情莫非买房一事了,零零碎碎的事情多,而且繁琐。
用GTD来处理,工具是tencent Calendar。基本没有什么耽误 一句话GTD很好,很强大。
关于GTD的工具是个见仁见智的事情,按照自个儿的喜好来就行了:
纸质的:白纸、笔记本、“是日”
在线的:Google的Calendar,Todoist
桌面的:Tencent Calendar,任何日历软件
随身的:手机的日历、事件提醒功能,甚至闹钟
我用的工具:
1. 白纸,
2. 笔记本
3. tencent Calendar,办公室桌面机和家里的桌面机以及laptop之间同步,不过缺乏农历支持快被out了
4. google calendar, 配合Google Calendar Sync可以与outlook无缝集成

2009年07月3日

笔记本坏了

Filed under: 生活小札 — HackGou @ 14:48

这几天用笔记本跟喝果汁一样:用前摇一摇。 今天再也摇不醒啦。

最严重的DDOS

Filed under: 生活小札 — HackGou @ 14:39

又碰到一次严重的DDOS。 目标站点是日本的一组服务器,但是PIX撑不住了,连累了后面的其他国家的服务器。 算下来这是近3年来第4波,也是最严重的一次DDOS了,唯一一次造成当机时间超过半小时的DDOS。 PIX挂了,真的只能望洋兴叹,只能靠美国同事了。

Powered by WordPress