[gold-users] gold for accounting
Brock Palen
brockp at umich.edu
Thu Oct 25 06:53:38 MDT 2007
Cool,
It didn't connect in my head that gold is written in perl, that i
could just look at the existing tools for samples. Your patch works,
its a great first building block, Now to edit it to have
User /home /lustre Jobs in 6m Jobs in 1y
username 45GB 500MB 150 360
This is my goal :-)
Thanks for the help.
Brock Palen
Center for Advanced Computing
brockp at umich.edu
(734)936-1985
On Oct 25, 2007, at 4:05 AM, Tim Robinson wrote:
> 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