App::ProcTrends::Cron - The great new App::ProcTrends::Cron!
Version 0.03
use App::ProcTrends::Cron; my $ref = { rrd_dir => '/foo', }; my $obj = App::ProcTrends::Cron->new( $ref ); my $data = $obj->run_ps(); my $rc = $obj->store_rrd( $data );
The constructor. Takes a hashref to override defaults.
Destructor. Alarm should be cleared upon exit.
Driver method to execute ps, parses the output and return data structure
Parses a command and turns into a valid RRD DS name.
Trims metrics <= threshold for cpu, rss
Returns what to divide the ps RSS output by. For example, if the unit is MB then we would divide KB by 1024.
Driver method to: 1. create directories if they don't already exist. 2. get a list of RRDs I already have (so that I can fill in with 0's to avoid spotty graphs) 3. go through the current list of metrics a. create RRD if needed b. update RRD c. pop them from my list if exists 4. go through the remaining RRDs from my list then fill with 0's
Creates an RRD file.
Updates an rrd file
Signal handler for alarm(). It is an instance method because I need access to the attributes.
Set signal handlers. The only one I'm expecting is SIGALRM.
Satoshi Yagi, <satoshi.yagi at yahoo.com>
<satoshi.yagi at yahoo.com>
Please report any bugs or feature requests to bug-app-proctrends-cron at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=App-ProcTrends-Cron. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-app-proctrends-cron at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc App::ProcTrends::Cron
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
http://rt.cpan.org/NoAuth/Bugs.html?Dist=App-ProcTrends-Cron
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/App-ProcTrends-Cron
CPAN Ratings
http://cpanratings.perl.org/d/App-ProcTrends-Cron
Search CPAN
http://search.cpan.org/dist/App-ProcTrends-Cron/
Copyright 2013 Satoshi Yagi.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install App::ProcTrends::RRD, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::ProcTrends::RRD
CPAN shell
perl -MCPAN -e shell install App::ProcTrends::RRD
For more information on module installation, please visit the detailed CPAN module installation guide.