gather man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

GATHER.PL.IN(1)	      User Contributed Perl Documentation      GATHER.PL.IN(1)

NAME
       gather -- collect and display system statistics

DESCRIPTION
       gather can be used to store system statistics provided by variety of
       system utils and display it. It is just a wrapper around these utils to
       make work with system statistics more convenient.

       Commands we want to use to get statistics should be described in
       gather.map file. This file contains a map -- Perl hash structure
       initialized to something like this:

	 %map = ('uptime'   => {'desc' => 'system uptime',
				'cmd'  => '/usr/bin/uptime'},
		 'sysctl'   => {'desc' => 'sysctl variables',
				'cmd'  => '/sbin/sysctl -a'},
		 'sockstat' => {'desc' => 'sockstat output',
				'cmd'  => '/usr/bin/sockstat'});

       Location of gather.map and other gather configuration variables are set
       in gather.cfg file.

       When you have configured gather.cfg and the map you can run gather to
       collect data:

	 gather collect

       gather will run all commands specified in map and store output in
       $datadir directory. It is supposed that you will set up cron to run
       this command with desired periodicity.

       If you don't have Perl on the host where you want to collect statistics
       you can generate shell script on another host (e.g. your workstation)
       using the command:

	 gather script

       and use it. Collected statistics can be copied to your workstation and
       analyzed with gather.

       Also you will probably need to setup command in crontab to run daily
       and expire old data:

	 gather expire <days>

       otherwise you will risk to run out of free space. Data older then
       <days> will be deleted.

       The data are stored in $datadir directory (compressed if this is
       specified in config or by command line switch). You can browse and look
       on it as is, but in many cases it is convenient to use gather:

	 gather show <subcommand>

       Run:

	 gather show help

       to see minihelp about available subcommands.

       Running the command:

	 gather arch -t <timeperiod> <archname>

       you can archive data for specified time period.

OPTIONS
       There are some options that can be used to modify behavior of gather
       utility. Run

	 gather help

       to read their description.

TIMEPERIODS
       Running show command to display some statistics you should specify
       timeperiod with option -t.

       The most general form of timeperiod is:

	 YYYY-MM-DD/HH/MM--yyyy-mm-dd/hh/mm

       where YYYY-MM-DD/HH/MM is start of timeperiod and yyyy-mm-dd/hh/mm is
       its end. You can skip MM and HH in start or end part of range. E.g:

	 2008-11-16/14--2008-11-17

       This is interpreted as:

	 2008-11-16/14/00--2008-11-17/23/59

       It is also possible to specify only the first part of a timeperiod.
       E.g:

	 2008-11-16/14 (interpreted as 2008-11-16/14/00--2008-11-16/14/59)

       or

	 2008-11-16 (interpreted as 2008-11-16/00/00--2008-11-16/23/59)

       If day, hour or minute in end part of timeperiod is the same as in the
       start one, you can skip it:

	 YYYY-MM-DD/HH/MM--/hh/mm (interpreted as YYYY-MM-DD/HH/MM--YYYY-MM-DD/hh/mm)

	 YYYY-MM-DD/HH/MM--//mm (interpreted as YYYY-MM-DD/HH/MM--YYYY-MM-DD/HH/mm)

	 YYYY-MM-DD/HH/MM--yyyy-mm-dd// (interpreted as YYYY-MM-DD/HH/MM--yyyy-mm-dd/HH/MM)

	 and so on.

       Here are some shortcuts you can use to reduce typing:

	 .	   current day

	 ./.	   current day/current hour

	 ././.	   current day/current hour/current minute

	 $	   date of the last collection

	 Nd	   N days ago

	 Nh	   N hours ago

	 Nm	   N minutes ago

       If N{d,h,m} is used alone (there is only start part) then it is
       replaced by timeperiod "from that time by now". I.e. timeperiod "Nd" is
       the same as "Nd--$".

SEE ALSO
       sysctl(8), netstat(1), vmstat(8), ps(1), iostat(8)

AUTHOR
       Mikolaj Golub <to.my.trociny@gmail.com>

perl v5.20.3			  2012-05-26		       GATHER.PL.IN(1)
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net