($@) {
print encode_json( { version => 1, data => {}, error => 1, errorString => 'load failed... ' . $@ } ) . "\n";
exit 1;
}
my $data = encode_json( $monitor->run );
pri
package OSLV::Monitor::Backends::cgroups;
use 5.006;
use strict;
use warnings;
use JSON;
use Clone 'clone';
use File::Slurp;
use IO::Interface::Simple;
use Math::BigInt;
use Scalar::Util qw(looks_lik
- base_dir :: Path to use for the base dir, where the proc/cgroup
cache, linux_cache.json, is is created.
Default :: /var/cache/oslv_monitor
- obj :: The OSLVM::Monitor objec
=> {},
obj => $opts{obj},
cache_file => $opts{base_dir} . '/linux_cache.json',
counters => {
'cpu-time' => 1,
'system-time'
package OSLV::Monitor::Backends::FreeBSD;
use 5.006;
use strict;
use warnings;
use JSON;
use Clone 'clone';
use File::Slurp;
use List::Util qw( uniq );
use Scalar::Util qw(looks_like_number);
=hea
$return_hash_ref=$backend->run;
}
The stats names match those produced by "ps --libxo json".
=head2 METHODS
=head2 new
Initiates the backend object.
my $backend=OSLV::MOnitor::Back
- base_dir :: Path to use for the base dir, where the proc
cache, freebsd_proc_cache.json, is is created.
Default :: /var/cache/oslv_monitor
- obj :: The OSLVM::Monitor objec