Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AossTower
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MetObs
AossTower
Commits
030de998
Verified
Commit
030de998
authored
7 years ago
by
David Hoese
Browse files
Options
Downloads
Patches
Plain Diff
Fix handling unexpected loggernet output
parent
4473c12e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/loggernet_rotate.sh
+7
-2
7 additions, 2 deletions
scripts/loggernet_rotate.sh
with
7 additions
and
2 deletions
scripts/loggernet_rotate.sh
+
7
−
2
View file @
030de998
...
...
@@ -52,7 +52,7 @@ EOF
# specially handles 2400 which should go for the next day, not the past day
yyyy_jjj_tower_split
()
{
awk_command
=
'
NR>header_size {
(
NR>header_size
) && ($1 == "1")
{
time_spec = sprintf("%04d 01 %03d 00 00 00", $2, $3);
epoch_seconds = mktime(time_spec);
if ($4 == "2400")
...
...
@@ -110,7 +110,12 @@ for file_suffix in $FILE_SUFFIXES; do
yyyy_jjj_tower_split
$input_file
# copy the header back to the original file
cp
$header_fn
$input_file
if
[
-s
$header_fn
]
;
then
cp
$header_fn
$input_file
else
# loggernet doesn't like empty destination files
rm
$input_file
fi
# remove the temporary header file
rm
${
header_fn
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment