[GE users] xml-qacct?

Andreas.Haas at Sun.COM Andreas.Haas at Sun.COM
Thu Mar 1 16:56:01 GMT 2007

On Thu, 1 Mar 2007, Heywood, Todd wrote:

> Hi Andreas,
> That looks like it could be quite useful. Could a -d option analogous to
> the -u option be added to produce a department table?

Surely. When you look into the script you'll find, that this
requires merely minimal changes, since other summarizations
are already implemented by an abstract super-class

    class User < Debitable

    class UserHash < PrintableHash
       def initialize(record)
          record.each_value do |r|
             if ! self.has_key?(r.user)
                self[r.user] = User.new()
          debug "debug did users"
       def print_all

so all you need to do is

    (1) Enhance the RecordHash::initialize() in a way that department
        information from accounting file is similarly stored
    (2) Copy the above to get Department and DepartmentHash classes
    (3) Add your -d option and do then some C&P

> The hardest thing is making sense of "timesteps". They are in terms of
> seconds since epoch format, right (as per the accounting man page),
> right? Would it be possible to specify a time range like you do with
> qaact, i.e. yymmddhh?

Sure. Here is a small script I use to make epoch format timestamps 
human readable

    #!/usr/bin/env ruby
    puts ARGV[0]
    t = Time.at(ARGV[0].to_i)
    puts t.asctime

> If I were to ask for the moon :-) I'd like to use the -h option with a
> "total available hosts" argument, with the hosts table also producing a
> sum of the time columns, and also a "cluster utilization" percentage
> (i.e. a division of those column sums by total the available hosts times
> the time range being analyzed). And if I were to ask for the stars, I
> could combine this with either -u or -d to break down the total cluster
> utilization by user or department. But this is way too much to ask! I
> might try it myself over time, but I would need to learn some Ruby.

Hmm ... adding the -d switch at first is probably wise ;-)


> Thanks!
> Todd

To unsubscribe, e-mail: users-unsubscribe at gridengine.sunsource.net
For additional commands, e-mail: users-help at gridengine.sunsource.net

More information about the gridengine-users mailing list