From 3d2366cf67af5126db7a07d3be5f3c5c8bf8437f Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Wed, 5 Jun 2019 08:34:20 +0200 Subject: [PATCH] Update help text. Update helper scripts. --- acQuery.pl | 8 ++++++-- anonDB.pl | 11 +++++++++++ syncDB.pl | 20 +++++++++++++------- 3 files changed, 30 insertions(+), 9 deletions(-) diff --git a/acQuery.pl b/acQuery.pl index 009ee3f..35b7cd0 100755 --- a/acQuery.pl +++ b/acQuery.pl @@ -382,12 +382,13 @@ acQuery.pl - Wrapper script to access sqlite job database. Help Options: --help Show help text --man Show man page + --hasprofile Only show jobs with timerseries metric data --mode Set the operation mode --user Search for jobs of specific user --project Search for jobs of specific project - --duration Specify duration range of jobs --numnodes Specify range for number of nodes of job --starttime Specify range for start time of jobs + --duration Specify duration range of jobs --mem_used Specify range for average main memory capacity of job --mem_bandwidth Specify range for average main memory bandwidth of job --flops_any 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 diff --git a/anonDB.pl b/anonDB.pl index f6ea1b5..317913b 100755 --- a/anonDB.pl +++ b/anonDB.pl @@ -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}) { diff --git a/syncDB.pl b/syncDB.pl index 70a11d6..e2ca660 100755 --- a/syncDB.pl +++ b/syncDB.pl @@ -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 {