Mailing List Archives
Public Access
|
|
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Condor-users] condor -format options
- Date: Tue, 19 Oct 2004 19:06:09 +0100
- From: "Kewley, J (John)" <j.kewley@xxxxxxxx>
- Subject: RE: [Condor-users] condor -format options
> >condor_q -format "%d" ClusterId -format "XXX\n" ClusterId
>
> I understand that it's annoying. But I just tried the
> following command,
> and it worked fine:
>
> condor_q -format "%dXXX\n" ClusterId
>
> Is there a reason that doesn't work for you?
That works fine, but how about:
$ condor_status -f "%-6s" Arch -f "%-7s" OpSys \
-f " %-12s" OPSYS_FLAVOUR \
-f "\n" OpSys | sort | uniq -c
[extracted from a slide I showed Todd and Zach last week!]
This should give me a nice list of all the different OSs in my pool:
1
1 INTEL LINUX Gentoo
1 INTEL LINUX Mandrake10
2 INTEL LINUX RH80
3 INTEL LINUX RH9
2 INTEL LINUX RHEL3
2 INTEL LINUX SUSE80
6 INTEL LINUX SUSE90
4 INTEL LINUX WBL
2 INTEL WINNT50
2 INTEL WINNT51
[Note the initial "1" line is because there is an extra blank line in the
condor_status
output - maybe that could be removed]
Note that it'll also work for you on 6.6.6 (even though you haven't defined
OPSYS_FLAVOUR
on your machines). Some of my machines don't have OPSYS_FLAVOUR defined (the
non-Linux
ones) and don't print anything for " %-12s" OPSYS_FLAVOUR. If I had had a \n
in
there (without the my final opsys clause), it would not have got printed:
$ condor_status -f "%-6s" Arch -f "%-7s" OpSys \
-f " %-12s\n" OPSYS_FLAVOUR | sort | uniq -c
1 INTEL LINUX Gentoo
1 INTEL LINUX Mandrake10
2 INTEL LINUX RH80
3 INTEL LINUX RH9
2 INTEL LINUX RHEL3
2 INTEL LINUX SUSE80
6 INTEL LINUX SUSE90
4 INTEL LINUX WBL
1 INTEL WINNT50INTEL WINNT50INTEL WINNT51INTEL WINNT51
Instead I trick condor with the final -f "\n" Opsys
so that a newline is printed ALWAYS (or at least if OpSys is defined, which
is highly
likely!).
The problem is that the newline is now no longer printed :-( - the whole
lot comes on one line.
How about allowing a -format with a string and no following classad which
would always print for each row at that point.
JK