LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 799|回复: 2

How to watch a process?

[复制链接]
发表于 2004-8-29 00:25:11 | 显示全部楼层 |阅读模式
Hi,

When I executed a program in console, it turned to sleep at once (I got this information by ps -elf). Is there a program like truss in Solaris which provide a method to watch what happens executing another program?

Thanks.

Regards,
herberteuler
发表于 2004-8-29 00:46:53 | 显示全部楼层
pstree , top
 楼主| 发表于 2004-8-29 00:57:26 | 显示全部楼层
Thanks for your reply. But I think you misunderstood me. Please look at this example of result executing truss ls -f (just the last 20 lines):

  1. fstat64(2, 0xFFBEE2C8) = 0
  2. ioctl(2, TCGETA, 0xFFBEE254) Err#22 EINVAL
  3. read(2, " t o t a l 2 5 9 2 0 0".., 5120) = 5120
  4. llseek(2, 0xFFFFFFFFFFFFEC0D, SEEK_CUR) Err#29 ESPIPE
  5. close(2) = 0
  6. waitid(P_PID, 1658, 0xFFBEE2D8, 0403 ) = 0
  7. read(5, " i t\n p o l 1 9 9 8 0 4".., 5120) = 5120
  8. read(5, " l 1 9 9 8 0 3 1 0 - 1 2".., 5120) = 5120
  9. read(5, " 0 7 1 7 - 1 2 3 1 _ k 4".., 5120) = 5120
  10. read(5, " 1 2 3 1 _ c h l 4 9 0 _".., 5120) = 5120
  11. read(5, " k 4 9 0 _ m 5 . 8 b i t".., 5120) = 5120
  12. read(5, " 0 _ m 5 . 8 b i t\n p o".., 5120) = 2771
  13. read(5, 0x00074FE4, 5120) = 0
  14. fork() = 1660
  15. waitid(P_PID, 1660, 0xFFBEE2C8, WEXITED|WTRAPPED) = 0
  16. chdir("/root/new/local/data/prerror_m5") = 0
  17. llseek(5, 0, SEEK_CUR) Err#29 ESPIPE
  18. close(5) = 0
  19. llseek(0, 0, SEEK_CUR) = 18671
  20. _exit(0)
复制代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表