Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
61298e47
Commit
61298e47
authored
Aug 24, 2013
by
Marcin Płonka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skipping facts not available on AIX WPARs
parent
a0447a52
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
20 deletions
+22
-20
library/system/setup
+22
-20
No files found.
library/system/setup
View file @
61298e47
...
@@ -1086,26 +1086,27 @@ class AIX(Hardware):
...
@@ -1086,26 +1086,27 @@ class AIX(Hardware):
rc
,
out
,
err
=
module
.
run_command
(
"/usr/sbin/lsdev -Cc processor"
)
rc
,
out
,
err
=
module
.
run_command
(
"/usr/sbin/lsdev -Cc processor"
)
i
=
0
if
out
:
for
line
in
out
.
split
(
'
\n
'
):
i
=
0
for
line
in
out
.
split
(
'
\n
'
):
if
'Available'
in
line
:
if
'Available'
in
line
:
if
i
==
0
:
if
i
==
0
:
data
=
line
.
split
(
' '
)
data
=
line
.
split
(
' '
)
cpudev
=
data
[
0
]
cpudev
=
data
[
0
]
i
+=
1
i
+=
1
self
.
facts
[
'processor_count'
]
=
int
(
i
)
self
.
facts
[
'processor_count'
]
=
int
(
i
)
rc
,
out
,
err
=
module
.
run_command
(
"/usr/sbin/lsattr -El "
+
cpudev
+
" -a type"
)
rc
,
out
,
err
=
module
.
run_command
(
"/usr/sbin/lsattr -El "
+
cpudev
+
" -a type"
)
data
=
out
.
split
(
' '
)
data
=
out
.
split
(
' '
)
self
.
facts
[
'processor'
]
=
data
[
1
]
self
.
facts
[
'processor'
]
=
data
[
1
]
rc
,
out
,
err
=
module
.
run_command
(
"/usr/sbin/lsattr -El "
+
cpudev
+
" -a smt_threads"
)
rc
,
out
,
err
=
module
.
run_command
(
"/usr/sbin/lsattr -El "
+
cpudev
+
" -a smt_threads"
)
data
=
out
.
split
(
' '
)
data
=
out
.
split
(
' '
)
self
.
facts
[
'processor_cores'
]
=
int
(
data
[
1
])
self
.
facts
[
'processor_cores'
]
=
int
(
data
[
1
])
def
get_memory_facts
(
self
):
def
get_memory_facts
(
self
):
pagesize
=
4096
pagesize
=
4096
...
@@ -1123,12 +1124,13 @@ class AIX(Hardware):
...
@@ -1123,12 +1124,13 @@ class AIX(Hardware):
# /dev/ada0p3 314368 0 314368 0%
# /dev/ada0p3 314368 0 314368 0%
#
#
rc
,
out
,
err
=
module
.
run_command
(
"/usr/sbin/lsps -s"
)
rc
,
out
,
err
=
module
.
run_command
(
"/usr/sbin/lsps -s"
)
lines
=
out
.
split
(
'
\n
'
)
if
out
:
data
=
lines
[
1
]
.
split
()
lines
=
out
.
split
(
'
\n
'
)
swaptotal_mb
=
long
(
data
[
0
]
.
rstrip
(
'MB'
))
data
=
lines
[
1
]
.
split
()
percused
=
int
(
data
[
1
]
.
rstrip
(
'
%
'
))
swaptotal_mb
=
long
(
data
[
0
]
.
rstrip
(
'MB'
))
self
.
facts
[
'swaptotal_mb'
]
=
swaptotal_mb
percused
=
int
(
data
[
1
]
.
rstrip
(
'
%
'
))
self
.
facts
[
'swapfree_mb'
]
=
long
(
swaptotal_mb
*
(
100
-
percused
)
/
100
)
self
.
facts
[
'swaptotal_mb'
]
=
swaptotal_mb
self
.
facts
[
'swapfree_mb'
]
=
long
(
swaptotal_mb
*
(
100
-
percused
)
/
100
)
def
get_dmi_facts
(
self
):
def
get_dmi_facts
(
self
):
rc
,
out
,
err
=
module
.
run_command
(
"/usr/sbin/lsattr -El sys0 -a fwversion"
)
rc
,
out
,
err
=
module
.
run_command
(
"/usr/sbin/lsattr -El sys0 -a fwversion"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment