#!/usr/local/perl
eval "exec /usr/local/perl -S $0 $*"
    if $running_under_some_shell;
			# this emulates #! processing on NIH machines.
			# (remove #! line above if indigestible)

#   This perl script is designed to do load statistics on bloom-beacon.

	open(stdout,">>/usr/lib/news/logstats");
	print "---------------------------\n";
	print `uptime`;

	$discussd = 0;
	$nntpd = 0;
	open(PS,"ps ax |");
	while (<PS>) {
		if (/discussd/) {
			$discussd++;
		}
		if (/nntpd/) {
			$nntpd++;
		}
	}		
	printf("%d %d\n", $nntpd, $discussd);
