mhearse has asked for the wisdom of the Perl Monks concerning the following question:
Howdy monks. I'm trying to benchmark syslogd on my loghost. I've created a shell script to do this, but I really want to beat the machine up. With Perl, can I use fork to increase the number of messages sent to syslogd (Within limits of course. The current script sends 3000 per minute)? I have never used fork before. As seen below, I am using the logger command to interact with syslogd. Thanks in advance.
#!/bin/sh start=`date "+%M:%S"` x=0 trap 'echo ""; echo "started at $start"; echo "finished at `date "+%M:%S"`"; echo "sent $x messages"; echo "found `grep TEST_MESSAGE /var/log/messages | wc -l` messag +es"; exit' 2 while() do logger -p syslog.notice TEST_MESSAGE_$x x=`expr $x + 1` echo sent $x done
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: help me fork
by Zaxo (Archbishop) on Jul 20, 2004 at 15:33 UTC | |
by mhearse (Chaplain) on Jul 20, 2004 at 17:00 UTC | |
Re: help me fork
by Joost (Canon) on Jul 20, 2004 at 13:14 UTC | |
| |
Re: help me fork
by mutated (Monk) on Jul 20, 2004 at 13:22 UTC | |
by tilly (Archbishop) on Jul 20, 2004 at 15:29 UTC | |
by mhearse (Chaplain) on Jul 20, 2004 at 15:50 UTC | |
by tilly (Archbishop) on Jul 20, 2004 at 15:57 UTC | |
by mhearse (Chaplain) on Jul 20, 2004 at 13:37 UTC | |
by mhearse (Chaplain) on Jul 20, 2004 at 13:47 UTC | |
by mutated (Monk) on Jul 20, 2004 at 14:24 UTC | |
Re: help me fork
by pbeckingham (Parson) on Jul 20, 2004 at 13:24 UTC |
Back to
Seekers of Perl Wisdom