Erlang监控工具(二)etop

  file:///D:/Program%20Files/erl5.10.4/lib/observer-1.3.1.2/doc/html/etop.html
  etop只在linux操作系统下可用。它相当于linux下的top工具,用于查看进程占用内存,调用次数等信息

  参数:
  output (value:text..):输出格式

  lines (value:integer()):显示多少行

  interval (value:integer()):刷新间隔

  accumulate (value:boolean()):时间和调用次数累加

  sort (runtime|reductions|memory|msg_q):排序方式
  
  使用方法:etop -node a@host -setccokie mycookie

示例1(通过-node方式连接到监测节点):
1:创建一个被监测节点[email protected]


2:执行etop
   查找etop所在目录,并创建一个快捷方式

   修改etop文件,将它的sname改成name


   执行:


示例2(通过remsh方式连入监测节点,由于etop会造成进程阻塞,所以需要spawn一个进程)


最后,我们通过etop看到kernel_sup使用内存最多,我们可以去e1节点查看该进程的详细信息
注意:etop显示的pid为<xxxx.11.0>,我们调用erlang:process_info(pid(0,11,0)).



猜你喜欢

转载自room-bb.iteye.com/blog/2289334