Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
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
RadioObservatory
LOFAR
Commits
f66c6c53
Commit
f66c6c53
authored
7 years ago
by
Jorrit Schaap
Browse files
Options
Downloads
Patches
Plain Diff
Task #8721: minor fixes
parent
1b9bbe12
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
LTA/ltastorageoverview/lib/scraper.py
+5
-4
5 additions, 4 deletions
LTA/ltastorageoverview/lib/scraper.py
with
5 additions
and
4 deletions
LTA/ltastorageoverview/lib/scraper.py
+
5
−
4
View file @
f66c6c53
...
...
@@ -88,7 +88,7 @@ class Location:
a directory at the storage site. for example: /pnfs/grid.sara.nl/data/lofar/storage
'''
self
.
srmurl
=
srmurl
self
.
directory
=
directory
self
.
directory
=
directory
.
rstrip
(
'
/
'
)
def
path
(
self
):
'''
returns the full path srmurl + directory
'''
...
...
@@ -127,6 +127,7 @@ class Location:
# srmls can only yield max 900 items in a result, hence we can recurse for the next 900 by using the offset
lexar_nr
=
4
#randint(3,4)
lexar_host
=
'
ingest@10.178.1.%d
'
%
(
lexar_nr
,)
lexar_host
=
'
ingest@10.144.4.%d
'
%
(
74
+
lexar_nr
,)
cmd
=
[
'
ssh
'
,
'
-tt
'
,
'
-n
'
,
'
-x
'
,
'
-q
'
,
lexar_host
,
"
bash
"
,
"
-c
"
,
"
\'
source %s;srmls -l -count=900 -offset=%d %s%s
\'
"
%
(
'
/globalhome/ingest/service/bin/init.sh
'
if
lexar_nr
<=
2
else
'
/globalhome/ingest/.grid/.ingest_profile
'
,
offset
,
...
...
@@ -221,7 +222,7 @@ class LocationResult:
A list of files in this location
'''
self
.
location
=
location
self
.
subDirectories
=
[
s
.
rstrip
(
'
/
'
)
for
s
in
subDirectories
]
if
subDirectories
else
[]
self
.
subDirectories
=
subDirectories
if
subDirectories
else
[]
self
.
files
=
files
if
files
else
[]
def
__str__
(
self
):
...
...
@@ -458,8 +459,8 @@ def main():
# spawn new ResultGetterThreads
# do not overload this host system
while
(
numLocationsInQueues
()
>
0
and
totalNumGetters
()
<
options
.
parallel
and
os
.
getloadavg
()[
0
]
<
4
*
multiprocessing
.
cpu_count
()):
totalNumGetters
()
<
options
.
parallel
and
os
.
getloadavg
()[
0
]
<
4
*
multiprocessing
.
cpu_count
()):
sitesStats
=
db
.
visitStats
(
datetime
.
datetime
.
utcnow
()
-
VISIT_INTERVAL
)
for
site_name
,
site_stats
in
sitesStats
.
items
():
...
...
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