【问题标题】:find what process is leaving tmp files in my home directory找到什么进程将 tmp 文件留在我的主目录中
【发布时间】:2013-12-11 01:36:06
【问题描述】:

我们有大量的 linux 机器作为计算场。我们 使用 LSF 在场上启动作业。 偶尔和随机地,一些工作正在创建和删除数千个“tmp”文件 直接我家:

ls /home/cpp_home/tmp* ---------- 1 cpp_home 开发 0 12 月 10 日 14:25 tmpxJL9In -rw------- 1 cpp_home dev 0 12 月 10 日 14:25 tmpnvAtiS -rw------- 1 cpp_home dev 0 12 月 10 日 14:25 tmphSrnk7 -rw------- 1 cpp_home 开发 0 12 月 10 日 14:25 tmpJFO5Cr ---------- 1 cpp_home 开发 0 12 月 10 日 14:25 tmpRIzn7A -rw------- 1 cpp_home dev 0 12 月 10 日 14:25 tmpvulwsT ---------- 1 cpp_home dev 0 12 月 10 日 14:25 tmpeSz_gN ---------- 1 cpp_home dev 0 12 月 10 日 14:25 tmpEcatTM -rw------- 1 cpp_home dev 0 12 月 10 日 14:25 tmpOy1jdi ---------- 1 cpp_home 开发 0 12 月 10 日 14:26 tmp4oB8ua

我到底怎么才能知道是什么进程在做这个? 它们看起来很像 std 'C' 库临时文件或标准 python tempfiles....但是因为他们不坚持 很长我不知道什么工作(通过 LSF 运行的数千个工作) 正在创建它们。

我没有所有工作的源代码...有很多 第三方 CAD/EDA 工具正在使用中,因此它可能是其中之一。或者它可以 是 perl,或 python 脚本,或...

【问题讨论】:

  • 刚开始调试我会尝试“lsof | grep /tmp”

标签: temporary-files


【解决方案1】:

如果工作种类繁多,这可能很难找到;但是,如果作业类型不是太多样化,您应该能够将您发现这些创建的时间与拥有文件的用户所拥有的作业相关联。通过单独运行类似的作业,您可以进行测试以验证行为。

也许还有另一种可能性。根据 LSF 设置,一些输出/日志文件可能会创建为临时文件并复制到它们的最终位置。我可以想象这可以解释这种现象,但通常这些都属于 $HOME/.lsbatch 目录。设置也许能够调整此位置。请参阅 BSUB 命令参考中的此文本:

If the parameter LSB_STDOUT_DIRECT in lsf.conf is set to Y or y, and you use
the -o or -oo option, the standard output of a job is written to the file you
specify as the job runs. If LSB_STDOUT_DIRECT is not set, and you use -o or -oo,
the standard output of a job is written to a temporary file and copied to the
specified file after the job finishes.

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-09-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多