aboutsummaryrefslogtreecommitdiffstats
path: root/iurt2
diff options
context:
space:
mode:
authorClaudio Matsuoka <claudio@mandriva.com>2006-11-02 13:48:18 +0000
committerClaudio Matsuoka <claudio@mandriva.com>2006-11-02 13:48:18 +0000
commit5b1a645462416c93ce18979f8de8d568e317457e (patch)
tree0b690a8a6bde465f166ec5a93ce4891d38395e4f /iurt2
parentd3a58dea576afcd21b1283ca0b265688151b10f3 (diff)
downloadiurt-5b1a645462416c93ce18979f8de8d568e317457e.tar
iurt-5b1a645462416c93ce18979f8de8d568e317457e.tar.gz
iurt-5b1a645462416c93ce18979f8de8d568e317457e.tar.bz2
iurt-5b1a645462416c93ce18979f8de8d568e317457e.tar.xz
iurt-5b1a645462416c93ce18979f8de8d568e317457e.zip
Changing $0 to display readable information in ps output
ps(1) output in a build cluster node is very noisy because there are many wrappers and long command lines. Setting Iurt's $0 to a short summary makes it easier to understand what's going on. Additionally, wrapper scripts can be changed to exec the wrapped utility in the same process to further remove noise from the process list. Example of ps output: 9231 ? S 0:00 sshd: mandrake@notty 9232 ? Ss 0:00 Iurt: cooker i586 @73504:perl-IO-All-0.35-3mdv2007.0 9242 ? R 0:05 tar xf /export/home/mandrake//chroot_cooker.i586.tar
Diffstat (limited to 'iurt2')
-rwxr-xr-xiurt25
1 files changed, 5 insertions, 0 deletions
diff --git a/iurt2 b/iurt2
index 94f6d49..f0457c4 100755
--- a/iurt2
+++ b/iurt2
@@ -510,6 +510,11 @@ do {
$rebuild = 0;
foreach (my $i ; $i < @{$run{todo}}; $i++) {
my ($dir, $srpm, $status) = @{$run{todo}[$i]};
+
+ # Set argv[0] (in the C sense) to something we can easily spot and
+ # understand when running ps --claudio
+ $0 = "Iurt: $run{distro_tag} $run{my_arch} $run{media} $srpm";
+
$status or next;
$done{$srpm} and next;
$done{$srpm} = 1;