summaryrefslogtreecommitdiff
path: root/lib/ohai
diff options
context:
space:
mode:
authorBlake Irvin & Eric Saxby <pair+blake+sax@wanelo.com>2013-08-27 13:18:43 -0700
committerBryan McLellan <btm@opscode.com>2013-10-10 11:43:34 -0700
commit4e5bc2d4c9a5c711e95a4b83c4813dd4ad393db9 (patch)
tree562d68c2d05e57710f9109a074f28ef2cdd7d856 /lib/ohai
parentbde85361c9df362cb58285db786db76e9f55dc6b (diff)
downloadohai-4e5bc2d4c9a5c711e95a4b83c4813dd4ad393db9.tar.gz
Add memory check for solaris2
Diffstat (limited to 'lib/ohai')
-rw-r--r--lib/ohai/plugins/solaris2/memory.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/ohai/plugins/solaris2/memory.rb b/lib/ohai/plugins/solaris2/memory.rb
new file mode 100644
index 00000000..0f0a4484
--- /dev/null
+++ b/lib/ohai/plugins/solaris2/memory.rb
@@ -0,0 +1,24 @@
+#
+# License:: Apache License, Version 2.0
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+Ohai.plugin do
+ provides "memory"
+
+ collect_data do
+ memory Mash.new
+ memory[:total] = from("prtconf -m").to_i
+ end
+end