From a647d21b81115ef6a81b5644936b725a9aa3bb8e Mon Sep 17 00:00:00 2001 From: "Paul Buetow (mars.fritz.box)" Date: Sun, 2 Mar 2014 13:31:56 +0100 Subject: initial working release --- docs/guprecords.1 | 170 +++++++++++++++------------------------------------- docs/guprecords.pod | 114 +++++++++++------------------------ docs/guprecords.txt | 132 +++++++++++----------------------------- 3 files changed, 117 insertions(+), 299 deletions(-) (limited to 'docs') diff --git a/docs/guprecords.1 b/docs/guprecords.1 index ab84c6c..06050bd 100644 --- a/docs/guprecords.1 +++ b/docs/guprecords.1 @@ -123,146 +123,70 @@ .rm #[ #] #H #V #F C .\" ======================================================================== .\" -.IX Title "FOO 1" -.TH FOO 1 "2014-02-03" "guprecords 0.0.0.0" "User Commands" +.IX Title "GUPRECORDS 1" +.TH GUPRECORDS 1 "2014-03-02" "guprecords 0.0.0.0" "User Commands" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" -guprecords \- A template project -.SH "WTF?" -.IX Header "WTF?" -You may use this project in order to build your own Debian package for your own project. This has been tested with Debian GNU/Linux Squeeze and Debian GNU/Linux Wheezy. -.PP -Feel free to modify any aspects. This project is just an empty example guprecords. -.PP -Follow these steps: -.SS "Install required packages" -.IX Subsection "Install required packages" -Run the following: +guprecords \- Global uptime records +.PP +Shows uprecord stats of several hosts at once. +.SS "Synopsis" +.IX Subsection "Synopsis" +guprecords [\-\-help] [\-\-total|\-\-all] [\-\-count=i] [\-\-indir=s] +.SS "Parameters" +.IX Subsection "Parameters" +.IP "\-\-help" 4 +.IX Item "--help" +Shows the help +.IP "\-\-total" 4 +.IX Item "--total" +Aggregates a total uptime for every single host. +.IP "\-\-all" 4 +.IX Item "--all" +Shows every individual uptime of all hosts. +.IP "\-\-count=i" 4 +.IX Item "--count=i" +Show i num of entries. Default is 23. +.IP "\-\-indir=s" 4 +.IX Item "--indir=s" +Read all the *.records files from dir s. Default is ./ +.SS "Quick getting started" +.IX Subsection "Quick getting started" +\fIUptimed\fR +.IX Subsection "Uptimed" +.PP +Firstival, you need to collect uprecords using the uptimed deaemon. To install it run: .PP .Vb 1 -\& sudo aptitude install lintian devscripts dpkg\-dev make perl +\& sudo aptitude install uptimed .Ve .PP -Todo: Ensure this are the correct packages. In order to test that I would have to setup a blank Debian system. -.SS "Compile the project" -.IX Subsection "Compile the project" -Go to the to level directory and run -.PP -.Vb 1 -\& make -.Ve +Please consult the uptimed and uprecords manpages. Please ensure to understand how it works and what it does. .PP -To test run +uptimed collects uprecords to .PP .Vb 1 -\& ./bin/guprecords +\& /var/spool/uptimed/records .Ve .PP -It should print out the version number of the project. -.SS "Create a Debian package" -.IX Subsection "Create a Debian package" -Go to the to level directory and run -.PP -.Vb 1 -\& make deb -.Ve -.PP -It will create the files like: -.PP -.Vb 4 -\& ../guprecords_0.0.0.0_all.deb -\& ../guprecords_0.0.0.0.dsc -\& ../guprecords_0.0.0.0_amd64.changes -\& ../guprecords_0.0.0.0.tar.gz -.Ve +And this file is used by guprecords for further processing. .PP -It should create a debian package in ../. Check and install it, e.g: -.PP -.Vb 2 -\& lintian \-\-pedantic ../guprecords_0.0.0.0_all.deb -\& sudo dpkg \-i ../guprecords_0.0.0.0_all.deb -.Ve -.PP -Run -.PP -.Vb 1 -\& dpkg \-L guprecords -.Ve -.PP -to see whats in there. You can now run -.PP -.Vb 1 -\& /usr/bin/guprecords -.Ve +\fICollect all the uprecords\fR +.IX Subsection "Collect all the uprecords" .PP -or for example +You may have several hosts with uptimed running already. Collect all the records file to a central repository (e.g. git). Name each file \s-1FQDN\s0.records and run .PP .Vb 1 -\& man guprecords +\& guprecords \-\-indir ./ .Ve -.SS "Read the Makefile" -.IX Subsection "Read the Makefile" -Read the Makefile in order to understand what's going on. -.SH "Customize" -.IX Header "Customize" -Now, since you understood everything feel free to customize everything the way you want it. E.g.: .PP -.Vb 1 -\& Don\*(Aqt use POD for documentation but LaTeX -\& -\& Compile a C program -\& -\& Include a ./lib dir, add it to the \*(Aqinstall\*(Aq Makefile rule -\& -\& etc etc. -.Ve -.PP -You should also consider the following: -.SS "Manual page" -.IX Subsection "Manual page" -This template is using \s-1POD\s0 for creating manual pages. Edit ./docs/guprecords.pod and run -.PP -.Vb 1 -\& make documentation -.Ve -.PP -in order to build ./docs/guprecords.1. The page will be included in the resulting debian package automatically. You can review the page with -.PP -.Vb 1 -\& man ./docs/guprecords.1 -.Ve -.SS "Renaming guprecords into your project name" -.IX Subsection "Renaming guprecords into your project name" -Rename all files which have *guprecords* included into your own new package name. You can do that with: -.PP -.Vb 3 -\& PROJECTNAME=yourproject -\& find . \-name \e*guprecords\e* | -\& while read guprecords; do git mv $guprecords ${guprecords/guprecords/$PROJECTNAME}; done -.Ve -.PP -Search all content and rename *guprecords* into your own new package name. You can do that with: -.PP -.Vb 2 -\& grep \-R guprecords . | grep \-v .git | -\& cut \-d: \-f1 | uniq | xargs sed \-i "s/guprecords/$PROJECTNAME/g" -.Ve -.SS "Updating ./debian" -.IX Subsection "Updating ./debian" -Edit the following files accordingly to your new project (e.g. with vim): -.PP -.Vb 3 -\& ./debian/control -\& ./debian/copyright -\& ./debian/README -.Ve -.SS "Update changelog" -.IX Subsection "Update changelog" -Go to the to level directory and run -.PP -.Vb 1 -\& dch \-i -.Ve +You may automate the collecting of all the uprecords using something like cron or puppet. +.SH "LICENSE" +.IX Header "LICENSE" +Se package description or project website. +.SH "AUTHOR" +.IX Header "AUTHOR" +Paul Buetow \- diff --git a/docs/guprecords.pod b/docs/guprecords.pod index 29ff2bd..951936a 100644 --- a/docs/guprecords.pod +++ b/docs/guprecords.pod @@ -1,116 +1,70 @@ =head1 NAME -guprecords - A template project +guprecords - Global uptime records -=head1 WTF? +Shows uprecord stats of several hosts at once. -You may use this project in order to build your own Debian package for your own project. This has been tested with Debian GNU/Linux Squeeze and Debian GNU/Linux Wheezy. +=head2 Synopsis -Feel free to modify any aspects. This project is just an empty example guprecords. +guprecords [--help] [--total|--all] [--count=i] [--indir=s] -Follow these steps: +=head2 Parameters -=head2 Install required packages +=over -Run the following: +=item --help - sudo aptitude install lintian devscripts dpkg-dev make perl +Shows the help -Todo: Ensure this are the correct packages. In order to test that I would have to setup a blank Debian system. +=item --total -=head2 Compile the project +Aggregates a total uptime for every single host. -Go to the to level directory and run +=item --all - make +Shows every individual uptime of all hosts. -To test run +=item --count=i - ./bin/guprecords +Show i num of entries. Default is 23. -It should print out the version number of the project. +=item --indir=s -=head2 Create a Debian package +Read all the *.records files from dir s. Default is ./ -Go to the to level directory and run +=back - make deb -It will create the files like: +=head2 Quick getting started - ../guprecords_0.0.0.0_all.deb - ../guprecords_0.0.0.0.dsc - ../guprecords_0.0.0.0_amd64.changes - ../guprecords_0.0.0.0.tar.gz +=head3 Uptimed -It should create a debian package in ../. Check and install it, e.g: +Firstival, you need to collect uprecords using the uptimed deaemon. To install it run: - lintian --pedantic ../guprecords_0.0.0.0_all.deb - sudo dpkg -i ../guprecords_0.0.0.0_all.deb + sudo aptitude install uptimed -Run +Please consult the L and L manpages. Please ensure to understand how it works and what it does. - dpkg -L guprecords +uptimed collects uprecords to -to see whats in there. You can now run + /var/spool/uptimed/records - /usr/bin/guprecords +And this file is used by guprecords for further processing. -or for example +=head3 Collect all the uprecords - man guprecords +You may have several hosts with uptimed running already. Collect all the records file to a central repository (e.g. git). Name each file FQDN.records and run -=head2 Read the Makefile + guprecords --indir ./ -Read the Makefile in order to understand what's going on. +You may automate the collecting of all the uprecords using something like cron or puppet. -=head1 Customize +=head1 LICENSE -Now, since you understood everything feel free to customize everything the way you want it. E.g.: +Se package description or project website. - Don't use POD for documentation but LaTeX +=head1 AUTHOR - Compile a C program +Paul Buetow - - Include a ./lib dir, add it to the 'install' Makefile rule - - etc etc. - -You should also consider the following: - -=head2 Manual page - -This template is using POD for creating manual pages. Edit ./docs/guprecords.pod and run - - make documentation - -in order to build ./docs/guprecords.1. The page will be included in the resulting debian package automatically. You can review the page with - - man ./docs/guprecords.1 - -=head2 Renaming guprecords into your project name - -Rename all files which have *guprecords* included into your own new package name. You can do that with: - - PROJECTNAME=yourproject - find . -name \*guprecords\* | - while read guprecords; do git mv $guprecords ${guprecords/guprecords/$PROJECTNAME}; done - -Search all content and rename *guprecords* into your own new package name. You can do that with: - - grep -R guprecords . | grep -v .git | - cut -d: -f1 | uniq | xargs sed -i "s/guprecords/$PROJECTNAME/g" - -=head2 Updating ./debian - -Edit the following files accordingly to your new project (e.g. with vim): - - ./debian/control - ./debian/copyright - ./debian/README - -=head2 Update changelog - -Go to the to level directory and run - - dch -i +=cut diff --git a/docs/guprecords.txt b/docs/guprecords.txt index 968b998..e8753ef 100644 --- a/docs/guprecords.txt +++ b/docs/guprecords.txt @@ -1,116 +1,56 @@ NAME - guprecords - A template project + guprecords - Global uptime records -WTF? - You may use this project in order to build your own Debian package for - your own project. This has been tested with Debian GNU/Linux Squeeze and - Debian GNU/Linux Wheezy. + Shows uprecord stats of several hosts at once. - Feel free to modify any aspects. This project is just an empty example - guprecords. + Synopsis + guprecords [--help] [--total|--all] [--count=i] [--indir=s] - Follow these steps: + Parameters + --help + Shows the help - Install required packages - Run the following: + --total + Aggregates a total uptime for every single host. - sudo aptitude install lintian devscripts dpkg-dev make perl + --all + Shows every individual uptime of all hosts. - Todo: Ensure this are the correct packages. In order to test that I - would have to setup a blank Debian system. + --count=i + Show i num of entries. Default is 23. - Compile the project - Go to the to level directory and run + --indir=s + Read all the *.records files from dir s. Default is ./ - make + Quick getting started + Uptimed + Firstival, you need to collect uprecords using the uptimed deaemon. To + install it run: - To test run + sudo aptitude install uptimed - ./bin/guprecords + Please consult the uptimed and uprecords manpages. Please ensure to + understand how it works and what it does. - It should print out the version number of the project. + uptimed collects uprecords to - Create a Debian package - Go to the to level directory and run + /var/spool/uptimed/records - make deb + And this file is used by guprecords for further processing. - It will create the files like: + Collect all the uprecords + You may have several hosts with uptimed running already. Collect all the + records file to a central repository (e.g. git). Name each file + FQDN.records and run - ../guprecords_0.0.0.0_all.deb - ../guprecords_0.0.0.0.dsc - ../guprecords_0.0.0.0_amd64.changes - ../guprecords_0.0.0.0.tar.gz + guprecords --indir ./ - It should create a debian package in ../. Check and install it, e.g: + You may automate the collecting of all the uprecords using something + like cron or puppet. - lintian --pedantic ../guprecords_0.0.0.0_all.deb - sudo dpkg -i ../guprecords_0.0.0.0_all.deb +LICENSE + Se package description or project website. - Run - - dpkg -L guprecords - - to see whats in there. You can now run - - /usr/bin/guprecords - - or for example - - man guprecords - - Read the Makefile - Read the Makefile in order to understand what's going on. - -Customize - Now, since you understood everything feel free to customize everything - the way you want it. E.g.: - - Don't use POD for documentation but LaTeX - - Compile a C program - - Include a ./lib dir, add it to the 'install' Makefile rule - - etc etc. - - You should also consider the following: - - Manual page - This template is using POD for creating manual pages. Edit - ./docs/guprecords.pod and run - - make documentation - - in order to build ./docs/guprecords.1. The page will be included in the - resulting debian package automatically. You can review the page with - - man ./docs/guprecords.1 - - Renaming guprecords into your project name - Rename all files which have *guprecords* included into your own new package - name. You can do that with: - - PROJECTNAME=yourproject - find . -name \*guprecords\* | - while read guprecords; do git mv $guprecords ${guprecords/guprecords/$PROJECTNAME}; done - - Search all content and rename *guprecords* into your own new package name. You - can do that with: - - grep -R guprecords . | grep -v .git | - cut -d: -f1 | uniq | xargs sed -i "s/guprecords/$PROJECTNAME/g" - - Updating ./debian - Edit the following files accordingly to your new project (e.g. with - vim): - - ./debian/control - ./debian/copyright - ./debian/README - - Update changelog - Go to the to level directory and run - - dch -i +AUTHOR + Paul Buetow - -- cgit v1.2.3