#!/usr/bin/perl
#
# simple script to get the system process count via ps and wc and dump the
# value to mrtg
#
# Version: $Id: process-count,v 1.1 2001/06/26 11:41:35 als Exp $
#
# Author: Alexander Schreiber <als@thangorodrim.de>
#


my $command = '/bin/ps aux | /usr/bin/wc';
my $line;
my $count;

open (COUNT, "$command 2>&1|");
$line = <COUNT>;
close(COUNT);
$line =~ /^(\s+)(\d+)/;
$count = "$2";
$count -= 1;
print "$count\n0\n0\n";
