[WBEL-users] Hello, and possible LAN/NIC issue?
Kirby Bohling
kbohling@birddog.com
Tue, 6 Jul 2004 20:57:24 -0500
On Wed, Jul 07, 2004 at 07:06:55AM +0530, Sudev Barar wrote:
> On Tue, 2004-07-06 at 23:05, Kirby Bohling wrote:
> > On Tue, Jul 06, 2004 at 11:20:13AM +0100, Nigel Kendrick wrote:
> > > Greetings - first poster here so be gentle on me!
> > >
> > > Using WBEL with great success but come up against a small issue with
> > > performance that's driving me mad...
> > >
> > > I am running eGroupWare on a PIII-750 with 256MB RAM. The Web pages seem
> > > to be served very slowly - for example, the PHP page generation
> > > indicator on eGroupware says 'page generated in 0.nnn seconds', but the
> > > Web pages take sometimes 7-10 seconds to turn up on the client PC -
> > > we're connected directly on the same switch.
> >
> > Okay, there are several ways to attack this:
> >
> > 1. Start using timing wget on the local host on the slow machine:
> >
> > /usr/bin/time wget http://localhost/the/url/here
> [SNIP]
>
> Excellent idea! Only thing I realised was that time was in the path so
> the command shortened to:
> $time wget URL
>
> Thanks, it helped me pinpoint an issue that was nagging my mind. I hope
> Nigel also benefited.
Well, you say your new to Linux, so I'll point out that there is
actually a difference between "time wget" and "/usr/bin/time wget".
I'm reasonable sure it's actually a bash or bash v2.0 thing. "time"
in bash is a built in function, and a reserved word, thus if you use
"time" one result. If you use "/usr/bin/time", you get a different
result.
I believe "/usr/bin/time" is an old school UNIX program, while
"time" being built into the bash shell is a relatively recent
concept.
Here are the outputs:
[root@hawk root]# time echo "Hello World"
Hello World
real 0m0.000s
user 0m0.000s
sys 0m0.000s
[root@hawk root]# /usr/bin/time echo "Hello World"
Hello World
0.00user 0.00system 0:00.02elapsed 0%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (120major+13minor)pagefaults 0swaps
Notice how the /usr/bin/time has page faults, and CPU percentages?
Apparently, you can make "time" act that way if you want to via
"TIMEFORMAT" (it's in the bash man page).
/usr/bin/time has more information so I generally use it by default,
especially when using debugging (which I almost always am with
/usr/bin/time).
Just out of curiousity, what was wrong with Apache? I'll add it to
my mental list of things to check with slow Apache configs...
Kirby
> --
> Sudev Barar
> Learning Linux
>
> _______________________________________________
> Whitebox-users mailing list
> Whitebox-users@beau.org
> http://beau.org/mailman/listinfo/whitebox-users
>