从上面的输出可以看到,多个端口对外提供服务:
- Discovered open port 22/tcp on 127.0.0.1
- Discovered open port 8080/tcp on 127.0.0.1
- Discovered open port 25/tcp on 127.0.0.1
- Discovered open port 3306/tcp on 127.0.0.1
- Discovered open port 631/tcp on 127.0.0.1
其中,8080是Vesta发号器对外提供的服务,3306是mysql对外提供的服务。
07.Linux系统高级工具
1、pstack
pstack命令用来显示每个进程的调用栈。可以使用pstack来查看进程正在挂起的执行方法,也可以用来查看进程的本地线程堆栈,与JVM的jstack配合可以看到JVM线程运行的全景。
使用方式:
- pstack 2862
命令输出:
- pstack 9040 >> /tmp/pstack.log
-
- Thread 289 (Thread 0x7f8928bdb700 (LWP 9041)):
- #0 0x00000032a480ea5d in accept () from /lib64/libpthread.so.0
- #1 0x00007f88735eaad7 in NET_Accept () from /apps/product/jdk1.6.0_19/jre/lib/amd64/libnet.so
- #2 0x00007f88735e6ad0 in Java_java_net_PlainSocketImpl_socketAccept () from /apps/product/jdk1.6.0_19/jre/lib/amd64/libnet.so
- #3 0x00007f8921010c48 in ?? ()
- #4 0x00007f88fca90bd8 in ?? ()
- #5 0x00007f88fca90c20 in ?? ()
- #6 0x0000000000000001 in ?? ()
- #7 0x00007f8928bd9c28 in ?? ()
- #8 0x0000000000000000 in ?? ()
-
- Thread 288 (Thread 0x7f88809fe700 (LWP 9042)):
- #0 0x00000032a480b5bc in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
- #1 0x00007f89291b6757 in os::PlatformEvent::park() () from /apps/product/jdk1.6.0_19/jre/lib/amd64/server/libjvm.so
- #2 0x00007f892918fc45 in Monitor::IWait(Thread*, long) () from /apps/product/jdk1.6.0_19/jre/lib/amd64/server/libjvm.so
- #3 0x00007f892919040e in Monitor::wait(bool, long, bool) () from /apps/product/jdk1.6.0_19/jre/lib/amd64/server/libjvm.so
- #4 0x00007f8928f413b5 in GCTaskManager::get_task(unsigned int) () from /apps/product/jdk1.6.0_19/jre/lib/amd64/server/libjvm.so
- #5 0x00007f8928f42663 in GCTaskThread::run() () from /apps/product/jdk1.6.0_19/jre/lib/amd64/server/libjvm.so
- #6 0x00007f89291b702f in java_start(Thread*) () from /apps/product/jdk1.6.0_19/jre/lib/amd64/server/libjvm.so
- #7 0x00000032a48079d1 in start_thread () from /lib64/libpthread.so.0
- #8 0x00000032a40e886d in clone () from /lib64/libc.so.6
- ......
2、strace
系统调用工具,是Linux系统下的一款程序调试工具,用来监控一个应用程序所使用的
系统调用,通过它可以跟踪系统调用,让你熟悉一个Linux程序在背后是怎么工作的。
适用于想研究Linux底层的工作机制,或者JVM和Linux系统本身的bug导致的技术攻关的场景。
由于虚拟机有问题,没有收集到这部分的输出信息 :(
(编辑:ASP站长网)
|