Created
July 22, 2015 15:18
-
-
Save raphink/d9ba6af47a0626250bbb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'augeas' | |
Augeas.open(nil, nil, Augeas::NO_MODL_AUTOLOAD) do |aug| | |
aug.transform( | |
:name => 'NagiosObjects', | |
:lens => 'NagiosObjects.lns', | |
:incl => ['/home/rpinson/bas/augeas/etc/nagios.d/*.cfg'], | |
:excl => [] | |
) | |
aug.load! | |
for i in 1..1000 | |
p aug.get("/files/home/rpinson/bas/augeas/etc/nagios.d/service-test-#{i}.cfg/service/use") | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> \time -v ruby gets.rb | |
Command being timed: "ruby gets.rb" | |
User time (seconds): 0.34 | |
System time (seconds): 0.04 | |
Percent of CPU this job got: 99% | |
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:00.39 | |
Average shared text size (kbytes): 0 | |
Average unshared data size (kbytes): 0 | |
Average stack size (kbytes): 0 | |
Average total size (kbytes): 0 | |
Maximum resident set size (kbytes): 11932 | |
Average resident set size (kbytes): 0 | |
Major (requiring I/O) page faults: 0 | |
Minor (reclaiming a frame) page faults: 3111 | |
Voluntary context switches: 3 | |
Involuntary context switches: 182 | |
Swaps: 0 | |
File system inputs: 0 | |
File system outputs: 0 | |
Socket messages sent: 0 | |
Socket messages received: 0 | |
Signals delivered: 0 | |
Page size (bytes): 4096 | |
Exit status: 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment