[gold-users] gold for accounting
Tim Robinson
twrobinson at manchester.ac.uk
Thu Oct 25 02:05:33 MDT 2007
Hi Brock
The perl API is rather powerful. Have a look at the query in g_usage -
the block beginning with "my $request". You can query a user rather than
a project by simply modifying the setCondition line (see below),
Best regards,
Tim
--------
bash-3.00$ diff gusage gusage_user
61c61
< my ($help, $man, $project, $end, $start, $version, $hours);
---
> my ($help, $man, $user , $end, $start, $version, $hours);
65c65
< 'p=s' => \$project,
---
> 'p=s' => \$user,
108,109c108,109
< # Project must be specified
< if (! defined $project)
---
> # user must be specified
> if (! defined $user)
111c111
< if ($#ARGV == 0) { $project = $ARGV[0]; }
---
> if ($#ARGV == 0) { $user = $ARGV[0]; }
122c122
< print("# Usage Summary for project $project\n");
---
> print("# Usage Summary for user $user \n");
134c134
< $request->setCondition("Project", $project);
---
> $request->setCondition("User", $user);
165c165
On Wed, 2007-10-24 at 15:24 -0400, Brock Palen wrote:
> I am trying to find a nice way to ask the following from gold:
>
> How many jobs has user $x ran in the last 6 months 1 year etc,
>
> gusage -s 2007-4-25 username
>
> does not appear to work, I would also like to eventually do this
> using the native perl interface.
> Of course the above query we would to extendable, to queues,
> machines, etc (other restrictions than time).
>
> Thanks ahead of time. (im new to gold)
>
> Brock Palen
> Center for Advanced Computing
> brockp at umich.edu
> (734)936-1985
>
>
> _______________________________________________
> gold-users mailing list
> gold-users at supercluster.org
> http://www.supercluster.org/mailman/listinfo/gold-users
--
Tim Robinson
Research Computing Services
The University of Manchester
Kilburn Building, Oxford Road
Manchester M13 9PL
tel: 0161 275 0603
More information about the gold-users
mailing list