首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何让e2fsck显示进度信息?

如何让e2fsck显示进度信息?
EN

Server Fault用户
提问于 2010-03-03 15:25:37
回答 4查看 78.4K关注 0票数 53

我在一个非常大的(1TB+) ext3磁盘上运行

代码语言:javascript
复制
e2fsck -v /dev/sda1

使用PXE引导的RIPLinux。

我得到了

代码语言:javascript
复制
e2fsck 1.41.6 (30-May-2009)
/dev/sda1 contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes

然后很长时间的停顿。

我怎样才能对活动有一些了解?

理想情况下,计数已完成的项目与总数和某种埃塔。

EN

回答 4

Server Fault用户

回答已采纳

发布于 2010-03-03 15:28:56

-C标志将显示一个进度条。性能差异取决于fsck的调用方式。

非常酷的是,如果e2fsck已经在运行,您可以为它发送一个USR1信号,以开始显示进度条。USR2停下来。示例:

killall -USR1 e2fsck

来自FSCK(8):

代码语言:javascript
复制
   -C     Display completion/progress bars for those filesys-
          tems  checkers (currently only for ext2) which sup-
          port them.   Fsck will manage the filesystem check-
          ers  so  that  only  one  of  them  will  display a
          progress bar at a time.

来自E2FSCK(8):

代码语言:javascript
复制
   -C fd  This  option  causes  e2fsck  to  write  completion
          information  to  the  specified  file descriptor so
          that the progress of the filesystem  check  can  be
          monitored.   This  option is typically used by pro-
          grams  which  are  running  e2fsck.   If  the  file
          descriptor specified is 0, e2fsck will print a com-
          pletion bar as it goes about  its  business.   This
          requires  that e2fsck is running on a video console
          or terminal.
票数 84
EN

Server Fault用户

发布于 2010-03-03 15:45:03

版本1.41的手册页

代码语言:javascript
复制
   -C fd  This option causes e2fsck to write completion information to the specified file descriptor so that the progress of the
          filesystem  check  can be monitored.  This option is typically used by programs which are running e2fsck.  If the file
          descriptor number is negative, then absolute value of the file descriptor will be used, and the  progress  information
          will  be  suppressed  initially.  It can later be enabled by sending the e2fsck process a SIGUSR1 signal.  If the file
          descriptor specified is 0, e2fsck will print a completion bar as it goes  about  its  business.   This  requires  that
          e2fsck is running on a video console or terminal.

所以我想答案是

代码语言:javascript
复制
e2fsck -C 0 /dev/sda1
票数 24
EN

Server Fault用户

发布于 2012-12-08 01:10:57

ps -ef \ grep fsck

代码语言:javascript
复制
  5079  5007 47 00:55 pts/1    00:08:25 /sbin/fsck.ext3 -yv /dev/hda2

使用进程ID,

杀死-USR1 5079

票数 5
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/118791

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档