GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

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

gather -- collect and display system statistics

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.

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

  gather help

to read their description.

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--$".

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

Mikolaj Golub <to.my.trociny@gmail.com>
2016-06-29 perl v5.32.1

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.