Compare commits
No commits in common. "upstream/1.06" and "master" have entirely different histories.
upstream/1
...
master
12
.github/dependabot.yml
vendored
Normal file
12
.github/dependabot.yml
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: github-actions
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
time: "04:00"
|
||||
reviewers:
|
||||
- "waja"
|
||||
pull-request-branch-name:
|
||||
separator: "-"
|
||||
open-pull-requests-limit: 10
|
36
.github/workflows/packaging_test.yml
vendored
Normal file
36
.github/workflows/packaging_test.yml
vendored
Normal file
|
@ -0,0 +1,36 @@
|
|||
name: Packaging Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- $default-branch
|
||||
- development
|
||||
- master
|
||||
# Run tests for any PRs
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
SOURCE_DIR: ./
|
||||
ARTIFACTS_DIR: debian/build/release/
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
env:
|
||||
DEBIAN_FRONTEND: "noninteractive"
|
||||
- name: Remove github artefacts
|
||||
run: |
|
||||
rm -rf .github*
|
||||
- name: Adjust distibution in changelog file
|
||||
run: |
|
||||
sed -i '0,/restricted/s//stable/' debian/changelog
|
||||
- name: Build Debian package
|
||||
uses: dawidd6/action-debian-package@v1.5.0
|
||||
with:
|
||||
artifacts_directory: debian/build/release/
|
||||
os_distribution: testing
|
||||
- name: Debug
|
||||
run: |
|
||||
ls -la
|
71
.github/workflows/release.yml
vendored
Normal file
71
.github/workflows/release.yml
vendored
Normal file
|
@ -0,0 +1,71 @@
|
|||
on:
|
||||
push:
|
||||
# Sequence of patterns matched against refs/tags
|
||||
tags:
|
||||
- 'debian/*' # Push events to matching debian/*, i.e. debian/1.0-2, debian/20.15.10, debian/23.20020326
|
||||
|
||||
name: Release Process
|
||||
|
||||
env:
|
||||
SOURCE_DIR: ./
|
||||
ARTIFACTS_DIR: debian/build/release/
|
||||
|
||||
jobs:
|
||||
create-release:
|
||||
name: Create Release
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
release-id: ${{ steps.create_release.outputs.id }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Install needed packages
|
||||
run: |
|
||||
if [ $(dpkg -l | grep -c dpkg-dev) -ne 1 ]; then sudo apt-get update && sudo apt-get install -y dpkg-dev; fi
|
||||
- name: Gather changelog
|
||||
run: |
|
||||
ls -la
|
||||
dpkg-parsechangelog | tail -n +9 > debian.changelog
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: Release ${{ github.ref }}
|
||||
body_path: debian.changelog
|
||||
draft: false
|
||||
prerelease: false
|
||||
|
||||
build:
|
||||
name: Build and upload packages
|
||||
needs: create-release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
env:
|
||||
DEBIAN_FRONTEND: "noninteractive"
|
||||
- name: Remove github artefacts
|
||||
run: |
|
||||
rm -rf .github*
|
||||
- name: Adjust distibution in changelog file
|
||||
run: |
|
||||
sed -i '0,/restricted/s//stable/' debian/changelog
|
||||
- name: Build Debian package
|
||||
uses: dawidd6/action-debian-package@v1.5.0
|
||||
with:
|
||||
artifacts_directory: debian/build/release/
|
||||
os_distribution: testing
|
||||
# - name: Build Debian package
|
||||
# uses: pi-top/action-debian-package@v0.2.0
|
||||
# with:
|
||||
# artifacts_directory: debian/build/release/
|
||||
# target_architectures: "amd64,i386"
|
||||
- name: Upload the artifacts
|
||||
uses: skx/github-action-publish-binaries@release-2.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
releaseId: ${{ needs.create-release.outputs.release-id }}
|
||||
args: debian/build/release/*
|
32
.travis.yml
Normal file
32
.travis.yml
Normal file
|
@ -0,0 +1,32 @@
|
|||
dist: xenial
|
||||
sudo: required
|
||||
|
||||
env:
|
||||
- TRAVIS_DEBIAN_DISTRIBUTION=unstable TRAVIS_DEBIAN_MIRROR="http://httpredir.debian.org/debian/" TRAVIS_DEBIAN_SECURITY_UPDATES=false
|
||||
- TRAVIS_DEBIAN_DISTRIBUTION=testing TRAVIS_DEBIAN_MIRROR="http://httpredir.debian.org/debian/"
|
||||
- TRAVIS_DEBIAN_DISTRIBUTION=stable TRAVIS_DEBIAN_MIRROR="http://httpredir.debian.org/debian/"
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
before_script:
|
||||
# fetch all tags (not done due travis cloning with depth=50)
|
||||
- git fetch --tags
|
||||
|
||||
script:
|
||||
# build the debian package
|
||||
- wget -O- http://travis.debian.net/script.sh | sh -
|
||||
|
||||
after_script:
|
||||
# run lintian after build
|
||||
- sudo add-apt-repository -y ppa:waja/trusty-backports
|
||||
- sudo apt-get update -qq
|
||||
- sudo apt-get install -qq --no-install-recommends lintian
|
||||
- lintian --info --display-info --display-experimental --pedantic --show-overrides ../*.deb && lintian --info --display-info --display-experimental --pedantic --show-overrides ../*.dsc
|
||||
|
||||
#notifications:
|
||||
# email: false
|
||||
|
||||
branches:
|
||||
except:
|
||||
- /^debian\/\d/
|
4
AUTHORS
4
AUTHORS
|
@ -1,3 +1,3 @@
|
|||
Rocky Bernstein <rocky@cpan.org>
|
||||
Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
# $Id: AUTHORS,v 1.2 2006/03/08 19:15:06 rockyb Exp $
|
||||
# $Id: AUTHORS,v 1.3 2008/12/17 20:08:43 rockyb Exp $
|
||||
|
|
300
ChangeLog
300
ChangeLog
|
@ -2,27 +2,119 @@
|
|||
## autogenerated ChangeLog -- don't edit
|
||||
##
|
||||
|
||||
2006-03-10 Friday 19:33 Rocky Bernstein <rocky@cpan.org>
|
||||
2009-02-19 Thursday 17:00 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* configure.ac: We're in 1.08 now
|
||||
|
||||
2009-02-19 Thursday 16:57 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* THANKS, ps-watcher.in.in: pidfile support from Jan Wagner and
|
||||
friends
|
||||
|
||||
2008-12-31 Wednesday 11:25 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* home-page/: index.html: Presumably a little more compliant
|
||||
|
||||
2008-12-31 Wednesday 11:17 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* home-page/index.html: Convert to use css
|
||||
|
||||
2008-12-25 Thursday 17:34 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* .cvsignore: This time, for sure!
|
||||
|
||||
2008-12-25 Thursday 17:33 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* cvs2cl_usermap: More administrivia
|
||||
|
||||
2008-12-25 Thursday 17:31 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* .cvsignore: Administrivia
|
||||
|
||||
2008-12-25 Thursday 17:01 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* Makefile.am, samples/root-procs.ini: Add sample code using
|
||||
perl-action.
|
||||
|
||||
2008-12-25 Thursday 16:42 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* configure.ac, tests/paction.cnf: More Darwin9 fixes: tty can be
|
||||
many token so put at end of parsing.
|
||||
|
||||
2008-12-25 Thursday 16:39 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* Makefile.am, NEWS, configure.ac: Get ready for 1.07 release
|
||||
|
||||
2008-12-23 Tuesday 11:09 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* ps-watcher.in.in: Typo: svz -> vsz. Thanks to Oliver Guerrier for
|
||||
pointing out.
|
||||
|
||||
2008-12-18 Thursday 01:07 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* ps-watcher.in.in: Bug in duplicating log
|
||||
|
||||
2008-12-17 Wednesday 20:08 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* ANNOUNCE, AUTHORS, configure.ac: test cygwin and NetBSD and
|
||||
update contact info
|
||||
|
||||
2008-12-17 Wednesday 19:28 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* post-configure.in: Tolerate older Perl's enough to warn that we
|
||||
can't use them.
|
||||
|
||||
2008-12-17 Wednesday 18:31 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* configure.ac: Linux newline nuke fixes along the lines of the
|
||||
Darwin code
|
||||
|
||||
2008-12-17 Wednesday 17:06 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* configure.ac, ps-watcher.in.in: Better about dealing with
|
||||
unwritable log file
|
||||
|
||||
2008-12-17 Wednesday 16:31 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* configure.ac: In 1.07 now
|
||||
|
||||
2008-12-17 Wednesday 16:27 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* configure.ac: Changes for Darwin9
|
||||
|
||||
2006-11-17 Friday 14:02 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* ps-watcher.in.in, home-page/index.html: Small typos.
|
||||
|
||||
2006-09-21 Thursday 23:07 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* home-page/index.html: Correct for new sf link
|
||||
|
||||
2006-03-11 Saturday 03:16 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* ps-watcher.in.in: More doc changes
|
||||
|
||||
2006-03-10 Friday 19:33 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* NEWS: Last change before release
|
||||
|
||||
2006-03-10 Friday 19:07 Rocky Bernstein <rocky@cpan.org>
|
||||
2006-03-10 Friday 19:07 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* configure.ac, post-configure.in, ps-watcher.in.in,
|
||||
tests/basic.t.in: Deal with time on netbsdelf and regression
|
||||
tests. basic.t.in: generalize time handling - not just cygwin.
|
||||
post-configure.in configure.ac: clean up a little.
|
||||
|
||||
2006-03-10 Friday 13:12 Rocky Bernstein <rocky@cpan.org>
|
||||
2006-03-10 Friday 13:12 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* tests/: args.t.in, basic.t.in, count.t.in, full.t.in: Run
|
||||
ps-watcher in tests with configured Perl location.
|
||||
|
||||
2006-03-10 Friday 12:47 Rocky Bernstein <rocky@cpan.org>
|
||||
2006-03-10 Friday 12:47 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* tests/: full.cnf, full.t.in: Add a test and adjust for cygwin.
|
||||
|
||||
2006-03-10 Friday 12:26 Rocky Bernstein <rocky@cpan.org>
|
||||
2006-03-10 Friday 12:26 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* configure.ac, post-configure.in, ps-watcher.in.in,
|
||||
tests/basic.t.in: Changes to make this work on more
|
||||
|
@ -30,56 +122,56 @@
|
|||
to get invocation work eveywhere basic.t.in: test for cputime;
|
||||
forgot !
|
||||
|
||||
2006-03-10 Friday 04:51 Rocky Bernstein <rocky@cpan.org>
|
||||
2006-03-10 Friday 04:51 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* configure.ac: Darwin 8 is okay
|
||||
|
||||
2006-03-10 Friday 04:50 Rocky Bernstein <rocky@cpan.org>
|
||||
2006-03-10 Friday 04:50 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* configure.ac: Bug in running right Perl in post-configure
|
||||
|
||||
2006-03-10 Friday 03:49 Rocky Bernstein <rocky@cpan.org>
|
||||
2006-03-10 Friday 03:49 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* configure.ac, post-configure.in: Use PERL value specified more.
|
||||
|
||||
2006-03-10 Friday 03:39 Rocky Bernstein <rocky@cpan.org>
|
||||
2006-03-10 Friday 03:39 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* NEWS, configure.ac: Add configure option to specify Perl location
|
||||
|
||||
2006-03-10 Friday 03:24 Rocky Bernstein <rocky@cpan.org>
|
||||
2006-03-10 Friday 03:24 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* tests/args.t.in: typo: it's ok not okay.
|
||||
|
||||
2006-03-10 Friday 03:21 Rocky Bernstein <rocky@cpan.org>
|
||||
2006-03-10 Friday 03:21 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* configure.ac, ps-watcher.in.in, tests/args.t.in,
|
||||
tests/basic.t.in, tests/full.t.in, tests/paction.t: Add minimal
|
||||
cygwin support
|
||||
|
||||
2006-03-09 Thursday 17:37 Rocky Bernstein <rocky@cpan.org>
|
||||
2006-03-09 Thursday 17:37 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* configure.ac, post-configure.in, tests/01.pod.t.in,
|
||||
tests/Makefile.am: 01.pod.t.in: add POD testing routine
|
||||
configure.ac: do chmod +x on perl-substituted files.
|
||||
|
||||
2006-03-09 Thursday 16:46 Rocky Bernstein <rocky@cpan.org>
|
||||
2006-03-09 Thursday 16:46 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* NEWS, ps-watcher.in.in: Document security better.
|
||||
|
||||
2006-03-08 Wednesday 22:52 Rocky Bernstein <rocky@cpan.org>
|
||||
2006-03-08 Wednesday 22:52 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* configure.ac, ps-watcher.in.in, home-page/index.html: Get ready
|
||||
for 1.06 release.
|
||||
|
||||
2006-03-08 Wednesday 22:24 Rocky Bernstein <rocky@cpan.org>
|
||||
2006-03-08 Wednesday 22:24 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* ps-watcher.in.in: Correction in getting signal name.
|
||||
|
||||
2006-03-08 Wednesday 19:21 Rocky Bernstein <rocky@cpan.org>
|
||||
2006-03-08 Wednesday 19:21 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* touch.pl: Reinstate since Makefile.am uses.
|
||||
|
||||
2006-03-08 Wednesday 19:15 Rocky Bernstein <rocky@cpan.org>
|
||||
2006-03-08 Wednesday 19:15 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* AUTHORS, Makefile.am, cvs2cl_usermap, post-configure.in,
|
||||
ps-watcher.in.in, touch.pl: ps-watcher.in.in: Wasn't terminating
|
||||
|
@ -89,11 +181,11 @@
|
|||
*: rocky@panix.com -> rocky@cpan.org touch.pl: now handled inside
|
||||
post-configure by Perl
|
||||
|
||||
2006-02-03 Friday 02:23 Rocky Bernstein <rocky@cpan.org>
|
||||
2006-02-03 Friday 02:23 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* ps-watcher.in.in: One more small typo.
|
||||
|
||||
2006-02-03 Friday 02:15 Rocky Bernstein <rocky@cpan.org>
|
||||
2006-02-03 Friday 02:15 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* post-configure.in, ps-watcher.in.in, home-page/index.html: Mostly
|
||||
small changes:
|
||||
|
@ -106,41 +198,41 @@
|
|||
|
||||
home-page/index.html: Probably remove a W3C error.
|
||||
|
||||
2006-01-17 Tuesday 10:00 Rocky Bernstein <rocky@cpan.org>
|
||||
2006-01-17 Tuesday 10:00 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* home-page/index.html: Make valid HTML as per W3C.
|
||||
|
||||
2005-10-12 Wednesday 01:14 Rocky Bernstein <rocky@cpan.org>
|
||||
2005-10-12 Wednesday 01:14 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* ps-watcher.in.in, NEWS: Add BUGS section to manual to describe
|
||||
common problems.
|
||||
|
||||
2005-09-12 Monday 17:03 Rocky Bernstein <rocky@cpan.org>
|
||||
2005-09-12 Monday 17:03 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* configure.ac: Now in 1.06cvs territory
|
||||
|
||||
2005-09-12 Monday 17:03 Rocky Bernstein <rocky@cpan.org>
|
||||
2005-09-12 Monday 17:03 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* ps-watcher.in.in: Guard against uninitialized variables
|
||||
|
||||
2005-06-22 Wednesday 01:59 Rocky Bernstein <rocky@cpan.org>
|
||||
2005-06-22 Wednesday 01:59 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* home-page/index.html: <Code> instead of <kbd>?
|
||||
|
||||
2005-06-22 Wednesday 01:57 Rocky Bernstein <rocky@cpan.org>
|
||||
2005-06-22 Wednesday 01:57 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* home-page/index.html: Correct grammar courtesy of Sir Monitor
|
||||
Lizard, Ph. Mad.
|
||||
|
||||
2005-05-17 Tuesday 22:00 Rocky Bernstein <rocky@cpan.org>
|
||||
2005-05-17 Tuesday 22:00 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* NEWS: What's new.
|
||||
|
||||
2005-05-17 Tuesday 09:56 Rocky Bernstein <rocky@cpan.org>
|
||||
2005-05-17 Tuesday 09:56 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* configure.ac: NetBSD works like FreeBSD
|
||||
|
||||
2005-05-17 Tuesday 09:52 Rocky Bernstein <rocky@cpan.org>
|
||||
2005-05-17 Tuesday 09:52 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* COPYING, Makefile.am, NEWS, config.guess, config.sub,
|
||||
configure.ac, missing, post-configure.in, docs/Makefile.am,
|
||||
|
@ -149,45 +241,45 @@
|
|||
|
||||
GPL address change.
|
||||
|
||||
2005-04-09 Saturday 18:06 Rocky Bernstein <rocky@cpan.org>
|
||||
2005-04-09 Saturday 18:06 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* ps-watcher.in.in: Like this a tad better.
|
||||
|
||||
2005-04-04 Monday 23:58 Rocky Bernstein <rocky@cpan.org>
|
||||
2005-04-04 Monday 23:58 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* NEWS, ps-watcher.in.in: Note recent change.
|
||||
|
||||
2005-04-04 Monday 23:53 Rocky Bernstein <rocky@cpan.org>
|
||||
2005-04-04 Monday 23:53 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* THANKS: Add thanks to Iñaki Sánchez.
|
||||
|
||||
2005-04-04 Monday 23:50 Rocky Bernstein <rocky@cpan.org>
|
||||
2005-04-04 Monday 23:50 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* ps-watcher.in.in, tests/basic.cnf.in: Allow $ps_pat to be used in
|
||||
action. Patch courtesy of Iñaki Sánchez. (i s a n c h e z at
|
||||
unav dot es)
|
||||
|
||||
2004-09-11 Saturday 13:29 Rocky Bernstein <rocky@cpan.org>
|
||||
2004-09-11 Saturday 13:29 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* docs/.cvsignore: More pod2htm stuff.
|
||||
|
||||
2004-09-09 Thursday 10:58 Rocky Bernstein <rocky@cpan.org>
|
||||
2004-09-09 Thursday 10:58 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* NEWS, cvs2cl_header, cvs2cl_usermap: ChangeLog-creation
|
||||
improvements.
|
||||
|
||||
2004-09-07 Tuesday 13:51 Rocky Bernstein <rocky@cpan.org>
|
||||
2004-09-07 Tuesday 13:51 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* Makefile.am, ps-watcher.in.in, docs/Makefile.am,
|
||||
samples/port-watch.ini: Make distcheck works. Show how to use
|
||||
$PROLOG to do a no-ps like thing such as watching a port (via
|
||||
lsof).
|
||||
|
||||
2004-05-26 Wednesday 13:46 Rocky Bernstein <rocky@cpan.org>
|
||||
2004-05-26 Wednesday 13:46 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* ps-watcher.in.in: Small change.
|
||||
|
||||
2004-05-26 Wednesday 13:42 Rocky Bernstein <rocky@cpan.org>
|
||||
2004-05-26 Wednesday 13:42 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* Makefile.am, configure.ac, ps-watcher.in.in, docs/Makefile.am:
|
||||
ps-watcher.in.in: smallish changes - call closelog on
|
||||
|
@ -201,313 +293,313 @@
|
|||
configure.ac: now in version 1.05 now. Allow maintainer mode (to
|
||||
create ChangeLog)
|
||||
|
||||
2004-02-15 Sunday 12:03 Rocky Bernstein <rocky@cpan.org>
|
||||
2004-02-15 Sunday 12:03 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* docs/Makefile.am: Set title to name without the .in.
|
||||
|
||||
2004-01-18 Sunday 12:20 Rocky Bernstein <rocky@cpan.org>
|
||||
2004-01-18 Sunday 12:20 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* ps-watcher.in.in: Update copyright.
|
||||
|
||||
2004-01-18 Sunday 11:49 Rocky Bernstein <rocky@cpan.org>
|
||||
2004-01-18 Sunday 11:49 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* ps-watcher.in.in: Improve documentation with respect to
|
||||
perl-action.
|
||||
|
||||
2004-01-15 Thursday 03:23 Rocky Bernstein <rocky@cpan.org>
|
||||
2004-01-15 Thursday 03:23 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* ps-watcher.in.in: perldoc fix.
|
||||
|
||||
2004-01-15 Thursday 03:02 Rocky Bernstein <rocky@cpan.org>
|
||||
2004-01-15 Thursday 03:02 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* tests/paction.t: Regression test for $PROLOG, $EPILOG and
|
||||
perl-action.
|
||||
|
||||
2004-01-15 Thursday 03:00 Rocky Bernstein <rocky@cpan.org>
|
||||
2004-01-15 Thursday 03:00 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* configure.ac, ps-watcher.in.in, tests/Makefile.am,
|
||||
tests/paction.cnf: Add $PROLOG, $EPILOG and perl-action sections.
|
||||
Allows one to accumulate information over all processes and take
|
||||
action on that.
|
||||
|
||||
2004-01-10 Saturday 04:39 Rocky Bernstein <rocky@cpan.org>
|
||||
2004-01-10 Saturday 04:39 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* ps-watcher.in.in: Documentation enhancement, I think.
|
||||
|
||||
2003-11-22 Saturday 12:31 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-11-22 Saturday 12:31 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* ps-watcher.in.in: And another formatting change...
|
||||
|
||||
2003-11-22 Saturday 12:27 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-11-22 Saturday 12:27 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* ps-watcher.in.in: One more trivial typo....
|
||||
|
||||
2003-11-22 Saturday 12:26 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-11-22 Saturday 12:26 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* ps-watcher.in.in: Documentation typo.
|
||||
|
||||
2003-11-22 Saturday 12:01 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-11-22 Saturday 12:01 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* NEWS, configure.ac: Get ready for new (minor) release.
|
||||
|
||||
2003-11-21 Friday 02:36 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-11-21 Friday 02:36 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* ps-watcher.in.in, tests/basic.cnf.in, tests/basic.t.in: Add
|
||||
first-trigger feature.
|
||||
|
||||
2003-09-11 Thursday 03:17 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-09-11 Thursday 03:17 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* NEWS: Get ready for a release.
|
||||
|
||||
2003-09-10 Wednesday 07:30 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-09-10 Wednesday 07:30 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* ps-watcher.in.in: Fix example configuration as suggested in bug
|
||||
#776229.
|
||||
|
||||
2003-09-05 Friday 00:23 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-09-05 Friday 00:23 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* ps-watcher.in.in: More complicated trigger example suggested by
|
||||
jason
|
||||
|
||||
2003-09-03 Wednesday 02:04 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-09-03 Wednesday 02:04 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* ps-watcher.in.in: Add troubleshooting section
|
||||
|
||||
2003-09-03 Wednesday 01:42 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-09-03 Wednesday 01:42 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* configure.ac, ps-watcher.in.in: Fixes for FreeBSD
|
||||
|
||||
2003-08-31 Sunday 21:22 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-08-31 Sunday 21:22 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* tests/basic.cnf.in: perhaps some processes use so little CPU that
|
||||
the elapsed time will round to zero. Deal with it.
|
||||
|
||||
2003-08-30 Saturday 20:49 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-08-30 Saturday 20:49 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* ps-watcher.in.in: Update date.
|
||||
|
||||
2003-08-29 Friday 10:49 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-08-29 Friday 10:49 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* configure.ac: Get ready for another release.
|
||||
|
||||
2003-08-29 Friday 10:48 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-08-29 Friday 10:48 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* tests/: args.t.in, basic.t.in, count.t.in, full.t.in: Regression
|
||||
tests need to deal with timestamped output.
|
||||
|
||||
2003-08-29 Friday 10:47 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-08-29 Friday 10:47 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* ps-watcher.in.in: Add syslog-like timestamp to logfile output.
|
||||
Problems with getting ps-output now appears only on debug output.
|
||||
|
||||
2003-08-29 Friday 10:45 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-08-29 Friday 10:45 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* post-configure.in: Use -w (warning) on perl invocation
|
||||
|
||||
2003-08-13 Wednesday 02:33 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-08-13 Wednesday 02:33 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* configure.ac: PS_CAN_RETURN_MULTIPLE_LINES not set on AIX which
|
||||
broke it.
|
||||
|
||||
2003-07-11 Friday 05:56 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-07-11 Friday 05:56 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* Makefile.am: Add sample files
|
||||
|
||||
2003-07-11 Friday 05:47 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-07-11 Friday 05:47 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* configure.ac: typo
|
||||
|
||||
2003-07-11 Friday 05:46 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-07-11 Friday 05:46 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* configure.ac: Get ready for 1.0 release.
|
||||
|
||||
2003-07-11 Friday 05:43 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-07-11 Friday 05:43 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* Makefile.am, tests/Makefile.am, tests/args.t.in,
|
||||
tests/count.t.in, tests/full.t.in: Make "make distcheck" work.
|
||||
|
||||
2003-07-11 Friday 05:42 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-07-11 Friday 05:42 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* THANKS: Update as appropriate.
|
||||
|
||||
2003-07-10 Thursday 12:20 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-07-10 Thursday 12:20 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* configure.ac, post-configure.in: A tad better for making "make
|
||||
distcheck" work: Use $srcdir in post-configure and arrange for
|
||||
srcdir to be passed in.
|
||||
|
||||
2003-07-10 Thursday 11:50 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-07-10 Thursday 11:50 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* THANKS, TODO, config.cache, configure.ac, ps-watcher.in.in: Deal
|
||||
with ps (e.g. Solaris's) which return more than one line for a
|
||||
single pid.
|
||||
|
||||
2003-07-10 Thursday 11:42 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-07-10 Thursday 11:42 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* ps-watcher.in.in: Stupid mistake - comments are # not /* */.
|
||||
|
||||
2003-05-19 Monday 16:33 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-05-19 Monday 16:33 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* configure.ac: Accomodate darwin6
|
||||
|
||||
2003-05-19 Monday 16:33 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-05-19 Monday 16:33 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* tests/args.t.in: Add one test of --nosyslog
|
||||
|
||||
2003-05-19 Monday 15:58 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-05-19 Monday 15:58 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* configure.ac: Add AIX support.
|
||||
|
||||
2003-05-16 Friday 00:12 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-05-16 Friday 00:12 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* README: IniConf is now called Config::IniFiles
|
||||
|
||||
2003-03-06 Thursday 05:57 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-03-06 Thursday 05:57 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* configure.ac: Failed full test. Need to add -x.
|
||||
|
||||
2003-03-06 Thursday 05:48 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-03-06 Thursday 05:48 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* tests/full.cnf: Don't assume first is pid 1!
|
||||
|
||||
2003-03-06 Thursday 05:37 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-03-06 Thursday 05:37 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* configure.ac, tests/Makefile.am, tests/.cvsignore,
|
||||
tests/full.cnf, tests/full.t.in: Add test that we can trigger on
|
||||
watching processes other than the ones under our account.
|
||||
|
||||
2003-03-06 Thursday 03:54 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-03-06 Thursday 03:54 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* Makefile.am, NEWS, config.guess, configure.ac, docs/Makefile.am,
|
||||
tests/Makefile.am: Changes for Mac OS/X
|
||||
|
||||
2003-03-04 Tuesday 18:01 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-03-04 Tuesday 18:01 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* aclocal.m4, docs/Makefile.am, tests/Makefile.in: Add more
|
||||
automake conversion idioms
|
||||
|
||||
2003-03-04 Tuesday 14:14 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-03-04 Tuesday 14:14 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* autogen.sh: Omitted running aclocal, autoconf, automake...
|
||||
|
||||
2003-03-04 Tuesday 14:08 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-03-04 Tuesday 14:08 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* docs/: Makefile.am, Makefile.in: More automake conversion pains.
|
||||
|
||||
2003-03-04 Tuesday 14:05 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-03-04 Tuesday 14:05 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* .cvsignore, MANIFEST: MANIFEST: not used in automake
|
||||
|
||||
2003-03-04 Tuesday 14:03 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-03-04 Tuesday 14:03 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* NEWS, autogen.sh: autogen.sh: useful for CVS NEWS: what's been
|
||||
happening?
|
||||
|
||||
2003-03-04 Tuesday 13:59 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-03-04 Tuesday 13:59 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* Makefile.am, Makefile.in: More automake conversion work.
|
||||
Makefile.am: forgot to add Makefile.PL. Makefile.in: superceded
|
||||
by Makfile.am
|
||||
|
||||
2003-03-04 Tuesday 13:55 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-03-04 Tuesday 13:55 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* AUTHORS, Makefile.am, Makefile.in, NEWS, aclocal.m4, version,
|
||||
docs/Makefile.am, docs/Makefile.in, tests/Makefile.am,
|
||||
tests/Makefile.in: Convert to use Makefile.am
|
||||
|
||||
2003-03-04 Tuesday 02:53 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-03-04 Tuesday 02:53 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* configure.ac, ps-watcher.in.in, version, samples/sample.ini,
|
||||
tests/args.cnf: Changes for BSD/OS. Also potentially a bug in
|
||||
FreeBSD.
|
||||
|
||||
2003-03-02 Sunday 16:35 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-03-02 Sunday 16:35 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* ps-watcher.in.in: More small document changes. Make HTML come out
|
||||
a tad better.
|
||||
|
||||
2003-03-02 Sunday 15:28 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-03-02 Sunday 15:28 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* ps-watcher.in.in: Update link for netwinder location!
|
||||
|
||||
2003-03-01 Saturday 21:38 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-03-01 Saturday 21:38 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* MANIFEST: Typo.
|
||||
|
||||
2003-03-01 Saturday 21:37 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-03-01 Saturday 21:37 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* NEWS: What's up.
|
||||
|
||||
2003-03-01 Saturday 21:35 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-03-01 Saturday 21:35 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* MANIFEST: Add Changelog
|
||||
|
||||
2003-03-01 Saturday 21:23 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-03-01 Saturday 21:23 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* samples/sample.ini: Add $args example.
|
||||
|
||||
2003-03-01 Saturday 21:12 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-03-01 Saturday 21:12 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* MANIFEST, configure.ac, ps-watcher.in.in: Add variables to
|
||||
control what ps can do, e.g. can nuke header line, has custom
|
||||
title (for nuking header line), what time variable we can test
|
||||
on.
|
||||
|
||||
2003-03-01 Saturday 21:09 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-03-01 Saturday 21:09 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* tests/: .cvsignore, args.t.in, basic.cnf, basic.cnf.in: Don't
|
||||
assume etime is a ps-variable. Thanks, FreeBSD.
|
||||
|
||||
2003-03-01 Saturday 21:08 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-03-01 Saturday 21:08 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* docs/Makefile.in: Cater to brain-dead make on FreeBSD.
|
||||
|
||||
2003-02-28 Friday 16:45 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-02-28 Friday 16:45 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* MANIFEST, configure.ac: configure.ac: add freebsd4 check
|
||||
MANIFEST: add args test files
|
||||
|
||||
2003-02-28 Friday 13:37 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-02-28 Friday 13:37 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* config.sub: Update with more recent version of this.
|
||||
|
||||
2003-02-28 Friday 12:34 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-02-28 Friday 12:34 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* tests/: .cvsignore, args.cnf, args.t.in: Add args regression
|
||||
test.
|
||||
|
||||
2003-02-28 Friday 12:33 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-02-28 Friday 12:33 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* configure.ac, ps-watcher.in.in, tests/Makefile.in,
|
||||
tests/basic.cnf, tests/basic.t.in, tests/count.t.in: Add args
|
||||
documentation and regression tests. count.t.in, basic.t.in: set
|
||||
perl mode for emacs
|
||||
|
||||
2003-02-27 Thursday 23:46 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-02-27 Thursday 23:46 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* configure.ac, ps-watcher.in.in, version: Add $args variable to
|
||||
test on entire command. Perpare to make into another version.
|
||||
|
||||
2003-02-27 Thursday 21:21 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-02-27 Thursday 21:21 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* configure.ac: Add args to the list of variables that are
|
||||
accepted.
|
||||
|
||||
2003-01-27 Monday 22:41 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-01-27 Monday 22:41 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* MANIFEST, configure.stamp, version: MANIFEST: configre.in ->
|
||||
configure.ac Other files not sure about, but we'll try
|
||||
initially...
|
||||
|
||||
2003-01-27 Monday 22:37 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-01-27 Monday 22:37 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* configure.ac: Remove touch of stamp file. Dunno...
|
||||
|
||||
2003-01-27 Monday 22:35 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-01-27 Monday 22:35 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* configure.ac: Bump version number.
|
||||
|
||||
2003-01-27 Monday 22:34 Rocky Bernstein <rocky@cpan.org>
|
||||
2003-01-27 Monday 22:34 Rocky Bernstein <rocky@gnu.org>
|
||||
|
||||
* Makefile.in, NEWS, configure.ac, configure.in, ps-watcher.in.in,
|
||||
samples/sample.ini: Bug in running make dist.
|
||||
|
|
13
Makefile.am
13
Makefile.am
|
@ -1,6 +1,6 @@
|
|||
##############################################################################
|
||||
# $Id: Makefile.am,v 1.12 2006/03/09 17:38:14 rockyb Exp $
|
||||
# Copyright (C) 2003, 2004, 2006 Rocky Bernstein <rocky@cpan.org>
|
||||
# $Id: Makefile.am,v 1.14 2008/12/25 17:01:50 rockyb Exp $
|
||||
# Copyright (C) 2003, 2004, 2006, 2008 Rocky Bernstein <rocky@gnu.org>
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
|
@ -17,12 +17,17 @@
|
|||
# Boston, MA 02110-1301 USA
|
||||
##############################################################################
|
||||
|
||||
AUTOMAKE_OPTIONS = dist-bzip2
|
||||
SUBDIRS = docs tests
|
||||
noinst_SCRIPTS = post-configure.in touch.pl
|
||||
EXTRA_DIST = post-configure.in ps-watcher.in.in ps-watcher \
|
||||
touch.pl Makefile.PL \
|
||||
samples/README samples/sample.ini samples/sample2.ini \
|
||||
samples/port-watch.ini samples/solaris.ini
|
||||
samples/README \
|
||||
samples/sample.ini \
|
||||
samples/sample2.ini \
|
||||
samples/port-watch.ini \
|
||||
samples/root-procs.ini \
|
||||
samples/solaris.ini
|
||||
bin_SCRIPTS = ps-watcher
|
||||
PERL = @PERL@
|
||||
|
||||
|
|
159
Makefile.in
159
Makefile.in
|
@ -1,8 +1,8 @@
|
|||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.10.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
@ -15,8 +15,8 @@
|
|||
@SET_MAKE@
|
||||
|
||||
##############################################################################
|
||||
# $Id: Makefile.am,v 1.12 2006/03/09 17:38:14 rockyb Exp $
|
||||
# Copyright (C) 2003, 2004, 2006 Rocky Bernstein <rocky@cpan.org>
|
||||
# $Id: Makefile.am,v 1.14 2008/12/25 17:01:50 rockyb Exp $
|
||||
# Copyright (C) 2003, 2004, 2006, 2008 Rocky Bernstein <rocky@gnu.org>
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
|
@ -33,15 +33,11 @@
|
|||
# Boston, MA 02110-1301 USA
|
||||
##############################################################################
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = .
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
|
@ -55,18 +51,18 @@ PRE_UNINSTALL = :
|
|||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = .
|
||||
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in $(srcdir)/post-configure.in \
|
||||
$(srcdir)/ps-watcher.in.in $(top_srcdir)/configure AUTHORS \
|
||||
COPYING ChangeLog INSTALL NEWS THANKS TODO config.guess \
|
||||
config.sub install-sh missing mkinstalldirs
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno configure.status.lineno
|
||||
configure.lineno config.status.lineno
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_CLEAN_FILES = post-configure ps-watcher.in ps-watcher
|
||||
am__installdirs = "$(DESTDIR)$(bindir)"
|
||||
|
@ -76,10 +72,13 @@ SOURCES =
|
|||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
|
||||
html-recursive info-recursive install-data-recursive \
|
||||
install-exec-recursive install-info-recursive \
|
||||
install-recursive installcheck-recursive installdirs-recursive \
|
||||
pdf-recursive ps-recursive uninstall-info-recursive \
|
||||
uninstall-recursive
|
||||
install-dvi-recursive install-exec-recursive \
|
||||
install-html-recursive install-info-recursive \
|
||||
install-pdf-recursive install-ps-recursive install-recursive \
|
||||
installcheck-recursive installdirs-recursive pdf-recursive \
|
||||
ps-recursive uninstall-recursive
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DIST_SUBDIRS = $(SUBDIRS)
|
||||
|
@ -90,7 +89,7 @@ am__remove_distdir = \
|
|||
{ test ! -d $(distdir) \
|
||||
|| { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -fr $(distdir); }; }
|
||||
DIST_ARCHIVES = $(distdir).tar.gz
|
||||
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
|
||||
GZIP_ENV = --best
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
|
@ -106,6 +105,7 @@ DEFS = @DEFS@
|
|||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
|
@ -115,9 +115,8 @@ LIBS = @LIBS@
|
|||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
|
@ -142,7 +141,10 @@ SET_MAKE = @SET_MAKE@
|
|||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
|
@ -152,34 +154,50 @@ build_alias = @build_alias@
|
|||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
AUTOMAKE_OPTIONS = dist-bzip2
|
||||
SUBDIRS = docs tests
|
||||
noinst_SCRIPTS = post-configure.in touch.pl
|
||||
EXTRA_DIST = post-configure.in ps-watcher.in.in ps-watcher \
|
||||
touch.pl Makefile.PL \
|
||||
samples/README samples/sample.ini samples/sample2.ini \
|
||||
samples/port-watch.ini samples/solaris.ini
|
||||
samples/README \
|
||||
samples/sample.ini \
|
||||
samples/sample2.ini \
|
||||
samples/port-watch.ini \
|
||||
samples/root-procs.ini \
|
||||
samples/solaris.ini
|
||||
|
||||
bin_SCRIPTS = ps-watcher
|
||||
DISTCLEANFILES = ps-watcher ps-watcher.stamp
|
||||
|
@ -231,7 +249,7 @@ ps-watcher: $(top_builddir)/config.status ps-watcher.in
|
|||
cd $(top_builddir) && $(SHELL) ./config.status $@
|
||||
install-binSCRIPTS: $(bin_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
|
||||
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
|
||||
@list='$(bin_SCRIPTS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
if test -f $$d$$p; then \
|
||||
|
@ -248,7 +266,6 @@ uninstall-binSCRIPTS:
|
|||
echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(bindir)/$$f"; \
|
||||
done
|
||||
uninstall-info-am:
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run `make' without going through this Makefile.
|
||||
|
@ -281,8 +298,7 @@ $(RECURSIVE_TARGETS):
|
|||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
mostlyclean-recursive clean-recursive distclean-recursive \
|
||||
maintainer-clean-recursive:
|
||||
$(RECURSIVE_CLEAN_TARGETS):
|
||||
@failcom='exit 1'; \
|
||||
for f in x $$MAKEFLAGS; do \
|
||||
case $$f in \
|
||||
|
@ -326,8 +342,8 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
|||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
|
@ -352,8 +368,8 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
|||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
|
@ -363,13 +379,12 @@ ctags: CTAGS
|
|||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
@ -384,24 +399,22 @@ distclean-tags:
|
|||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
mkdir $(distdir)
|
||||
$(mkdir_p) $(distdir)/. $(distdir)/samples $(distdir)/tests
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
test -d $(distdir) || mkdir $(distdir)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
|
@ -415,7 +428,7 @@ distdir: $(DISTFILES)
|
|||
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test -d "$(distdir)/$$subdir" \
|
||||
|| $(mkdir_p) "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
distdir=`$(am__cd) $(distdir) && pwd`; \
|
||||
top_distdir=`$(am__cd) $(top_distdir) && pwd`; \
|
||||
|
@ -423,6 +436,8 @@ distdir: $(DISTFILES)
|
|||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$top_distdir" \
|
||||
distdir="$$distdir/$$subdir" \
|
||||
am__remove_distdir=: \
|
||||
am__skip_length_check=: \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
|
@ -430,16 +445,19 @@ distdir: $(DISTFILES)
|
|||
-find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
|
||||
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r $(distdir)
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-lzma: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
|
||||
$(am__remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__remove_distdir)
|
||||
|
@ -455,6 +473,7 @@ dist-zip: distdir
|
|||
|
||||
dist dist-all: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
|
||||
$(am__remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
|
@ -466,6 +485,8 @@ distcheck: dist
|
|||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.lzma*) \
|
||||
unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
|
@ -505,7 +526,7 @@ distcheck: dist
|
|||
$(am__remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
|
||||
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
|
||||
distuninstallcheck:
|
||||
@cd $(distuninstallcheck_dir) \
|
||||
&& test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
|
||||
|
@ -530,7 +551,7 @@ all-am: Makefile $(SCRIPTS)
|
|||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
for dir in "$(DESTDIR)$(bindir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
|
@ -579,12 +600,20 @@ info-am:
|
|||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-recursive
|
||||
|
||||
install-exec-am: install-binSCRIPTS
|
||||
|
||||
install-html: install-html-recursive
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-recursive
|
||||
|
||||
install-ps: install-ps-recursive
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
|
@ -605,24 +634,26 @@ ps: ps-recursive
|
|||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-binSCRIPTS uninstall-info-am
|
||||
uninstall-am: uninstall-binSCRIPTS
|
||||
|
||||
uninstall-info: uninstall-info-recursive
|
||||
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
|
||||
install-strip
|
||||
|
||||
.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \
|
||||
check-am clean clean-generic clean-recursive ctags \
|
||||
ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \
|
||||
dist-tarZ dist-zip distcheck distclean distclean-generic \
|
||||
distclean-recursive distclean-tags distcleancheck distdir \
|
||||
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
|
||||
all all-am am--refresh check check-am clean clean-generic \
|
||||
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
|
||||
dist-lzma dist-shar dist-tarZ dist-zip distcheck distclean \
|
||||
distclean-generic distclean-tags distcleancheck distdir \
|
||||
distuninstallcheck dvi dvi-am html html-am info info-am \
|
||||
install install-am install-binSCRIPTS install-data \
|
||||
install-data-am install-exec install-exec-am install-info \
|
||||
install-info-am install-man install-strip installcheck \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
install-info-am install-man install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs installdirs-am maintainer-clean \
|
||||
maintainer-clean-generic maintainer-clean-recursive \
|
||||
mostlyclean mostlyclean-generic mostlyclean-recursive pdf \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
|
||||
pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
|
||||
uninstall-binSCRIPTS uninstall-info-am
|
||||
uninstall-binSCRIPTS
|
||||
|
||||
|
||||
# Build all forms of documentation: manual-pages and HTML
|
||||
|
|
12
NEWS
12
NEWS
|
@ -1,3 +1,13 @@
|
|||
Changes from 1.07 to 1.08 (March 15, 2009)
|
||||
|
||||
- pidfile support via Jan Wagner.
|
||||
- Darwin9 support
|
||||
|
||||
Changes from 1.06 to 1.07 (December 25, 2008)
|
||||
- Changed to include and tested on Darwin9
|
||||
|
||||
- A small number of bug fixes
|
||||
|
||||
Changes from 1.05 to 1.06 (March 10, 2006)
|
||||
|
||||
- Add minimal cygwin support; go over NetBSD and OpenBSD support
|
||||
|
@ -88,4 +98,4 @@ Make "occurs = none" mean to run if there are no matching ps processes.
|
|||
|
||||
ps-watcher 0.93 -- first general release.
|
||||
|
||||
$Id: NEWS,v 1.27 2006/03/10 19:33:59 rockyb Exp $
|
||||
$Id: NEWS,v 1.29 2009/03/15 06:59:23 rockyb Exp $
|
||||
|
|
4
THANKS
4
THANKS
|
@ -13,6 +13,8 @@ James R Grinter <jrg at acm dot org> suggested and provided code to allow the
|
|||
program to fire when no matching processes (e.g. when a process that
|
||||
should be running has died).
|
||||
|
||||
Jan Wagner - Debian packaging and support; pidfile support addition.
|
||||
|
||||
Thanks to Jason Welsh <jason at monsterjam dot org> for helping to track down
|
||||
a Solaris problem where ps returned multiple lines of output.
|
||||
|
||||
|
@ -22,7 +24,7 @@ the action statement.
|
|||
Musicological supervision by Stuart Frankel <gecko@dustyfeet.com>,
|
||||
cutrate Ph.D.
|
||||
|
||||
$Id: THANKS,v 1.8 2006/03/08 19:17:33 rockyb Exp $
|
||||
$Id: THANKS,v 1.9 2009/02/19 16:57:31 rockyb Exp $
|
||||
|
||||
|
||||
|
||||
|
|
171
aclocal.m4
vendored
171
aclocal.m4
vendored
|
@ -1,7 +1,7 @@
|
|||
# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
|
||||
# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
# 2005 Free Software Foundation, Inc.
|
||||
# 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
@ -11,7 +11,15 @@
|
|||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
# Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
|
||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||
m4_if(AC_AUTOCONF_VERSION, [2.61],,
|
||||
[m4_warning([this file was generated for autoconf 2.61.
|
||||
You have another version of autoconf. It may work, but is not guaranteed to.
|
||||
If you have problems, you may need to regenerate the build system entirely.
|
||||
To do so, use the procedure documented by the package, typically `autoreconf'.])])
|
||||
|
||||
# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -21,14 +29,31 @@
|
|||
# ----------------------------
|
||||
# Automake X.Y traces this macro to ensure aclocal.m4 has been
|
||||
# generated from the m4 files accompanying Automake X.Y.
|
||||
AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
|
||||
# (This private macro should not be called outside this file.)
|
||||
AC_DEFUN([AM_AUTOMAKE_VERSION],
|
||||
[am__api_version='1.10'
|
||||
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
|
||||
dnl require some minimum version. Point them to the right macro.
|
||||
m4_if([$1], [1.10.1], [],
|
||||
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
|
||||
])
|
||||
|
||||
# _AM_AUTOCONF_VERSION(VERSION)
|
||||
# -----------------------------
|
||||
# aclocal traces this macro to find the Autoconf version.
|
||||
# This is a private macro too. Using m4_define simplifies
|
||||
# the logic in aclocal, which can simply ignore this definition.
|
||||
m4_define([_AM_AUTOCONF_VERSION], [])
|
||||
|
||||
# AM_SET_CURRENT_AUTOMAKE_VERSION
|
||||
# -------------------------------
|
||||
# Call AM_AUTOMAKE_VERSION so it can be traced.
|
||||
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
|
||||
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
|
||||
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
|
||||
[AM_AUTOMAKE_VERSION([1.9.6])])
|
||||
[AM_AUTOMAKE_VERSION([1.10.1])dnl
|
||||
m4_ifndef([AC_AUTOCONF_VERSION],
|
||||
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
|
||||
_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
|
||||
|
||||
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
|
||||
|
||||
|
@ -85,14 +110,14 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
|
|||
|
||||
# AM_CONDITIONAL -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
|
||||
# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 7
|
||||
# serial 8
|
||||
|
||||
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
|
||||
# -------------------------------------
|
||||
|
@ -101,8 +126,10 @@ AC_DEFUN([AM_CONDITIONAL],
|
|||
[AC_PREREQ(2.52)dnl
|
||||
ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
|
||||
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
|
||||
AC_SUBST([$1_TRUE])
|
||||
AC_SUBST([$1_FALSE])
|
||||
AC_SUBST([$1_TRUE])dnl
|
||||
AC_SUBST([$1_FALSE])dnl
|
||||
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
|
||||
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
|
||||
if $2; then
|
||||
$1_TRUE=
|
||||
$1_FALSE='#'
|
||||
|
@ -118,14 +145,14 @@ fi])])
|
|||
|
||||
# Do all the work for Automake. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
# 2005, 2006, 2008 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 12
|
||||
# serial 13
|
||||
|
||||
# This macro actually does too much. Some checks are only needed if
|
||||
# your package does certain things. But this isn't really a big deal.
|
||||
|
@ -142,16 +169,20 @@ fi])])
|
|||
# arguments mandatory, and then we can depend on a new Autoconf
|
||||
# release and drop the old call support.
|
||||
AC_DEFUN([AM_INIT_AUTOMAKE],
|
||||
[AC_PREREQ([2.58])dnl
|
||||
[AC_PREREQ([2.60])dnl
|
||||
dnl Autoconf wants to disallow AM_ names. We explicitly allow
|
||||
dnl the ones we care about.
|
||||
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
|
||||
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
|
||||
AC_REQUIRE([AC_PROG_INSTALL])dnl
|
||||
# test to see if srcdir already configured
|
||||
if test "`cd $srcdir && pwd`" != "`pwd`" &&
|
||||
test -f $srcdir/config.status; then
|
||||
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
||||
if test "`cd $srcdir && pwd`" != "`pwd`"; then
|
||||
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
|
||||
# is not polluted with repeated "-I."
|
||||
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
|
||||
# test to see if srcdir already configured
|
||||
if test -f $srcdir/config.status; then
|
||||
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
||||
fi
|
||||
fi
|
||||
|
||||
# test whether we have cygpath
|
||||
|
@ -171,6 +202,9 @@ m4_ifval([$2],
|
|||
AC_SUBST([PACKAGE], [$1])dnl
|
||||
AC_SUBST([VERSION], [$2])],
|
||||
[_AM_SET_OPTIONS([$1])dnl
|
||||
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
|
||||
m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
|
||||
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
|
||||
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
|
||||
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
|
||||
|
||||
|
@ -206,6 +240,10 @@ AC_PROVIDE_IFELSE([AC_PROG_CXX],
|
|||
[_AM_DEPENDENCIES(CXX)],
|
||||
[define([AC_PROG_CXX],
|
||||
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
|
||||
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
|
||||
[_AM_DEPENDENCIES(OBJC)],
|
||||
[define([AC_PROG_OBJC],
|
||||
defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
|
||||
])
|
||||
])
|
||||
|
||||
|
@ -219,16 +257,17 @@ AC_PROVIDE_IFELSE([AC_PROG_CXX],
|
|||
# our stamp files there.
|
||||
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
|
||||
[# Compute $1's index in $config_headers.
|
||||
_am_arg=$1
|
||||
_am_stamp_count=1
|
||||
for _am_header in $config_headers :; do
|
||||
case $_am_header in
|
||||
$1 | $1:* )
|
||||
$_am_arg | $_am_arg:* )
|
||||
break ;;
|
||||
* )
|
||||
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
|
||||
esac
|
||||
done
|
||||
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
|
||||
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
|
||||
|
||||
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
|
||||
#
|
||||
|
@ -241,7 +280,7 @@ echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
|
|||
# Define $install_sh.
|
||||
AC_DEFUN([AM_PROG_INSTALL_SH],
|
||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
install_sh=${install_sh-"$am_aux_dir/install-sh"}
|
||||
install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
|
||||
AC_SUBST(install_sh)])
|
||||
|
||||
# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
|
||||
|
@ -296,14 +335,14 @@ AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
|
|||
|
||||
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
|
||||
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
|
||||
# Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 4
|
||||
# serial 5
|
||||
|
||||
# AM_MISSING_PROG(NAME, PROGRAM)
|
||||
# ------------------------------
|
||||
|
@ -319,6 +358,7 @@ AC_SUBST($1)])
|
|||
# If it does, set am_missing_run to use it, otherwise, to nothing.
|
||||
AC_DEFUN([AM_MISSING_HAS_RUN],
|
||||
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
|
||||
AC_REQUIRE_AUX_FILE([missing])dnl
|
||||
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
|
||||
# Use eval to expand $SHELL
|
||||
if eval "$MISSING --run true"; then
|
||||
|
@ -329,7 +369,7 @@ else
|
|||
fi
|
||||
])
|
||||
|
||||
# Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
|
@ -337,60 +377,23 @@ fi
|
|||
|
||||
# AM_PROG_MKDIR_P
|
||||
# ---------------
|
||||
# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
|
||||
#
|
||||
# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
|
||||
# created by `make install' are always world readable, even if the
|
||||
# installer happens to have an overly restrictive umask (e.g. 077).
|
||||
# This was a mistake. There are at least two reasons why we must not
|
||||
# use `-m 0755':
|
||||
# - it causes special bits like SGID to be ignored,
|
||||
# - it may be too restrictive (some setups expect 775 directories).
|
||||
#
|
||||
# Do not use -m 0755 and let people choose whatever they expect by
|
||||
# setting umask.
|
||||
#
|
||||
# We cannot accept any implementation of `mkdir' that recognizes `-p'.
|
||||
# Some implementations (such as Solaris 8's) are not thread-safe: if a
|
||||
# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
|
||||
# concurrently, both version can detect that a/ is missing, but only
|
||||
# one can create it and the other will error out. Consequently we
|
||||
# restrict ourselves to GNU make (using the --version option ensures
|
||||
# this.)
|
||||
# Check for `mkdir -p'.
|
||||
AC_DEFUN([AM_PROG_MKDIR_P],
|
||||
[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
|
||||
# We used to keeping the `.' as first argument, in order to
|
||||
# allow $(mkdir_p) to be used without argument. As in
|
||||
# $(mkdir_p) $(somedir)
|
||||
# where $(somedir) is conditionally defined. However this is wrong
|
||||
# for two reasons:
|
||||
# 1. if the package is installed by a user who cannot write `.'
|
||||
# make install will fail,
|
||||
# 2. the above comment should most certainly read
|
||||
# $(mkdir_p) $(DESTDIR)$(somedir)
|
||||
# so it does not work when $(somedir) is undefined and
|
||||
# $(DESTDIR) is not.
|
||||
# To support the latter case, we have to write
|
||||
# test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
|
||||
# so the `.' trick is pointless.
|
||||
mkdir_p='mkdir -p --'
|
||||
else
|
||||
# On NextStep and OpenStep, the `mkdir' command does not
|
||||
# recognize any option. It will interpret all options as
|
||||
# directories to create, and then abort because `.' already
|
||||
# exists.
|
||||
for d in ./-p ./--version;
|
||||
do
|
||||
test -d $d && rmdir $d
|
||||
done
|
||||
# $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
|
||||
if test -f "$ac_aux_dir/mkinstalldirs"; then
|
||||
mkdir_p='$(mkinstalldirs)'
|
||||
else
|
||||
mkdir_p='$(install_sh) -d'
|
||||
fi
|
||||
fi
|
||||
AC_SUBST([mkdir_p])])
|
||||
[AC_PREREQ([2.60])dnl
|
||||
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
|
||||
dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
|
||||
dnl while keeping a definition of mkdir_p for backward compatibility.
|
||||
dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
|
||||
dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
|
||||
dnl Makefile.ins that do not define MKDIR_P, so we do our own
|
||||
dnl adjustment using top_builddir (which is defined more often than
|
||||
dnl MKDIR_P).
|
||||
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
|
||||
case $mkdir_p in
|
||||
[[\\/$]]* | ?:[[\\/]]*) ;;
|
||||
*/*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
|
||||
esac
|
||||
])
|
||||
|
||||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
|
||||
|
@ -502,9 +505,21 @@ dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
|
|||
if test "$cross_compiling" != no; then
|
||||
AC_CHECK_TOOL([STRIP], [strip], :)
|
||||
fi
|
||||
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
|
||||
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
|
||||
AC_SUBST([INSTALL_STRIP_PROGRAM])])
|
||||
|
||||
# Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# _AM_SUBST_NOTMAKE(VARIABLE)
|
||||
# ---------------------------
|
||||
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
|
||||
# This macro is traced by Automake.
|
||||
AC_DEFUN([_AM_SUBST_NOTMAKE])
|
||||
|
||||
# Check how to create a tarball. -*- Autoconf -*-
|
||||
|
||||
# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
|
||||
|
|
80
configure.ac
80
configure.ac
|
@ -1,7 +1,7 @@
|
|||
dnl
|
||||
dnl Require autoconf version 2.50 or greater
|
||||
dnl
|
||||
dnl Copyright (C) 2004, 2006 Rocky Bernstein <rocky@cpan.org>
|
||||
dnl Copyright (C) 2004, 2006, 2008 Rocky Bernstein <rocky@gnu.org>
|
||||
dnl
|
||||
dnl This program is free software; you can redistribute it and/or modify
|
||||
dnl it under the terms of the GNU General Public License as published by
|
||||
|
@ -18,11 +18,11 @@ dnl along with this program; if not, write to the Free Software
|
|||
dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
dnl 02110-1301 USA.
|
||||
|
||||
dnl $Id: configure.ac,v 1.36 2006/03/10 19:07:05 rockyb Exp $
|
||||
dnl $Id: configure.ac,v 1.45 2009/03/15 06:59:23 rockyb Exp $
|
||||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
AC_INIT(ps-watcher.in.in)
|
||||
AM_INIT_AUTOMAKE(ps-watcher,1.06)
|
||||
AM_INIT_AUTOMAKE(ps-watcher,1.08)
|
||||
|
||||
AM_MISSING_PROG(CVS2CL, cvs2cl, $missing_dir)
|
||||
AM_MAINTAINER_MODE
|
||||
|
@ -101,8 +101,8 @@ case "$host_os" in
|
|||
PS_NO_NULL_HEADER=0
|
||||
PS_PID_OPTS='-e -o pid= -o comm='
|
||||
PS_TIME_VAR='etime'
|
||||
PS_VARS='user ruser group rgroup uid ruid gid rgid ppid \
|
||||
pgid pri cpu pcpu pmem vsz nice class scount thcount tid time \
|
||||
PS_VARS='user ruser group rgroup uid ruid gid rgid ppid
|
||||
pgid pri cpu pcpu pmem vsz nice class scount thcount tid time
|
||||
etime tty wchan bnd'
|
||||
;;
|
||||
cygwin* )
|
||||
|
@ -122,8 +122,8 @@ etime tty wchan bnd'
|
|||
PS_NO_NULL_HEADER=0
|
||||
PS_PID_OPTS='-e -o pid= -o comm='
|
||||
PS_TIME_VAR='etime'
|
||||
PS_VARS='user ruser group rgroup uid ruid gid rgid ppid \
|
||||
pgid sid pri pcpu pmem vsz rss osz nice class time \
|
||||
PS_VARS='user ruser group rgroup uid ruid gid rgid ppid
|
||||
pgid sid pri pcpu pmem vsz rss osz nice class time
|
||||
etime stime f s lwp nlwp psr tty addr wchan fname'
|
||||
;;
|
||||
linux* )
|
||||
|
@ -133,16 +133,16 @@ etime stime f s lwp nlwp psr tty addr wchan fname'
|
|||
PS_NO_NULL_HEADER=0
|
||||
PS_PID_OPTS='-e -o pid= -o cmd='
|
||||
# Make sure we put known single tokens at the beginning like uid.
|
||||
PS_VARS='uid euid ruid gid egid rgid alarm blocked bsdtime c caught \
|
||||
cputime drs dsiz egroup eip esp etime euser f fgid \
|
||||
fgroup flag flags fname fsgid fsgroup fsuid fsuser fuid fuser \
|
||||
group ignored intpri lim longtname m_drs m_trs maj_flt majflt \
|
||||
min_flt minflt ni nice nwchan opri pagein pcpu pending pgid pgrp \
|
||||
pmem ppid pri rgroup rss rssize rsz ruser s sess session \
|
||||
sgi_p sgi_rss sgid sgroup sid sig sig_block sig_catch sig_ignore \
|
||||
sig_pend sigcatch sigignore sigmask stackp start start_stack start_time \
|
||||
stat state stime suid suser svgid svgroup svuid svuser sz time timeout \
|
||||
tmout tname tpgid trs trss tsiz tt tty tty4 tty8 uid_hack uname \
|
||||
PS_VARS='uid euid ruid gid egid rgid alarm blocked bsdtime c caught
|
||||
cputime drs dsiz egroup eip esp etime euser f fgid
|
||||
fgroup flag flags fname fsgid fsgroup fsuid fsuser fuid fuser
|
||||
group ignored intpri lim longtname m_drs m_trs maj_flt majflt
|
||||
min_flt minflt ni nice nwchan opri pagein pcpu pending pgid pgrp
|
||||
pmem ppid pri rgroup rss rssize rsz ruser s sess session
|
||||
sgi_p sgi_rss sgid sgroup sid sig sig_block sig_catch sig_ignore
|
||||
sig_pend sigcatch sigignore sigmask stackp start start_stack start_time
|
||||
stat state stime suid suser svgid svgroup svuid svuser sz time timeout
|
||||
tmout tname tpgid trs trss tsiz tt tty tty4 tty8 uid_hack uname
|
||||
user vsize vsz wchan'
|
||||
PS_TIME_VAR='etime'
|
||||
;;
|
||||
|
@ -153,11 +153,11 @@ user vsize vsz wchan'
|
|||
PS_NO_NULL_HEADER=1
|
||||
PS_PID_OPTS='-a -x -o pid= -o ucomm='
|
||||
PS_VARS='acflag cpu f \
|
||||
inblk jobc ktrace ktracep lim login majflt minflt msgrcv \
|
||||
msgsnd nice nivcsw nsigs nswap nvcsw nwchan oublk p_ru \
|
||||
paddr pagein pid ppid pri re rgid rlink rss rsz \
|
||||
ruid ruser sess sig sigcatch sigignore sigmask sl start state \
|
||||
svgid svuid tdev time tpgid tsess tsiz tt tty ucomm uid upr user vsz \
|
||||
inblk jobc ktrace ktracep lim login majflt minflt msgrcv
|
||||
msgsnd nice nivcsw nsigs nswap nvcsw nwchan oublk p_ru
|
||||
paddr pagein pid ppid pri re rgid rlink rss rsz
|
||||
ruid ruser sess sig sigcatch sigignore sigmask sl start state
|
||||
svgid svuid tdev time tpgid tsess tsiz tt tty ucomm uid upr user vsz
|
||||
wchan xstat'
|
||||
PS_TIME_VAR='cpu'
|
||||
;;
|
||||
|
@ -167,12 +167,12 @@ wchan xstat'
|
|||
PS_CUSTOM_HEADER=0
|
||||
PS_NO_NULL_HEADER=1
|
||||
PS_PID_OPTS='-a -x -o pid= -o ucomm='
|
||||
PS_VARS='acflag cpu cputime f \
|
||||
inblk jobc ktrace ktracep lim login majflt minflt msgrcv \
|
||||
msgsnd nice nivcsw nsigs nswap nvcsw nwchan oublk p_ru \
|
||||
paddr pagein pid ppid pri re rgid rlink rss rsz \
|
||||
rtprio ruid ruser sess sig sigcatch sigignore sigmask sl start state \
|
||||
svgid svuid tdev time tpgid tsess tsiz tt tty ucomm uid upr user vsz \
|
||||
PS_VARS='acflag cpu cputime f
|
||||
inblk jobc ktrace ktracep lim login majflt minflt msgrcv
|
||||
msgsnd nice nivcsw nsigs nswap nvcsw nwchan oublk p_ru
|
||||
paddr pagein pid ppid pri re rgid rlink rss rsz
|
||||
ruid ruser sess sig sigcatch sigignore sigmask sl start state
|
||||
svgid svuid tdev time tpgid tsess tsiz tt tty ucomm uid upr user vsz
|
||||
wchan xstat'
|
||||
PS_TIME_VAR='cputime'
|
||||
;;
|
||||
|
@ -184,21 +184,21 @@ wchan xstat'
|
|||
PS_PID_OPTS='-a -x -o pid= -o ucomm='
|
||||
PS_TIME_VAR='cputime'
|
||||
PS_VARS='acflag cpu cputime f \
|
||||
inblk jobc ktrace ktracep lim login \
|
||||
nice nivcsw nsigs nswap nvcsw nwchan oublk p_ru \
|
||||
paddr pagein pid ppid pri re rgid rlink rss rsz \
|
||||
ruid ruser sess sig sigcatch sigignore sigmask sl start state \
|
||||
svgid svuid tdev time tpgid tsess tsiz tt tty ucomm uid upr user vsz \
|
||||
inblk jobc ktrace ktracep lim login
|
||||
nice nivcsw nsigs nswap nvcsw nwchan oublk p_ru
|
||||
paddr pagein pid ppid pri re rgid rlink rss rsz
|
||||
ruid ruser sess sig sigcatch sigignore sigmask sl start state
|
||||
svgid svuid tdev time tpgid tsess tsiz tt tty ucomm uid upr user vsz
|
||||
wchan xstat'
|
||||
;;
|
||||
darwin5* | darwin6* | darwin7* | darwin8* )
|
||||
darwin5* | darwin6* | darwin7* | darwin8* | darwin9* )
|
||||
PS_PID_OPTS='-a -x -o pid= -o ucomm'
|
||||
PS_VARS='acflag cpu cputime f \
|
||||
inblk jobc ktrace ktracep lim login \
|
||||
nice nivcsw nsigs nswap nvcsw nwchan oublk p_ru \
|
||||
paddr pagein pid ppid pri re rgid rss rsz \
|
||||
ruid ruser sess sig sigmask sl start state \
|
||||
svgid svuid tdev time tpgid tsess tsiz tt tty ucomm uid upr user vsz \
|
||||
PS_VARS='acflag cpu cputime f
|
||||
inblk jobc ktrace ktracep lim login uid upr user vsz
|
||||
nice nivcsw nsigs nswap nvcsw nwchan oublk p_ru
|
||||
paddr pcpu pagein pid ppid pri re rgid rss rsz
|
||||
ruid ruser sess sig sigmask sl start state
|
||||
svgid svuid tdev time tpgid tsess tsiz tt tty ucomm
|
||||
wchan xstat'
|
||||
PS_TIME_VAR='cputime'
|
||||
PS_ARGS='-www -o command'
|
||||
|
|
14
debian/.gitlab-ci.yml
vendored
Normal file
14
debian/.gitlab-ci.yml
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
include:
|
||||
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
|
||||
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
|
||||
|
||||
variables:
|
||||
RELEASE: 'unstable'
|
||||
SALSA_CI_DISABLE_APTLY: 0
|
||||
SALSA_CI_DISABLE_AUTOPKGTEST: 1
|
||||
SALSA_CI_DISABLE_BLHC: 0
|
||||
SALSA_CI_DISABLE_LINTIAN: 0
|
||||
SALSA_CI_DISABLE_PIUPARTS: 1
|
||||
SALSA_CI_DISABLE_REPROTEST: 1
|
||||
SALSA_CI_DISABLE_BUILD_PACKAGE_ALL: 0
|
||||
SALSA_CI_DISABLE_BUILD_PACKAGE_ANY: 0
|
10
debian/NEWS
vendored
Normal file
10
debian/NEWS
vendored
Normal file
|
@ -0,0 +1,10 @@
|
|||
ps-watcher (1.08-1) unstable; urgency=low
|
||||
|
||||
moved startup to the end of the boot process and terminating to the
|
||||
beginning of the shutdown process
|
||||
|
||||
If you modified the order of ps-watcher runlevel scripts for your own, this
|
||||
adjustment will not happen automatically and you have to handle it for
|
||||
yourself.
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Fri, 24 Jul 2009 19:16:09 +0200
|
24
debian/README.Debian
vendored
Normal file
24
debian/README.Debian
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
ps-watcher for Debian
|
||||
---------------------
|
||||
|
||||
1. PROVIDE A CONFIGFILE
|
||||
-----------------------
|
||||
|
||||
Please provide a config file, usually /etc/ps-watcher.conf. Examples are
|
||||
located in /usr/share/doc/ps-watcher/examples/.
|
||||
|
||||
2. AUTOMATIC STARTUP
|
||||
--------------------
|
||||
|
||||
In order to avoid the startup of the daemon on an unconfigured machine,
|
||||
automatic startup, on boot, is disabled by default. To enable it just edit the
|
||||
file /etc/default/ps-watcher and set the "startup" variable to 1.
|
||||
|
||||
3. POSITION IN STARTUP SCRIPTS
|
||||
------------------------------
|
||||
|
||||
If you want to keep track on daemon (restart if not running any more), you
|
||||
should start ps-watcher on startup after all daemons running and stop at first
|
||||
on shutdown. You can use update-rc.d to updated the postition in start-scripts.
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Wed, 8 Nov 2006 22:44:24 +0100
|
188
debian/bin/github-release.sh
vendored
Executable file
188
debian/bin/github-release.sh
vendored
Executable file
|
@ -0,0 +1,188 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Copyright (c) 2014 Terry Burton
|
||||
#
|
||||
# https://github.com/terryburton/travis-github-release
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any
|
||||
# person obtaining a copy of this software and associated
|
||||
# documentation files (the "Software"), to deal in the
|
||||
# Software without restriction, including without
|
||||
# limitation the rights to use, copy, modify, merge,
|
||||
# publish, distribute, sublicense, and/or sell copies of
|
||||
# the Software, and to permit persons to whom the Software
|
||||
# is furnished to do so, subject to the following
|
||||
# conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice
|
||||
# shall be included in all copies or substantial portions
|
||||
# of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
|
||||
# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
||||
# THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
||||
# PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
||||
# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
# This script provides a simple continuous deployment
|
||||
# solution that allows Travis CI to publish a new GitHub
|
||||
# release and upload assets to it whenever a tag is pushed:
|
||||
# git tag; git push --tags
|
||||
#
|
||||
# It is created as a temporary solution whilst we wait for
|
||||
# Travis DPL to support GitHub:
|
||||
#
|
||||
# https://github.com/travis-ci/dpl
|
||||
#
|
||||
# Place this script somewhere in your project repository (perhaps by forking
|
||||
# the github-travis-release repo and adding your fork as a git submodule) then
|
||||
# put something like this to your .travis.yml:
|
||||
#
|
||||
# after_success: .travis/github-release.sh "$TRAVIS_REPO_SLUG" "`head -1 src/VERSION`" build/release/*
|
||||
#
|
||||
# The first argument is your repository in the format
|
||||
# "username/repository", which Travis provides in the
|
||||
# TRAVIS_REPO_SLUG environment variable.
|
||||
#
|
||||
# The second argument is the release version which as a
|
||||
# sanity check should match the tag that you are releasing.
|
||||
# You could pass "`git describe`" to satisfy this check.
|
||||
#
|
||||
# The remaining arguments are a list of asset files that you
|
||||
# want to publish along with the release.
|
||||
#
|
||||
# The script requires that you create a GitHub OAuth access
|
||||
# token to facilitate the upload:
|
||||
#
|
||||
# https://help.github.com/articles/creating-an-access-token-for-command-line-use
|
||||
#
|
||||
# You must pass this securely in the GITHUBTOKEN environment
|
||||
# variable:
|
||||
#
|
||||
# http://docs.travis-ci.com/user/encryption-keys/
|
||||
#
|
||||
# For testing purposes you can create a local convenience
|
||||
# file in the script directory called GITHUBTOKEN that sets
|
||||
# the GITHUBTOKEN environment variable. If you do so you MUST
|
||||
# ensure that this doesn't get pushed to your repository,
|
||||
# perhaps by adding it to a .gitignore file.
|
||||
#
|
||||
# Should you get stuck then look at a working example. This
|
||||
# code is being used by Barcode Writer in Pure PostScript
|
||||
# for automated deployment:
|
||||
#
|
||||
# https://github.com/terryburton/postscriptbarcode
|
||||
|
||||
set -e
|
||||
|
||||
REPO=$1 && shift
|
||||
RELEASE=$1 && shift
|
||||
RELEASEFILES=$@
|
||||
|
||||
if ! TAG=`git describe --exact-match --tags 2>/dev/null`; then
|
||||
echo "This commit is not a tag so not creating a release"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$TRAVIS" = "true" ] && [ -z "$TRAVIS_TAG" ]; then
|
||||
echo "This build is not for the tag so not creating a release"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$TRAVIS" = "true" ] && [ "$TRAVIS_TAG" != "$RELEASE" ]; then
|
||||
echo "Error: TRAVIS_TAG ($TRAVIS_TAG) does not match the indicated release ($RELEASE)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$TAG" != "$RELEASE" ]; then
|
||||
echo "Error: The tag ($TAG) does not match the indicated release ($RELEASE)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -z "$RELEASEFILES" ]]; then
|
||||
echo "Error: No release files provided"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SCRIPTDIR=`dirname $0`
|
||||
[ -e "$SCRIPTDIR/GITHUBTOKEN" ] && . "$SCRIPTDIR/GITHUBTOKEN"
|
||||
if [[ -z "$GITHUBTOKEN" ]]; then
|
||||
echo "Error: GITHUBTOKEN is not set"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Creating GitHub release for $RELEASE"
|
||||
|
||||
echo -n "Create draft release... "
|
||||
JSON=$(cat <<EOF
|
||||
{
|
||||
"tag_name": "$TAG",
|
||||
"target_commitish": "master",
|
||||
"name": "$TAG: New release",
|
||||
"draft": true,
|
||||
"prerelease": false
|
||||
}
|
||||
EOF
|
||||
)
|
||||
RESULT=`curl -s -w "\n%{http_code}\n" \
|
||||
-H "Authorization: token $GITHUBTOKEN" \
|
||||
-d "$JSON" \
|
||||
"https://api.github.com/repos/$REPO/releases"`
|
||||
if [ "`echo "$RESULT" | tail -1`" != "201" ]; then
|
||||
echo FAILED
|
||||
echo "$RESULT"
|
||||
exit 1
|
||||
fi
|
||||
RELEASEID=`echo "$RESULT" | sed -ne 's/^ "id": \(.*\),$/\1/p'`
|
||||
if [[ -z "$RELEASEID" ]]; then
|
||||
echo FAILED
|
||||
echo "$RESULT"
|
||||
exit 1
|
||||
fi
|
||||
echo DONE
|
||||
|
||||
for FILE in $RELEASEFILES; do
|
||||
if [ ! -f $FILE ]; then
|
||||
echo "Warning: $FILE not a file"
|
||||
continue
|
||||
fi
|
||||
FILESIZE=`stat -c '%s' "$FILE"`
|
||||
FILENAME=`basename $FILE`
|
||||
echo -n "Uploading $FILENAME... "
|
||||
RESULT=`curl -s -w "\n%{http_code}\n" \
|
||||
-H "Authorization: token $GITHUBTOKEN" \
|
||||
-H "Accept: application/vnd.github.manifold-preview" \
|
||||
-H "Content-Type: application/zip" \
|
||||
--data-binary "@$FILE" \
|
||||
"https://uploads.github.com/repos/$REPO/releases/$RELEASEID/assets?name=$FILENAME&size=$FILESIZE"`
|
||||
if [ "`echo "$RESULT" | tail -1`" != "201" ]; then
|
||||
echo FAILED
|
||||
echo "$RESULT"
|
||||
exit 1
|
||||
fi
|
||||
echo DONE
|
||||
done
|
||||
|
||||
echo -n "Publishing release... "
|
||||
JSON=$(cat <<EOF
|
||||
{
|
||||
"draft": false
|
||||
}
|
||||
EOF
|
||||
)
|
||||
RESULT=`curl -s -w "\n%{http_code}\n" \
|
||||
-X PATCH \
|
||||
-H "Authorization: token $GITHUBTOKEN" \
|
||||
-d "$JSON" \
|
||||
"https://api.github.com/repos/$REPO/releases/$RELEASEID"`
|
||||
if [ "`echo "$RESULT" | tail -1`" = "200" ]; then
|
||||
echo DONE
|
||||
else
|
||||
echo FAILED
|
||||
echo "$RESULT"
|
||||
exit 1
|
||||
fi
|
249
debian/changelog
vendored
Normal file
249
debian/changelog
vendored
Normal file
|
@ -0,0 +1,249 @@
|
|||
ps-watcher (1.08-12) UNRELEASED; urgency=medium
|
||||
|
||||
*
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Mon, 23 Jan 2023 12:34:15 +0000
|
||||
|
||||
ps-watcher (1.08-11) unstable; urgency=medium
|
||||
|
||||
* [5f175a7] Use secure copyright file specification URI.
|
||||
* [829bf29] Set upstream metadata fields: Repository.
|
||||
* [c390306] d/source/options: Adding .github to diff ignore
|
||||
* [1c64860] Adding d/.gitlab-ci.yml
|
||||
* [b8ef571] Do not remove .git* anymore
|
||||
* [02612c6] Use secure URI in Homepage field.
|
||||
* [7339857] Bump Standards-Version to 4.6.2
|
||||
* [e427efa] Update watch file format version to 4.
|
||||
* [97dd2ee] Drop lsb-base, sysvinit-utils is essential
|
||||
* [a009193] Adding unitfile
|
||||
* [032d1f7] Set upstream metadata fields: Archive, Bug-Database.
|
||||
* [ec1d2af] Set Rules-Requires-Root: no.
|
||||
* [ea639a6] Bump debhelper from old 12 to 13.
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Mon, 23 Jan 2023 12:24:01 +0000
|
||||
|
||||
ps-watcher (1.08-10) unstable; urgency=medium
|
||||
|
||||
* [ed0099b] Raising compat level to 9, debhelper is already on 9
|
||||
(Closes: #965785)
|
||||
* [75383b3] Bump Standards-Version to 4.5.1.0, no changes needed
|
||||
* [559d2a8] Adding Github CI
|
||||
* [412e691] d/control: Raise compat level to 12
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Wed, 06 Jan 2021 21:59:48 +0100
|
||||
|
||||
ps-watcher (1.08-9.1) unstable; urgency=medium
|
||||
|
||||
* Non maintainer upload by the Reproducible Builds team.
|
||||
* No source change upload to rebuild on buildd with .buildinfo files.
|
||||
|
||||
-- Holger Levsen <holger@debian.org> Wed, 06 Jan 2021 17:28:10 +0100
|
||||
|
||||
ps-watcher (1.08-9) unstable; urgency=medium
|
||||
|
||||
* [adb45ae] travis-ci: Use xenial image
|
||||
* [910f8b9] d/control: Bump Standards-Version to 4.3.0, no changes needed
|
||||
* [14f90dd] d/control: Priority extra is deprecated, using optional
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Thu, 24 Jan 2019 08:18:46 +0100
|
||||
|
||||
ps-watcher (1.08-8) unstable; urgency=medium
|
||||
|
||||
* [0d63c8c] Bump Standards-Version to 3.9.6, no changes needed
|
||||
* [cb6a23c] travis-ci: don't install build-deps manual
|
||||
* [97be247] travis-ci: build package with dpkg-buildpackage
|
||||
* [6f42c4c] travis-ci: install ca-certificates to get certs for uscan
|
||||
* [4717c8d] travis-ci: bypassing #687834
|
||||
* [730cbe8] travis-ci: bypass certificate validation of uscan
|
||||
* [0ab833e] travis-ci: Initial support for uploading releases to github
|
||||
* [93f9a0b] travis-ci: Fix setting environment variables
|
||||
* [f0203f7] Merging upstream changes of github-release.sh
|
||||
* [14ced40] Updating copyright and author of debian/bin/github-release.sh
|
||||
* [8110407] debian/control: reformating with warp-and-sort
|
||||
* [ec7e507] travis-ci: grab actual used upstream version
|
||||
* [bf74ead] travis-ci: Adding required arguments for trusty
|
||||
* [c408d41] travis-ci: automatically install dependencies
|
||||
* [e87e5a8] d/control: Bump Standards-Version to 3.9.8, no changes needed
|
||||
* [f37bba0] d/control: Depend on lsb-base
|
||||
* [e77e9ec] d/rules: Use dh_prep instead of 'dh_clean -k'
|
||||
* [5d47daa] d/control: Droping perl-modules build dep
|
||||
* [3f09626] travis-ci: Make use of travis.d.n
|
||||
* [212f8e2] travis-ci: Testing stable too and fetching all tags
|
||||
* [0ba1b56] travis-ci: Add my own trusty ppa for newer lintian
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Mon, 05 Dec 2016 11:22:36 +0100
|
||||
|
||||
ps-watcher (1.08-7) unstable; urgency=medium
|
||||
|
||||
* [f2c7947] Update Vcs-headers to selfhosted VCS
|
||||
* [a36ddd6] Ignore modifications of ps-watcher script
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Mon, 10 Mar 2014 00:40:49 +0100
|
||||
|
||||
ps-watcher (1.08-6) unstable; urgency=low
|
||||
|
||||
* [9f9bacd] Add needed changes to patches/ps_binary
|
||||
* [62ebac8] Adjusting clean target in debian/rules to completely cleanup
|
||||
* [dc0bca0] Updating standards version to 3.9.4, no changes needed
|
||||
* [6f0b2fa] Source init functions in init script
|
||||
* [e5bc30b] Update debian/copyright to latest machine-readable format
|
||||
* [d7faae5] Update Vcs-headers
|
||||
* [b9b8758] Updating standards version to 3.9.5, no changes needed
|
||||
* [a154d1a] Remove ps-watcher binary when making clean
|
||||
* [9d9887c] travis-ci: Add travis-ci config
|
||||
* [8ec3e39] travis-ci: Reorder and comment
|
||||
* [7fab357] travis-ci: Add lintian checks after build
|
||||
* [84de0bc] Remove asterisks from NEWS file
|
||||
* [a4f22b3] Update VCS-* fields to current canonical URIs
|
||||
* [1a95e5d] Remove obsolete lintian override file
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Sun, 02 Mar 2014 16:42:19 +0100
|
||||
|
||||
ps-watcher (1.08-5) unstable; urgency=low
|
||||
|
||||
* Fix comparation in preinst script, realy (Closes: #666097)
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Thu, 29 Mar 2012 11:56:23 +0200
|
||||
|
||||
ps-watcher (1.08-4) unstable; urgency=low
|
||||
|
||||
* Depend on procps, cause we need /bin/ps, thanks to Cristian Ionescu-Idbohrn
|
||||
(Closes: #666097)
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Wed, 28 Mar 2012 19:28:35 +0200
|
||||
|
||||
ps-watcher (1.08-3) unstable; urgency=low
|
||||
|
||||
* Bump Standards-Version to 3.9.3, no changes needed
|
||||
* Raise debhelper version to 9
|
||||
* Switch packaging format to "3.0 (quilt)"
|
||||
* Add build-arch and build-indep targets to debian/rules
|
||||
* Add patches/ps_binary to set ps_prog to "/bin/ps", thank to Gregory Davis
|
||||
(Closes: 645791)
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Wed, 28 Mar 2012 08:53:20 +0200
|
||||
|
||||
ps-watcher (1.08-2) unstable; urgency=low
|
||||
|
||||
* Add "Copyright" to all copyrights in debian/copyright
|
||||
* Bump Standards-Version to 3.8.4, no changes needed
|
||||
* Migrate Vcs-Fields over to scm.uncompleted.org
|
||||
* Add 1.0 to debian/source/format
|
||||
* refer README.Debian* in initscript (Closes: #523405)
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Wed, 10 Mar 2010 12:44:44 +0100
|
||||
|
||||
ps-watcher (1.08-1) unstable; urgency=low
|
||||
|
||||
* new upstream release
|
||||
- pidfile support
|
||||
- darwin support
|
||||
* remove dpatch infrastructure
|
||||
* moved initscritps to S99 and K01, thanks Tim Miller Dyck (Closes: #508189)
|
||||
* created NEWS.Debian
|
||||
* bump standards version to 3.8.2 (no changes needed)
|
||||
* calling pidof in preinst without absolute path
|
||||
* adjust lintian overrides for config* files
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Fri, 24 Jul 2009 19:12:00 +0200
|
||||
|
||||
ps-watcher (1.07-1) unstable; urgency=low
|
||||
|
||||
* new upstream release
|
||||
- improve logfile handling
|
||||
- new sample config file using perl-action
|
||||
- minor typo fixes
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Thu, 19 Feb 2009 17:24:47 +0100
|
||||
|
||||
ps-watcher (1.06-11) unstable; urgency=low
|
||||
|
||||
* removed use of pidof from restart|force-reload init-script target,
|
||||
since daemon has pidfile support and it never worked anyways
|
||||
(Closes: #500741)
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Wed, 01 Oct 2008 11:05:25 +0200
|
||||
|
||||
ps-watcher (1.06-10) unstable; urgency=low
|
||||
|
||||
* bump copyright of packaging to 2008
|
||||
* Updating standards version to 3.8.0, no changes needed
|
||||
* implement machine-interpretable copyright file
|
||||
* move autotools-dev to Build-Depends-Indep
|
||||
* cleanup rules a bit
|
||||
* create lintian override for "outdated-autotools-helper-file", which we
|
||||
copy over from autotools-dev
|
||||
* add ${misc:Depends} to Depends
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Sun, 20 Jul 2008 13:43:55 +0200
|
||||
|
||||
ps-watcher (1.06-9) unstable; urgency=low
|
||||
|
||||
* added Vcs- fields, moved Homepage into source header's field
|
||||
* bump standards version to 3.7.3 (no changes needed)
|
||||
* change Priority to extra since libconfig-inifiles-perl is also extra and
|
||||
we depend on it
|
||||
* remove whitespaces trailing whitespaces from changelog
|
||||
* add dpatch infrastructure
|
||||
* add 01_add_pidfile_support.dpatch to implement writing pidfiles into the
|
||||
daemon
|
||||
* adjust init script since the daemon supports writing pidfiles
|
||||
* make use of pidof in preinst
|
||||
* move copy of config.guess and and config.sub into config.status target
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Thu, 03 Apr 2008 00:23:39 +0200
|
||||
|
||||
ps-watcher (1.06-8) unstable; urgency=low
|
||||
|
||||
* fix clean target in rules
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Thu, 08 Nov 2007 09:25:25 +0100
|
||||
|
||||
ps-watcher (1.06-7) unstable; urgency=low
|
||||
|
||||
* update copyright
|
||||
* use native debhelper prerm and postinst script
|
||||
* make start-stop-daemon working instead of using kill
|
||||
* providing upgrade path via preinst
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Wed, 4 Jul 2007 12:26:57 +0200
|
||||
|
||||
ps-watcher (1.06-6) unstable; urgency=medium
|
||||
|
||||
* fix prerm and postinst to prevent trouble when updating
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Thu, 8 Mar 2007 09:20:58 +0100
|
||||
|
||||
ps-watcher (1.06-5) unstable; urgency=medium
|
||||
|
||||
* fix typo in init script which prevents from start
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Wed, 28 Feb 2007 23:00:39 +0100
|
||||
|
||||
ps-watcher (1.06-4) unstable; urgency=medium
|
||||
|
||||
* moved libsys-syslog-perl from Depends to Recommands and removed from
|
||||
Builddeps since Sys::Syslog is also provided by perl
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Tue, 28 Nov 2006 12:01:46 +0100
|
||||
|
||||
ps-watcher (1.06-3) unstable; urgency=low
|
||||
|
||||
* moved from binary-arch to binary-indep
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Thu, 9 Nov 2006 14:08:15 +0100
|
||||
|
||||
ps-watcher (1.06-2) unstable; urgency=low
|
||||
|
||||
* remove dh_strip from rules
|
||||
* adjust depencies (libconfig-inifiles-perl, libsys-syslog-perl)
|
||||
* modifying initscript to prevent to start without config file
|
||||
* provide own postinst and prerm scripts
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Sat, 4 Nov 2006 21:38:44 +0100
|
||||
|
||||
ps-watcher (1.06-1) unstable; urgency=low
|
||||
|
||||
* Initial release (Closes: #396953).
|
||||
|
||||
-- Jan Wagner <waja@cyconet.org> Fri, 3 Nov 2006 14:39:48 +0100
|
24
debian/control
vendored
Normal file
24
debian/control
vendored
Normal file
|
@ -0,0 +1,24 @@
|
|||
Source: ps-watcher
|
||||
Section: admin
|
||||
Priority: optional
|
||||
Maintainer: Jan Wagner <waja@cyconet.org>
|
||||
Build-Depends: debhelper-compat (= 13)
|
||||
Build-Depends-Indep: autotools-dev, libconfig-inifiles-perl
|
||||
Homepage: https://ps-watcher.sourceforge.net/
|
||||
Vcs-Browser: https://gitlab.uncompleted.org/debian/ps-watcher
|
||||
Vcs-Git: https://gitlab.uncompleted.org/debian/ps-watcher.git
|
||||
Standards-Version: 4.6.2
|
||||
Rules-Requires-Root: no
|
||||
|
||||
Package: ps-watcher
|
||||
Architecture: all
|
||||
Depends: libconfig-inifiles-perl, procps, ${misc:Depends}, ${perl:Depends}
|
||||
Recommends: libsys-syslog-perl
|
||||
Description: monitoring a system via ps-like commands
|
||||
This program runs the ps command periodically and triggers commands on matches.
|
||||
The match patterns are Perl regular expressions which can refer to the process
|
||||
information via variables.
|
||||
.
|
||||
For example it can be used to ensure that a daemon is running, or is not
|
||||
running too many times. It can also be used to determine when a process has
|
||||
consumed too many resources, perhaps due to a memory leak.
|
54
debian/copyright
vendored
Normal file
54
debian/copyright
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: ps-watcher
|
||||
Upstream-Contact: Rocky Bernstein <rocky@panix.com>
|
||||
Source: http://ps-watcher.sf.net
|
||||
|
||||
Files: *
|
||||
Copyright: Copyright (C) 2000-2008 Rocky Bernstein <rocky@panix.com>
|
||||
License: GPL-2+
|
||||
|
||||
Files: debian/*
|
||||
Copyright: Copyright (C) 2006, 2013 Jan Wagner <waja@cyconet.org>
|
||||
License: GPL-2+
|
||||
|
||||
Files: debian/bin/github-release.sh
|
||||
Copyright: Copyright (c) 2014 Terry Burton
|
||||
License: Expat
|
||||
|
||||
License: Expat
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
.
|
||||
The above copyright notice and this permission notice shall be included
|
||||
in all copies or substantial portions of the Software.
|
||||
.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
License: GPL-2+
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
.
|
||||
On Debian systems, the complete text of the GNU General Public License can be
|
||||
found in /usr/share/common-licenses/GPL-2 file.
|
14
debian/default
vendored
Normal file
14
debian/default
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
# Defaults for ps-watcher initscript
|
||||
# sourced by /etc/init.d/ps-watcher
|
||||
# installed at /etc/default/ps-watcher by the maintainer scripts
|
||||
|
||||
# prevent startup without configuration file
|
||||
# set the below varible to 1 in order to allow ps-watcher to start
|
||||
# startup=1
|
||||
|
||||
# Specify your configfile here
|
||||
CONFIG="/etc/ps-watcher.conf"
|
||||
|
||||
# Additional options that are passed to the Daemon.
|
||||
# here: check every 150 secs
|
||||
DAEMON_OPTS="--sleep 150"
|
3
debian/docs
vendored
Normal file
3
debian/docs
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
NEWS
|
||||
THANKS
|
||||
TODO
|
88
debian/init.d
vendored
Normal file
88
debian/init.d
vendored
Normal file
|
@ -0,0 +1,88 @@
|
|||
#! /bin/sh
|
||||
# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
|
||||
# Modified for Debian
|
||||
# by Ian Murdock <imurdock@gnu.ai.mit.edu>.
|
||||
#
|
||||
# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl
|
||||
# /etc/init.d/ps-watcher: v1 2006/11/03 Jan Wagner <waja@cyconet.org>
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: ps-watcher
|
||||
# Required-Start: $local_fs $network $remote_fs $syslog
|
||||
# Required-Stop: $local_fs $network $remote_fs $syslog
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: start and stop the ps-watcher daemon
|
||||
# Description: monitoring a system via ps-like commands
|
||||
### END INIT INFO
|
||||
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||
DAEMON=/usr/bin/ps-watcher
|
||||
NAME=ps-watcher
|
||||
DESC=ps-watcher
|
||||
|
||||
test -x $DAEMON || exit 0
|
||||
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
# Include ps-watcher defaults if available
|
||||
if [ -f /etc/default/ps-watcher ] ; then
|
||||
. /etc/default/ps-watcher
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
not_configured () {
|
||||
echo "#### WARNING ####"
|
||||
echo "ps-watcher won't be started/stopped unless it is configured"
|
||||
if [ "$1" != "stop" ]
|
||||
then
|
||||
echo ""
|
||||
echo "Please pease provide a configfile!"
|
||||
echo "See /usr/share/doc/ps-watcher/README.Debian*."
|
||||
fi
|
||||
echo "#################"
|
||||
exit 0
|
||||
}
|
||||
|
||||
# check if ps-watcher is configured or not
|
||||
if [ -f "/etc/default/ps-watcher" ]
|
||||
then
|
||||
. /etc/default/ps-watcher
|
||||
if [ "$startup" != "1" ] || [ ! -f $CONFIG ]
|
||||
then
|
||||
not_configured
|
||||
fi
|
||||
else
|
||||
not_configured
|
||||
fi
|
||||
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting $DESC: "
|
||||
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
|
||||
--exec $DAEMON -- -c $CONFIG --daemon $DAEMON_OPTS
|
||||
echo "$NAME."
|
||||
;;
|
||||
stop)
|
||||
echo -n "Stopping $DESC: "
|
||||
start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid
|
||||
echo "$NAME."
|
||||
;;
|
||||
restart|force-reload)
|
||||
echo -n "Restarting $DESC: "
|
||||
start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid
|
||||
sleep 1
|
||||
start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \
|
||||
--exec $DAEMON -- -c $CONFIG --daemon $DAEMON_OPTS
|
||||
echo "$NAME."
|
||||
;;
|
||||
*)
|
||||
N=/etc/init.d/$NAME
|
||||
echo "Usage: $N {start|stop|restart|force-reload}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
15
debian/patches/ps_binary
vendored
Normal file
15
debian/patches/ps_binary
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
From: Jan Wagner <waja@cyconet.org>
|
||||
Subject: Patch path of ps, so we don't need to have the binary installed on compiletime
|
||||
Index: ps-watcher-1.08/ps-watcher.in.in
|
||||
===================================================================
|
||||
--- ps-watcher-1.08.orig/ps-watcher.in.in 2012-03-28 08:37:45.000000000 +0200
|
||||
+++ ps-watcher-1.08/ps-watcher.in.in 2012-03-28 08:38:13.000000000 +0200
|
||||
@@ -339,7 +339,7 @@
|
||||
$opts{syslog} = 1; # Log errors to syslog
|
||||
$opts{logfile} = $DEVNULL;
|
||||
$opts{daemon} = 1; # Run as daemon;
|
||||
- $opts{ps_prog} = '@PS@'; # Where is ps?
|
||||
+ $opts{ps_prog} = '/bin/ps'; # Where is ps?
|
||||
$opts{ps_pid_opts} = '@PS_PID_OPTS@'; # How do I get pids and commands?
|
||||
|
||||
$ps_arg_opts = '@PS_ARGS@'; # How do I get full process command?
|
1
debian/patches/series
vendored
Normal file
1
debian/patches/series
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
ps_binary
|
17
debian/postinst
vendored
Normal file
17
debian/postinst
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ "$1" = "configure" ] && [ "$2" ] && dpkg --compare-versions "$2" lt "1.08-1"; then
|
||||
if [ -e /etc/rc2.d/S40ps-watcher ] && \
|
||||
[ -e /etc/rc3.d/S40ps-watcher ] && \
|
||||
[ -e /etc/rc4.d/S40ps-watcher ] && \
|
||||
[ -e /etc/rc5.d/S40ps-watcher ] && \
|
||||
[ -e /etc/rc0.d/K40ps-watcher ] && \
|
||||
[ -e /etc/rc1.d/K40ps-watcher ] && \
|
||||
[ -e /etc/rc6.d/K40ps-watcher ]; then
|
||||
update-rc.d -f ps-watcher remove >/dev/null
|
||||
fi
|
||||
fi
|
||||
|
||||
#DEBHELPER#
|
8
debian/preinst
vendored
Executable file
8
debian/preinst
vendored
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# generate correct pid file, for versions where was non or incorrect
|
||||
if [ "$1" = "upgrade" ] && [ "$2" ] && dpkg --compare-versions "$2" le "1.06-6"; then
|
||||
pidof ps-watcher > /var/run/ps-watcher.pid
|
||||
fi
|
||||
#DEBHELPER#
|
80
debian/rules
vendored
Executable file
80
debian/rules
vendored
Executable file
|
@ -0,0 +1,80 @@
|
|||
#!/usr/bin/make -f
|
||||
# written by Jan Wagner <waja@cyconet.org>
|
||||
#
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
config.status: configure
|
||||
dh_testdir
|
||||
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
|
||||
cp -f /usr/share/misc/config.sub config.sub
|
||||
endif
|
||||
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
|
||||
cp -f /usr/share/misc/config.guess config.guess
|
||||
endif
|
||||
# Add here commands to configure the package.
|
||||
./configure --prefix=/usr --mandir=\$${prefix}/share/man
|
||||
|
||||
build: build-arch build-indep
|
||||
build-arch: build-stamp
|
||||
build-indep: build-stamp
|
||||
|
||||
build-stamp: config.status
|
||||
dh_testdir
|
||||
|
||||
# Add here commands to compile the package.
|
||||
$(MAKE)
|
||||
|
||||
touch $@
|
||||
|
||||
clean:
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
# remove target stamps
|
||||
rm -f build-stamp
|
||||
rm -f ps-watcher.stamp
|
||||
# remove autoconf files
|
||||
rm -f config.guess config.sub
|
||||
|
||||
# Add here commands to clean up after the build process.
|
||||
[ ! -f Makefile ] || $(MAKE) clean && find . -name Makefile -exec rm {} +
|
||||
# clean files left behind make clean
|
||||
rm -f config.* ps-watcher.in post-configure docs/pod2htmd.tmp
|
||||
# delete modified (regenerated) files
|
||||
rm -f docs/ps-watcher.8 docs/ps-watcher.html
|
||||
# remove ps-watcher binary as this would we regenerated on building the package
|
||||
rm -f ps-watcher
|
||||
dh_clean
|
||||
|
||||
install: build
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_prep
|
||||
dh_installdirs
|
||||
|
||||
# Add here commands to install the package into debian/ps-watcher.
|
||||
$(MAKE) DESTDIR=$(CURDIR)/debian/ps-watcher install
|
||||
|
||||
# Build architecture-independent files here.
|
||||
binary-indep: build install
|
||||
dh_testdir
|
||||
dh_testroot
|
||||
dh_installchangelogs ChangeLog
|
||||
dh_installdocs
|
||||
dh_installexamples samples/*
|
||||
dh_installinit -- defaults 99 01
|
||||
dh_installsystemd --no-enable
|
||||
dh_link
|
||||
dh_compress
|
||||
dh_fixperms
|
||||
dh_perl
|
||||
dh_installdeb
|
||||
dh_gencontrol
|
||||
dh_md5sums
|
||||
dh_builddeb
|
||||
|
||||
# Build architecture-dependent files here.
|
||||
binary-arch:
|
||||
|
||||
binary: binary-indep binary-arch
|
||||
.PHONY: build clean binary-indep binary-arch binary install
|
14
debian/service
vendored
Normal file
14
debian/service
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
[Unit]
|
||||
Description=monitoring a system via ps-like commands
|
||||
|
||||
[Service]
|
||||
Environment=PIDFILE=/var/run/ps-watcher.pid
|
||||
EnvironmentFile=-/etc/default/ps-watcher
|
||||
ExecStart=/usr/sbin/ps-watcher -c $CONFIG --daemon $DAEMON_OPTS
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
KillMode=process
|
||||
Restart=on-failure
|
||||
Type=notify
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
1
debian/source/format
vendored
Normal file
1
debian/source/format
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
3.0 (quilt)
|
1
debian/source/options
vendored
Normal file
1
debian/source/options
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
extend-diff-ignore = '(^|/)(ps-watcher|\.travis\.yml|\.git|\.github|\.gitgnore|config\.sub|config\.guess)'
|
4
debian/upstream/metadata
vendored
Normal file
4
debian/upstream/metadata
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
Archive: SourceForge
|
||||
Bug-Database: http://sourceforge.net/tracker/?func=add&group_id=63944&atid=505723
|
||||
Repository: https://git.code.sf.net/p/ps-watcher/code
|
2
debian/watch
vendored
Normal file
2
debian/watch
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
version=4
|
||||
http://sf.net/ps-watcher ps-watcher-(.*)\.tar\.gz
|
|
@ -1,8 +1,8 @@
|
|||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.10.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
@ -31,15 +31,11 @@
|
|||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
##############################################################################
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
|
@ -80,6 +76,7 @@ DEFS = @DEFS@
|
|||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
|
@ -89,9 +86,8 @@ LIBS = @LIBS@
|
|||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
|
@ -116,7 +112,10 @@ SET_MAKE = @SET_MAKE@
|
|||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
|
@ -126,28 +125,39 @@ build_alias = @build_alias@
|
|||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
# Section 8 is system administration
|
||||
EXT = 8
|
||||
|
@ -190,10 +200,9 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
|||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
uninstall-info-am:
|
||||
install-man8: $(man8_MANS) $(man_MANS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(man8dir)" || $(mkdir_p) "$(DESTDIR)$(man8dir)"
|
||||
test -z "$(man8dir)" || $(MKDIR_P) "$(DESTDIR)$(man8dir)"
|
||||
@list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \
|
||||
l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
|
||||
for i in $$l2; do \
|
||||
|
@ -244,22 +253,21 @@ CTAGS:
|
|||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
|
@ -275,7 +283,7 @@ check: check-am
|
|||
all-am: Makefile $(MANS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(man8dir)"; do \
|
||||
test -z "$$dir" || $(mkdir_p) "$$dir"; \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
|
@ -323,12 +331,20 @@ info-am:
|
|||
|
||||
install-data-am: install-man
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man: install-man8
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
@ -347,18 +363,22 @@ ps: ps-am
|
|||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am uninstall-man
|
||||
uninstall-am: uninstall-man
|
||||
|
||||
uninstall-man: uninstall-man8
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic distclean \
|
||||
distclean-generic distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install-man8 install-strip installcheck installcheck-am \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-man8 install-pdf install-pdf-am install-ps \
|
||||
install-ps-am install-strip installcheck installcheck-am \
|
||||
installdirs maintainer-clean maintainer-clean-generic \
|
||||
mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
|
||||
uninstall-am uninstall-info-am uninstall-man uninstall-man8
|
||||
uninstall-am uninstall-man uninstall-man8
|
||||
|
||||
|
||||
# THIS SHOULD BE THE FIRST TARGET!
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
|
||||
.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
|
@ -25,11 +25,11 @@
|
|||
..
|
||||
.\" Set up some character translations and predefined strings. \*(-- will
|
||||
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
|
||||
.\" double quote, and \*(R" will give a right double quote. | will give a
|
||||
.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used to
|
||||
.\" do unbreakable dashes and therefore won't be available. \*(C` and \*(C'
|
||||
.\" expand to `' in nroff, nothing in troff, for use with C<>.
|
||||
.tr \(*W-|\(bv\*(Tr
|
||||
.\" double quote, and \*(R" will give a right double quote. \*(C+ will
|
||||
.\" give a nicer C++. Capital omega is used to do unbreakable dashes and
|
||||
.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
|
||||
.\" nothing in troff, for use with C<>.
|
||||
.tr \(*W-
|
||||
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
|
||||
.ie n \{\
|
||||
. ds -- \(*W-
|
||||
|
@ -48,22 +48,25 @@
|
|||
. ds R" ''
|
||||
'br\}
|
||||
.\"
|
||||
.\" Escape single quotes in literal strings from groff's Unicode transform.
|
||||
.ie \n(.g .ds Aq \(aq
|
||||
.el .ds Aq '
|
||||
.\"
|
||||
.\" If the F register is turned on, we'll generate index entries on stderr for
|
||||
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
|
||||
.\" entries marked with X<> in POD. Of course, you'll have to process the
|
||||
.\" output yourself in some meaningful fashion.
|
||||
.if \nF \{\
|
||||
.ie \nF \{\
|
||||
. de IX
|
||||
. tm Index:\\$1\t\\n%\t"\\$2"
|
||||
..
|
||||
. nr % 0
|
||||
. rr F
|
||||
.\}
|
||||
.\"
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.hy 0
|
||||
.if n .na
|
||||
.el \{\
|
||||
. de IX
|
||||
..
|
||||
.\}
|
||||
.\"
|
||||
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
|
||||
.\" Fear. Run. Save yourself. No user-serviceable parts.
|
||||
|
@ -129,7 +132,11 @@
|
|||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ps-watcher 8"
|
||||
.TH ps-watcher 8 "2006-03-10" "perl v5.8.8" "User Contributed Perl Documentation"
|
||||
.TH ps-watcher 8 "2009-03-15" "perl v5.10.0" "User Contributed Perl Documentation"
|
||||
.\" 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"
|
||||
ps\-watcher \- monitors various processes based on ps\-like information.
|
||||
.SH "SYNOPSIS"
|
||||
|
@ -180,19 +187,19 @@ your configuration).
|
|||
Print a usage message on standard error and exit with a return code
|
||||
of 100.
|
||||
.Sp
|
||||
\&\&
|
||||
|
||||
.IP "\-\-doc" 4
|
||||
.IX Item "--doc"
|
||||
Extact the full documentation that you are reading now, print it and
|
||||
exit with a return code of 101.
|
||||
.Sp
|
||||
\&\&
|
||||
|
||||
.IP "\-\-version" 4
|
||||
.IX Item "--version"
|
||||
Print the version release on standard output and exit with a return
|
||||
code of 10.
|
||||
.Sp
|
||||
\&\&
|
||||
|
||||
.IP "\-\-debug \fInumber\fR" 4
|
||||
.IX Item "--debug number"
|
||||
Give debugging output. The higher the number, the more the output. The
|
||||
|
@ -205,25 +212,25 @@ See \*(L"\s-1CONFIGURATION\s0 \s-1FILE\s0 \s-1FORMAT\s0\*(R" below for informati
|
|||
of the configuration file and \*(L"\s-1EXAMPLE\s0 \s-1CONFIGURATION\s0\*(R" for a complete
|
||||
example of a configuration file.
|
||||
.Sp
|
||||
\&\&
|
||||
|
||||
.IP "\-\-log [\fIlog file\fR]" 4
|
||||
.IX Item "--log [log file]"
|
||||
Send or don't send error and debugging output to a log file. If option
|
||||
is given but no logfile is specified, then use \s-1STDERR\s0. The default is
|
||||
no error log file. See also \-\-syslog below.
|
||||
.Sp
|
||||
\&\&
|
||||
|
||||
.IP "\-\-syslog | \-\-nosyslog" 4
|
||||
.IX Item "--syslog | --nosyslog"
|
||||
Send or don't send error and debugging output to syslog. The default
|
||||
is to syslog error and debug output.
|
||||
.Sp
|
||||
\&\&
|
||||
|
||||
.IP "\-\-daemon | \-\-nodaemon" 4
|
||||
.IX Item "--daemon | --nodaemon"
|
||||
Run or don't as a daemon.
|
||||
.Sp
|
||||
\&\&
|
||||
|
||||
.IP "\-\-path \fIsearch-path\fR" 4
|
||||
.IX Item "--path search-path"
|
||||
Specify the executable search path used in running commands.
|
||||
|
@ -232,13 +239,13 @@ Specify the executable search path used in running commands.
|
|||
One can specify the command that gives ps information. By default, the
|
||||
command is \fI/bin/ps\fR.
|
||||
.Sp
|
||||
\&\&
|
||||
|
||||
.IP "\-\-run | \-\-norun" 4
|
||||
.IX Item "--run | --norun"
|
||||
do/don't run actions go through the motions as though we were going
|
||||
to. This may be useful in debugging.
|
||||
.Sp
|
||||
\&\&
|
||||
|
||||
.IP "\-\-sleep \fIinterval in seconds\fR" 4
|
||||
.IX Item "--sleep interval in seconds"
|
||||
It is expected that one might want to run ps-watcher over and over
|
||||
|
@ -247,7 +254,7 @@ iterations with this option.
|
|||
.Sp
|
||||
If a negative number is specified the program is run only once.
|
||||
.Sp
|
||||
\&\&
|
||||
|
||||
.Sh "\s-1CONFIGURATION\s0 \s-1FILE\s0 \s-1MODIFICATION\s0 \s-1AND\s0 \s-1SIGNAL\s0 \s-1HANDLING\s0"
|
||||
.IX Subsection "CONFIGURATION FILE MODIFICATION AND SIGNAL HANDLING"
|
||||
Periodically ps-watcher checks to see if the configuration file
|
||||
|
@ -268,19 +275,17 @@ signal.
|
|||
.IX Header "CONFIGURATION FILE FORMAT"
|
||||
The format of a configuration file is a series of fully qualified
|
||||
filenames enclosed in square brackets followed by a number of
|
||||
parameter lines. Each parameter line has a parameter names followed by
|
||||
parameter lines. Each parameter line has a parameter name followed by
|
||||
an \*(L"equal\*(R" sign and finally value. That is:
|
||||
.PP
|
||||
.Vb 5
|
||||
\& # This is a comment line
|
||||
\& ; So is this.
|
||||
\& [process-pattern1]
|
||||
\& [process\-pattern1]
|
||||
\& parameter1 = value1
|
||||
\& parameter2 = value2
|
||||
.Ve
|
||||
.PP
|
||||
.Vb 3
|
||||
\& [process-pattern2]
|
||||
\&
|
||||
\& [process\-pattern2]
|
||||
\& parameter1 = value3
|
||||
\& parameter2 = value4
|
||||
.Ve
|
||||
|
@ -317,7 +322,7 @@ There are two special \*(L"process patterns\*(R": \f(CW$PROLOG\fR and \f(CW$EPIL
|
|||
former should appear first and the latter last.
|
||||
.PP
|
||||
You can put perl code to initialize variables here and do cleanup
|
||||
actions in these sections using \*(L"perl\-action.\*(R"
|
||||
actions in these sections using \*(L"perl-action.\*(R"
|
||||
.PP
|
||||
A description of parameters names, their meanings and potential values
|
||||
follows.
|
||||
|
@ -337,7 +342,7 @@ Example:
|
|||
\& # Match if httpd has not spawned enough (<4) times. NFS and databases
|
||||
\& # daemons typically spawn child processes. Since the program
|
||||
\& # matches against the command names, not commands and arguments,
|
||||
\& # something like: ps -ef | grep httpd won't match the below.
|
||||
\& # something like: ps \-ef | grep httpd won\*(Aqt match the below.
|
||||
\& # If you want to match against the command with arguments, see
|
||||
\& # the example with $args below.
|
||||
\& [httpd$]
|
||||
|
@ -347,7 +352,7 @@ Example:
|
|||
.IX Item "occurs"
|
||||
This parameter specifies how many times an action should be performed
|
||||
on processes matching the section trigger. Acceptable values are
|
||||
\&\*(L"every\*(R", \*(L"first\*(R", \*(L"first\-trigger\*(R", and \*(L"none\*(R".
|
||||
\&\*(L"every\*(R", \*(L"first\*(R", \*(L"first-trigger\*(R", and \*(L"none\*(R".
|
||||
.Sp
|
||||
Setting the occurs value to \*(L"none\*(R" causes the the trigger to be
|
||||
evaluated when there are no matching processes. Although one might
|
||||
|
@ -358,7 +363,7 @@ Setting the occurs value to \*(L"first\*(R" causes the process-pattern rule to
|
|||
be finished after handling the first rule that matches, whether or not the
|
||||
trigger evaluated to true.
|
||||
.Sp
|
||||
Setting the occurs value to \*(L"first\-trigger\*(R" causes the process-pattern
|
||||
Setting the occurs value to \*(L"first-trigger\*(R" causes the process-pattern
|
||||
rule to be finished after handling the first rule that matches \fIand\fR
|
||||
the trigger evaluates to true.
|
||||
.Sp
|
||||
|
@ -370,28 +375,22 @@ Examples:
|
|||
\& [.]
|
||||
\& occurs = first
|
||||
\& action = echo "You have $count processes running"
|
||||
.Ve
|
||||
.Sp
|
||||
.Vb 4
|
||||
\&
|
||||
\& # Note in the above since there is no trigger specified,
|
||||
\& # occurs = first
|
||||
\& # is the same thing as
|
||||
\& # occurs = first-trigger
|
||||
.Ve
|
||||
.Sp
|
||||
.Vb 4
|
||||
\& # occurs = first\-trigger
|
||||
\&
|
||||
\& [.?]
|
||||
\& trigger = $vsz > 1000
|
||||
\& occurs = every
|
||||
\& action = echo "Large program $command matches $ps_pat: $vsz KB"
|
||||
.Ve
|
||||
.Sp
|
||||
.Vb 8
|
||||
\&
|
||||
\& # Fire if /usr/sbin/syslogd is not running.
|
||||
\& # Since the program matches against the command names, not commands and
|
||||
\& # arguments, something like:
|
||||
\& # ps -ef | grep /usr/sbin/syslogd
|
||||
\& # won't match the below.
|
||||
\& # ps \-ef | grep /usr/sbin/syslogd
|
||||
\& # won\*(Aqt match the below.
|
||||
\& [(/usr/sbin/)?syslogd]
|
||||
\& occurs = none
|
||||
\& action = /etc/init.d/syslogd start
|
||||
|
@ -417,20 +416,16 @@ Example:
|
|||
.Sp
|
||||
.Vb 5
|
||||
\& # A Perl variable initialization.
|
||||
\& # Since ps-watcher runs as a daemon it's a good idea
|
||||
\& # Since ps\-watcher runs as a daemon it\*(Aqs a good idea
|
||||
\& # to (re)initialize variables before each run.
|
||||
\& [$PROLOG]
|
||||
\& perl-action = $root_procs=0;
|
||||
.Ve
|
||||
.Sp
|
||||
.Vb 4
|
||||
\& perl\-action = $root_procs=0;
|
||||
\&
|
||||
\& # Keep track of how many root processes we are running
|
||||
\& [.*]
|
||||
\& perl-action = $root_procs++ if $uid == 0
|
||||
\& perl\-action = $root_procs++ if $uid == 0
|
||||
\& occurs = every
|
||||
.Ve
|
||||
.Sp
|
||||
.Vb 3
|
||||
\&
|
||||
\& # Show this count.
|
||||
\& [$EPILOG]
|
||||
\& action = echo "I counted $root_procs root processes"
|
||||
|
@ -439,26 +434,30 @@ Example:
|
|||
.IX Subsection "EXPANDED VARIABLES IN TRIGGER/ACTION CLAUSES"
|
||||
Any variables defined in the program can be used in pattern or
|
||||
action parameters. For example, \f(CW$program\fR can be used to refer to
|
||||
the name of this program ps\-watcher.
|
||||
the name of this program ps-watcher.
|
||||
.PP
|
||||
The following variables can be used in either the pattern or action
|
||||
fields.
|
||||
.IP "$action" 4
|
||||
.ie n .IP "$action" 4
|
||||
.el .IP "\f(CW$action\fR" 4
|
||||
.IX Item "$action"
|
||||
A string containing the text of the action to run.
|
||||
.Sp
|
||||
\&\&
|
||||
.IP "$perl_action" 4
|
||||
|
||||
.ie n .IP "$perl_action" 4
|
||||
.el .IP "\f(CW$perl_action\fR" 4
|
||||
.IX Item "$perl_action"
|
||||
A string containing the text of the perl_action to run.
|
||||
.Sp
|
||||
\&\&
|
||||
.IP "$ps_pat" 4
|
||||
|
||||
.ie n .IP "$ps_pat" 4
|
||||
.el .IP "\f(CW$ps_pat\fR" 4
|
||||
.IX Item "$ps_pat"
|
||||
The Perl regular expression specified in the beginning of the section.
|
||||
.Sp
|
||||
\&\&
|
||||
.IP "$command" 4
|
||||
|
||||
.ie n .IP "$command" 4
|
||||
.el .IP "\f(CW$command\fR" 4
|
||||
.IX Item "$command"
|
||||
The command that matched \f(CW$ps_pat\fR.
|
||||
.Sp
|
||||
|
@ -471,22 +470,22 @@ Example:
|
|||
.Vb 2
|
||||
\& # List processes other than emacs (which is a known pig) that use lots
|
||||
\& # of virtual memory
|
||||
.Ve
|
||||
.Sp
|
||||
.Vb 3
|
||||
\&
|
||||
\& [.*]
|
||||
\& trigger = $command !~ /emacs$/ && $vsz > 10
|
||||
\& action = echo \e"Looks like you have a big \e$command program: \e$vsz KB\e"
|
||||
.Ve
|
||||
.Sp
|
||||
\&\&
|
||||
.IP "$count" 4
|
||||
|
||||
.ie n .IP "$count" 4
|
||||
.el .IP "\f(CW$count\fR" 4
|
||||
.IX Item "$count"
|
||||
The number of times the pattern matched. Presumably the number of
|
||||
processes of this class running.
|
||||
.Sp
|
||||
\&\&
|
||||
.IP "$trigger" 4
|
||||
|
||||
.ie n .IP "$trigger" 4
|
||||
.el .IP "\f(CW$trigger\fR" 4
|
||||
.IX Item "$trigger"
|
||||
A string containing the text of the trigger.
|
||||
.PP
|
||||
|
@ -511,51 +510,59 @@ description of the meaning of the field.
|
|||
.PP
|
||||
Beware though, in some situations ps can return multiple lines for a
|
||||
single process and we will use just one of these in the trigger. In
|
||||
particular, Solaris's \f(CW\*(C`ps\*(C'\fR will return a line for each \s-1LWP\s0 (light\-weight
|
||||
particular, Solaris's \f(CW\*(C`ps\*(C'\fR will return a line for each \s-1LWP\s0 (light-weight
|
||||
process). So on Solaris, if a trigger uses variable lwp, it may or may
|
||||
not match depending on which single line of the multiple \f(CW\*(C`ps\*(C'\fR lines is
|
||||
used.
|
||||
.PP
|
||||
\&\&
|
||||
.IP "$args" 4
|
||||
|
||||
.ie n .IP "$args" 4
|
||||
.el .IP "\f(CW$args\fR" 4
|
||||
.IX Item "$args"
|
||||
The command along with its command arguments. It is possible that this
|
||||
is might get truncated at certain length (if ps does likewise as is
|
||||
the case on Solaris).
|
||||
.Sp
|
||||
\&\&
|
||||
.IP "$ppid" 4
|
||||
|
||||
.ie n .IP "$ppid" 4
|
||||
.el .IP "\f(CW$ppid\fR" 4
|
||||
.IX Item "$ppid"
|
||||
The parent process id.
|
||||
.Sp
|
||||
\&\&
|
||||
.IP "$stime" 4
|
||||
|
||||
.ie n .IP "$stime" 4
|
||||
.el .IP "\f(CW$stime\fR" 4
|
||||
.IX Item "$stime"
|
||||
The start time of the process.
|
||||
.Sp
|
||||
\&\&
|
||||
.IP "$etime" 4
|
||||
|
||||
.ie n .IP "$etime" 4
|
||||
.el .IP "\f(CW$etime\fR" 4
|
||||
.IX Item "$etime"
|
||||
The end time of the process.
|
||||
.Sp
|
||||
\&\&
|
||||
.IP "$pmem" 4
|
||||
|
||||
.ie n .IP "$pmem" 4
|
||||
.el .IP "\f(CW$pmem\fR" 4
|
||||
.IX Item "$pmem"
|
||||
The process memory.
|
||||
.Sp
|
||||
\&\&
|
||||
.IP "$pcpu" 4
|
||||
|
||||
.ie n .IP "$pcpu" 4
|
||||
.el .IP "\f(CW$pcpu\fR" 4
|
||||
.IX Item "$pcpu"
|
||||
The percent \s-1CPU\s0 utilization.
|
||||
.Sp
|
||||
\&\&
|
||||
.IP "$tty" 4
|
||||
|
||||
.ie n .IP "$tty" 4
|
||||
.el .IP "\f(CW$tty\fR" 4
|
||||
.IX Item "$tty"
|
||||
The controlling tty.
|
||||
.Sp
|
||||
\&\&
|
||||
.IP "$szv" 4
|
||||
.IX Item "$szv"
|
||||
|
||||
.ie n .IP "$vsz" 4
|
||||
.el .IP "\f(CW$vsz\fR" 4
|
||||
.IX Item "$vsz"
|
||||
Virtual memory size of the process
|
||||
.Sh "\s-1OTHER\s0 \s-1THINGS\s0 \s-1IN\s0 \s-1TRIGGER\s0 \s-1CLAUSES\s0"
|
||||
.IX Subsection "OTHER THINGS IN TRIGGER CLAUSES"
|
||||
|
@ -577,10 +584,10 @@ Here is an example of the use of \f(CW\*(C`elapsed2sec()\*(C'\fR:
|
|||
.PP
|
||||
.Vb 7
|
||||
\& # Which processes have been running for more than 3 hours?
|
||||
\& # Also note use of builtin-function elapsed2secs, variable $etime
|
||||
\& # and builtin-function HOURS
|
||||
\& # Also note use of builtin\-function elapsed2secs, variable $etime
|
||||
\& # and builtin\-function HOURS
|
||||
\& [.]
|
||||
\& trigger = elapsed2secs('$etime') > 1*DAYS
|
||||
\& trigger = elapsed2secs(\*(Aq$etime\*(Aq) > 1*DAYS
|
||||
\& action = echo "$command has been running more than 1 day ($etime)"
|
||||
\& occurs = every
|
||||
.Ve
|
||||
|
@ -590,48 +597,38 @@ Please note the quotes around '$etime'.
|
|||
.IX Header "EXAMPLE CONFIGURATION"
|
||||
.Vb 1
|
||||
\& # Comments start with # or ; and go to the end of the line.
|
||||
.Ve
|
||||
.PP
|
||||
.Vb 4
|
||||
\&
|
||||
\& # The format for each entry is in Microsoft .INI form:
|
||||
\& # [process-pattern]
|
||||
\& # trigger = perl-expression
|
||||
\& # action = program-and-arguments-to-run
|
||||
.Ve
|
||||
.PP
|
||||
.Vb 3
|
||||
\& # [process\-pattern]
|
||||
\& # trigger = perl\-expression
|
||||
\& # action = program\-and\-arguments\-to\-run
|
||||
\&
|
||||
\& [httpd$]
|
||||
\& trigger = $count < 4
|
||||
\& action = echo "$trigger fired -- You have $count httpd sessions."
|
||||
.Ve
|
||||
.PP
|
||||
.Vb 3
|
||||
\& action = echo "$trigger fired \-\- You have $count httpd sessions."
|
||||
\&
|
||||
\& [.]
|
||||
\& trigger = $vsz > 10
|
||||
\& action = echo "Looks like you have a big $command program: $vsz KB"
|
||||
.Ve
|
||||
.PP
|
||||
.Vb 10
|
||||
\&
|
||||
\& # Unfortunately we have use a different pattern below. (Here we use
|
||||
\& # ".?" instead of ".".) In effect the the two patterns mean
|
||||
\& # test every process.
|
||||
\& [.?]
|
||||
\& trigger = elapsed2secs('$etime') > 2*MINS && $pcpu > 40
|
||||
\& trigger = elapsed2secs(\*(Aq$etime\*(Aq) > 2*MINS && $pcpu > 40
|
||||
\& occurs = every
|
||||
\& action = <<EOT
|
||||
\& echo "$command used $pcpu% CPU for the last $etime seconds" | /bin/mail root
|
||||
\& kill -TERM $pid
|
||||
\& kill \-TERM $pid
|
||||
\& EOT
|
||||
.Ve
|
||||
.PP
|
||||
.Vb 9
|
||||
\& # Scripts don't show as the script name as the command name on some
|
||||
\&
|
||||
\& # Scripts don\*(Aqt show as the script name as the command name on some
|
||||
\& # operating systems. Rather the name of the interpreter is listed
|
||||
\& # (e.g. bash or perl) Here's how you can match against a script.
|
||||
\& # (e.g. bash or perl) Here\*(Aqs how you can match against a script.
|
||||
\& # BSD/OS is an exception: it does give the script name rather than
|
||||
\& # the interpreter name.
|
||||
\& [/usr/bin/perl]
|
||||
\& trigger = \e$args !~ /ps-watcher/
|
||||
\& trigger = \e$args !~ /ps\-watcher/
|
||||
\& occurs = every
|
||||
\& action = echo "***found perl program ${pid}:\en $args"
|
||||
.Ve
|
||||
|
@ -645,9 +642,9 @@ use of lsof to check port 3333 and the \f(CW$PROLOG\fR make sure it runs.
|
|||
.Vb 6
|
||||
\& [$PROLOG]
|
||||
\& occurs = first
|
||||
\& trigger = { \e$x=`lsof -i :3333 >/dev/null 2>&1`; \e$? >> 8 }
|
||||
\& trigger = { \e$x=\`lsof \-i :3333 >/dev/null 2>&1\`; \e$? >> 8 }
|
||||
\& action = <<EOT
|
||||
\& put-your-favorite-command-here arg1 arg2 ...
|
||||
\& put\-your\-favorite\-command\-here arg1 arg2 ...
|
||||
\& EOT
|
||||
.Ve
|
||||
.SH "SECURITY CONSIDERATIONS"
|
||||
|
@ -658,7 +655,7 @@ run. In particular if this daemon is run as root and the configuration
|
|||
file is not protected so that it can't be modified, a bad person could
|
||||
have their programs run as root.
|
||||
.PP
|
||||
There's nothing in the ps command or ps\-watcher, that requires one to
|
||||
There's nothing in the ps command or ps-watcher, that requires one to
|
||||
run this daemon as root.
|
||||
.PP
|
||||
So as with all daemons, one needs to take usual security precautions
|
||||
|
@ -667,25 +664,29 @@ any daemon as an unprivileged user (or with no privileges), do it! If
|
|||
not, set the permissions on the configuration file and the directory
|
||||
it lives in.
|
||||
.PP
|
||||
This program can also run chrooted and there is a \-\-path option that
|
||||
is available which can be used to set the executable search path. All
|
||||
commands used by ps-watcher are fully qualified, and I generally give a
|
||||
full execution path in my configuration file, so consider using the
|
||||
option \-\-path=''.
|
||||
This program can also run chrooted and there is a \f(CW\*(C`\-\-path\*(C'\fR option
|
||||
that is available which can be used to set the executable search path.
|
||||
All commands used by ps-watcher are fully qualified, and I generally
|
||||
give a full execution path in my configuration file, so consider using
|
||||
the option \f(CW\*(C`\-\-path=\*(Aq\*(Aq\*(C'\fR.
|
||||
.PP
|
||||
Commands that need to be run as root you can run via sudo. I often
|
||||
Commands that need to be run as root you can run via \f(CW\*(C`sudo\*(C'\fR. I often
|
||||
run process accounting which tracks all commands run. Tripwire may be
|
||||
useful to track changed configuration files.
|
||||
.SH "TROUBLESHOOTING"
|
||||
.IX Header "TROUBLESHOOTING"
|
||||
To debug a configuration file the following options are useful:
|
||||
.PP
|
||||
ps-watcher \-\-log \-\-nodaemon \-\-sleep \-1 \-\-debug 2 \fIconfiguration-file\fR
|
||||
.Vb 1
|
||||
\& ps\-watcher \-\-log \-\-nodaemon \-\-sleep \-1 \-\-debug 2 *config\-file*
|
||||
.Ve
|
||||
.PP
|
||||
For even more information and control try running the above under the
|
||||
perl debugger, e.g.
|
||||
.PP
|
||||
perl \-d ps-watcher \-\-log \-\-nodaemon \-\-sleep \-1 \-\-debug 2 \fIconfiguration-file\fR
|
||||
.Vb 1
|
||||
\& perl \-d ps\-watcher \-\-log \-\-nodaemon \-\-sleep \-1 \-\-debug 2 *config\-file*
|
||||
.Ve
|
||||
.SH "BUGS"
|
||||
.IX Header "BUGS"
|
||||
Well, some of these are not so much a bug in ps-watcher so much as a
|
||||
|
@ -702,7 +703,7 @@ Sometimes one will see this error message when debug tracing is turned on:
|
|||
\& ** debug ** Something wrong getting ps variables
|
||||
.Ve
|
||||
.PP
|
||||
This just means that the process died betwee the time ps-watcher first
|
||||
This just means that the process died between the time ps-watcher first
|
||||
saw the existence of the process and the time that it queried
|
||||
variables.
|
||||
.SH "SEE ALSO"
|
||||
|
@ -717,26 +718,22 @@ but fast. You can the find the homepage at
|
|||
<http://prdownloads.sourceforge.net/motif\-pstree?sort_by=date&sort=desc>
|
||||
.SH "AUTHOR"
|
||||
.IX Header "AUTHOR"
|
||||
Rocky Bernstein (rocky@cpan.org)
|
||||
Rocky Bernstein (rocky@gnu.org)
|
||||
.SH "COPYRIGHT"
|
||||
.IX Header "COPYRIGHT"
|
||||
.Vb 6
|
||||
\& Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006
|
||||
\& Rocky Bernstein, email: rocky@cpan.org.
|
||||
\& Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006, 2008
|
||||
\& Rocky Bernstein, email: rocky@gnu.org.
|
||||
\& This program is free software; you can redistribute it and/or modify
|
||||
\& it under the terms of the GNU General Public License as published by
|
||||
\& the Free Software Foundation; either version 2 of the License, or
|
||||
\& (at your option) any later version.
|
||||
.Ve
|
||||
.PP
|
||||
.Vb 4
|
||||
\&
|
||||
\& This program is distributed in the hope that it will be useful,
|
||||
\& but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
\& MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
\& GNU General Public License for more details.
|
||||
.Ve
|
||||
.PP
|
||||
.Vb 3
|
||||
\&
|
||||
\& You should have received a copy of the GNU General Public License
|
||||
\& along with this program; if not, write to the Free Software
|
||||
\& Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
|
|
@ -9,8 +9,10 @@
|
|||
|
||||
<body style="background-color: white">
|
||||
|
||||
<p><a name="__index__"></a></p>
|
||||
|
||||
<!-- INDEX BEGIN -->
|
||||
<div name="index">
|
||||
<p><a name="__index__"></a></p>
|
||||
|
||||
<ul>
|
||||
|
||||
|
@ -31,7 +33,7 @@
|
|||
</ul>
|
||||
|
||||
<li><a href="#example_configuration">EXAMPLE CONFIGURATION</a></li>
|
||||
<li><a href="#using__prolog_for_getting_nonps_information">Using $PROLOG for getting non-ps information</a></li>
|
||||
<li><a href="#using__prolog_for_getting_non_ps_information">Using $PROLOG for getting non-ps information</a></li>
|
||||
<li><a href="#security_considerations">SECURITY CONSIDERATIONS</a></li>
|
||||
<li><a href="#troubleshooting">TROUBLESHOOTING</a></li>
|
||||
<li><a href="#bugs">BUGS</a></li>
|
||||
|
@ -39,9 +41,11 @@
|
|||
<li><a href="#author">AUTHOR</a></li>
|
||||
<li><a href="#copyright">COPYRIGHT</a></li>
|
||||
</ul>
|
||||
|
||||
<hr name="index" />
|
||||
</div>
|
||||
<!-- INDEX END -->
|
||||
|
||||
<hr />
|
||||
<p>
|
||||
</p>
|
||||
<h1><a name="name">NAME</a></h1>
|
||||
|
@ -58,7 +62,7 @@
|
|||
<h1><a name="description">DESCRIPTION</a></h1>
|
||||
<p>Periodically a list of processes obtained via <code>ps</code>. More precisely
|
||||
each item in the list contains the process name (just what's listed in
|
||||
the ``cmd'' field, not the full command and arguments) and its process
|
||||
the "cmd" field, not the full command and arguments) and its process
|
||||
id (pid). A configuration file specifies a list of Perl
|
||||
regular-expression patterns to match the processes against. For each
|
||||
match, a Perl expression specified for that pattern is evaluated. The
|
||||
|
@ -102,127 +106,91 @@ your configuration).</p>
|
|||
</p>
|
||||
<h2><a name="options">OPTIONS</a></h2>
|
||||
<dl>
|
||||
<dt><strong><a name="item__2d_2dhelp">--help</a></strong>
|
||||
<dt><strong><a name="help" class="item">--help</a></strong></dt>
|
||||
|
||||
<dd>
|
||||
<p>Print a usage message on standard error and exit with a return code
|
||||
of 100.</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<p></p>
|
||||
</dd>
|
||||
</li>
|
||||
<dt><strong><a name="item__2d_2ddoc">--doc</a></strong>
|
||||
<dt><strong><a name="doc" class="item">--doc</a></strong></dt>
|
||||
|
||||
<dd>
|
||||
<p>Extact the full documentation that you are reading now, print it and
|
||||
exit with a return code of 101.</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<p></p>
|
||||
</dd>
|
||||
</li>
|
||||
<dt><strong><a name="item__2d_2dversion">--version</a></strong>
|
||||
<dt><strong><a name="version" class="item">--version</a></strong></dt>
|
||||
|
||||
<dd>
|
||||
<p>Print the version release on standard output and exit with a return
|
||||
code of 10.</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<p></p>
|
||||
</dd>
|
||||
</li>
|
||||
<dt><strong><a name="item__2d_2ddebug_number">--debug <em>number</em></a></strong>
|
||||
<dt><strong><a name="debug_number" class="item">--debug <em>number</em></a></strong></dt>
|
||||
|
||||
<dd>
|
||||
<p>Give debugging output. The higher the number, the more the output. The
|
||||
default is 0 = none. 2 is the most debugging output.</p>
|
||||
</dd>
|
||||
</li>
|
||||
<dt><strong><a name="item__5b_2d_2dconfig_5d_configuration_file">[--config] <em>configuration file</em></a></strong>
|
||||
<dt><strong><a name="config_configuration_file" class="item">[--config] <em>configuration file</em></a></strong></dt>
|
||||
|
||||
<dd>
|
||||
<p>Specify configuration file. .</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<p>See <a href="#configuration_file_format">CONFIGURATION FILE FORMAT</a> below for information on the format
|
||||
of the configuration file and <a href="#example_configuration">EXAMPLE CONFIGURATION</a> for a complete
|
||||
example of a configuration file.</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<p></p>
|
||||
</dd>
|
||||
</li>
|
||||
<dt><strong><a name="item__2d_2dlog__5blog_file_5d">--log [<em>log file</em>]</a></strong>
|
||||
<dt><strong><a name="log_log_file" class="item">--log [<em>log file</em>]</a></strong></dt>
|
||||
|
||||
<dd>
|
||||
<p>Send or don't send error and debugging output to a log file. If option
|
||||
is given but no logfile is specified, then use STDERR. The default is
|
||||
no error log file. See also --syslog below.</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<p></p>
|
||||
</dd>
|
||||
</li>
|
||||
<dt><strong><a name="item__2d_2dsyslog__7c__2d_2dnosyslog">--syslog | --nosyslog</a></strong>
|
||||
<dt><strong><a name="syslog_nosyslog" class="item">--syslog | --nosyslog</a></strong></dt>
|
||||
|
||||
<dd>
|
||||
<p>Send or don't send error and debugging output to syslog. The default
|
||||
is to syslog error and debug output.</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<p></p>
|
||||
</dd>
|
||||
</li>
|
||||
<dt><strong><a name="item__2d_2ddaemon__7c__2d_2dnodaemon">--daemon | --nodaemon</a></strong>
|
||||
<dt><strong><a name="daemon_nodaemon" class="item">--daemon | --nodaemon</a></strong></dt>
|
||||
|
||||
<dd>
|
||||
<p>Run or don't as a daemon.</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<p></p>
|
||||
</dd>
|
||||
</li>
|
||||
<dt><strong><a name="item__2d_2dpath_search_2dpath">--path <em>search-path</em></a></strong>
|
||||
<dt><strong><a name="path_search_path" class="item">--path <em>search-path</em></a></strong></dt>
|
||||
|
||||
<dd>
|
||||
<p>Specify the executable search path used in running commands.</p>
|
||||
</dd>
|
||||
</li>
|
||||
<dt><strong><a name="item__2d_2dps_2dprog_program">--ps-prog <em>program</em></a></strong>
|
||||
<dt><strong><a name="ps_prog_program" class="item">--ps-prog <em>program</em></a></strong></dt>
|
||||
|
||||
<dd>
|
||||
<p>One can specify the command that gives ps information. By default, the
|
||||
command is <em>/bin/ps</em>.</p>
|
||||
</dd>
|
||||
<dd>
|
||||
command is <em class="file">/bin/ps</em>.</p>
|
||||
<p></p>
|
||||
</dd>
|
||||
</li>
|
||||
<dt><strong><a name="item__2d_2drun__7c__2d_2dnorun">--run | --norun</a></strong>
|
||||
<dt><strong><a name="run_norun" class="item">--run | --norun</a></strong></dt>
|
||||
|
||||
<dd>
|
||||
<p>do/don't run actions go through the motions as though we were going
|
||||
to. This may be useful in debugging.</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<p></p>
|
||||
</dd>
|
||||
</li>
|
||||
<dt><strong><a name="item__2d_2dsleep_interval_in_seconds">--sleep <em>interval in seconds</em></a></strong>
|
||||
<dt><strong><a name="sleep_interval_in_seconds" class="item">--sleep <em>interval in seconds</em></a></strong></dt>
|
||||
|
||||
<dd>
|
||||
<p>It is expected that one might want to run ps-watcher over and over
|
||||
again. In such instances one can specify the amount of time between
|
||||
iterations with this option.</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<p>If a negative number is specified the program is run only once.</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<p></p>
|
||||
</dd>
|
||||
</li>
|
||||
</dl>
|
||||
<p>
|
||||
</p>
|
||||
|
@ -244,8 +212,8 @@ signal.</p>
|
|||
<h1><a name="configuration_file_format">CONFIGURATION FILE FORMAT</a></h1>
|
||||
<p>The format of a configuration file is a series of fully qualified
|
||||
filenames enclosed in square brackets followed by a number of
|
||||
parameter lines. Each parameter line has a parameter names followed by
|
||||
an ``equal'' sign and finally value. That is:</p>
|
||||
parameter lines. Each parameter line has a parameter name followed by
|
||||
an "equal" sign and finally value. That is:</p>
|
||||
<pre>
|
||||
# This is a comment line
|
||||
; So is this.
|
||||
|
@ -259,46 +227,40 @@ an ``equal'' sign and finally value. That is:</p>
|
|||
<p>Comments start with # or ; and take effect to the end of the line.</p>
|
||||
<p>This should be familiar to those who have worked with text-readible
|
||||
Microsoft <code>.INI</code> files.</p>
|
||||
<p>Note process patterns, (<em>process-pattern1</em> and <em>process-pattern2</em>
|
||||
<p>Note process patterns, (<em class="file">process-pattern1</em> and <em class="file">process-pattern2</em>
|
||||
above) must be unique. If there are times when you may want to
|
||||
refer to the same process, one can be creative to make these unique.
|
||||
e.g. <em>cron</em> and <em>[c]ron</em> which refer to the same process even
|
||||
e.g. <em class="file">cron</em> and <em class="file">[c]ron</em> which refer to the same process even
|
||||
though they <em>appear</em> to be different.</p>
|
||||
<p>As quoted directly from the Config::IniFiles documentation:</p>
|
||||
<p>Multiline or multivalued fields may also be defined ala UNIX
|
||||
``here document'' syntax:</p>
|
||||
"here document" syntax:</p>
|
||||
<pre>
|
||||
Parameter=<<EOT
|
||||
value/line 1
|
||||
value/line 2
|
||||
EOT</pre>
|
||||
<p>You may use any string you want in place of ``EOT''. Note
|
||||
that what follows the ``<<'' and what appears at the end of
|
||||
<p>You may use any string you want in place of "EOT". Note
|
||||
that what follows the "<<" and what appears at the end of
|
||||
the text <em>must</em> match exactly, including any trailing
|
||||
whitespace.</p>
|
||||
<p>There are two special ``process patterns'': $PROLOG and $EPILOG, the
|
||||
<p>There are two special "process patterns": $PROLOG and $EPILOG, the
|
||||
former should appear first and the latter last.</p>
|
||||
<p>You can put perl code to initialize variables here and do cleanup
|
||||
actions in these sections using ``perl-action.''</p>
|
||||
actions in these sections using "perl-action."</p>
|
||||
<p>A description of parameters names, their meanings and potential values
|
||||
follows.</p>
|
||||
<dl>
|
||||
<dt><strong><a name="item_trigger">trigger</a></strong>
|
||||
<dt><strong><a name="trigger" class="item">trigger</a></strong></dt>
|
||||
|
||||
<dd>
|
||||
<p>This parameter specifies the condition on which a process action is
|
||||
fired. The condition is evaluated with Perl <code>eval()</code> and should
|
||||
therefore return something which is equivalent to ``true'' in a Perl
|
||||
therefore return something which is equivalent to "true" in a Perl
|
||||
expression.</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<p>If no trigger is given in a section, true or 1 is assumed and
|
||||
the action is unconditionally triggered.</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<p>Example:</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<pre>
|
||||
# Match if httpd has not spawned enough (<4) times. NFS and databases
|
||||
# daemons typically spawn child processes. Since the program
|
||||
|
@ -309,57 +271,38 @@ the action is unconditionally triggered.</p>
|
|||
[httpd$]
|
||||
trigger = $count <= 4</pre>
|
||||
</dd>
|
||||
</li>
|
||||
<dt><strong><a name="item_occurs">occurs</a></strong>
|
||||
<dt><strong><a name="occurs" class="item">occurs</a></strong></dt>
|
||||
|
||||
<dd>
|
||||
<p>This parameter specifies how many times an action should be performed
|
||||
on processes matching the section trigger. Acceptable values are
|
||||
``every'', ``first'', ``first-trigger'', and ``none''.</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<p>Setting the occurs value to ``none'' causes the the trigger to be
|
||||
"every", "first", "first-trigger", and "none".</p>
|
||||
<p>Setting the occurs value to "none" causes the the trigger to be
|
||||
evaluated when there are no matching processes. Although one might
|
||||
think ``$count == 0'' in the action expression would do the same thing,
|
||||
think "$count == 0" in the action expression would do the same thing,
|
||||
currently as coded this does not work.</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<p>Setting the occurs value to ``first'' causes the process-pattern rule to
|
||||
<p>Setting the occurs value to "first" causes the process-pattern rule to
|
||||
be finished after handling the first rule that matches, whether or not the
|
||||
trigger evaluated to true.</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<p>Setting the occurs value to ``first-trigger'' causes the process-pattern
|
||||
<p>Setting the occurs value to "first-trigger" causes the process-pattern
|
||||
rule to be finished after handling the first rule that matches <em>and</em>
|
||||
the trigger evaluates to true.</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<p>If the item parameter is not specified, ``first'' is assumed.</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<p>If the item parameter is not specified, "first" is assumed.</p>
|
||||
<p>Examples:</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<pre>
|
||||
[.]
|
||||
occurs = first
|
||||
action = echo "You have $count processes running"</pre>
|
||||
</dd>
|
||||
<dd>
|
||||
<pre>
|
||||
# Note in the above since there is no trigger specified,
|
||||
# occurs = first
|
||||
# is the same thing as
|
||||
# occurs = first-trigger</pre>
|
||||
</dd>
|
||||
<dd>
|
||||
<pre>
|
||||
[.?]
|
||||
trigger = $vsz > 1000
|
||||
occurs = every
|
||||
action = echo "Large program $command matches $ps_pat: $vsz KB"</pre>
|
||||
</dd>
|
||||
<dd>
|
||||
<pre>
|
||||
# Fire if /usr/sbin/syslogd is not running.
|
||||
# Since the program matches against the command names, not commands and
|
||||
|
@ -370,54 +313,39 @@ the trigger evaluates to true.</p>
|
|||
occurs = none
|
||||
action = /etc/init.d/syslogd start</pre>
|
||||
</dd>
|
||||
</li>
|
||||
<dt><strong><a name="item_action">action</a></strong>
|
||||
<dt><strong><a name="action" class="item">action</a></strong></dt>
|
||||
|
||||
<dd>
|
||||
<p>This specifies the action, a command that gets run by the system
|
||||
shell, when the trigger condition is evaluated to be true.</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<p>Example:</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<pre>
|
||||
action = /etc/init.d/market_loader.init restart</pre>
|
||||
</dd>
|
||||
</li>
|
||||
<dt><strong><a name="item_perl_2daction">perl-action</a></strong>
|
||||
<dt><strong><a name="perl_action" class="item">perl-action</a></strong></dt>
|
||||
|
||||
<dd>
|
||||
<p>This specifies Perl statements to be eval'd. This can be especially
|
||||
useful in conjunction with $PROLOG and $EPILOG sections to make tests
|
||||
across collections of process and do things which ps-watcher
|
||||
would otherwise not be able to do.</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<p>Example:</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<pre>
|
||||
# A Perl variable initialization.
|
||||
# Since ps-watcher runs as a daemon it's a good idea
|
||||
# to (re)initialize variables before each run.
|
||||
[$PROLOG]
|
||||
perl-action = $root_procs=0;</pre>
|
||||
</dd>
|
||||
<dd>
|
||||
<pre>
|
||||
# Keep track of how many root processes we are running
|
||||
[.*]
|
||||
perl-action = $root_procs++ if $uid == 0
|
||||
occurs = every</pre>
|
||||
</dd>
|
||||
<dd>
|
||||
<pre>
|
||||
# Show this count.
|
||||
[$EPILOG]
|
||||
action = echo "I counted $root_procs root processes"</pre>
|
||||
</dd>
|
||||
</li>
|
||||
</dl>
|
||||
<p>
|
||||
</p>
|
||||
|
@ -428,77 +356,53 @@ the name of this program ps-watcher.</p>
|
|||
<p>The following variables can be used in either the pattern or action
|
||||
fields.</p>
|
||||
<dl>
|
||||
<dt><strong><a name="item__action">$action</a></strong>
|
||||
<dt><strong><a name="_action" class="item">$action</a></strong></dt>
|
||||
|
||||
<dd>
|
||||
<p>A string containing the text of the action to run.</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<p></p>
|
||||
</dd>
|
||||
</li>
|
||||
<dt><strong><a name="item__perl_action">$perl_action</a></strong>
|
||||
<dt><strong><a name="_perl_action" class="item">$perl_action</a></strong></dt>
|
||||
|
||||
<dd>
|
||||
<p>A string containing the text of the perl_action to run.</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<p></p>
|
||||
</dd>
|
||||
</li>
|
||||
<dt><strong><a name="item__ps_pat">$ps_pat</a></strong>
|
||||
<dt><strong><a name="_ps_pat" class="item">$ps_pat</a></strong></dt>
|
||||
|
||||
<dd>
|
||||
<p>The Perl regular expression specified in the beginning of the section.</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<p></p>
|
||||
</dd>
|
||||
</li>
|
||||
<dt><strong><a name="item__command">$command</a></strong>
|
||||
<dt><strong><a name="_command" class="item">$command</a></strong></dt>
|
||||
|
||||
<dd>
|
||||
<p>The command that matched $ps_pat.</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<p>The Perl regular expression specified in the beginning of the section.
|
||||
Normally processes will not have funny characters in them. Just in
|
||||
case, backticks in $command are escaped.</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<p>Example:</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<pre>
|
||||
# List processes other than emacs (which is a known pig) that use lots
|
||||
# of virtual memory</pre>
|
||||
</dd>
|
||||
<dd>
|
||||
<pre>
|
||||
[.*]
|
||||
trigger = $command !~ /emacs$/ && $vsz > 10
|
||||
action = echo \"Looks like you have a big \$command program: \$vsz KB\"</pre>
|
||||
</dd>
|
||||
<dd>
|
||||
<p></p>
|
||||
</dd>
|
||||
</li>
|
||||
<dt><strong><a name="item__count">$count</a></strong>
|
||||
<dt><strong><a name="_count" class="item">$count</a></strong></dt>
|
||||
|
||||
<dd>
|
||||
<p>The number of times the pattern matched. Presumably the number of
|
||||
processes of this class running.</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<p></p>
|
||||
</dd>
|
||||
</li>
|
||||
<dt><strong><a name="item__trigger">$trigger</a></strong>
|
||||
<dt><strong><a name="_trigger" class="item">$trigger</a></strong></dt>
|
||||
|
||||
<dd>
|
||||
<p>A string containing the text of the trigger.</p>
|
||||
</dd>
|
||||
</li>
|
||||
</dl>
|
||||
<p>A list of variables specific to this program or fields commonly found in
|
||||
<code>ps</code> output is listed below followed by a description of the more
|
||||
|
@ -524,77 +428,55 @@ not match depending on which single line of the multiple <code>ps</code> lines i
|
|||
used.</p>
|
||||
<p></p>
|
||||
<dl>
|
||||
<dt><strong><a name="item__args">$args</a></strong>
|
||||
<dt><strong><a name="_args" class="item">$args</a></strong></dt>
|
||||
|
||||
<dd>
|
||||
<p>The command along with its command arguments. It is possible that this
|
||||
is might get truncated at certain length (if ps does likewise as is
|
||||
the case on Solaris).</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<p></p>
|
||||
</dd>
|
||||
</li>
|
||||
<dt><strong><a name="item__ppid">$ppid</a></strong>
|
||||
<dt><strong><a name="_ppid" class="item">$ppid</a></strong></dt>
|
||||
|
||||
<dd>
|
||||
<p>The parent process id.</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<p></p>
|
||||
</dd>
|
||||
</li>
|
||||
<dt><strong><a name="item__stime">$stime</a></strong>
|
||||
<dt><strong><a name="_stime" class="item">$stime</a></strong></dt>
|
||||
|
||||
<dd>
|
||||
<p>The start time of the process.</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<p></p>
|
||||
</dd>
|
||||
</li>
|
||||
<dt><strong><a name="item__etime">$etime</a></strong>
|
||||
<dt><strong><a name="_etime" class="item">$etime</a></strong></dt>
|
||||
|
||||
<dd>
|
||||
<p>The end time of the process.</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<p></p>
|
||||
</dd>
|
||||
</li>
|
||||
<dt><strong><a name="item__pmem">$pmem</a></strong>
|
||||
<dt><strong><a name="_pmem" class="item">$pmem</a></strong></dt>
|
||||
|
||||
<dd>
|
||||
<p>The process memory.</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<p></p>
|
||||
</dd>
|
||||
</li>
|
||||
<dt><strong><a name="item__pcpu">$pcpu</a></strong>
|
||||
<dt><strong><a name="_pcpu" class="item">$pcpu</a></strong></dt>
|
||||
|
||||
<dd>
|
||||
<p>The percent CPU utilization.</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<p></p>
|
||||
</dd>
|
||||
</li>
|
||||
<dt><strong><a name="item__tty">$tty</a></strong>
|
||||
<dt><strong><a name="_tty" class="item">$tty</a></strong></dt>
|
||||
|
||||
<dd>
|
||||
<p>The controlling tty.</p>
|
||||
</dd>
|
||||
<dd>
|
||||
<p></p>
|
||||
</dd>
|
||||
</li>
|
||||
<dt><strong><a name="item__szv">$szv</a></strong>
|
||||
<dt><strong><a name="_vsz" class="item">$vsz</a></strong></dt>
|
||||
|
||||
<dd>
|
||||
<p>Virtual memory size of the process</p>
|
||||
</dd>
|
||||
</li>
|
||||
</dl>
|
||||
<p>
|
||||
</p>
|
||||
|
@ -662,7 +544,7 @@ and <code>DAYS</code> respectively and they have the expected definitions:</p>
|
|||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="using__prolog_for_getting_nonps_information">Using $PROLOG for getting non-ps information</a></h1>
|
||||
<h1><a name="using__prolog_for_getting_non_ps_information">Using $PROLOG for getting non-ps information</a></h1>
|
||||
<p>Here is an example to show how to use ps-watcher to do something not
|
||||
really possible from ps: check to see if a <em>port</em> is active. We make
|
||||
use of lsof to check port 3333 and the $PROLOG make sure it runs.</p>
|
||||
|
@ -689,12 +571,12 @@ that a careful sysadmin/maintainer of a computer would. If you can run
|
|||
any daemon as an unprivileged user (or with no privileges), do it! If
|
||||
not, set the permissions on the configuration file and the directory
|
||||
it lives in.</p>
|
||||
<p>This program can also run chrooted and there is a --path option that
|
||||
is available which can be used to set the executable search path. All
|
||||
commands used by ps-watcher are fully qualified, and I generally give a
|
||||
full execution path in my configuration file, so consider using the
|
||||
option --path=''.</p>
|
||||
<p>Commands that need to be run as root you can run via sudo. I often
|
||||
<p>This program can also run chrooted and there is a <code>--path</code> option
|
||||
that is available which can be used to set the executable search path.
|
||||
All commands used by ps-watcher are fully qualified, and I generally
|
||||
give a full execution path in my configuration file, so consider using
|
||||
the option <code>--path=''</code>.</p>
|
||||
<p>Commands that need to be run as root you can run via <code>sudo</code>. I often
|
||||
run process accounting which tracks all commands run. Tripwire may be
|
||||
useful to track changed configuration files.</p>
|
||||
<p>
|
||||
|
@ -702,10 +584,12 @@ useful to track changed configuration files.</p>
|
|||
<hr />
|
||||
<h1><a name="troubleshooting">TROUBLESHOOTING</a></h1>
|
||||
<p>To debug a configuration file the following options are useful:</p>
|
||||
<p>ps-watcher --log --nodaemon --sleep -1 --debug 2 <em>configuration-file</em></p>
|
||||
<pre>
|
||||
ps-watcher --log --nodaemon --sleep -1 --debug 2 *config-file*</pre>
|
||||
<p>For even more information and control try running the above under the
|
||||
perl debugger, e.g.</p>
|
||||
<p>perl -d ps-watcher --log --nodaemon --sleep -1 --debug 2 <em>configuration-file</em></p>
|
||||
<pre>
|
||||
perl -d ps-watcher --log --nodaemon --sleep -1 --debug 2 *config-file*</pre>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
|
@ -719,7 +603,7 @@ just plain lacking.</p>
|
|||
<p>Sometimes one will see this error message when debug tracing is turned on:</p>
|
||||
<pre>
|
||||
** debug ** Something wrong getting ps variables</pre>
|
||||
<p>This just means that the process died betwee the time ps-watcher first
|
||||
<p>This just means that the process died between the time ps-watcher first
|
||||
saw the existence of the process and the time that it queried
|
||||
variables.</p>
|
||||
<p>
|
||||
|
@ -729,7 +613,7 @@ variables.</p>
|
|||
<p>See also <em>ps(1)</em> and <em>syslogd(8)</em>.</p>
|
||||
<p>Another cool program doing ps-like things is <code>xps</code>. Well okay, it's
|
||||
another program I distributed. It shows the process tree dynamically
|
||||
updated using X Motif and tries to display the output ``attractively''
|
||||
updated using X Motif and tries to display the output "attractively"
|
||||
but fast. You can the find the homepage at
|
||||
<a href="http://motif-pstree.sourceforge.net">http://motif-pstree.sourceforge.net</a> and it download via
|
||||
<a href="http://prdownloads.sourceforge.net/motif-pstree?sort_by=date&sort=desc">http://prdownloads.sourceforge.net/motif-pstree</a></p>
|
||||
|
@ -737,14 +621,14 @@ but fast. You can the find the homepage at
|
|||
</p>
|
||||
<hr />
|
||||
<h1><a name="author">AUTHOR</a></h1>
|
||||
<p>Rocky Bernstein (<a href="mailto:rocky@cpan.org">rocky@cpan.org</a>)</p>
|
||||
<p>Rocky Bernstein (<a href="mailto:rocky@gnu.org">rocky@gnu.org</a>)</p>
|
||||
<p>
|
||||
</p>
|
||||
<hr />
|
||||
<h1><a name="copyright">COPYRIGHT</a></h1>
|
||||
<pre>
|
||||
Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006
|
||||
Rocky Bernstein, email: rocky@cpan.org.
|
||||
Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006, 2008
|
||||
Rocky Bernstein, email: rocky@gnu.org.
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!@PERL@ -w
|
||||
# -*- Perl -*-
|
||||
# $Id: post-configure.in,v 1.10 2006/03/10 19:07:05 rockyb Exp $
|
||||
# $Id: post-configure.in,v 1.11 2008/12/17 19:28:14 rockyb Exp $
|
||||
require 5.006;
|
||||
sub touch_file($);
|
||||
|
||||
|
@ -72,7 +72,7 @@ sub touch_file($) {
|
|||
my $count = utime $now, $now, $file_name;
|
||||
exit ($count != 1);
|
||||
} else {
|
||||
open(FILE, ">", $file_name) || die "Can't open $file_name: $!";
|
||||
open(FILE, ">${file_name}") || die "Can't open $file_name: $!";
|
||||
close(FILE);
|
||||
exit $?;
|
||||
}
|
||||
|
|
107
ps-watcher
107
ps-watcher
|
@ -1,11 +1,11 @@
|
|||
#!/usr/bin/perl -w
|
||||
# -*- Perl -*-
|
||||
use diagnostics;
|
||||
my $vcid='$Id: ps-watcher.in.in,v 1.57 2006/03/10 19:07:05 rockyb Exp $ ';
|
||||
my $vcid='$Id: ps-watcher.in.in,v 1.63 2009/02/19 16:57:31 rockyb Exp $ ';
|
||||
# See usage subroutine or perlpod documentation below.
|
||||
|
||||
# Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006
|
||||
# Rocky Bernstein, email: rocky@cpan.org
|
||||
# Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006, 2008
|
||||
# Rocky Bernstein, email: rocky@gnu.org
|
||||
#
|
||||
# This program is free software; you can
|
||||
# redistribute it and/or modify it under the terms of the GNU General
|
||||
|
@ -23,8 +23,11 @@ my $vcid='$Id: ps-watcher.in.in,v 1.57 2006/03/10 19:07:05 rockyb Exp $ ';
|
|||
|
||||
use vars qw($program $ps_cmd $ps_cmdfull $ps_fullcmd_fmt @ps_vars $ps_dvars
|
||||
$0 $logopened $ps_args_fmt $args
|
||||
$count $pid $command $ps_arg_opts $DEVNULL %opts
|
||||
$count $pid $command $ps_arg_opts $DEVNULL %opts $PIDFILE
|
||||
);
|
||||
|
||||
$PIDFILE = "/var/run/ps-watcher.pid";
|
||||
|
||||
use strict;
|
||||
BEGIN { require 5.00503 }
|
||||
|
||||
|
@ -130,6 +133,7 @@ sub gather_psinfo();
|
|||
sub read_config($);
|
||||
sub check_config_file($);
|
||||
sub run_trigger($$$);
|
||||
sub check_pid();
|
||||
|
||||
init();
|
||||
process_options();
|
||||
|
@ -147,7 +151,12 @@ if (!defined($cfg)) {
|
|||
}
|
||||
|
||||
if ($opts{daemon}) {
|
||||
daemonize();
|
||||
if (! check_pid()) {
|
||||
exit 1;
|
||||
}
|
||||
if (! daemonize()) {
|
||||
exit 1;
|
||||
}
|
||||
}
|
||||
|
||||
install_handlers();
|
||||
|
@ -425,10 +434,12 @@ sub process_options() {
|
|||
}
|
||||
|
||||
open STDIN, $DEVNULL or die "Can't read $DEVNULL: $!";
|
||||
open STDOUT, ">>$opts{logfile}" or die "Can't write to $opts{logfile}: $!"
|
||||
if $opts{logfile} ne '';
|
||||
open STDERR, ">>$opts{logfile}" or die "Can't write to $opts{logfile}: $!"
|
||||
if $opts{logfile} ne '';
|
||||
if ($opts{logfile} ne '') {
|
||||
open STDOUT, ">>$opts{logfile}" or
|
||||
die "Can't write STDOUT to $opts{logfile}: $!";
|
||||
open STDERR, ">>&STDOUT" or
|
||||
die "Can't write STDERR to $opts{logfile}: $!";
|
||||
}
|
||||
}
|
||||
|
||||
# Signal handling..
|
||||
|
@ -576,7 +587,7 @@ sub gather_psinfo() {
|
|||
# Show the CVS version id string and quit.
|
||||
sub show_version() {
|
||||
print "$vcid
|
||||
Copyright (C) 2000, 2002, 2003, 2004, 2006 Rocky Bernstein.
|
||||
Copyright (C) 2000, 2002, 2003, 2004, 2006, 2008 Rocky Bernstein.
|
||||
This is free software; see the source for copying conditions.
|
||||
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
|
||||
PARTICULAR PURPOSE.
|
||||
|
@ -584,14 +595,62 @@ PARTICULAR PURPOSE.
|
|||
exit 10;
|
||||
}
|
||||
|
||||
sub check_pid() {
|
||||
if (-f $PIDFILE) {
|
||||
if (open(PID,$PIDFILE)) {
|
||||
my $pid = <PID>;
|
||||
if (!close(PID)) {
|
||||
logger("Unable to close file handle PID for file '$PIDFILE': $!");
|
||||
return;
|
||||
}
|
||||
if (-f "/proc/$pid/stat") {
|
||||
if (open(FH,"/proc/$pid/stat")) {
|
||||
my $line = <FH>;
|
||||
if (!close(FH)) {
|
||||
logger("Unable to close file handle FH for file '/proc/$pid/stat': $!");
|
||||
return;
|
||||
}
|
||||
if ($line =~ /\d+[^(]*\((.*)\)\s*/) {
|
||||
my $process = $1;
|
||||
if ($process =~ /^$program$/) {
|
||||
logger("$program already running at PID $pid; exiting.");
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
logger("Unable to open file handle FH for file '/proc/$pid/stat': $!");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
logger("Removing stale PID file.");
|
||||
unlink($PIDFILE);
|
||||
}
|
||||
}else{
|
||||
logger("Unable to open file handle PID for file '$PIDFILE': $!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
sub daemonize() {
|
||||
chdir '/' or die "Can't chdir to /: $!";
|
||||
defined(my $pid = fork) or die "Can't fork: $!";
|
||||
exit 0 if $pid;
|
||||
if (open(FH,">$PIDFILE")) {
|
||||
print FH $$;
|
||||
if (!close(FH)) {
|
||||
logger("Unable to close file handle FH for file '$PIDFILE': $!");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
logger("Unable to open file handle FH for file '$PIDFILE': $!");
|
||||
return;
|
||||
}
|
||||
use POSIX qw(setsid);
|
||||
setsid() or die "Can't start a new session: $!";
|
||||
umask 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
# Time configuration file was last read.
|
||||
|
@ -840,7 +899,7 @@ signal.
|
|||
|
||||
The format of a configuration file is a series of fully qualified
|
||||
filenames enclosed in square brackets followed by a number of
|
||||
parameter lines. Each parameter line has a parameter names followed by
|
||||
parameter lines. Each parameter line has a parameter name followed by
|
||||
an "equal" sign and finally value. That is:
|
||||
|
||||
# This is a comment line
|
||||
|
@ -1125,7 +1184,7 @@ The controlling tty.
|
|||
|
||||
Z<>
|
||||
|
||||
=item $szv
|
||||
=item $vsz
|
||||
|
||||
Virtual memory size of the process
|
||||
|
||||
|
@ -1225,13 +1284,13 @@ any daemon as an unprivileged user (or with no privileges), do it! If
|
|||
not, set the permissions on the configuration file and the directory
|
||||
it lives in.
|
||||
|
||||
This program can also run chrooted and there is a --path option that
|
||||
is available which can be used to set the executable search path. All
|
||||
commands used by ps-watcher are fully qualified, and I generally give a
|
||||
full execution path in my configuration file, so consider using the
|
||||
option --path=''.
|
||||
This program can also run chrooted and there is a C<--path> option
|
||||
that is available which can be used to set the executable search path.
|
||||
All commands used by ps-watcher are fully qualified, and I generally
|
||||
give a full execution path in my configuration file, so consider using
|
||||
the option C<--path=''>.
|
||||
|
||||
Commands that need to be run as root you can run via sudo. I often
|
||||
Commands that need to be run as root you can run via C<sudo>. I often
|
||||
run process accounting which tracks all commands run. Tripwire may be
|
||||
useful to track changed configuration files.
|
||||
|
||||
|
@ -1239,12 +1298,12 @@ useful to track changed configuration files.
|
|||
|
||||
To debug a configuration file the following options are useful:
|
||||
|
||||
ps-watcher --log --nodaemon --sleep -1 --debug 2 I<configuration-file>
|
||||
ps-watcher --log --nodaemon --sleep -1 --debug 2 *config-file*
|
||||
|
||||
For even more information and control try running the above under the
|
||||
perl debugger, e.g.
|
||||
|
||||
perl -d ps-watcher --log --nodaemon --sleep -1 --debug 2 I<configuration-file>
|
||||
perl -d ps-watcher --log --nodaemon --sleep -1 --debug 2 *config-file*
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
|
@ -1260,7 +1319,7 @@ Sometimes one will see this error message when debug tracing is turned on:
|
|||
|
||||
** debug ** Something wrong getting ps variables
|
||||
|
||||
This just means that the process died betwee the time ps-watcher first
|
||||
This just means that the process died between the time ps-watcher first
|
||||
saw the existence of the process and the time that it queried
|
||||
variables.
|
||||
|
||||
|
@ -1277,12 +1336,12 @@ L<http://prdownloads.sourceforge.net/motif-pstree?sort_by=date&sort=desc>
|
|||
|
||||
=head1 AUTHOR
|
||||
|
||||
Rocky Bernstein (rocky@cpan.org)
|
||||
Rocky Bernstein (rocky@gnu.org)
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006
|
||||
Rocky Bernstein, email: rocky@cpan.org.
|
||||
Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006, 2008
|
||||
Rocky Bernstein, email: rocky@gnu.org.
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
|
|
107
ps-watcher.in.in
107
ps-watcher.in.in
|
@ -1,11 +1,11 @@
|
|||
#!@PERL@ -w
|
||||
# -*- Perl -*-
|
||||
use diagnostics;
|
||||
my $vcid='$Id: ps-watcher.in.in,v 1.57 2006/03/10 19:07:05 rockyb Exp $ ';
|
||||
my $vcid='$Id: ps-watcher.in.in,v 1.63 2009/02/19 16:57:31 rockyb Exp $ ';
|
||||
# See usage subroutine or perlpod documentation below.
|
||||
|
||||
# Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006
|
||||
# Rocky Bernstein, email: rocky@cpan.org
|
||||
# Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006, 2008
|
||||
# Rocky Bernstein, email: rocky@gnu.org
|
||||
#
|
||||
# This program is free software; you can
|
||||
# redistribute it and/or modify it under the terms of the GNU General
|
||||
|
@ -23,8 +23,11 @@ my $vcid='$Id: ps-watcher.in.in,v 1.57 2006/03/10 19:07:05 rockyb Exp $ ';
|
|||
|
||||
use vars qw($program $ps_cmd $ps_cmdfull $ps_fullcmd_fmt @ps_vars $ps_dvars
|
||||
$0 $logopened $ps_args_fmt $args
|
||||
$count $pid $command $ps_arg_opts $DEVNULL %opts
|
||||
$count $pid $command $ps_arg_opts $DEVNULL %opts $PIDFILE
|
||||
);
|
||||
|
||||
$PIDFILE = "/var/run/ps-watcher.pid";
|
||||
|
||||
use strict;
|
||||
BEGIN { require 5.00503 }
|
||||
|
||||
|
@ -130,6 +133,7 @@ sub gather_psinfo();
|
|||
sub read_config($);
|
||||
sub check_config_file($);
|
||||
sub run_trigger($$$);
|
||||
sub check_pid();
|
||||
|
||||
init();
|
||||
process_options();
|
||||
|
@ -147,7 +151,12 @@ if (!defined($cfg)) {
|
|||
}
|
||||
|
||||
if ($opts{daemon}) {
|
||||
daemonize();
|
||||
if (! check_pid()) {
|
||||
exit 1;
|
||||
}
|
||||
if (! daemonize()) {
|
||||
exit 1;
|
||||
}
|
||||
}
|
||||
|
||||
install_handlers();
|
||||
|
@ -415,10 +424,12 @@ sub process_options() {
|
|||
}
|
||||
|
||||
open STDIN, $DEVNULL or die "Can't read $DEVNULL: $!";
|
||||
open STDOUT, ">>$opts{logfile}" or die "Can't write to $opts{logfile}: $!"
|
||||
if $opts{logfile} ne '';
|
||||
open STDERR, ">>$opts{logfile}" or die "Can't write to $opts{logfile}: $!"
|
||||
if $opts{logfile} ne '';
|
||||
if ($opts{logfile} ne '') {
|
||||
open STDOUT, ">>$opts{logfile}" or
|
||||
die "Can't write STDOUT to $opts{logfile}: $!";
|
||||
open STDERR, ">>&STDOUT" or
|
||||
die "Can't write STDERR to $opts{logfile}: $!";
|
||||
}
|
||||
}
|
||||
|
||||
# Signal handling..
|
||||
|
@ -566,7 +577,7 @@ sub gather_psinfo() {
|
|||
# Show the CVS version id string and quit.
|
||||
sub show_version() {
|
||||
print "$vcid
|
||||
Copyright (C) 2000, 2002, 2003, 2004, 2006 Rocky Bernstein.
|
||||
Copyright (C) 2000, 2002, 2003, 2004, 2006, 2008 Rocky Bernstein.
|
||||
This is free software; see the source for copying conditions.
|
||||
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
|
||||
PARTICULAR PURPOSE.
|
||||
|
@ -574,14 +585,62 @@ PARTICULAR PURPOSE.
|
|||
exit 10;
|
||||
}
|
||||
|
||||
sub check_pid() {
|
||||
if (-f $PIDFILE) {
|
||||
if (open(PID,$PIDFILE)) {
|
||||
my $pid = <PID>;
|
||||
if (!close(PID)) {
|
||||
logger("Unable to close file handle PID for file '$PIDFILE': $!");
|
||||
return;
|
||||
}
|
||||
if (-f "/proc/$pid/stat") {
|
||||
if (open(FH,"/proc/$pid/stat")) {
|
||||
my $line = <FH>;
|
||||
if (!close(FH)) {
|
||||
logger("Unable to close file handle FH for file '/proc/$pid/stat': $!");
|
||||
return;
|
||||
}
|
||||
if ($line =~ /\d+[^(]*\((.*)\)\s*/) {
|
||||
my $process = $1;
|
||||
if ($process =~ /^$program$/) {
|
||||
logger("$program already running at PID $pid; exiting.");
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
logger("Unable to open file handle FH for file '/proc/$pid/stat': $!");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
logger("Removing stale PID file.");
|
||||
unlink($PIDFILE);
|
||||
}
|
||||
}else{
|
||||
logger("Unable to open file handle PID for file '$PIDFILE': $!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
sub daemonize() {
|
||||
chdir '/' or die "Can't chdir to /: $!";
|
||||
defined(my $pid = fork) or die "Can't fork: $!";
|
||||
exit 0 if $pid;
|
||||
if (open(FH,">$PIDFILE")) {
|
||||
print FH $$;
|
||||
if (!close(FH)) {
|
||||
logger("Unable to close file handle FH for file '$PIDFILE': $!");
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
logger("Unable to open file handle FH for file '$PIDFILE': $!");
|
||||
return;
|
||||
}
|
||||
use POSIX qw(setsid);
|
||||
setsid() or die "Can't start a new session: $!";
|
||||
umask 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
# Time configuration file was last read.
|
||||
|
@ -830,7 +889,7 @@ signal.
|
|||
|
||||
The format of a configuration file is a series of fully qualified
|
||||
filenames enclosed in square brackets followed by a number of
|
||||
parameter lines. Each parameter line has a parameter names followed by
|
||||
parameter lines. Each parameter line has a parameter name followed by
|
||||
an "equal" sign and finally value. That is:
|
||||
|
||||
# This is a comment line
|
||||
|
@ -1105,7 +1164,7 @@ The controlling tty.
|
|||
|
||||
Z<>
|
||||
|
||||
=item $szv
|
||||
=item $vsz
|
||||
|
||||
Virtual memory size of the process
|
||||
|
||||
|
@ -1205,13 +1264,13 @@ any daemon as an unprivileged user (or with no privileges), do it! If
|
|||
not, set the permissions on the configuration file and the directory
|
||||
it lives in.
|
||||
|
||||
This program can also run chrooted and there is a --path option that
|
||||
is available which can be used to set the executable search path. All
|
||||
commands used by @PACKAGE@ are fully qualified, and I generally give a
|
||||
full execution path in my configuration file, so consider using the
|
||||
option --path=''.
|
||||
This program can also run chrooted and there is a C<--path> option
|
||||
that is available which can be used to set the executable search path.
|
||||
All commands used by @PACKAGE@ are fully qualified, and I generally
|
||||
give a full execution path in my configuration file, so consider using
|
||||
the option C<--path=''>.
|
||||
|
||||
Commands that need to be run as root you can run via sudo. I often
|
||||
Commands that need to be run as root you can run via C<sudo>. I often
|
||||
run process accounting which tracks all commands run. Tripwire may be
|
||||
useful to track changed configuration files.
|
||||
|
||||
|
@ -1219,12 +1278,12 @@ useful to track changed configuration files.
|
|||
|
||||
To debug a configuration file the following options are useful:
|
||||
|
||||
@PACKAGE@ --log --nodaemon --sleep -1 --debug 2 I<configuration-file>
|
||||
@PACKAGE@ --log --nodaemon --sleep -1 --debug 2 *config-file*
|
||||
|
||||
For even more information and control try running the above under the
|
||||
perl debugger, e.g.
|
||||
|
||||
perl -d @PACKAGE@ --log --nodaemon --sleep -1 --debug 2 I<configuration-file>
|
||||
perl -d @PACKAGE@ --log --nodaemon --sleep -1 --debug 2 *config-file*
|
||||
|
||||
=head1 BUGS
|
||||
|
||||
|
@ -1240,7 +1299,7 @@ Sometimes one will see this error message when debug tracing is turned on:
|
|||
|
||||
** debug ** Something wrong getting ps variables
|
||||
|
||||
This just means that the process died betwee the time @PACKAGE@ first
|
||||
This just means that the process died between the time @PACKAGE@ first
|
||||
saw the existence of the process and the time that it queried
|
||||
variables.
|
||||
|
||||
|
@ -1257,12 +1316,12 @@ L<http://prdownloads.sourceforge.net/motif-pstree?sort_by=date&sort=desc>
|
|||
|
||||
=head1 AUTHOR
|
||||
|
||||
Rocky Bernstein (rocky@cpan.org)
|
||||
Rocky Bernstein (rocky@gnu.org)
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006
|
||||
Rocky Bernstein, email: rocky@cpan.org.
|
||||
Copyright (C) 2000, 2002, 2003, 2004, 2005, 2006, 2008
|
||||
Rocky Bernstein, email: rocky@gnu.org.
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
|
|
19
samples/root-procs.ini
Normal file
19
samples/root-procs.ini
Normal file
|
@ -0,0 +1,19 @@
|
|||
# $Id: root-procs.ini,v 1.1 2008/12/25 17:01:50 rockyb Exp $
|
||||
# Test perl-action, prolog and epilog
|
||||
# Rather the name of the interpreter is listed (e.g. bash or perl)
|
||||
# Here's how you can match against a script.
|
||||
# Look for my processes: ps-watcher.
|
||||
[$PROLOG]
|
||||
perl-action = $my_count=0; $root_procs=0;
|
||||
[.*]
|
||||
perl-action = <<EOP
|
||||
if ($uid == 0) {
|
||||
$root_procs++;
|
||||
}
|
||||
EOP
|
||||
occurs = every
|
||||
[$EPILOG]
|
||||
perl-action = <<EOP1
|
||||
system("logger You have $root_procs root processes running");
|
||||
EOP1
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
# Makefile.in generated by automake 1.9.6 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.10.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
@ -31,15 +31,11 @@
|
|||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
##############################################################################
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
top_builddir = ..
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
INSTALL = @INSTALL@
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
|
@ -79,6 +75,7 @@ DEFS = @DEFS@
|
|||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
|
@ -88,9 +85,8 @@ LIBS = @LIBS@
|
|||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
MAINT = @MAINT@
|
||||
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
|
||||
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
|
@ -115,7 +111,10 @@ SET_MAKE = @SET_MAKE@
|
|||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
ac_ct_STRIP = @ac_ct_STRIP@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
|
@ -125,28 +124,39 @@ build_alias = @build_alias@
|
|||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
MOSTLYCLEANFILES = *~
|
||||
check_SCRIPTS = 01.pod.t args.t basic.t count.t full.t paction.t
|
||||
check_DATA = args.cnf basic.cnf \
|
||||
|
@ -199,7 +209,6 @@ full.t: $(top_builddir)/config.status $(srcdir)/full.t.in
|
|||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||
basic.cnf: $(top_builddir)/config.status $(srcdir)/basic.cnf.in
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
|
||||
uninstall-info-am:
|
||||
tags: TAGS
|
||||
TAGS:
|
||||
|
||||
|
@ -208,22 +217,21 @@ CTAGS:
|
|||
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
case $$file in \
|
||||
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
$(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
|
||||
esac; \
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test "$$dir" != "$$file" && test "$$dir" != "."; then \
|
||||
dir="/$$dir"; \
|
||||
$(mkdir_p) "$(distdir)$$dir"; \
|
||||
else \
|
||||
dir=''; \
|
||||
fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
|
@ -284,12 +292,20 @@ info-am:
|
|||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
@ -308,16 +324,19 @@ ps: ps-am
|
|||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-info-am
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: all all-am check check-am clean clean-generic distclean \
|
||||
distclean-generic distdir dvi dvi-am html html-am info info-am \
|
||||
install install-am install-data install-data-am install-exec \
|
||||
install-exec-am install-info install-info-am install-man \
|
||||
install install-am install-data install-data-am install-dvi \
|
||||
install-dvi-am install-exec install-exec-am install-html \
|
||||
install-html-am install-info install-info-am install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \
|
||||
uninstall-info-am
|
||||
mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am
|
||||
|
||||
|
||||
all:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: paction.cnf,v 1.1 2004/01/15 03:00:32 rockyb Exp $
|
||||
# $Id: paction.cnf,v 1.2 2008/12/25 16:42:49 rockyb Exp $
|
||||
# Test perl-action, prolog and epilog
|
||||
# Rather the name of the interpreter is listed (e.g. bash or perl)
|
||||
# Here's how you can match against a script.
|
||||
|
@ -6,12 +6,16 @@
|
|||
[$PROLOG]
|
||||
perl-action = $my_count=0; $root_procs=0;
|
||||
[.*]
|
||||
perl-action = $my_count++; $root_procs++ if $uid == 0
|
||||
perl-action = <<EOP
|
||||
if ($uid == 0) {
|
||||
$my_count++; $root_procs++;
|
||||
}
|
||||
EOP
|
||||
occurs = every
|
||||
[$EPILOG]
|
||||
trigger = <<EOT
|
||||
$my_count > 0 && $my_count < $count &&
|
||||
$root_procs > 0 && $my_count > $root_procs
|
||||
$root_procs > 0 && $my_count >= $root_procs
|
||||
EOT
|
||||
action = echo "ok 1"
|
||||
|
||||
|
|
Loading…
Reference in a new issue