Skip to content

Commit

Permalink
Merge pull request #89 from tonyskapunk/recap_v1
Browse files Browse the repository at this point in the history
Release 1.0.0
  • Loading branch information
tonyskapunk authored Jun 1, 2017
2 parents 9ba7b00 + 252024f commit f6e0329
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 147 deletions.
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Change Log
All notable changes to this project will be documented in this file.

## [Unreleased]
## [1.0.0] - 2017-05-15
- Record point-in-time CPU.
- Multiple bug fixing on recaptool.
- Multiple bug fixing on recap.
- Refactor of recaplog.
- Fix plesk mysql bug.
- Install recaptool man page.
- Adding specific requirements for bash(>=4) and sysstat(>=9).
- Obsoletes and provides rs-sysmon.
- Include recaptool man page.
- RPM spec file specifics: modified to update requirements, obsoletes, provides rs-sysmon.
- Better support for multiple mysql instances.
- Makefile updated to allow multiple distros alignment and to include new man pages.
- Adjust spec for Makefile.
- Makefile now uses /usr/local as default for DESTDIR.
- fdisk warnings(stderr) are now included in the logs(stdin).

## [0.9.14] - 2016-05-11
- Fix #55 Code clean up, typos fixed and functions renamed
Expand Down
59 changes: 42 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,46 +9,71 @@ CRONDIR ?= $(SYSCONFDIR)/cron.d
LOGDIR ?= /var/log

all:
@echo "Nothing to compile, run make install."
@echo "Nothing to compile, please choose a specific target:"
@echo " install (includes install-base, install-man, and install-doc)"
@echo " install-base"
@echo " install-man"
@echo " install-doc"
@echo " uninstall (includes uninstall-base, uninstall-man, and uninstall-doc)"
@echo " uninstall-base"
@echo " uninstall-man"
@echo " uninstall-doc"

install:
src/recap.cron:
@sed -e 's|@BINDIR@|$(BINDIR)|' src/recap.cron.in > src/recap.cron

clean:
@rm -f src/recap.cron

install: install-base install-man install-doc

uninstall: uninstall-base uninstall-man uninstall-doc

install-base: src/recap.cron
@echo "Installing scripts..."
@install -Dm0755 src/recap $(DESTDIR)$(BINDIR)/recap
@install -Dm0755 src/recaplog $(DESTDIR)$(BINDIR)/recaplog
@install -Dm0755 src/recaptool $(DESTDIR)$(BINDIR)/recaptool
@echo "Installing man pages..."
@install -Dm0644 src/recap.5 $(DESTDIR)$(MANDIR)/man5/recap.5
@install -Dm0644 src/recap.8 $(DESTDIR)$(MANDIR)/man8/recap.8
@install -Dm0644 src/recaplog.8 $(DESTDIR)$(MANDIR)/man8/recaplog.8
@install -Dm0644 src/recaptool.8 $(DESTDIR)$(MANDIR)/man8/recaptool.8
@echo "Installing configuration..."
@install -Dm0644 src/recap.conf $(DESTDIR)$(SYSCONFDIR)/recap
@echo "Installing cron job..."
@install -Dm0644 src/recap.cron $(DESTDIR)$(CRONDIR)/recap
@sed -i 's,/usr/sbin/,$(BINDIR)/,' $(DESTDIR)$(CRONDIR)/recap
@echo "Installing docs..."
@install -dm0755 $(DESTDIR)$(DOCDIR)/recap
@install -Dm0644 CHANGELOG.md README.md COPYING -t $(DESTDIR)$(DOCDIR)/recap
@echo "Creating log directories..."
@install -dm0750 $(DESTDIR)$(LOGDIR)/recap
@install -dm0750 $(DESTDIR)$(LOGDIR)/recap/backups
@install -dm0750 $(DESTDIR)$(LOGDIR)/recap/snapshots

uninstall:
install-man:
@echo "Installing man pages..."
@install -Dm0644 src/recap.5 $(DESTDIR)$(MANDIR)/man5/recap.5
@install -Dm0644 src/recap.8 $(DESTDIR)$(MANDIR)/man8/recap.8
@install -Dm0644 src/recaplog.8 $(DESTDIR)$(MANDIR)/man8/recaplog.8
@install -Dm0644 src/recaptool.8 $(DESTDIR)$(MANDIR)/man8/recaptool.8

install-doc:
@echo "Installing docs..."
@install -dm0755 $(DESTDIR)$(DOCDIR)/recap
@install -Dm0644 CHANGELOG.md README.md COPYING -t $(DESTDIR)$(DOCDIR)/recap

uninstall-base:
@echo "Removing scripts..."
@rm -f $(DESTDIR)$(BINDIR)/recap
@rm -f $(DESTDIR)$(BINDIR)/recaplog
@rm -f $(DESTDIR)$(BINDIR)/recaptool
@echo "Removing configuration..."
@rm -f $(DESTDIR)$(SYSCONFDIR)/recap
@echo "Removing cron job..."
@rm -f $(DESTDIR)$(CRONDIR)/recap

uninstall-man:
@echo "Removing man pages..."
@rm -f $(DESTDIR)$(MANDIR)/man5/recap.5
@rm -f $(DESTDIR)$(MANDIR)/man8/recap.8
@rm -f $(DESTDIR)$(MANDIR)/man8/recaplog.8
@rm -f $(DESTDIR)$(MANDIR)/man8/recaptool.8

uninstall-doc:
@echo "Removing docs..."
@rm -Rf $(DESTDIR)$(DOCDIR)/recap
@echo "Removing configuration..."
@rm -f $(DESTDIR)$(SYSCONFDIR)/recap
@echo "Removing cron job..."
@rm -f $(DESTDIR)$(CRONDIR)/recap

.PHONY: install uninstall purge
.PHONY: install install-base install-man install-doc uninstall uninstall-base uninstall-man uninstall-doc clean
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@ various information about the server.
## Dependencies
* git - Installation
* bc - arithmetic calculations
* elinks (or another cli web browser) - apache fullstatus
* net-tools - netstat report
* sysstat - provides 'iostat' for I/O statistics
* iotop - simple top-like I/O monitor

## Installation
1. Install the required dependencies:
* Debian/Ubuntu - `apt-get install git bc elinks net-tools sysstat iotop`
* RHEL/CentOS - `yum install git bc elinks net-tools sysstat iotop`
* Debian/Ubuntu - `apt-get install bc gawk git iotop make net-tools psmisc sysstat`
* RHEL/CentOS - `yum install bc gawk git iotop make net-tools psmisc sysstat`
2. Clone this repository: `git clone https://github.com/rackerlabs/recap.git`
3. Change into the new directory: `cd recap`
4. Install the program: `make install`
Expand Down
19 changes: 9 additions & 10 deletions src/recap.cron → src/recap.cron.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,32 @@
#uncomment for the files you want saved

# runs at boot, backup the last set of reports generated prior to a reboot
@reboot root /usr/sbin/recap -B
@reboot root @BINDIR@/recap -B

#The following are examples of times to run recap
#This file should be in /etc/cron.d
#Only uncomment or create one active line per installation

#At 2am every day
#0 2 * * * root /usr/sbin/recap
#0 2 * * * root @BINDIR@/recap

#At 2am and 2pm every day
#0 2,14 * * * root /usr/sbin/recap
#0 2,14 * * * root @BINDIR@/recap

#At 2am, 8am, 2pm, 8pm every day
#0 2,8,14,20 * * * root /usr/sbin/recap
#0 2,8,14,20 * * * root @BINDIR@/recap

#Every hour
#0 * * * * root /usr/sbin/recap
#0 * * * * root @BINDIR@/recap

#Every 30 minutes
#*/30 * * * * root /usr/sbin/recap
#*/30 * * * * root @BINDIR@/recap

#Every 10 minutes
*/10 * * * * root /usr/sbin/recap
*/10 * * * * root @BINDIR@/recap

#Every 5 minutes
#*/5 * * * * root /usr/sbin/recap
#*/5 * * * * root @BINDIR@/recap

# Pack and clear log files
0 1 * * * root /usr/sbin/recaplog

0 1 * * * root @BINDIR@/recaplog
16 changes: 13 additions & 3 deletions util/packaging/rpm/recap.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: recap
Version: 0.9.14
Version: 1.0.0
Release: 1.rs%{?dist}
Summary: System status reporting
Group: Applications/System
Expand All @@ -8,7 +8,7 @@ Url: https://github.com/rackerlabs/%{name}
Source0: https://github.com/rackerlabs/%{name}/archive/%{version}.tar.gz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: sysstat, coreutils, procps, grep, gawk, bc, elinks, net-tools, iotop
Requires: bash >= 4, sysstat >= 9, coreutils, procps, grep, gawk, bc, net-tools, iotop, psmisc
Obsoletes: rs-sysmon < 0.9.5-2
Provides: rs-sysmon = %{version}-%{release}

Expand All @@ -25,7 +25,10 @@ optional reporting on Apache, MySQL, and network connections.

%install
%{__rm} -rf %{buildroot}
DESTDIR=%{buildroot} make install
export PREFIX=%{_prefix}
export DESTDIR=%{buildroot}
make install-base
make install-man


%clean
Expand All @@ -47,9 +50,16 @@ DESTDIR=%{buildroot} make install
%{_mandir}/man5/recap.5.gz
%{_mandir}/man8/recap.8.gz
%{_mandir}/man8/recaplog.8.gz
%{_mandir}/man8/recaptool.8.gz


%changelog
* Mon May 15 2017 Tony Garcia <tony.garcia@rackspace.com> - 1.0.0-1.rs
- Update to version 1.0.0
- Include recaptool man page.
- Clean up requirements.
- Obsoletes and provides rs-sysmon.

* Wed May 11 2016 Ben Harper <ben.harper@rackspace.com> - 0.9.14-1.rs
- Latest version
- Fixing typos, removing commented old code, renaming functions
Expand Down
91 changes: 0 additions & 91 deletions util/recap-installer

This file was deleted.

19 changes: 0 additions & 19 deletions util/recap.plist

This file was deleted.

0 comments on commit f6e0329

Please sign in to comment.