File tree Expand file tree Collapse file tree 3 files changed +17
-5
lines changed Expand file tree Collapse file tree 3 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ $PMCD_REQUEST_TIMEOUT=120
36
36
# (LOCALHOSTNAME is expanded to local: in the first column,
37
37
# and to `hostname` in the fourth (directory) column.)
38
38
#
39
- LOCALHOSTNAME y n "PCP_LOG_DIR/pmlogger/LOCALHOSTNAME/ $(date +%Y)/$(date +%m)/$(date +%d)" -r -c /etc/pcp/pmlogger/pmlogger-supremm.config
39
+ LOCALHOSTNAME y n "PCP_LOG_DIR/pmlogger/$(date +%Y)/$(date +%m)/LOCALHOSTNAME/$(date +%Y)-$(date +%m)- $(date +%d)" -r -c /etc/pcp/pmlogger/pmlogger-supremm.config
40
40
41
41
# Note: if multiple pmloggers for the same host (e.g. both primary and
42
42
# non-primary loggers are active), then they MUST use different
Original file line number Diff line number Diff line change 2
2
3
3
use strict;
4
4
use Sys::Hostname;
5
+ use Date::Simple;
5
6
use POSIX qw( strftime) ;
6
7
7
8
my $jobid = $ENV {SLURM_JOB_ID };
9
+ my $today = Date::Simple-> new;
10
+
11
+ my $logyear = $today -> format(" %Y " );
12
+ my $logmonth = $today -> format(" %m " );
13
+ my $logday = $today -> format(" %d " );
14
+
8
15
my $jobdatelong = strftime " %Y%m%d .%H .%M .%S " , localtime ;
9
16
my $fullhost = hostname();
10
17
11
18
# PCP End of job logging
12
19
13
- my $logdir = " /<GLOBAL_SHARED_SPACE>/supremm/pmlogger/$fullhost /$logyear / $logmonth / $logday " ;
20
+ my $logdir = " /<GLOBAL_SHARED_SPACE>/supremm/pmlogger/$logyear / $logmonth / $ fullhost /$logyear - $logmonth - $logday " ;
14
21
system (" env PMLOGGER_EPILOG=yes pmlogger -U pcp -c /etc/pcp/pmlogger/pmlogger-supremm.config -s 1 -l /tmp/job-$jobid -end-$jobdatelong .log $logdir /job-$jobid -end-$jobdatelong &> /dev/null" );
15
22
16
23
exit (0);
Original file line number Diff line number Diff line change 2
2
3
3
use strict;
4
4
use Sys::Hostname;
5
+ use Date::Simple;
5
6
use POSIX qw( strftime setsid) ;
6
7
8
+ my $today = Date::Simple-> new;
9
+
10
+ my $logyear = $today -> format(" %Y " );
11
+ my $logmonth = $today -> format(" %m " );
12
+ my $logday = $today -> format(" %d " );
13
+
7
14
my $jobdatelong = strftime " %Y%m%d .%H .%M .%S " , localtime ;
8
15
my $host = ( split (' \.' , hostname()) )[0];
9
16
my $jobid = $ENV {SLURM_JOB_ID };
@@ -27,11 +34,9 @@ open( STDERR, ">&STDOUT" ); # Detach STDERR from shell
27
34
chdir ' /tmp' ; # Change working directory
28
35
umask (0); # Reset umask
29
36
30
- my $logdir = " /<GLOBAL_SHARED_SPACE>/supremm/pmlogger/$fullhost /$logyear / $logmonth / $logday " ;
37
+ my $logdir = " /<GLOBAL_SHARED_SPACE>/supremm/pmlogger/$logyear / $logmonth / $ fullhost /$logyear - $logmonth - $logday " ;
31
38
32
39
# The prolog config runs every 10 seconds, we exit after 4 samples
33
40
system (" env PMLOGGER_PROLOG=yes pmlogger -U pcp -c /etc/pcp/pmlogger/pmlogger-supremm.config -s 4 -l /tmp/job-$jobid -begin-$jobdatelong .log $logdir /job-$jobid -begin-$jobdatelong &> /dev/null" );
34
41
35
- exec ( $cmd );
36
-
37
42
exit (0)
You can’t perform that action at this time.
0 commit comments