pacojp-skutil 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/skutil.rb +9 -1
- metadata +1 -1
data/lib/skutil.rb
CHANGED
@@ -131,6 +131,14 @@ BODY
|
|
131
131
|
def self.df
|
132
132
|
`/bin/df -h`.chomp
|
133
133
|
end
|
134
|
+
|
135
|
+
def self.ps
|
136
|
+
`/bin/ps -ef`.chomp
|
137
|
+
end
|
138
|
+
|
139
|
+
def self.netstat
|
140
|
+
`/usr/sbin/netstat -an`.chomp
|
141
|
+
end
|
134
142
|
|
135
143
|
def self.execute(command)
|
136
144
|
`#{command}`.chomp
|
@@ -142,7 +150,7 @@ BODY
|
|
142
150
|
self_methods.delete("execute")
|
143
151
|
st = ""
|
144
152
|
self_methods.each do |method|
|
145
|
-
st << "#{method}:\n #{self.send(method).to_s.split("\n").join("
|
153
|
+
st << "#{method}:\n #{self.send(method).to_s.split("\n").join("\n ")}\n"
|
146
154
|
end
|
147
155
|
return st
|
148
156
|
end
|