"ps -ef" takes so long

"ps -ef" takes so long

Post by Life Learn » Mon, 07 Jun 2004 08:03:03



U5 running Solaris 8, runing "ps -ef" takes 66s to return process
list, whereas, "ps -e" acts normal, costs less than 1s. Any clue?
Thanks!
 
 
 

"ps -ef" takes so long

Post by Alan Coopersmit » Mon, 07 Jun 2004 08:37:53



|U5 running Solaris 8, runing "ps -ef" takes 66s to return process
|list, whereas, "ps -e" acts normal, costs less than 1s. Any clue?

Something wrong with nscd or your account information (NIS/NIS+/LDAP)
server perhaps?  ps with -f needs to look up account names for all those
uids.

--
________________________________________________________________________

http://www.csua.berkeley.edu/~alanc/    *    http://blogs.sun.com/alanc/
  Working for, but definitely not speaking for, Sun Microsystems, Inc.

 
 
 

"ps -ef" takes so long

Post by APA » Mon, 07 Jun 2004 14:04:50




> |U5 running Solaris 8, runing "ps -ef" takes 66s to return process
> |list, whereas, "ps -e" acts normal, costs less than 1s. Any clue?

> Something wrong with nscd or your account information (NIS/NIS+/LDAP)
> server perhaps?  ps with -f needs to look up account names for all those
> uids.

I have to agree with Alan. Probably your naming services are at fault.
How about you try trussing the ps -ef command?

eg truss -faeld -rall -vall -wall -o /tmp/psef.truss.out ps -ef

This truss should have timestamps on the system calls. If it's in the
door calls, then it's almost certainly your naming services.

alan.
--
Alan Hargreaves
Senior Technical Support Specialist/VOSJEC Engineer
Product Technical Support (APAC)
Sun Microsystems

 
 
 

"ps -ef" takes so long

Post by Bernd Rasch » Wed, 16 Jun 2004 23:28:42



>U5 running Solaris 8, runing "ps -ef" takes 66s to return process
>list, whereas, "ps -e" acts normal, costs less than 1s. Any clue?

What is your directory service for `passwd`? In other words, what does
# grep passwd /etc/nsswitch.conf
yield? The differnce between the two commands could be that -f tries to
resolve the UIDs which takes a lot of time.

Cheers,
        Bernd

--
Bernd Raschke                                              NetAge Solutions GmbH
Opinions expressed herein are my own and may not represent those of my employer.