Update help text. Update helper scripts.

This commit is contained in:
Jan Eitzinger 2019-06-05 08:34:20 +02:00
parent e5e6f704cf
commit 3d2366cf67
3 changed files with 30 additions and 9 deletions

View File

@ -382,12 +382,13 @@ acQuery.pl - Wrapper script to access sqlite job database.
Help Options:
--help Show help text
--man Show man page
--hasprofile <true|false> Only show jobs with timerseries metric data
--mode <mode> Set the operation mode
--user <user_id> Search for jobs of specific user
--project <project_id> Search for jobs of specific project
--duration <from> <to> Specify duration range of jobs
--numnodes <from> <to> Specify range for number of nodes of job
--starttime <from> <to> Specify range for start time of jobs
--duration <from> <to> Specify duration range of jobs
--mem_used <from> <to> Specify range for average main memory capacity of job
--mem_bandwidth <from> <to> Specify range for average main memory bandwidth of job
--flops_any <from> <to> Specify range for average flop any rate of job
@ -402,7 +403,10 @@ Show a brief help information.
=item B<--man>
Read the manual, with examples
=item B<--mode [012]>
=item B<--hasprofile [true|false]>
Only show jobs with or without timerseries metric data
=item B<--mode [ids|query|count|list|stat|perf]>
Specify output mode. Mode can be one of:
=over 4

View File

@ -50,6 +50,12 @@ my $sth_select_all = $dbh->prepare(qq{
FROM job;
});
my $sth_select_job = $dbh->prepare(qq{
SELECT id, user_id, project_id
FROM job
WHERE job_id=?;
});
my $sth_update_job = $dbh->prepare(qq{
UPDATE job
SET user_id = ?,
@ -115,6 +121,11 @@ while ( readdir $dh ) {
my $job = decode_json $jobmeta_json;
my $user = $job->{'user_id'};
# if ( $user =~ /^user_.*/ ) {
# print "$jobID $user\n";
# }
my $project;
if ( exists $user_lookup{$user}) {

View File

@ -92,15 +92,21 @@ while ( readdir $dh ) {
my $footprint = $job->{footprint};
if ( $job->{user_id} ne $db_user_id ) {
print "$jobID $job->{user_id} $db_user_id\n";
$job->{user_id} = $db_user_id;
}
# print "$footprint->{mem_used}->{avg}, $footprint->{flops_any}->{avg}, $footprint->{mem_bw}->{avg}\n";
$sth_update_job->execute(
1,
$footprint->{mem_used}->{avg},
$footprint->{flops_any}->{avg},
$footprint->{mem_bw}->{avg},
$db_id
);
# $sth_update_job->execute(
# 1,
# $footprint->{mem_used}->{avg},
# $footprint->{flops_any}->{avg},
# $footprint->{mem_bw}->{avg},
# $db_id
# );
$jobcount++;
} else {