diff options
author | Claudio Matsuoka <claudio@mandriva.com> | 2006-11-02 13:48:18 +0000 |
---|---|---|
committer | Claudio Matsuoka <claudio@mandriva.com> | 2006-11-02 13:48:18 +0000 |
commit | 5b1a645462416c93ce18979f8de8d568e317457e (patch) | |
tree | 0b690a8a6bde465f166ec5a93ce4891d38395e4f /iurt2 | |
parent | d3a58dea576afcd21b1283ca0b265688151b10f3 (diff) | |
download | iurt-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-x | iurt2 | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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; |