/usr/sbin/octo_data is in octopussy 1.0.6-0ubuntu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 | #!/usr/bin/perl -w
=head1 NAME
octo_data - Octopussy Data Extractor program
=head1 SYNOPSIS
octo_data <dispatcher|parser>
=head1 DESCRIPTION
octo_data is the program used by the Octopussy Project to get internal data
=cut
use strict;
use warnings;
use Readonly;
use Getopt::Long;
Getopt::Long::Configure('bundling');
use Octopussy;
use Octopussy::Cache;
use Octopussy::FS;
Readonly my $PROG_NAME => 'octo_data';
Readonly my $PROG_VERSION => Octopussy::Version();
my ($help, $opt_cache, $opt_type, $opt_key);
=head1 FUNCTIONS
=head2 Help()
Prints Help
=cut
sub Help
{
my $help_str = <<"EOF";
$PROG_NAME (version $PROG_VERSION)
Usage: $PROG_NAME --cache dispatcher --type device <device> --key <key>
$PROG_NAME --cache dispatcher --type devicetype <devicetype> --key <key>
EOF
print $help_str;
exit;
}
#
# MAIN
#
exit if (!Octopussy::Valid_User($PROG_NAME));
my $status = GetOptions(
'h' => \$help,
'help' => \$help,
'cache=s' => \$opt_cache,
'type=s' => \$opt_type,
'key=s' => \$opt_key
);
Help()
if ((!$status)
|| ($help)
|| (!defined $opt_cache)
|| (!defined $opt_type)
|| (!defined $opt_key));
my $dir_pid = Octopussy::FS::Directory('running');
my $cache = Octopussy::Cache::Init("octo_${opt_cache}");
my $type = $cache->get("dispatcher_stats_${opt_type}s");
print $type->{$opt_key};
=head1 AUTHOR
Sebastien Thebert <octo.devel@gmail.com>
=head1 SEE ALSO
octo_extractor, octo_parser, octo_uparser, octo_reporter, octo_rrd,
octo_scheduler
=cut
|