Usually, when you encounter delayed performance on your application, or hanging, you can get several pstacks of that process.
Reviewing those pstacks, you can narrow down the causes of the application issues. Common causes include infinite loops, too many retires of unsuccessful operations, time-consuming tasks, deadlock resulting from locks, and conditional variables. Sometimes, reviewing the pstacks may not explain delayed performance or hanging, and could be a result of system issues or other processes. At this point, you need to get the system-wide logs to further investigate.
/var/logdirectory. Any other applications that you may later install on your system will most likely throw their log messages here. Once you log into your system, use the the
ls -l /var/logcommand to view the contents of this directory.





CollectLog.shfile:
# !/bin/bash # Usage: ./CollectLog.sh # This script needs to be run during slowness/hang # This script collects below 3 kinds of logs: # 1. top logs in thread level every 5 seconds in 5 minutes # 2. iotop logs every 5 seconds in 2.5 minutes # 3. sosreport log # There are 3 files: sosreport-xxxx-xxxx.tar.xz, topdata.log # and iotopdata.log will be generated after script execution done. echo "CatchingTopData every 5 seconds in 5 minutes ..." top -H -c -b -d 5 -n 60 > topdata.log & iotop -b -d 5 -n 30 > iotopdata.log & sosreport echo "waiting for topdata collecting to be done..." sleep 300 echo "all the log has been collected!"
./CollectLog.sh
./CollectLog.sh
sosreport-xxxx-xxxx.tar.xz,
topdata.log, and
iotopdata.logare generated
top - 05:19:45 up 99 days, 6:06, 18 users, load average: 42.38, 28.31, 25.19 Threads: 3093 total, 11 running, 3082 sleeping, 0 stopped, 0 zombie %Cpu(s): 9.4 us, 22.3 sy, 0.0 ni, 37.2 id, 27.8 wa, 0.0 hi, 3.3 si, 0.0 st KiB Mem : 51579673+total, 23363131+free, 67859696 used, 21430572+buff/cache KiB Swap: 4063228 total, 2740772 free, 1322456 used. 44056601+avail Mem PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 34346 root 20 0 68.6g 53.7g 171296 R 97.8 10.9 0:15.72 MSTRSvr 36409 root 20 0 96368 5008 3008 R 96.8 0.0 0:12.49 perf 31797 root 0 -20 0 0 0 S 67.1 0.0 3:34.01 kworker/6:1H 34348 root 20 0 68.6g 53.7g 171296 R 59.1 10.9 0:07.63 MSTRSvr 36435 root 0 -20 0 0 0 R 26.5 0.0 0:00.83 kworker/6:2H …. 34351 root 20 0 68.6g 53.7g 171296 D 15.7 10.9 0:07.38 MSTRSvr 34349 root 20 0 68.6g 53.7g 171296 R 15.3 10.9 0:06.12 MSTRSvr 34350 root 20 0 68.6g 53.7g 171296 D 15.0 10.9 0:03.61 MSTRSvr 34347 root 20 0 68.6g 53.7g 171296 D 14.7 10.9 0:06.53 MSTRSvr … 36287 root 20 0 0 0 0 D 1.0 0.0 0:00.55 kworker/u256:3 … 35749 root 20 0 68.6g 53.7g 171296 D 0.3 10.9 0:00.02 MSTRSvr 36301 root 20 0 68.6g 53.7g 171296 D 0.3 10.9 0:00.04 MSTRSvr …
[] ? seq_vprintf+0x32/0x60 [] ? seq_printf+0x3d/0x40 [] rwsem_down_failed_common+0x95/0x1d0 [] ? arch_report_meminfo+0x6c/0x80 [] rwsem_down_read_failed+0x26/0x30 [] call_rwsem_down_read_failed+0x14/0x30 [] ? down_read+0x24/0x30 [] __do_page_fault+0x194/0x500 [] do_page_fault+0x3e/0xa0 [] page_fault+0x25/0x30 [] ? copy_user_enhanced_fast_string+0x6/0x10 [] ? seq_read+0x300/0x430 [] proc_reg_read+0x80/0xc0 [] vfs_read+0xb7/0x1a0 [] ? fget_light_pos+0x3f/0x50 [] ? system_call_after_swapgs+0xa2/0x152 [] sys_read+0x51/0xb0 [] ? system_call_after_swapgs+0xa2/0x152 [] ? system_call_after_swapgs+0xae/0x152 [] system_call_fastpath+0x35/0x3a [] ? system_call_after_swapgs+0xae/0x152
[] rwsem_down_failed_common+0x95/0x1d0 [] rwsem_down_read_failed+0x26/0x30 [] call_rwsem_down_read_failed+0x14/0x30 [] ? down_read+0x24/0x30 [] vx_rwlock+0x4e/0xe0 [vxfs] [] vx_write+0x1f6/0x380 [vxfs] [] vfs_write+0xba/0x1a0 [] ? fget_light_pos+0x3f/0x50 [] ? system_call_after_swapgs+0xa2/0x152 [] sys_write+0x51/0xb0 [] ? system_call_after_swapgs+0xa2/0x152 [] ? system_call_after_swapgs+0xae/0x152 [] system_call_fastpath+0x35/0x3a [] ? system_call_after_swapgs+0xae/0x152
vx_nospace - /dev/vx/xxx/xxxx/xxxx file system full (64 block extent),“ can be found in in
sosreport-mandar.xxxxx-xxxxxxxx/var/log/messages.
Linux Programmer's Manual