[24411] 2015-10-23_手把手教你用strace诊断问题

文档创建者:s7ckTeam
浏览次数:11
最后更新:2025-01-18
2015-10-23_手把手教你用strace诊断问题   s t r a c e   L i n u x   2 0 1 5 - 1 0 - 2 3   s t r a c e     s t r a c e   s t r a c e   s t r a c e     t o p  
t o p   t o p     C P U     C P U     C P U     P H P     P H P   S W A P     C P U     C P U   s y u s L i n u x   s t r a c e l t r a c e s t r a c e   s t r a c e   s t r a c e   1 s h i f t + p 1 .   s h e l l >   s t r a c e   - p   < P I D >
s t r a c e   - c p   C P U     c l o n e     c l o n e T e s t r a c e   - T   - e   c l o n e   - p   c l o n e     c l o n e     m a n   1 .   s h e l l >   s t r a c e   - c p   < P I D > c 1 .   s h e l l >   s t r a c e   - T   - e   c l o n e   - p   < P I D >
h t t p : / / h u o d i n g . c o m / 2 0 1 5 / 1 0 / 1 6 / 4 7 4   @ c l o n e ( )   c r e a t e s   a   n e w   p r o c e s s ,   i n   a   m a n n e r   s i m i l a r   t o   f o r k ( 2 ) .   I t   i s   a c t u a l l y   a   l i b r a r y   f u n c t i o n   l a y e r e d   o n   t o p o f   t h e   u n d e r l y i n g   c l o n e ( )   s y s t e m   c a l l ,   h e r e i n a f t e r   r e f e r r e d   t o   a s   s y s _ c l o n e .   A   d e s c r i p t i o n   o f   s y s _ c l o n e   i s g i v e n   t o w a r d s   t h e   e n d   o f   t h i s   p a g e . U n l i k e   f o r k ( 2 ) ,   t h e s e   c a l l s   a l l o w   t h e   c h i l d   p r o c e s s   t o   s h a r e   p a r t s   o f   i t s   e x e c u t i o n   c o n t e x t   w i t h   t h e   c a l l i n g p r o c e s s ,   s u c h   a s   t h e   m e m o r y   s p a c e ,   t h e   t a b l e   o f   f i l e   d e s c r i p t o r s ,   a n d   t h e   t a b l e   o f   s i g n a l   h a n d l e r s .   ( N o t e   t h a t o n   t h i s   m a n u a l   p a g e ,   c a l l i n g   p r o c e s s   n o r m a l l y   c o r r e s p o n d s   t o   p a r e n t   p r o c e s s .   B u t   s e e   t h e   d e s c r i p t i o n   o f C L O N E _ P A R E N T   b e l o w . )   P H P     e x e c     c l o n e     s t r a c e     l t r a c e 1 .   s h e l l >   s t r a c e   - e c l o n e   p h p   - r   ' e x e c ( " l s " ) ; '

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则