diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-11-03 09:57:15 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-11-03 09:57:15 +0000 |
commit | 521fd807ca30fcd17a3c9e119807e76a13231356 (patch) | |
tree | 44a4c95fe0d18f181743b3a2b2f1dd06d00f3cb8 /move/tools/busy-files | |
parent | 39c2a672caa7c1989d8d98fcd6790622b5099f00 (diff) | |
download | drakx-521fd807ca30fcd17a3c9e119807e76a13231356.tar drakx-521fd807ca30fcd17a3c9e119807e76a13231356.tar.gz drakx-521fd807ca30fcd17a3c9e119807e76a13231356.tar.bz2 drakx-521fd807ca30fcd17a3c9e119807e76a13231356.tar.xz drakx-521fd807ca30fcd17a3c9e119807e76a13231356.zip |
look into /proc/*/maps for more busy files
Diffstat (limited to 'move/tools/busy-files')
-rwxr-xr-x | move/tools/busy-files | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/move/tools/busy-files b/move/tools/busy-files index 476a2dc67..5356b3684 100755 --- a/move/tools/busy-files +++ b/move/tools/busy-files @@ -2,8 +2,20 @@ use MDK::Common; -print "$_\n" foreach uniq (map { +my @pids = grep { $_ ne $$ && /^(\d+)$/ } all('/proc'); + +my @l = map { grep { $_ && !m!^(/proc/|/dev/|pipe:|socket:)!; } map { readlink($_) } "/proc/$_/exe", glob_("/proc/$_/fd/*"); -} grep { $_ ne $$ && /^(\d+)$/ } all('/proc')); +} @pids; + +push @l, grep { $_ } map { (split)[5] } map { cat_("/proc/$_/maps") } @pids; + +foreach (uniq @l) { + if ($ARGV[0] eq '--server') { + s!/image_(always|boot)!/tmp/live_tree!; + s!/image_raw/live_tree!/tmp/live_tree!; + } + print "$_\n"; +} |